Contact Form 7 Skins - Version 2.3

Version Description

  • 2020-05-20 =

  • FEATURE: Make adding asterisk to required fields optional

  • TWEAK: Make CF7 Skins Settings clearer for users

  • TWEAK: Enable translation of all JavaScript

  • TWEAK: Minimize built JS & CSS files

Download this release

Release Info

Developer buzztone
Plugin Icon 128x128 Contact Form 7 Skins
Version 2.3
Comparing to
See all releases

Code changes from version 2.2.2 to 2.3

css/visual.min.css ADDED
@@ -0,0 +1,709 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .edit___bkz5l{background:#fff;padding:15px;margin:0 0 7%}.edit___bkz5l h3{text-transform:uppercase}.attribute___2PJGD,.row___1Ar16{display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-pack:distribute;justify-content:space-around}.label___1U6ET{width:35%;font-weight:600}.label___1U6ET>label{display:inline-block;margin-top:5px}.value___18pw0{width:65%}.label___1U6ET,.value___18pw0{margin:7px 0}.value___18pw0 select[name=cf7TagType]{display:block;margin-bottom:5px}.value___18pw0 input[type=date],.value___18pw0 input[type=number],.value___18pw0 input[type=text],.value___18pw0 textarea{width:100%;font-size:inherit}.value___18pw0 .dashicons{border:1px solid #ddd;width:18px;height:18px!important;line-height:19px!important;font-size:14px;border-radius:2px;cursor:pointer;background:#f2f2f2}.row___1Ar16{margin:0 0 4px -15px}.row___1Ar16 .dashicons-no,.row___1Ar16 input[type=checkbox],.row___1Ar16 input[type=radio]{margin-top:4px}.row___1Ar16 .control___VE4u5,.row___1Ar16 .default___3AYQQ,.row___1Ar16 .option___3AxB8,.row___1Ar16 .range___4LQlA{padding-left:15px;-webkit-box-sizing:border-box;box-sizing:border-box}.row___1Ar16 .default___3AYQQ{text-align:center}.row___1Ar16 .control___VE4u5{text-align:right;width:15%}.row___1Ar16 .default___3AYQQ{width:25%}.row___1Ar16 .range___4LQlA{width:50%}.row___1Ar16 .option___3AxB8{width:60%}.description___2sqDf{font-size:12px;line-height:15px;color:#898989;margin-bottom:0}.fieldChangeSelect___3gt-v{text-transform:uppercase;font-weight:700;margin:1em 0}.visualTextarea___2SgMU{width:100%;margin:7px 0}.visualTextarea___2SgMU textarea{width:100%}.rowWrapper___17qG0{padding:10px 10px 10px 0;height:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.row___2vavz{height:100%;white-space:nowrap;cursor:default;display:-ms-flexbox;display:flex}.row___2vavz>*{-webkit-box-sizing:border-box;box-sizing:border-box}.rowCancelPad___2-QVb,.rowLandingPad___2lizY{border:none!important;-webkit-box-shadow:none!important;box-shadow:none!important;outline:none!important}.rowCancelPad___2-QVb *,.rowLandingPad___2lizY *{opacity:0!important}.rowCancelPad___2-QVb:before,.rowLandingPad___2lizY:before{background-color:#add8e6;border:3px dashed #fff;content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}.rowCancelPad___2-QVb:before{background-color:#e6a8ad}.rowSearchMatch___2TybL{outline:3px solid #0080ff}.rowSearchFocus___1I3hg{outline:3px solid #fc6421}.loadingHandle___eKSbl,.moveHandle___3aHxV,.rowContents___2A7LI,.rowLabel___3fxle,.rowLabel_NoFlex___21cK3,.rowToolbar___eNAy7,.rowToolbar_NoFlex___UIDnZ,.toolbarButton___guIr-{display:inline-block;vertical-align:middle}.rowContents___2A7LI{position:relative;height:100%;border:1px solid #bbb;border-left:none;-webkit-box-shadow:0 2px 2px -2px;box-shadow:0 2px 2px -2px;border-radius:2px;min-width:230px;-ms-flex:1 0 auto;flex:1 0 auto;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background-color:#fff}.rowContentsDragDisabled___2crbS{border-left:1px solid #bbb}.rowLabel___3fxle{-ms-flex:0 1 auto;flex:0 1 auto;padding-right:20px}.rowToolbar___eNAy7{-ms-flex:0 1 auto;flex:0 1 auto;display:-ms-flexbox;display:flex}.loadingHandle___eKSbl,.moveHandle___3aHxV{height:100%;width:44px;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MiIgaGVpZ2h0PSI0MiI+PGcgc3Ryb2tlPSIjRkZGIiBzdHJva2Utd2lkdGg9IjIuOSIgPjxwYXRoIGQ9Ik0xNCAxNS43aDE0LjQiLz48cGF0aCBkPSJNMTQgMjEuNGgxNC40Ii8+PHBhdGggZD0iTTE0IDI3LjFoMTQuNCIvPjwvZz4KPC9zdmc+");background-repeat:no-repeat;background-position:50%;background-color:#d9d9d9;border:1px solid #aaa;-webkit-box-shadow:0 2px 2px -2px;box-shadow:0 2px 2px -2px;cursor:move;border-radius:1px;z-index:1}.loadingHandle___eKSbl{cursor:default;background:#d9d9d9}@-webkit-keyframes pointFade___2hjjQ{0%,19.999%,to{opacity:0}20%{opacity:1}}@keyframes pointFade___2hjjQ{0%,19.999%,to{opacity:0}20%{opacity:1}}.loadingCircle___1l2TV{width:80%;height:80%;margin:10%;position:relative}.loadingCirclePoint___1r25r{width:100%;height:100%;position:absolute;left:0;top:0}.loadingCirclePoint___1r25r:before{content:"";display:block;margin:0 auto;width:11%;height:30%;background-color:#fff;border-radius:30%;-webkit-animation:pointFade___2hjjQ .8s infinite ease-in-out both;animation:pointFade___2hjjQ .8s infinite ease-in-out both}.loadingCirclePoint___1r25r:first-of-type{-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg)}.loadingCirclePoint___1r25r:first-of-type:before,.loadingCirclePoint___1r25r:nth-of-type(7):before{-webkit-animation-delay:-.8s;animation-delay:-.8s}.loadingCirclePoint___1r25r:nth-of-type(2){-webkit-transform:rotate(30deg);-ms-transform:rotate(30deg);transform:rotate(30deg)}.loadingCirclePoint___1r25r:nth-of-type(8){-webkit-transform:rotate(210deg);-ms-transform:rotate(210deg);transform:rotate(210deg)}.loadingCirclePoint___1r25r:nth-of-type(2):before,.loadingCirclePoint___1r25r:nth-of-type(8):before{-webkit-animation-delay:-666.66667ms;animation-delay:-666.66667ms}.loadingCirclePoint___1r25r:nth-of-type(3){-webkit-transform:rotate(60deg);-ms-transform:rotate(60deg);transform:rotate(60deg)}.loadingCirclePoint___1r25r:nth-of-type(9){-webkit-transform:rotate(240deg);-ms-transform:rotate(240deg);transform:rotate(240deg)}.loadingCirclePoint___1r25r:nth-of-type(3):before,.loadingCirclePoint___1r25r:nth-of-type(9):before{-webkit-animation-delay:-.53333333s;animation-delay:-.53333333s}.loadingCirclePoint___1r25r:nth-of-type(4){-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.loadingCirclePoint___1r25r:nth-of-type(10){-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.loadingCirclePoint___1r25r:nth-of-type(4):before,.loadingCirclePoint___1r25r:nth-of-type(10):before{-webkit-animation-delay:-.4s;animation-delay:-.4s}.loadingCirclePoint___1r25r:nth-of-type(5){-webkit-transform:rotate(120deg);-ms-transform:rotate(120deg);transform:rotate(120deg)}.loadingCirclePoint___1r25r:nth-of-type(11){-webkit-transform:rotate(300deg);-ms-transform:rotate(300deg);transform:rotate(300deg)}.loadingCirclePoint___1r25r:nth-of-type(5):before,.loadingCirclePoint___1r25r:nth-of-type(11):before{-webkit-animation-delay:-.26666667s;animation-delay:-.26666667s}.loadingCirclePoint___1r25r:nth-of-type(6){-webkit-transform:rotate(150deg);-ms-transform:rotate(150deg);transform:rotate(150deg)}.loadingCirclePoint___1r25r:nth-of-type(12){-webkit-transform:rotate(330deg);-ms-transform:rotate(330deg);transform:rotate(330deg)}.loadingCirclePoint___1r25r:nth-of-type(6):before,.loadingCirclePoint___1r25r:nth-of-type(12):before{-webkit-animation-delay:-.13333333s;animation-delay:-.13333333s}.loadingCirclePoint___1r25r:nth-of-type(7){-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.loadingCirclePoint___1r25r:nth-of-type(13){-webkit-transform:rotate(1turn);-ms-transform:rotate(1turn);transform:rotate(1turn)}.loadingCirclePoint___1r25r:nth-of-type(7):before,.loadingCirclePoint___1r25r:nth-of-type(13):before{-webkit-animation-delay:0ms;animation-delay:0ms}.rowTitle___xP1iu{font-weight:700}.rowTitleWithSubtitle___1nAVB{font-size:85%;display:block;height:.8rem}.rowSubtitle___DZ3Kg{font-size:70%;line-height:1}.collapseButton___3TInD,.expandButton___13gwd{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;position:absolute;border-radius:100%;-webkit-box-shadow:0 0 0 1px #000;box-shadow:0 0 0 1px #000;width:16px;height:16px;top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);cursor:pointer}.collapseButton___3TInD:focus,.expandButton___13gwd:focus{outline:none;-webkit-box-shadow:0 0 0 1px #000,0 0 1px 3px #83bef9;box-shadow:0 0 0 1px #000,0 0 1px 3px #83bef9}.collapseButton___3TInD:hover:not(:active),.expandButton___13gwd:hover:not(:active){background-size:24px;height:20px;width:20px}.collapseButton___3TInD{background:#fff url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCI+PGNpcmNsZSBjeD0iOSIgY3k9IjkiIHI9IjgiIGZpbGw9IiNGRkYiLz48ZyBzdHJva2U9IiM5ODk4OTgiIHN0cm9rZS13aWR0aD0iMS45IiA+PHBhdGggZD0iTTQuNSA5aDkiLz48L2c+Cjwvc3ZnPg==") no-repeat 50%}.expandButton___13gwd{background:#fff url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCI+PGNpcmNsZSBjeD0iOSIgY3k9IjkiIHI9IjgiIGZpbGw9IiNGRkYiLz48ZyBzdHJva2U9IiM5ODk4OTgiIHN0cm9rZS13aWR0aD0iMS45IiA+PHBhdGggZD0iTTQuNSA5aDkiLz48cGF0aCBkPSJNOSA0LjV2OSIvPjwvZz4KPC9zdmc+") no-repeat 50%}.row_NoFlex___3ne3N:before,.rowContents_NoFlex___3dzXT:before{content:"";display:inline-block;vertical-align:middle;height:100%}.rowContents_NoFlex___3dzXT{display:inline-block}.rowContents_NoFlex___3dzXT:after{content:"";display:inline-block;width:100%}.rowLabel_NoFlex___21cK3{width:50%}.rowToolbar_NoFlex___UIDnZ{text-align:right;width:50%}.lineChildren___bsU6e{height:100%;display:inline-block;position:absolute}.lineChildren___bsU6e:after{content:"";position:absolute;background-color:#000;width:1px;left:50%;bottom:0;height:10px}.rowContents___2A7LI{-webkit-box-shadow:none;box-shadow:none;padding:0 5px 0 10px;border-radius:0 2px 2px 0;-ms-flex-pack:justify;justify-content:space-between;background-color:#ffffe0}.rowContents___2A7LI .dashicons{line-height:normal!important;height:auto!important}.rowContentsEnd___2YYFR,.rowContentsStart___2W-mK{//:#fff;display:-ms-flexbox;display:flex}.InputItemType___2HW5H{font-weight:400;text-transform:uppercase;-ms-flex:0 1 auto;flex:0 1 auto;padding-right:20px;color:#888;padding-right:10px}.loadingHandle___eKSbl,.moveHandle___3aHxV{//:#7aeb7a url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MiIgaGVpZ2h0PSI0MiI+PGcgc3Ryb2tlPSIjRkZGIiBzdHJva2Utd2lkdGg9IjIuOSIgPjxwYXRoIGQ9Ik0xNCAxNS43aDE0LjQiLz48cGF0aCBkPSJNMTQgMjEuNGgxNC40Ii8+PHBhdGggZD0iTTE0IDI3LjFoMTQuNCIvPjwvZz4KPC9zdmc+") no-repeat center;-webkit-box-shadow:none;box-shadow:none;border-radius:2px 0 0 2px}.ItemName___3iin5{padding-left:10px;color:#777}.ItemLabel___w-LE6{//:#fff;padding:0 10px;white-space:nowrap;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;width:100px}.ItemIcon___15lvE{//:#fff;font-size:20px;font-weight:400;color:#777}.ItemIcon___15lvE,.ItemLabel___w-LE6{-ms-flex-item-align:center;align-self:center}.toolbarButton___guIr-{//:#fff;display:-ms-flexbox;display:flex}.cf7Tag___1KWua{background-color:#c9f4b0}.cf7sItem___3TlQ4{background-color:#e3eff3}.edited___GJ0sQ .cf7sItem___3TlQ4,.edited___GJ0sQ .cf7Tag___1KWua,.edited___GJ0sQ .moveHandle___3aHxV,.edited___GJ0sQ .rowContents___2A7LI{border-width:2px;border-color:#95ab95}.edited___GJ0sQ .cf7sItem___3TlQ4,.edited___GJ0sQ .cf7Tag___1KWua{background-color:#bfdfbf;border-radius:0 2.5px 2.5px 0}.edited___GJ0sQ .moveHandle___3aHxV{background-color:#b3b3b3;border-color:#849c84;border-radius:2.5px 0 0 2.5px}@media only screen and (min-width:800px){//(Use flex) .rowContents___2A7LI{//:400px}}@media only screen and (min-width:1200px){.rowContents___2A7LI{//:600px}}@media only screen and (min-width:1400px){.rowContents___2A7LI{//:800px}}/*
2
+ @font-face {
3
+ font-family: 'FontAwesome';
4
+ src: url('https://cdn.bootcss.com/font-awesome/4.2.0/fonts/fontawesome-webfont.eot?v=4.2.0');
5
+ src: url('https://cdn.bootcss.com/font-awesome/4.2.0/fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'), url('https://cdn.bootcss.com/font-awesome/4.2.0/fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'), url('https://cdn.bootcss.com/font-awesome/4.2.0/fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'), url('https://cdn.bootcss.com/font-awesome/4.2.0/fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg');
6
+ font-weight: normal;
7
+ font-style: normal;
8
+ } */
9
+ .rc-menu {
10
+ outline: none;
11
+ margin-bottom: 0;
12
+ padding-left: 0;
13
+ list-style: none;
14
+ border: 1px solid #d9d9d9;
15
+ box-shadow: 0 0 4px #d9d9d9;
16
+ border-radius: 3px;
17
+ color: #666; }
18
+
19
+ .rc-menu-hidden {
20
+ display: none; }
21
+
22
+ .rc-menu-collapse {
23
+ overflow: hidden; }
24
+
25
+ .rc-menu-collapse-active {
26
+ transition: height 0.3s ease-out; }
27
+
28
+ .rc-menu-item-group-list {
29
+ margin: 0;
30
+ padding: 0; }
31
+
32
+ .rc-menu-item-group-title {
33
+ color: #999;
34
+ line-height: 1.5;
35
+ padding: 8px 10px;
36
+ border-bottom: 1px solid #dedede; }
37
+
38
+ .rc-menu-item-active,
39
+ .rc-menu-submenu-active > .rc-menu-submenu-title {
40
+ background-color: #eaf8fe; }
41
+
42
+ .rc-menu-item-selected {
43
+ background-color: #eaf8fe;
44
+ -webkit-transform: translateZ(0);
45
+ transform: translateZ(0); }
46
+
47
+ .rc-menu-submenu-selected {
48
+ background-color: #eaf8fe; }
49
+
50
+ .rc-menu > li.rc-menu-submenu {
51
+ padding: 0; }
52
+
53
+ .rc-menu-horizontal.rc-menu-sub,
54
+ .rc-menu-vertical.rc-menu-sub,
55
+ .rc-menu-vertical-left.rc-menu-sub,
56
+ .rc-menu-vertical-right.rc-menu-sub {
57
+ min-width: 160px;
58
+ margin-top: 0; }
59
+
60
+ .rc-menu-item,
61
+ .rc-menu-submenu-title {
62
+ margin: 0;
63
+ position: relative;
64
+ display: block;
65
+ padding: 7px 7px 7px 16px;
66
+ white-space: nowrap; }
67
+
68
+ .rc-menu-item.rc-menu-item-disabled,
69
+ .rc-menu-submenu-title.rc-menu-item-disabled,
70
+ .rc-menu-item.rc-menu-submenu-disabled,
71
+ .rc-menu-submenu-title.rc-menu-submenu-disabled {
72
+ color: #777 !important; }
73
+
74
+ .rc-menu > .rc-menu-item-divider {
75
+ height: 1px;
76
+ margin: 1px 0;
77
+ overflow: hidden;
78
+ padding: 0;
79
+ line-height: 0;
80
+ background-color: #e5e5e5; }
81
+
82
+ .rc-menu-submenu-popup {
83
+ position: absolute; }
84
+
85
+ .rc-menu-submenu > .rc-menu {
86
+ background-color: #fff; }
87
+
88
+ .rc-menu .rc-menu-submenu-title .anticon,
89
+ .rc-menu .rc-menu-item .anticon {
90
+ width: 14px;
91
+ height: 14px;
92
+ margin-right: 8px;
93
+ top: -1px; }
94
+
95
+ .rc-menu-horizontal {
96
+ background-color: #F3F5F7;
97
+ border: none;
98
+ border-bottom: 1px solid transparent;
99
+ border-bottom: 1px solid #d9d9d9;
100
+ box-shadow: none; }
101
+
102
+ .rc-menu-horizontal > .rc-menu-item,
103
+ .rc-menu-horizontal > .rc-menu-submenu > .rc-menu-submenu-title {
104
+ padding: 15px 20px; }
105
+
106
+ .rc-menu-horizontal > .rc-menu-submenu,
107
+ .rc-menu-horizontal > .rc-menu-item {
108
+ float: left;
109
+ border-bottom: 2px solid transparent; }
110
+
111
+ .rc-menu-horizontal > .rc-menu-submenu-active,
112
+ .rc-menu-horizontal > .rc-menu-item-active {
113
+ border-bottom: 2px solid #2db7f5;
114
+ background-color: #F3F5F7;
115
+ color: #2baee9; }
116
+
117
+ .rc-menu-horizontal:after {
118
+ content: " ";
119
+ display: block;
120
+ height: 0;
121
+ clear: both; }
122
+
123
+ .rc-menu-vertical,
124
+ .rc-menu-vertical-left,
125
+ .rc-menu-vertical-right,
126
+ .rc-menu-inline {
127
+ padding: 12px 0; }
128
+
129
+ .rc-menu-vertical > .rc-menu-item,
130
+ .rc-menu-vertical-left > .rc-menu-item,
131
+ .rc-menu-vertical-right > .rc-menu-item,
132
+ .rc-menu-inline > .rc-menu-item,
133
+ .rc-menu-vertical > .rc-menu-submenu > .rc-menu-submenu-title,
134
+ .rc-menu-vertical-left > .rc-menu-submenu > .rc-menu-submenu-title,
135
+ .rc-menu-vertical-right > .rc-menu-submenu > .rc-menu-submenu-title,
136
+ .rc-menu-inline > .rc-menu-submenu > .rc-menu-submenu-title {
137
+ padding: 12px 8px 12px 24px; }
138
+
139
+ .rc-menu-vertical .rc-menu-submenu-arrow,
140
+ .rc-menu-vertical-left .rc-menu-submenu-arrow,
141
+ .rc-menu-vertical-right .rc-menu-submenu-arrow,
142
+ .rc-menu-inline .rc-menu-submenu-arrow {
143
+ display: inline-block;
144
+ /* no longer use fontAwesome content to add arrow */
145
+ /* font: normal normal normal 14px/1 FontAwesome; */
146
+ /* font-size: inherit; */
147
+ vertical-align: baseline;
148
+ text-align: center;
149
+ text-transform: none;
150
+ text-rendering: auto;
151
+ position: absolute;
152
+ right: 16px;
153
+ line-height: 1.5em;
154
+ width: 0;
155
+ height: 0;
156
+ border-top: 5px solid transparent;
157
+ border-bottom: 5px solid transparent;
158
+ border-radius: 35%;
159
+ top: 35%;
160
+ border-left: 5px solid #666; }
161
+
162
+ /* no longer use fontAwesome content to add arrow */
163
+ /*
164
+ .rc-menu-vertical .rc-menu-submenu-arrow:before,
165
+ .rc-menu-vertical-left .rc-menu-submenu-arrow:before,
166
+ .rc-menu-vertical-right .rc-menu-submenu-arrow:before,
167
+ .rc-menu-inline .rc-menu-submenu-arrow:before {
168
+ content: "\f0da";
169
+ }
170
+ */
171
+ .rc-menu-inline .rc-menu-submenu-arrow {
172
+ -webkit-transform: rotate(90deg);
173
+ transform: rotate(90deg);
174
+ transition: -webkit-transform .3s;
175
+ transition: transform .3s;
176
+ transition: transform .3s, -webkit-transform .3s; }
177
+
178
+ .rc-menu-inline .rc-menu-submenu-open > .rc-menu-submenu-title .rc-menu-submenu-arrow {
179
+ -webkit-transform: rotate(-90deg);
180
+ transform: rotate(-90deg); }
181
+
182
+ .rc-menu-vertical.rc-menu-sub,
183
+ .rc-menu-vertical-left.rc-menu-sub,
184
+ .rc-menu-vertical-right.rc-menu-sub {
185
+ padding: 0; }
186
+
187
+ .rc-menu-sub.rc-menu-inline {
188
+ padding: 0;
189
+ border: none;
190
+ border-radius: 0;
191
+ box-shadow: none; }
192
+
193
+ .rc-menu-sub.rc-menu-inline > .rc-menu-item,
194
+ .rc-menu-sub.rc-menu-inline > .rc-menu-submenu > .rc-menu-submenu-title {
195
+ padding-top: 8px;
196
+ padding-bottom: 8px;
197
+ padding-right: 0; }
198
+
199
+ .rc-menu-open-slide-up-enter,
200
+ .rc-menu-open-slide-up-appear {
201
+ -webkit-animation-duration: .3s;
202
+ animation-duration: .3s;
203
+ -webkit-animation-fill-mode: both;
204
+ animation-fill-mode: both;
205
+ -webkit-transform-origin: 0 0;
206
+ transform-origin: 0 0;
207
+ opacity: 0;
208
+ -webkit-animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);
209
+ animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);
210
+ -webkit-animation-play-state: paused;
211
+ animation-play-state: paused; }
212
+
213
+ .rc-menu-open-slide-up-leave {
214
+ -webkit-animation-duration: .3s;
215
+ animation-duration: .3s;
216
+ -webkit-animation-fill-mode: both;
217
+ animation-fill-mode: both;
218
+ -webkit-transform-origin: 0 0;
219
+ transform-origin: 0 0;
220
+ opacity: 1;
221
+ -webkit-animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);
222
+ animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);
223
+ -webkit-animation-play-state: paused;
224
+ animation-play-state: paused; }
225
+
226
+ .rc-menu-open-slide-up-enter.rc-menu-open-slide-up-enter-active,
227
+ .rc-menu-open-slide-up-appear.rc-menu-open-slide-up-appear-active {
228
+ -webkit-animation-name: rcMenuOpenSlideUpIn;
229
+ animation-name: rcMenuOpenSlideUpIn;
230
+ -webkit-animation-play-state: running;
231
+ animation-play-state: running; }
232
+
233
+ .rc-menu-open-slide-up-leave.rc-menu-open-slide-up-leave-active {
234
+ -webkit-animation-name: rcMenuOpenSlideUpOut;
235
+ animation-name: rcMenuOpenSlideUpOut;
236
+ -webkit-animation-play-state: running;
237
+ animation-play-state: running; }
238
+
239
+ @-webkit-keyframes rcMenuOpenSlideUpIn {
240
+ 0% {
241
+ opacity: 0;
242
+ -webkit-transform-origin: 0% 0%;
243
+ transform-origin: 0% 0%;
244
+ -webkit-transform: scaleY(0);
245
+ transform: scaleY(0); }
246
+ 100% {
247
+ opacity: 1;
248
+ -webkit-transform-origin: 0% 0%;
249
+ transform-origin: 0% 0%;
250
+ -webkit-transform: scaleY(1);
251
+ transform: scaleY(1); } }
252
+
253
+ @keyframes rcMenuOpenSlideUpIn {
254
+ 0% {
255
+ opacity: 0;
256
+ -webkit-transform-origin: 0% 0%;
257
+ transform-origin: 0% 0%;
258
+ -webkit-transform: scaleY(0);
259
+ transform: scaleY(0); }
260
+ 100% {
261
+ opacity: 1;
262
+ -webkit-transform-origin: 0% 0%;
263
+ transform-origin: 0% 0%;
264
+ -webkit-transform: scaleY(1);
265
+ transform: scaleY(1); } }
266
+
267
+ @-webkit-keyframes rcMenuOpenSlideUpOut {
268
+ 0% {
269
+ opacity: 1;
270
+ -webkit-transform-origin: 0% 0%;
271
+ transform-origin: 0% 0%;
272
+ -webkit-transform: scaleY(1);
273
+ transform: scaleY(1); }
274
+ 100% {
275
+ opacity: 0;
276
+ -webkit-transform-origin: 0% 0%;
277
+ transform-origin: 0% 0%;
278
+ -webkit-transform: scaleY(0);
279
+ transform: scaleY(0); } }
280
+
281
+ @keyframes rcMenuOpenSlideUpOut {
282
+ 0% {
283
+ opacity: 1;
284
+ -webkit-transform-origin: 0% 0%;
285
+ transform-origin: 0% 0%;
286
+ -webkit-transform: scaleY(1);
287
+ transform: scaleY(1); }
288
+ 100% {
289
+ opacity: 0;
290
+ -webkit-transform-origin: 0% 0%;
291
+ transform-origin: 0% 0%;
292
+ -webkit-transform: scaleY(0);
293
+ transform: scaleY(0); } }
294
+
295
+ .rc-menu-open-zoom-enter,
296
+ .rc-menu-open-zoom-appear {
297
+ opacity: 0;
298
+ -webkit-animation-duration: .3s;
299
+ animation-duration: .3s;
300
+ -webkit-animation-fill-mode: both;
301
+ animation-fill-mode: both;
302
+ -webkit-transform-origin: 0 0;
303
+ transform-origin: 0 0;
304
+ -webkit-animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);
305
+ animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);
306
+ -webkit-animation-play-state: paused;
307
+ animation-play-state: paused; }
308
+
309
+ .rc-menu-open-zoom-leave {
310
+ -webkit-animation-duration: .3s;
311
+ animation-duration: .3s;
312
+ -webkit-animation-fill-mode: both;
313
+ animation-fill-mode: both;
314
+ -webkit-transform-origin: 0 0;
315
+ transform-origin: 0 0;
316
+ -webkit-animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);
317
+ animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);
318
+ -webkit-animation-play-state: paused;
319
+ animation-play-state: paused; }
320
+
321
+ .rc-menu-open-zoom-enter.rc-menu-open-zoom-enter-active,
322
+ .rc-menu-open-zoom-appear.rc-menu-open-zoom-appear-active {
323
+ -webkit-animation-name: rcMenuOpenZoomIn;
324
+ animation-name: rcMenuOpenZoomIn;
325
+ -webkit-animation-play-state: running;
326
+ animation-play-state: running; }
327
+
328
+ .rc-menu-open-zoom-leave.rc-menu-open-zoom-leave-active {
329
+ -webkit-animation-name: rcMenuOpenZoomOut;
330
+ animation-name: rcMenuOpenZoomOut;
331
+ -webkit-animation-play-state: running;
332
+ animation-play-state: running; }
333
+
334
+ @-webkit-keyframes rcMenuOpenZoomIn {
335
+ 0% {
336
+ opacity: 0;
337
+ -webkit-transform: scale(0, 0);
338
+ transform: scale(0, 0); }
339
+ 100% {
340
+ opacity: 1;
341
+ -webkit-transform: scale(1, 1);
342
+ transform: scale(1, 1); } }
343
+
344
+ @keyframes rcMenuOpenZoomIn {
345
+ 0% {
346
+ opacity: 0;
347
+ -webkit-transform: scale(0, 0);
348
+ transform: scale(0, 0); }
349
+ 100% {
350
+ opacity: 1;
351
+ -webkit-transform: scale(1, 1);
352
+ transform: scale(1, 1); } }
353
+
354
+ @-webkit-keyframes rcMenuOpenZoomOut {
355
+ 0% {
356
+ -webkit-transform: scale(1, 1);
357
+ transform: scale(1, 1); }
358
+ 100% {
359
+ opacity: 0;
360
+ -webkit-transform: scale(0, 0);
361
+ transform: scale(0, 0); } }
362
+
363
+ @keyframes rcMenuOpenZoomOut {
364
+ 0% {
365
+ -webkit-transform: scale(1, 1);
366
+ transform: scale(1, 1); }
367
+ 100% {
368
+ opacity: 0;
369
+ -webkit-transform: scale(0, 0);
370
+ transform: scale(0, 0); } }
371
+ button[data-balloon] {
372
+ overflow: visible; }
373
+
374
+ [data-balloon] {
375
+ position: relative;
376
+ cursor: pointer; }
377
+ [data-balloon]:after {
378
+ filter: alpha(opactiy=0);
379
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
380
+ -moz-opacity: 0;
381
+ -khtml-opacity: 0;
382
+ opacity: 0;
383
+ pointer-events: none;
384
+ -webkit-transition: all 0.18s ease-out 0.18s;
385
+ -moz-transition: all 0.18s ease-out 0.18s;
386
+ -ms-transition: all 0.18s ease-out 0.18s;
387
+ -o-transition: all 0.18s ease-out 0.18s;
388
+ transition: all 0.18s ease-out 0.18s;
389
+ font-family: sans-serif !important;
390
+ font-weight: normal !important;
391
+ font-style: normal !important;
392
+ text-shadow: none !important;
393
+ font-size: 12px !important;
394
+ background: rgba(17, 17, 17, 0.9);
395
+ border-radius: 4px;
396
+ color: #fff;
397
+ content: attr(data-balloon);
398
+ padding: .5em 1em;
399
+ position: absolute;
400
+ white-space: nowrap;
401
+ z-index: 10; }
402
+ [data-balloon]:before {
403
+ background: no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http://www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba(17, 17, 17, 0.9)%22%20transform%3D%22rotate(0)%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E");
404
+ background-size: 100% auto;
405
+ width: 18px;
406
+ height: 6px;
407
+ filter: alpha(opactiy=0);
408
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
409
+ -moz-opacity: 0;
410
+ -khtml-opacity: 0;
411
+ opacity: 0;
412
+ pointer-events: none;
413
+ -webkit-transition: all 0.18s ease-out 0.18s;
414
+ -moz-transition: all 0.18s ease-out 0.18s;
415
+ -ms-transition: all 0.18s ease-out 0.18s;
416
+ -o-transition: all 0.18s ease-out 0.18s;
417
+ transition: all 0.18s ease-out 0.18s;
418
+ content: '';
419
+ position: absolute;
420
+ z-index: 10; }
421
+ [data-balloon]:hover:before, [data-balloon]:hover:after, [data-balloon][data-balloon-visible]:before, [data-balloon][data-balloon-visible]:after {
422
+ filter: alpha(opactiy=100);
423
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
424
+ -moz-opacity: 1;
425
+ -khtml-opacity: 1;
426
+ opacity: 1;
427
+ pointer-events: auto; }
428
+ [data-balloon].font-awesome:after {
429
+ font-family: FontAwesome; }
430
+ [data-balloon][data-balloon-break]:after {
431
+ white-space: pre; }
432
+ [data-balloon][data-balloon-blunt]:before, [data-balloon][data-balloon-blunt]:after {
433
+ -webkit-transition: none;
434
+ -moz-transition: none;
435
+ -ms-transition: none;
436
+ -o-transition: none;
437
+ transition: none; }
438
+ [data-balloon][data-balloon-pos="up"]:after {
439
+ bottom: 100%;
440
+ left: 50%;
441
+ margin-bottom: 11px;
442
+ -webkit-transform: translate(-50%, 10px);
443
+ -moz-transform: translate(-50%, 10px);
444
+ -ms-transform: translate(-50%, 10px);
445
+ transform: translate(-50%, 10px);
446
+ -webkit-transform-origin: top;
447
+ -moz-transform-origin: top;
448
+ -ms-transform-origin: top;
449
+ transform-origin: top; }
450
+ [data-balloon][data-balloon-pos="up"]:before {
451
+ bottom: 100%;
452
+ left: 50%;
453
+ margin-bottom: 5px;
454
+ -webkit-transform: translate(-50%, 10px);
455
+ -moz-transform: translate(-50%, 10px);
456
+ -ms-transform: translate(-50%, 10px);
457
+ transform: translate(-50%, 10px);
458
+ -webkit-transform-origin: top;
459
+ -moz-transform-origin: top;
460
+ -ms-transform-origin: top;
461
+ transform-origin: top; }
462
+ [data-balloon][data-balloon-pos="up"]:hover:after, [data-balloon][data-balloon-pos="up"][data-balloon-visible]:after {
463
+ -webkit-transform: translate(-50%, 0);
464
+ -moz-transform: translate(-50%, 0);
465
+ -ms-transform: translate(-50%, 0);
466
+ transform: translate(-50%, 0); }
467
+ [data-balloon][data-balloon-pos="up"]:hover:before, [data-balloon][data-balloon-pos="up"][data-balloon-visible]:before {
468
+ -webkit-transform: translate(-50%, 0);
469
+ -moz-transform: translate(-50%, 0);
470
+ -ms-transform: translate(-50%, 0);
471
+ transform: translate(-50%, 0); }
472
+ [data-balloon][data-balloon-pos="up-left"]:after {
473
+ bottom: 100%;
474
+ left: 0;
475
+ margin-bottom: 11px;
476
+ -webkit-transform: translate(0, 10px);
477
+ -moz-transform: translate(0, 10px);
478
+ -ms-transform: translate(0, 10px);
479
+ transform: translate(0, 10px);
480
+ -webkit-transform-origin: top;
481
+ -moz-transform-origin: top;
482
+ -ms-transform-origin: top;
483
+ transform-origin: top; }
484
+ [data-balloon][data-balloon-pos="up-left"]:before {
485
+ bottom: 100%;
486
+ left: 5px;
487
+ margin-bottom: 5px;
488
+ -webkit-transform: translate(0, 10px);
489
+ -moz-transform: translate(0, 10px);
490
+ -ms-transform: translate(0, 10px);
491
+ transform: translate(0, 10px);
492
+ -webkit-transform-origin: top;
493
+ -moz-transform-origin: top;
494
+ -ms-transform-origin: top;
495
+ transform-origin: top; }
496
+ [data-balloon][data-balloon-pos="up-left"]:hover:after, [data-balloon][data-balloon-pos="up-left"][data-balloon-visible]:after {
497
+ -webkit-transform: translate(0, 0);
498
+ -moz-transform: translate(0, 0);
499
+ -ms-transform: translate(0, 0);
500
+ transform: translate(0, 0); }
501
+ [data-balloon][data-balloon-pos="up-left"]:hover:before, [data-balloon][data-balloon-pos="up-left"][data-balloon-visible]:before {
502
+ -webkit-transform: translate(0, 0);
503
+ -moz-transform: translate(0, 0);
504
+ -ms-transform: translate(0, 0);
505
+ transform: translate(0, 0); }
506
+ [data-balloon][data-balloon-pos="up-right"]:after {
507
+ bottom: 100%;
508
+ right: 0;
509
+ margin-bottom: 11px;
510
+ -webkit-transform: translate(0, 10px);
511
+ -moz-transform: translate(0, 10px);
512
+ -ms-transform: translate(0, 10px);
513
+ transform: translate(0, 10px);
514
+ -webkit-transform-origin: top;
515
+ -moz-transform-origin: top;
516
+ -ms-transform-origin: top;
517
+ transform-origin: top; }
518
+ [data-balloon][data-balloon-pos="up-right"]:before {
519
+ bottom: 100%;
520
+ right: 5px;
521
+ margin-bottom: 5px;
522
+ -webkit-transform: translate(0, 10px);
523
+ -moz-transform: translate(0, 10px);
524
+ -ms-transform: translate(0, 10px);
525
+ transform: translate(0, 10px);
526
+ -webkit-transform-origin: top;
527
+ -moz-transform-origin: top;
528
+ -ms-transform-origin: top;
529
+ transform-origin: top; }
530
+ [data-balloon][data-balloon-pos="up-right"]:hover:after, [data-balloon][data-balloon-pos="up-right"][data-balloon-visible]:after {
531
+ -webkit-transform: translate(0, 0);
532
+ -moz-transform: translate(0, 0);
533
+ -ms-transform: translate(0, 0);
534
+ transform: translate(0, 0); }
535
+ [data-balloon][data-balloon-pos="up-right"]:hover:before, [data-balloon][data-balloon-pos="up-right"][data-balloon-visible]:before {
536
+ -webkit-transform: translate(0, 0);
537
+ -moz-transform: translate(0, 0);
538
+ -ms-transform: translate(0, 0);
539
+ transform: translate(0, 0); }
540
+ [data-balloon][data-balloon-pos='down']:after {
541
+ left: 50%;
542
+ margin-top: 11px;
543
+ top: 100%;
544
+ -webkit-transform: translate(-50%, -10px);
545
+ -moz-transform: translate(-50%, -10px);
546
+ -ms-transform: translate(-50%, -10px);
547
+ transform: translate(-50%, -10px); }
548
+ [data-balloon][data-balloon-pos='down']:before {
549
+ background: no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http://www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba(17, 17, 17, 0.9)%22%20transform%3D%22rotate(180 18 6)%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E");
550
+ background-size: 100% auto;
551
+ width: 18px;
552
+ height: 6px;
553
+ left: 50%;
554
+ margin-top: 5px;
555
+ top: 100%;
556
+ -webkit-transform: translate(-50%, -10px);
557
+ -moz-transform: translate(-50%, -10px);
558
+ -ms-transform: translate(-50%, -10px);
559
+ transform: translate(-50%, -10px); }
560
+ [data-balloon][data-balloon-pos='down']:hover:after, [data-balloon][data-balloon-pos='down'][data-balloon-visible]:after {
561
+ -webkit-transform: translate(-50%, 0);
562
+ -moz-transform: translate(-50%, 0);
563
+ -ms-transform: translate(-50%, 0);
564
+ transform: translate(-50%, 0); }
565
+ [data-balloon][data-balloon-pos='down']:hover:before, [data-balloon][data-balloon-pos='down'][data-balloon-visible]:before {
566
+ -webkit-transform: translate(-50%, 0);
567
+ -moz-transform: translate(-50%, 0);
568
+ -ms-transform: translate(-50%, 0);
569
+ transform: translate(-50%, 0); }
570
+ [data-balloon][data-balloon-pos='down-left']:after {
571
+ left: 0;
572
+ margin-top: 11px;
573
+ top: 100%;
574
+ -webkit-transform: translate(0, -10px);
575
+ -moz-transform: translate(0, -10px);
576
+ -ms-transform: translate(0, -10px);
577
+ transform: translate(0, -10px); }
578
+ [data-balloon][data-balloon-pos='down-left']:before {
579
+ background: no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http://www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba(17, 17, 17, 0.9)%22%20transform%3D%22rotate(180 18 6)%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E");
580
+ background-size: 100% auto;
581
+ width: 18px;
582
+ height: 6px;
583
+ left: 5px;
584
+ margin-top: 5px;
585
+ top: 100%;
586
+ -webkit-transform: translate(0, -10px);
587
+ -moz-transform: translate(0, -10px);
588
+ -ms-transform: translate(0, -10px);
589
+ transform: translate(0, -10px); }
590
+ [data-balloon][data-balloon-pos='down-left']:hover:after, [data-balloon][data-balloon-pos='down-left'][data-balloon-visible]:after {
591
+ -webkit-transform: translate(0, 0);
592
+ -moz-transform: translate(0, 0);
593
+ -ms-transform: translate(0, 0);
594
+ transform: translate(0, 0); }
595
+ [data-balloon][data-balloon-pos='down-left']:hover:before, [data-balloon][data-balloon-pos='down-left'][data-balloon-visible]:before {
596
+ -webkit-transform: translate(0, 0);
597
+ -moz-transform: translate(0, 0);
598
+ -ms-transform: translate(0, 0);
599
+ transform: translate(0, 0); }
600
+ [data-balloon][data-balloon-pos='down-right']:after {
601
+ right: 0;
602
+ margin-top: 11px;
603
+ top: 100%;
604
+ -webkit-transform: translate(0, -10px);
605
+ -moz-transform: translate(0, -10px);
606
+ -ms-transform: translate(0, -10px);
607
+ transform: translate(0, -10px); }
608
+ [data-balloon][data-balloon-pos='down-right']:before {
609
+ background: no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http://www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba(17, 17, 17, 0.9)%22%20transform%3D%22rotate(180 18 6)%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E");
610
+ background-size: 100% auto;
611
+ width: 18px;
612
+ height: 6px;
613
+ right: 5px;
614
+ margin-top: 5px;
615
+ top: 100%;
616
+ -webkit-transform: translate(0, -10px);
617
+ -moz-transform: translate(0, -10px);
618
+ -ms-transform: translate(0, -10px);
619
+ transform: translate(0, -10px); }
620
+ [data-balloon][data-balloon-pos='down-right']:hover:after, [data-balloon][data-balloon-pos='down-right'][data-balloon-visible]:after {
621
+ -webkit-transform: translate(0, 0);
622
+ -moz-transform: translate(0, 0);
623
+ -ms-transform: translate(0, 0);
624
+ transform: translate(0, 0); }
625
+ [data-balloon][data-balloon-pos='down-right']:hover:before, [data-balloon][data-balloon-pos='down-right'][data-balloon-visible]:before {
626
+ -webkit-transform: translate(0, 0);
627
+ -moz-transform: translate(0, 0);
628
+ -ms-transform: translate(0, 0);
629
+ transform: translate(0, 0); }
630
+ [data-balloon][data-balloon-pos='left']:after {
631
+ margin-right: 11px;
632
+ right: 100%;
633
+ top: 50%;
634
+ -webkit-transform: translate(10px, -50%);
635
+ -moz-transform: translate(10px, -50%);
636
+ -ms-transform: translate(10px, -50%);
637
+ transform: translate(10px, -50%); }
638
+ [data-balloon][data-balloon-pos='left']:before {
639
+ background: no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http://www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba(17, 17, 17, 0.9)%22%20transform%3D%22rotate(-90 18 18)%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E");
640
+ background-size: 100% auto;
641
+ width: 6px;
642
+ height: 18px;
643
+ margin-right: 5px;
644
+ right: 100%;
645
+ top: 50%;
646
+ -webkit-transform: translate(10px, -50%);
647
+ -moz-transform: translate(10px, -50%);
648
+ -ms-transform: translate(10px, -50%);
649
+ transform: translate(10px, -50%); }
650
+ [data-balloon][data-balloon-pos='left']:hover:after, [data-balloon][data-balloon-pos='left'][data-balloon-visible]:after {
651
+ -webkit-transform: translate(0, -50%);
652
+ -moz-transform: translate(0, -50%);
653
+ -ms-transform: translate(0, -50%);
654
+ transform: translate(0, -50%); }
655
+ [data-balloon][data-balloon-pos='left']:hover:before, [data-balloon][data-balloon-pos='left'][data-balloon-visible]:before {
656
+ -webkit-transform: translate(0, -50%);
657
+ -moz-transform: translate(0, -50%);
658
+ -ms-transform: translate(0, -50%);
659
+ transform: translate(0, -50%); }
660
+ [data-balloon][data-balloon-pos='right']:after {
661
+ left: 100%;
662
+ margin-left: 11px;
663
+ top: 50%;
664
+ -webkit-transform: translate(-10px, -50%);
665
+ -moz-transform: translate(-10px, -50%);
666
+ -ms-transform: translate(-10px, -50%);
667
+ transform: translate(-10px, -50%); }
668
+ [data-balloon][data-balloon-pos='right']:before {
669
+ background: no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http://www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba(17, 17, 17, 0.9)%22%20transform%3D%22rotate(90 6 6)%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E");
670
+ background-size: 100% auto;
671
+ width: 6px;
672
+ height: 18px;
673
+ left: 100%;
674
+ margin-left: 5px;
675
+ top: 50%;
676
+ -webkit-transform: translate(-10px, -50%);
677
+ -moz-transform: translate(-10px, -50%);
678
+ -ms-transform: translate(-10px, -50%);
679
+ transform: translate(-10px, -50%); }
680
+ [data-balloon][data-balloon-pos='right']:hover:after, [data-balloon][data-balloon-pos='right'][data-balloon-visible]:after {
681
+ -webkit-transform: translate(0, -50%);
682
+ -moz-transform: translate(0, -50%);
683
+ -ms-transform: translate(0, -50%);
684
+ transform: translate(0, -50%); }
685
+ [data-balloon][data-balloon-pos='right']:hover:before, [data-balloon][data-balloon-pos='right'][data-balloon-visible]:before {
686
+ -webkit-transform: translate(0, -50%);
687
+ -moz-transform: translate(0, -50%);
688
+ -ms-transform: translate(0, -50%);
689
+ transform: translate(0, -50%); }
690
+ [data-balloon][data-balloon-length='small']:after {
691
+ white-space: normal;
692
+ width: 80px; }
693
+ [data-balloon][data-balloon-length='medium']:after {
694
+ white-space: normal;
695
+ width: 150px; }
696
+ [data-balloon][data-balloon-length='large']:after {
697
+ white-space: normal;
698
+ width: 260px; }
699
+ [data-balloon][data-balloon-length='xlarge']:after {
700
+ white-space: normal;
701
+ width: 380px; }
702
+ @media screen and (max-width: 768px) {
703
+ [data-balloon][data-balloon-length='xlarge']:after {
704
+ white-space: normal;
705
+ width: 90vw; } }
706
+ [data-balloon][data-balloon-length='fit']:after {
707
+ white-space: normal;
708
+ width: 100%; }
709
+ .InputItemOptions___2X231{display:-ms-flexbox;display:flex}.InputItemButtons___tV8hr{//:#fff}.InputItemButton___JWNCO{background:transparent;border:none;cursor:pointer;padding:0;margin-right:5px;visibility:visible;color:#777;outline:none}.InputItemButtonDisabled___4d2Nq{display:none}.rc-menu___1982w{//:inline-block;margin:0;background:transparent;border:none}.rc-menu___1982w .rc-menu-submenu{padding:0;margin:0;text-align:center;border:none}.rc-menu___1982w .rc-menu-submenu>.rc-menu-submenu-title{padding:0;height:0}.rc-menu___1982w .rc-menu-submenu-selected{background-color:transparent}.rc-menu___1982w .rc-menu-submenu-active{border:none;background-color:transparent;color:inherit}.rc-menu-vertical>.rc-menu-item,.rc-menu-vertical>.rc-menu-submenu>.rc-menu-submenu-title{padding:8px 8px 8px 17px}.rc-menu-submenu{margin-bottom:0}.rc-menu>.rc-menu-submenu-selected{background-color:transparent}.rc-menu-item,.rc-menu-submenu-title{cursor:default}select.fieldChangeSelect___24Qmi{margin:0 10px 0 0;padding:0;font-size:1em;text-transform:uppercase;height:auto;background-color:hsla(0,0%,100%,.2);-webkit-box-shadow:none;box-shadow:none;border:1px solid #777}.Items___1jMS3{width:100%;height:100%;background:#fff;resize:vertical;overflow:auto;padding-bottom:15px}.FormNotice___S7kYy{position:-webkit-sticky;position:sticky;top:32px;z-index:1}.notice___9CyqB{margin:0!important}.node___2KMWl{padding:9px 8px 8px 40px;border-radius:2px;cursor:pointer;position:relative;display:block;word-wrap:break-word;background:#fafafa;border:2px solid #e1e1e1;color:#2f2f2f}.node___2KMWl:hover{border-color:#749ec5;color:#ff0303}.node___2KMWl span.dashicons,.node___2KMWl span.typcn{font-size:18px;margin-right:10px;display:inline-block;border-radius:3px 0 0 3px;padding:0 7px;position:absolute;top:0;left:0;height:100%;background:none;color:#0978a5!important;line-height:36px!important}.tipsContainer____R5zW{border:2px solid #ff9800;padding:9px 8px 8px 40px;border-radius:2px;position:relative;display:block;word-wrap:break-word;color:#2f2f2f;margin-bottom:25px;min-height:30px}.tipsContainer____R5zW>.tipIcon___3q_1V{color:#ff9800;font-size:24px;margin-right:10px;display:inline-block;border-radius:3px 0 0 3px;padding:0 7px;position:absolute;top:0;left:0;height:100%;background:none;line-height:48px!important}.tipIcon___3q_1V:hover{color:#ff9800!important}.tipsContainer____R5zW a{color:#ff9800}.select___2eVfd .help{content:"?";position:absolute;right:0;border:1px solid #ccc;padding:0 5px;border-radius:2px!important;color:#666;cursor:pointer;text-transform:none;font-weight:400}.select___2eVfd .help:after{text-align:initial}.select___2eVfd .help:hover{border-color:#aaa}.select___2eVfd{background:#fff;padding:10px 15px}.select___2eVfd h3{margin-bottom:20px;position:relative;text-transform:uppercase}.cf7skinsItemsContainer___2PGFO,.cf7tagsContainer___3jyJN{display:-ms-flexbox;display:flex;margin-right:-10px;margin-left:-10px;margin-bottom:20px}.cf7skinsItemsEven___9Zp8r,.cf7skinsItemsOdd___2z1GI,.cf7tagsContainer___3jyJN .cf7tagsEven___18OAz,.cf7tagsOdd___1Q_xx{width:50%;min-height:1px;padding-right:10px;padding-left:10px;-webkit-box-sizing:border-box;box-sizing:border-box}.elemContainer___2tTnE{margin-bottom:10px}.Form___vhG7t{display:-ms-flexbox;display:flex;width:100%;-ms-flex-wrap:wrap;flex-wrap:wrap}.FormItems___3Nq_r{width:69%;-ms-flex-negative:1;flex-shrink:1;margin-right:2%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.Controls___kju7p{width:100%}.Toolbar___3FagP{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;width:100%;margin-bottom:10px}.Toolbar___3FagP>span:hover{background-color:#96a36b;color:#eee}.options___7Cmgd{-ms-flex:0 0 auto;flex:0 0 auto;color:inherit;cursor:pointer;padding:6px 10px;border-radius:3px;border:1px solid #98a26d;margin-right:15px}.options___7Cmgd:active>span,.options___7Cmgd:hover>span{color:inherit!important}.Toolbar___3FagP .dashicons{line-height:normal;height:auto}.AfterFormItems___22UvL{display:-ms-flexbox;display:flex;width:100%;-ms-flex-align:center;align-items:center}.Operate___2qc0q{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:29%}.Action___2qEzr{margin-top:20px}.spinner___qk-8L{float:none;vertical-align:top}.cf7s-visual-root___3HBOR,.top-level-container___rWu1n{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1}[data-balloon]:after{font-family:inherit!important}.cf7s #tab-visual .dashicons{line-height:1;height:auto}
images/cf7skins-pro-logo.png ADDED
Binary file
includes/admin-visual.php CHANGED
@@ -12,6 +12,7 @@ Class CF7_Skins_Admin_Visual {
12
 
13
  var $dom;
14
  var $textdomain;
 
15
 
16
  /**
17
  * Class constructor
@@ -30,12 +31,15 @@ Class CF7_Skins_Admin_Visual {
30
  $this->textdomain = CF7SKINS_TEXTDOMAIN;
31
  $this->version = CF7SKINS_VERSION;
32
  $this->url = CF7SKINS_URL;
 
33
 
34
  $this->dom = new DOMDocument( '1.0', 'utf-8' );
35
 
 
36
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ), 11 );
 
37
  add_action( 'admin_print_footer_scripts', array( $this, 'log_scripts' ) );
38
- add_action( 'cf7s_update', array( $this, 'save_visual' ), 10, 1 );
39
  add_action( 'cf7skins_copy', array( $this, 'copy_visual' ) );
40
  add_action( 'cf7skins_tabs', array( $this, 'visual_tab' ) );
41
  add_action( 'cf7skins_tab_content', array( $this, 'visual_content' ) );
@@ -89,23 +93,23 @@ Class CF7_Skins_Admin_Visual {
89
  return;
90
  }
91
 
92
- $form_id = CF7_Skins_Contact::get_form_id( $cf7 );
93
 
94
  // Remove extra backslashes, decode Visual JSON data
95
  $visual = json_decode( stripslashes( $_POST['cf7s-visual'] ) );
96
 
97
  // Remove visual meta data if is emptied by user or form does not have visual data
98
  if ( ! $visual ) {
99
- delete_post_meta( $form_id, 'cf7s_visual' );
100
  return;
101
  }
102
 
103
  // Save visual meta data for further use
104
- update_post_meta( $form_id, 'cf7s_visual', $visual );
105
 
106
  // Update CF7 textarea form content
107
  $visual_content = trim( $this->extract_visual( $visual ) );
108
- update_post_meta( $form_id, '_form', $visual_content );
109
  }
110
 
111
  /**
@@ -130,8 +134,14 @@ Class CF7_Skins_Admin_Visual {
130
  die();
131
  }
132
 
133
- $visual = json_decode( stripslashes( $_POST['visual'] ) );
134
- $form_id = (int) $_POST['form_id'];
 
 
 
 
 
 
135
 
136
  // Save visual meta data for further use
137
  update_post_meta( $form_id, 'cf7s_visual', $visual );
@@ -152,6 +162,7 @@ Class CF7_Skins_Admin_Visual {
152
  }
153
 
154
  // Update select/deselect template
 
155
  if ( $_POST['template'] ) { // selected
156
  update_post_meta( $form_id, 'cf7s_template', esc_attr( $_POST['template'] ) );
157
  } else { // deselected or empty
@@ -159,6 +170,7 @@ Class CF7_Skins_Admin_Visual {
159
  }
160
 
161
  // Update select/deselect style
 
162
  if ( $_POST['style'] ) { // selected
163
  update_post_meta( $form_id, 'cf7s_style', esc_attr( $_POST['style'] ) );
164
  } else { // deselected or empty
@@ -173,6 +185,7 @@ Class CF7_Skins_Admin_Visual {
173
  * Run add-ons JavaScript callback functions
174
  * Can be function within namespace or standalone function
175
  * For example: myNameSpace.myFunction() or anotherFunction();
 
176
  */
177
  $output['callbacks'] = apply_filters( 'cf7s_visual_update_js_callbacks', array() );
178
 
@@ -706,6 +719,42 @@ Class CF7_Skins_Admin_Visual {
706
  exit();
707
  }
708
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
709
  /**
710
  * Add backend scripts and styles.
711
  *
@@ -718,66 +767,140 @@ Class CF7_Skins_Admin_Visual {
718
  if ( ! CF7_Skins_Admin::edit_page() ) { // return if this is not CF7 editing page
719
  return;
720
  }
721
-
722
- wp_enqueue_script( 'visual-init',
723
- $this->url . 'js/init.js',
724
- array( 'wpcf7-admin' ), $this->version, true ); // added after 'wpcf7-admin' @since 2.1
725
-
 
 
 
 
 
 
726
  wp_enqueue_script( 'visual',
727
- $this->url . 'js/visual.js',
728
- array( 'visual-init' ), $this->version, true ); // added after 'wpcf7-admin'
729
-
730
  // Current contact form 7 object, null for non valid post ID
731
  $cf7 = wpcf7_get_current_contact_form();
732
-
733
  // Get visual meta data based on current editing CF7 form id
734
  $items = array();
735
  if ( isset( $_GET['post'] ) ) {
736
  $items = get_post_meta( (int) $_GET['post'], 'cf7s_visual', true );
737
  }
738
-
739
  // Add options from CF7 Skins settings page
740
  // @since 0.6.3
741
  $options = array();
742
  $cf7s_option = get_option( CF7SKINS_OPTIONS );
743
  $options['showName'] = isset( $cf7s_option['show_name'] ) && $cf7s_option['show_name'] ? true : false;
744
  $options['showCopyPaste'] = isset( $cf7s_option['show_copy_paste'] ) && $cf7s_option['show_copy_paste'] ? true : false;
745
-
746
  // Add integration @since 0.5.4
747
  $integration = array();
748
-
749
  $recaptcha = WPCF7_RECAPTCHA::get_instance();
750
-
751
  if ( $recaptcha->is_active() ) {
752
  $integration['reCAPTCHA'] = $recaptcha->is_active();
753
  }
754
-
755
  // Add versions @since 2.1
756
  global $wp_version;
757
  $versions = array();
758
  $versions['wp'] = $wp_version;
759
  $versions['cf7'] = WPCF7_VERSION;
760
-
761
  // Localize script filter
762
  $localize = apply_filters( 'cf7svisual_localize_script', array(
763
  'ajaxurl' => admin_url('admin-ajax.php'),
764
  'versions' => $versions, // @since 2.1
765
  'nonce' => wp_create_nonce( $this->nonce ), // generate a nonce for security checking
766
  'update' => 'cf7skins_visual_update', // post action for saving
767
- 'l10n' => array(
768
- 'save' => __( 'Save', $this->textdomain ),
769
- 'done' => __( 'Done', $this->textdomain ),
770
- 'error' => __( 'Error', $this->textdomain ),
771
- ),
772
  'options' => $options,
 
773
  'title' => $cf7 ? $cf7->title() : '',
774
  'items' => $items,
775
  'integration' => $integration,
776
  'environment' => defined('CF7SKINS_ENV') ? CF7SKINS_ENV : null, // @since 2.1
777
  ) );
778
-
779
  // Output visual items as a JS var
780
- wp_localize_script( 'visual-init', 'cf7svisual', $localize );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
781
  }
782
 
783
  /**
@@ -804,18 +927,18 @@ Class CF7_Skins_Admin_Visual {
804
  function setting_fields( $fields ) {
805
  $fields['show_copy_paste'] = array( // @ since 2.1
806
  'section' => 'advanced',
807
- 'label' => __( 'Visual Copy/Paste', $this->textdomain ),
808
  'type' => 'checkbox',
809
  'default' => false,
810
- 'detail' => __( 'Show Copy/Paste visual data options', $this->textdomain ),
811
  );
812
 
813
  $fields['show_name'] = array(
814
  'section' => 'advanced',
815
- 'label' => __( 'Show Name', $this->textdomain ),
816
  'type' => 'checkbox',
817
  'default' => false,
818
- 'detail' => __( 'Show Visual tag name.', $this->textdomain ),
819
  );
820
 
821
  return $fields;
12
 
13
  var $dom;
14
  var $textdomain;
15
+ var $form_id; // @since 2.3.0
16
 
17
  /**
18
  * Class constructor
31
  $this->textdomain = CF7SKINS_TEXTDOMAIN;
32
  $this->version = CF7SKINS_VERSION;
33
  $this->url = CF7SKINS_URL;
34
+ $this->path = CF7SKINS_PATH; // @since 2.3.0
35
 
36
  $this->dom = new DOMDocument( '1.0', 'utf-8' );
37
 
38
+ add_action( 'admin_enqueue_scripts', array( $this, 'vendor_scripts' ), 10 ); // @since 2.3.0
39
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ), 11 );
40
+ add_action( 'admin_enqueue_scripts', array( $this, 'translation_scripts' ), 12 );
41
  add_action( 'admin_print_footer_scripts', array( $this, 'log_scripts' ) );
42
+ add_action( 'cf7skins_update', array( $this, 'save_visual' ), 10, 1 );
43
  add_action( 'cf7skins_copy', array( $this, 'copy_visual' ) );
44
  add_action( 'cf7skins_tabs', array( $this, 'visual_tab' ) );
45
  add_action( 'cf7skins_tab_content', array( $this, 'visual_content' ) );
93
  return;
94
  }
95
 
96
+ $this->form_id = CF7_Skins_Contact::get_form_id( $cf7 );
97
 
98
  // Remove extra backslashes, decode Visual JSON data
99
  $visual = json_decode( stripslashes( $_POST['cf7s-visual'] ) );
100
 
101
  // Remove visual meta data if is emptied by user or form does not have visual data
102
  if ( ! $visual ) {
103
+ delete_post_meta( $this->form_id, 'cf7s_visual' );
104
  return;
105
  }
106
 
107
  // Save visual meta data for further use
108
+ update_post_meta( $this->form_id, 'cf7s_visual', $visual );
109
 
110
  // Update CF7 textarea form content
111
  $visual_content = trim( $this->extract_visual( $visual ) );
112
+ update_post_meta( $this->form_id, '_form', $visual_content );
113
  }
114
 
115
  /**
134
  die();
135
  }
136
 
137
+ $cf7svisual = json_decode( stripslashes( $_POST['cf7svisual'] ) ); // @since 2.3.0
138
+
139
+ // Callback function right before doing any update @since 2.3.0
140
+ do_action( 'cf7s_visual_before_update', $cf7svisual );
141
+
142
+ $visual = $cf7svisual->treeData;
143
+ $form_id = (int) $cf7svisual->id;
144
+ $this->form_id = $form_id; // setup class form id @since 2.3.0
145
 
146
  // Save visual meta data for further use
147
  update_post_meta( $form_id, 'cf7s_visual', $visual );
162
  }
163
 
164
  // Update select/deselect template
165
+
166
  if ( $_POST['template'] ) { // selected
167
  update_post_meta( $form_id, 'cf7s_template', esc_attr( $_POST['template'] ) );
168
  } else { // deselected or empty
170
  }
171
 
172
  // Update select/deselect style
173
+
174
  if ( $_POST['style'] ) { // selected
175
  update_post_meta( $form_id, 'cf7s_style', esc_attr( $_POST['style'] ) );
176
  } else { // deselected or empty
185
  * Run add-ons JavaScript callback functions
186
  * Can be function within namespace or standalone function
187
  * For example: myNameSpace.myFunction() or anotherFunction();
188
+
189
  */
190
  $output['callbacks'] = apply_filters( 'cf7s_visual_update_js_callbacks', array() );
191
 
719
  exit();
720
  }
721
 
722
+ /**
723
+ * Register vendor scripts for < WP 5.
724
+ *
725
+ * @link https://make.wordpress.org/core/2018/12/06/javascript-packages-and-interoperability-in-5-0-and-beyond/
726
+ *
727
+ * @since 2.3.0
728
+ */
729
+ function vendor_scripts() {
730
+
731
+ // Check if React is registered using 'wp-element', a thin abstraction over
732
+ // the React interface, and implements most all of the same functionality.
733
+ if ( ! wp_script_is( 'wp-element' , 'registered' ) ) {
734
+
735
+ // Enqueue our own copy of React and React DOM.
736
+ wp_register_script( 'react', $this->url . 'js/react.production.min.js',
737
+ array(), '16.4.2', true );
738
+
739
+ wp_register_script( 'react-dom', $this->url . 'js/react-dom.production.min.js',
740
+ array(), '16.4.2', true );
741
+ }
742
+
743
+ // Enqueue our own copy of Lodash
744
+ if ( ! wp_script_is( 'lodash' , 'registered' ) ) {
745
+ wp_register_script( 'lodash', $this->url . 'js/lodash.min.js',
746
+ array(), '4.17.4', true );
747
+
748
+ // Add lodash into window only if is not defined
749
+ // See Gutenberg approach https://github.com/WordPress/gutenberg/blob/master/lib/client-assets.php#L562
750
+ wp_add_inline_script( 'lodash', implode( "\n", array(
751
+ 'if ( ! window.lodash ) {',
752
+ ' window.lodash = _.noConflict();',
753
+ '}',
754
+ )));
755
+ }
756
+ }
757
+
758
  /**
759
  * Add backend scripts and styles.
760
  *
767
  if ( ! CF7_Skins_Admin::edit_page() ) { // return if this is not CF7 editing page
768
  return;
769
  }
770
+
771
+ wp_enqueue_style( 'visual',
772
+ $this->url . 'css/visual.min.css',
773
+ array(), $this->version ); // added after 'wpcf7-admin' @since 2.1
774
+
775
+ // Enqueue wp-i18n if is not shipped with current WordPress version @since 2.3.0
776
+ if ( ! wp_script_is( 'wp-i18n', 'registered' ) ) {
777
+ wp_enqueue_script( 'wp-i18n', $this->url . 'js/wp-i18n.min.js',
778
+ array(), '3.1.0', true );
779
+ }
780
+
781
  wp_enqueue_script( 'visual',
782
+ $this->url . 'js/visual.min.js',
783
+ array( 'wpcf7-admin', 'lodash', 'react', 'react-dom', 'wp-i18n' ), $this->version, true ); // added after 'wpcf7-admin'
784
+
785
  // Current contact form 7 object, null for non valid post ID
786
  $cf7 = wpcf7_get_current_contact_form();
787
+
788
  // Get visual meta data based on current editing CF7 form id
789
  $items = array();
790
  if ( isset( $_GET['post'] ) ) {
791
  $items = get_post_meta( (int) $_GET['post'], 'cf7s_visual', true );
792
  }
793
+
794
  // Add options from CF7 Skins settings page
795
  // @since 0.6.3
796
  $options = array();
797
  $cf7s_option = get_option( CF7SKINS_OPTIONS );
798
  $options['showName'] = isset( $cf7s_option['show_name'] ) && $cf7s_option['show_name'] ? true : false;
799
  $options['showCopyPaste'] = isset( $cf7s_option['show_copy_paste'] ) && $cf7s_option['show_copy_paste'] ? true : false;
800
+
801
  // Add integration @since 0.5.4
802
  $integration = array();
803
+
804
  $recaptcha = WPCF7_RECAPTCHA::get_instance();
805
+
806
  if ( $recaptcha->is_active() ) {
807
  $integration['reCAPTCHA'] = $recaptcha->is_active();
808
  }
809
+
810
  // Add versions @since 2.1
811
  global $wp_version;
812
  $versions = array();
813
  $versions['wp'] = $wp_version;
814
  $versions['cf7'] = WPCF7_VERSION;
815
+
816
  // Localize script filter
817
  $localize = apply_filters( 'cf7svisual_localize_script', array(
818
  'ajaxurl' => admin_url('admin-ajax.php'),
819
  'versions' => $versions, // @since 2.1
820
  'nonce' => wp_create_nonce( $this->nonce ), // generate a nonce for security checking
821
  'update' => 'cf7skins_visual_update', // post action for saving
 
 
 
 
 
822
  'options' => $options,
823
+ 'id' => $cf7 ? $cf7->id() : '', // @since 2.3.0
824
  'title' => $cf7 ? $cf7->title() : '',
825
  'items' => $items,
826
  'integration' => $integration,
827
  'environment' => defined('CF7SKINS_ENV') ? CF7SKINS_ENV : null, // @since 2.1
828
  ) );
829
+
830
  // Output visual items as a JS var
831
+ $localize_handle = apply_filters( 'cf7svisual_localize_script_handle', 'visual' ); // @since 2.3
832
+ wp_localize_script( $localize_handle, 'cf7svisual', $localize );
833
+ }
834
+
835
+ /**
836
+ * Add translation script with backward compatibility for WP < 5
837
+ *
838
+ * Priority set to 12, right after the handle script 'visual': 11.
839
+ *
840
+ * @since 2.3.0
841
+ */
842
+ function translation_scripts() {
843
+ $domain = 'contact-form-7-skins'; // should match in JS file domain
844
+ $this->print_translation_scripts( 'visual', $domain, CF7SKINS_PATH );
845
+ }
846
+
847
+ /**
848
+ * Add translation script with backward compatibility for WP < 5
849
+ *
850
+ * Priority set to 12, right after the handle script 'visual': 11.
851
+ *
852
+ * @link https://developer.wordpress.org/reference/functions/wp_set_script_translations/
853
+ * @link https://developer.wordpress.org/reference/classes/wp_scripts/print_translations/
854
+ *
855
+ * @param {String} $handle Script handle the textdomain will be attached to.
856
+ * @param {String} $domain Text domain. Default 'default'.
857
+ * @param {String} $path The full file path to the directory containing translation files.
858
+ *
859
+ * @since 2.3.0
860
+ */
861
+ public static function print_translation_scripts( $handle, $domain, $path ) {
862
+
863
+ if ( ! CF7_Skins_Admin::edit_page() ) { // return if this is not CF7 editing page
864
+ return;
865
+ }
866
+
867
+ // Tell WordPress 5.x our script contains translations @since 2.3.0
868
+ if ( function_exists( 'wp_set_script_translations' ) ) {
869
+
870
+ // https://make.wordpress.org/core/2018/11/09/new-javascript-i18n-support-in-wordpress/
871
+ // WordPres check if a file in the format of ${domain}-${locale}-${handle}.json or md5 filename
872
+ // before defaulting to the WordPress languages directory
873
+ wp_set_script_translations( $handle, $domain, $path . 'languages' );
874
+
875
+ // For WordPress 4, follow WP_Scripts::print_translations() approach
876
+ } else {
877
+ $locale = get_locale(); // or use user locale get_user_locale() ?
878
+
879
+ $translation_file = $path . "languages/{$domain}-{$locale}-{$handle}.json";
880
+
881
+ // Set default empty locale data object to ensure the domain still exists.
882
+ $json_translations = '{ "locale_data": { "messages": { "": {} } } }';
883
+
884
+ global $wp_filesystem; // https://codex.wordpress.org/Filesystem_API
885
+
886
+ if ( empty( $wp_filesystem ) ) {
887
+ require_once( ABSPATH . '/wp-admin/includes/file.php' );
888
+ WP_Filesystem();
889
+ }
890
+
891
+ if ( $wp_filesystem->exists( $translation_file ) ) { // check if .json exists in directory
892
+ $json_translations = $wp_filesystem->get_contents( $translation_file );
893
+ }
894
+
895
+ $jscript = <<<JS
896
+ ( function( domain, translations ) {
897
+ var localeData = translations.locale_data[ domain ] || translations.locale_data.messages;
898
+ localeData[""].domain = domain;
899
+ wp.i18n.setLocaleData( localeData, domain );
900
+ } )( "{$domain}", {$json_translations} );
901
+ JS;
902
+ wp_add_inline_script( 'visual', $jscript, $position = 'before' );
903
+ }
904
  }
905
 
906
  /**
927
  function setting_fields( $fields ) {
928
  $fields['show_copy_paste'] = array( // @ since 2.1
929
  'section' => 'advanced',
930
+ 'label' => __( 'Visual Data', $this->textdomain ),
931
  'type' => 'checkbox',
932
  'default' => false,
933
+ 'detail' => __( 'Enable copy & paste of visual data.', $this->textdomain ),
934
  );
935
 
936
  $fields['show_name'] = array(
937
  'section' => 'advanced',
938
+ 'label' => __( 'Show Field Names', $this->textdomain ),
939
  'type' => 'checkbox',
940
  'default' => false,
941
+ 'detail' => __( 'Show field names on each form field.', $this->textdomain ),
942
  );
943
 
944
  return $fields;
includes/admin.php CHANGED
@@ -29,9 +29,9 @@ class CF7_Skins_Admin {
29
  }
30
 
31
  // Action hooks to store selected template and style while updating or creating new CF7
32
- add_action( 'wpcf7_after_create', array( &$this, 'skin_update' ) );
33
  add_action( 'wpcf7_after_create', array( &$this, 'cf7skins_copy' ) ); // @since 1.2.0
34
- add_action( 'wpcf7_after_update', array( &$this, 'skin_update' ) );
35
 
36
  // Store current form id while duplicating
37
  add_filter( 'wpcf7_copy', array( $this, 'store_copy_id' ), 1, 2 ); // @since 1.2.0
@@ -59,13 +59,13 @@ class CF7_Skins_Admin {
59
  *
60
  * @action 'wpcf7_after_create'
61
  * @action 'wpcf7_after_update'
62
- * @do_action 'cf7s_update'
63
  *
64
  * @param $cf7 (class) WPCF7_ContactForm - Contact Form 7 object data
65
  *
66
  * @since 0.1.0
67
  */
68
- function skin_update( $cf7 ) { // NRM - CHANGE name to cf7skins_update & match with do_action
69
  // Get the current contact form 7 id
70
  $form_id = CF7_Skins_Contact::get_form_id( $cf7 );
71
 
@@ -84,7 +84,7 @@ class CF7_Skins_Admin {
84
  }
85
 
86
  // Add action while saving the Contact Form 7 form
87
- do_action( 'cf7s_update', $cf7 );
88
  }
89
 
90
  /**
@@ -137,12 +137,12 @@ class CF7_Skins_Admin {
137
  * @filter 'wpcf7_copy'
138
  *
139
  * @param $new (object) newly created Contact Form 7
140
- * $wpcf7 (class) WPCF7_ContactForm
141
  *
142
  * @since 1.2.0
143
  */
144
- function store_copy_id( $new, $wpcf7 ) { // NRM - why is this called $wpcf7 & not $cf7 like elsewhere?
145
- update_option( '_cf7skins_copy_id', $wpcf7->id() ); // store copied ID to database temporarily
146
  return $new;
147
  }
148
 
@@ -157,7 +157,7 @@ class CF7_Skins_Admin {
157
  * @since 0.1.0
158
  */
159
  function admin_enqueue_scripts( $hook_suffix ) {
160
- // NRM - ADD EXPLANATION
161
  if ( false === strpos( $hook_suffix, 'wpcf7' ) ) {
162
  return;
163
  }
@@ -214,9 +214,6 @@ class CF7_Skins_Admin {
214
  function add_meta_boxes( $post_id ) {
215
  add_meta_box( 'cf7s', __( 'Skins', CF7SKINS_TEXTDOMAIN ),
216
  array( &$this, 'skins_meta_box' ), null, 'mail', 'core' );
217
-
218
- // Add action while creating the skins metabox
219
- do_action( 'cf7s_add_meta_boxes', $post_id ); // NRM - why is this hook only added in CF7 < v4.2?
220
  }
221
 
222
  /**
29
  }
30
 
31
  // Action hooks to store selected template and style while updating or creating new CF7
32
+ add_action( 'wpcf7_after_create', array( &$this, 'cf7skins_update' ) );
33
  add_action( 'wpcf7_after_create', array( &$this, 'cf7skins_copy' ) ); // @since 1.2.0
34
+ add_action( 'wpcf7_after_update', array( &$this, 'cf7skins_update' ) );
35
 
36
  // Store current form id while duplicating
37
  add_filter( 'wpcf7_copy', array( $this, 'store_copy_id' ), 1, 2 ); // @since 1.2.0
59
  *
60
  * @action 'wpcf7_after_create'
61
  * @action 'wpcf7_after_update'
62
+ * @do_action 'cf7skins_update'
63
  *
64
  * @param $cf7 (class) WPCF7_ContactForm - Contact Form 7 object data
65
  *
66
  * @since 0.1.0
67
  */
68
+ function cf7skins_update( $cf7 ) {
69
  // Get the current contact form 7 id
70
  $form_id = CF7_Skins_Contact::get_form_id( $cf7 );
71
 
84
  }
85
 
86
  // Add action while saving the Contact Form 7 form
87
+ do_action( 'cf7skins_update', $cf7 );
88
  }
89
 
90
  /**
137
  * @filter 'wpcf7_copy'
138
  *
139
  * @param $new (object) newly created Contact Form 7
140
+ * $cf7 (class) WPCF7_ContactForm
141
  *
142
  * @since 1.2.0
143
  */
144
+ function store_copy_id( $new, $cf7 ) {
145
+ update_option( '_cf7skins_copy_id', $cf7->id() ); // store copied ID to database temporarily
146
  return $new;
147
  }
148
 
157
  * @since 0.1.0
158
  */
159
  function admin_enqueue_scripts( $hook_suffix ) {
160
+ // Return if current page hook suffix not wpcf7
161
  if ( false === strpos( $hook_suffix, 'wpcf7' ) ) {
162
  return;
163
  }
214
  function add_meta_boxes( $post_id ) {
215
  add_meta_box( 'cf7s', __( 'Skins', CF7SKINS_TEXTDOMAIN ),
216
  array( &$this, 'skins_meta_box' ), null, 'mail', 'core' );
 
 
 
217
  }
218
 
219
  /**
includes/cf7-connect.php CHANGED
@@ -25,6 +25,7 @@ class CF7_Skins_CF7_Connect {
25
  // Default is 10, we use 9 to allow other styles (registered wihtout setting priority/default)
26
  // enqueued after this style, or before such as framework styles, default styling, etc.
27
  add_action( 'cf7skins_enqueue_styles', array( $this, 'enqueue_skins_style' ), 9, 1 );
 
28
  }
29
 
30
  /**
@@ -358,6 +359,32 @@ class CF7_Skins_CF7_Connect {
358
  }
359
  }
360
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
361
  /**
362
  * Get lists that contains shortcode tag in CF7 form content.
363
  * Shortcode tags outside a list <li/> will be excluded.
25
  // Default is 10, we use 9 to allow other styles (registered wihtout setting priority/default)
26
  // enqueued after this style, or before such as framework styles, default styling, etc.
27
  add_action( 'cf7skins_enqueue_styles', array( $this, 'enqueue_skins_style' ), 9, 1 );
28
+ add_filter( 'wpcf7_form_tag', array( $this, 'add_shortcode_id' ), 1, 2 );
29
  }
30
 
31
  /**
359
  }
360
  }
361
 
362
+ /**
363
+ * Add tag id attribute by using its name if is not provided.
364
+ * The id will be used in front-end to create input id
365
+ * See contact-form-7/includes/form-tags-manager.php
366
+ *
367
+ * @param (Array) $scanned_tag Current CF7 form content
368
+ * @param (Boolean) $replace true to use tag function
369
+ *
370
+ * @since 2.1.3
371
+ */
372
+ function add_shortcode_id( $scanned_tag, $replace ) {
373
+ if ( !! $scanned_tag['name'] ) { // only if has name
374
+ if ( count( $scanned_tag['options'] ) > 1 ) { // options array not empty
375
+ foreach( $scanned_tag['options'] as $option ) { // loop
376
+ if ( strpos( $option, 'id:' ) != 0 ) { // has id attribute, use single =
377
+ $scanned_tag['options'][] = "id:{$scanned_tag['name']}"; // add the id
378
+ }
379
+ }
380
+ } else { // options array empty
381
+ $scanned_tag['options'][] = "id:{$scanned_tag['name']}"; // add the id
382
+ }
383
+ }
384
+
385
+ return $scanned_tag;
386
+ }
387
+
388
  /**
389
  * Get lists that contains shortcode tag in CF7 form content.
390
  * Shortcode tags outside a list <li/> will be excluded.
includes/label.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Add label and require <em> to CF7 form content.
5
+ *
6
+ * e.g. <li>Name [text* cf7s-name]</li> changed to
7
+ * <li><label for="cf7s-name">Name <em class="cf7s-reqd">*</em></label> [text* cf7s-name]</li>
8
+ *
9
+ * @param (HTML/String) $form Current CF7 form content
10
+ *
11
+ * @since 2.1.3
12
+ */
13
+ function cf7skins_add_label_req( $form ) {
14
+
15
+ // Get all current shortcode
16
+ $scanned = CF7_Skins_CF7_Connect::scan_shortcode( $form );
17
+
18
+ // Get all shortcodes id with tag name as the index
19
+ $ids = $tags = array();
20
+
21
+ // Required feature setting
22
+ $option = get_option( CF7SKINS_OPTIONS );
23
+ $add_asterisk = isset( $option['add_asterisk'] ) ? $option['add_asterisk'] : true;
24
+
25
+ foreach( $scanned as $tag ) {
26
+
27
+ /**
28
+ * Backward compatibility for CF7 4.6
29
+ * @since 1.2.1
30
+ */
31
+ if ( version_compare( WPCF7_VERSION, '4.6', '<' ) ) { // before CF7 4.6
32
+ $tag = new WPCF7_Shortcode( $tag );
33
+ }
34
+ else { // CF7 4.6 or greater
35
+ $tag = new WPCF7_FormTag( $tag );
36
+ }
37
+
38
+ $types[] = $tag->type; // add shortcode for further text searching
39
+ $ids[$tag->name] = $tag->get_id_option() ? $tag->get_id_option() : $tag->name;
40
+ }
41
+
42
+ libxml_use_internal_errors( true ); // handle error
43
+ $dom = new DOMDocument( '1.0', 'utf-8' );
44
+ $dom->loadHTML( "<?xml encoding='UTF-8' ?>". $form );
45
+ libxml_use_internal_errors( false ); // handle error
46
+
47
+ // Get all lists (and nested list)
48
+ $lists = $dom->getElementsByTagName('li');
49
+
50
+ if ( $lists->length ) { // only if list exists
51
+
52
+ foreach( $lists as $list ) { // loop for each
53
+
54
+ foreach ( $list->childNodes as $node ) { // loop each child nodes
55
+
56
+ $content = trim( $node->textContent ); // remove spaces from plain text
57
+
58
+ // If is a text node and not empty (trim spaces/tabs)
59
+ // https://www.php.net/manual/en/dom.constants.php#constant.xml-text-node
60
+ if ( $node->nodeType === XML_TEXT_NODE && ! empty( $content ) ) {
61
+
62
+ // Loop for each type to find if the content contains shortcode
63
+ foreach( $types as $type ) {
64
+ $shortcode_type = "[{$type} "; // bracket+type+required+space, i.e. '[select* '
65
+
66
+ // Shortcode exists in content, explode it and get the label
67
+ if ( strpos( $content, $shortcode_type ) !== false ) {
68
+
69
+ // Get the label by exploding the content with shortcode type
70
+ // Explode to get label and rest text, 0 is the label and 1 is the rest
71
+ $explode = explode( $shortcode_type, $content );
72
+
73
+ $label = trim( $explode[0] ); // get the label, trim space
74
+
75
+ $name = explode( ' ', $explode[1] )[0]; // explode by space to get the name
76
+ $name = str_replace( ']', '', $name ); // remove ending bracket i.e. [date* date-597]
77
+ $id = isset( $ids[$name] ) ? $ids[$name] : $name; // check existance in ids
78
+
79
+ // Create <label/> tag and set for
80
+ $label_el = $dom->createElement( 'label', $label );
81
+ $label_el->setAttribute( 'for', $id );
82
+
83
+ // Add * required <em /> tag if enabled and set to required
84
+ if ( $add_asterisk ) {
85
+ if ( strpos( $type, '*' ) !== false ) { // is required
86
+ $req_el = $dom->createElement( 'em', '*' );
87
+ $req_el->setAttribute( 'class', 'cf7s-reqd' );
88
+ $label_el->appendChild( $req_el );
89
+ }
90
+ }
91
+
92
+ // Remove label text
93
+ $node->nodeValue = str_replace( $label, '', $content );
94
+ }
95
+ }
96
+
97
+ // Insert the label inside <li /> list
98
+ if ( isset( $label_el ) ) {
99
+ $list->insertBefore( $label_el, $node );
100
+ }
101
+ }
102
+ }
103
+ }
104
+ }
105
+
106
+ // Filter to enable further modification to HTML form
107
+ $dom = apply_filters( 'cf7skins_form_dom', $dom );
108
+
109
+ return $dom->saveXML( $dom );
110
+ }
includes/pro-version.php CHANGED
@@ -29,6 +29,9 @@
29
 
30
  <h3><?php _ex('CF7 Skins Pro','Stand-alone form. No conjugations needed.',CF7SKINS_TEXTDOMAIN); ?></h3>
31
 
 
 
 
32
  <p><a href="http://cf7skins.com/add-ons/pro/?utm_source=plugin&utm_medium=link&utm_campaign=getting-started" target="_blank"><strong><?php _ex( 'CF7 Skins Pro', 'Subject form. Add conjugations if needed.' , CF7SKINS_TEXTDOMAIN ); ?></strong></a> <?php _e( '- offers a wider range of Templates & Styles for commonly used forms', CF7SKINS_TEXTDOMAIN ); ?>.</p>
33
 
34
  <p><a href="http://cf7skins.com/support/#premium-email-support?utm_source=plugin&utm_medium=link&utm_campaign=getting-started" target="_blank"><strong><?php _ex( 'Premium Email Support','Subject form. Add conjugations if needed.', CF7SKINS_TEXTDOMAIN ); ?></strong></a> <?php _e( 'is provided by paid staff to deal with Premium users questions and problems', CF7SKINS_TEXTDOMAIN ); ?>.</p>
29
 
30
  <h3><?php _ex('CF7 Skins Pro','Stand-alone form. No conjugations needed.',CF7SKINS_TEXTDOMAIN); ?></h3>
31
 
32
+ <a target="_blank" href="http://cf7skins.com/add-ons/pro/?utm_source=plugin&utm_medium=link&utm_campaign=getting-started"><img title="CF7 Skins Pro" src="<?php echo CF7SKINS_URL; ?>
33
+ images/cf7skins-pro-logo.png" alt="CF7 Skins Pro Logo" width="400" height="150" class="alignright" /></a>
34
+
35
  <p><a href="http://cf7skins.com/add-ons/pro/?utm_source=plugin&utm_medium=link&utm_campaign=getting-started" target="_blank"><strong><?php _ex( 'CF7 Skins Pro', 'Subject form. Add conjugations if needed.' , CF7SKINS_TEXTDOMAIN ); ?></strong></a> <?php _e( '- offers a wider range of Templates & Styles for commonly used forms', CF7SKINS_TEXTDOMAIN ); ?>.</p>
36
 
37
  <p><a href="http://cf7skins.com/support/#premium-email-support?utm_source=plugin&utm_medium=link&utm_campaign=getting-started" target="_blank"><strong><?php _ex( 'Premium Email Support','Subject form. Add conjugations if needed.', CF7SKINS_TEXTDOMAIN ); ?></strong></a> <?php _e( 'is provided by paid staff to deal with Premium users questions and problems', CF7SKINS_TEXTDOMAIN ); ?>.</p>
includes/settings.php CHANGED
@@ -32,7 +32,7 @@ class CF7_Skins_Settings {
32
  $this->slug = CF7SKINS_OPTIONS;
33
  $this->textdomain = CF7SKINS_TEXTDOMAIN;
34
 
35
- $this->section = isset( $_GET['tab'] ) ? $_GET['tab'] : 'general';
36
  $this->options = get_option( $this->slug );
37
 
38
  add_action( 'admin_menu', array( $this, 'add_menu_page' ) );
@@ -54,8 +54,8 @@ class CF7_Skins_Settings {
54
 
55
  // Apply filter to allow other functions to add tabs
56
  $this->tabs = apply_filters( 'cf7skins_setting_tabs', array(
57
- 'general' => __( 'General', $this->textdomain ),
58
- 'advanced' => __( 'Advanced', $this->textdomain ),
59
  'add-ons' => __( 'Add-ons', $this->textdomain ),
60
  'getting-started' => __( 'Getting Started', $this->textdomain )
61
  ) );
@@ -63,7 +63,7 @@ class CF7_Skins_Settings {
63
  // Add the submenu page under the CF7 page
64
  $page = add_submenu_page( 'wpcf7',
65
  __( 'CF7 Skins Settings', $this->textdomain ),
66
- __( 'CF7 Skins', $this->textdomain ), 'manage_options', 'cf7skins', array( $this, 'create_settings' ) );
67
 
68
  // Display our admin scripts
69
  add_action( 'admin_print_scripts-' . $page, array( &$this, 'enqueue_script' ) );
@@ -172,12 +172,19 @@ class CF7_Skins_Settings {
172
  * @since 0.2.0.
173
  */
174
  $fields = apply_filters( 'cf7skins_setting_fields', array(
 
 
 
 
 
 
 
175
  'color_scheme' => array(
176
- 'section' => 'general',
177
- 'label' => __( 'Color Scheme', $this->textdomain ),
178
  'type' => 'color-scheme',
179
  'default' => 'default',
180
- 'description' => __( 'Select color scheme for CF7 Skins interface.', $this->textdomain ),
181
  ),
182
  /*'custom' => array(
183
  'section' => 'advanced',
@@ -214,7 +221,7 @@ class CF7_Skins_Settings {
214
  'label' => __( 'Export Form', $this->textdomain ),
215
  'type' => 'checkbox',
216
  'default' => false,
217
- 'detail' => __( 'Enable export for individual form.', $this->textdomain ),
218
  ),
219
  'delete_data' => array(
220
  'section' => 'advanced',
32
  $this->slug = CF7SKINS_OPTIONS;
33
  $this->textdomain = CF7SKINS_TEXTDOMAIN;
34
 
35
+ $this->section = isset( $_GET['tab'] ) ? $_GET['tab'] : 'advanced';
36
  $this->options = get_option( $this->slug );
37
 
38
  add_action( 'admin_menu', array( $this, 'add_menu_page' ) );
54
 
55
  // Apply filter to allow other functions to add tabs
56
  $this->tabs = apply_filters( 'cf7skins_setting_tabs', array(
57
+ /* 'general' => __( 'General', $this->textdomain ), */
58
+ 'advanced' => __( 'Options', $this->textdomain ),
59
  'add-ons' => __( 'Add-ons', $this->textdomain ),
60
  'getting-started' => __( 'Getting Started', $this->textdomain )
61
  ) );
63
  // Add the submenu page under the CF7 page
64
  $page = add_submenu_page( 'wpcf7',
65
  __( 'CF7 Skins Settings', $this->textdomain ),
66
+ __( 'CF7 Skins Settings', $this->textdomain ), 'manage_options', 'cf7skins', array( $this, 'create_settings' ) );
67
 
68
  // Display our admin scripts
69
  add_action( 'admin_print_scripts-' . $page, array( &$this, 'enqueue_script' ) );
172
  * @since 0.2.0.
173
  */
174
  $fields = apply_filters( 'cf7skins_setting_fields', array(
175
+ 'add_asterisk' => array( // @since 2.1.3
176
+ 'section' => 'advanced',
177
+ 'label' => __( 'Asterisk', $this->textdomain ),
178
+ 'type' => 'checkbox',
179
+ 'default' => true,
180
+ 'detail' => __( 'Add asterisk to required fields.', $this->textdomain ),
181
+ ),
182
  'color_scheme' => array(
183
+ 'section' => 'advanced',
184
+ 'label' => __( 'Admin Color Scheme', $this->textdomain ),
185
  'type' => 'color-scheme',
186
  'default' => 'default',
187
+ 'description' => __( 'Select color scheme for CF7 Skins admin interface. (WP Admin only not form colors) ', $this->textdomain ),
188
  ),
189
  /*'custom' => array(
190
  'section' => 'advanced',
221
  'label' => __( 'Export Form', $this->textdomain ),
222
  'type' => 'checkbox',
223
  'default' => false,
224
+ 'detail' => __( 'Enable export of individual CF7 Skins form.', $this->textdomain ),
225
  ),
226
  'delete_data' => array(
227
  'section' => 'advanced',
index.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Contact Form 7 Skins
4
  * Plugin URI: http://cf7skins.com
5
  * Description: Adds drag & drop Visual Editor with Templates & Styles to Contact Form 7. Requires Contact Form 7.
6
- * Version: 2.2.2
7
  * Author: Neil Murray
8
  * Author URI: http://cf7skins.com
9
  * License: GPL-2.0+
@@ -30,7 +30,7 @@ if ( ! defined( 'ABSPATH' ) ) {
30
  *
31
  * @since 0.1.0
32
  */
33
- define( 'CF7SKINS_VERSION', '2.2.2' );
34
  define( 'CF7SKINS_OPTIONS', 'cf7skins' ); // Database option names
35
  define( 'CF7SKINS_TEXTDOMAIN', 'contact-form-7-skins' );
36
  define( 'CF7SKINS_FEATURE_FILTER', false ); // @since 0.4.0
@@ -168,22 +168,23 @@ function cf7skins_plugin_loaded() {
168
  require_once( CF7SKINS_PATH . 'includes/skin.php' );
169
  require_once( CF7SKINS_PATH . 'includes/template.php' );
170
  require_once( CF7SKINS_PATH . 'includes/style.php' );
 
171
  require_once( CF7SKINS_PATH . 'includes/cf7-connect.php' );
172
 
173
  if ( is_admin() ) {
174
  require_once( CF7SKINS_PATH . 'includes/admin.php' );
175
- require_once( CF7SKINS_PATH . 'includes/admin-visual.php' );
176
  require_once( CF7SKINS_PATH . 'includes/tab.php' );
177
  require_once( CF7SKINS_PATH . 'includes/settings.php' );
178
  require_once( CF7SKINS_PATH . 'includes/admin-notice.php' );
179
  require_once( CF7SKINS_PATH . 'includes/export.php' );
180
  } else {
181
- require_once( CF7SKINS_PATH . 'includes/front-visual.php' );
182
  }
183
-
184
  if ( ! class_exists( 'EDD_SL_Plugin_Updater' ) ) {
185
  require_once( CF7SKINS_PATH . 'includes/EDD_SL_Plugin_Updater.php' );
186
- }
187
 
188
  // Display admin notifications
189
  } else {
3
  * Plugin Name: Contact Form 7 Skins
4
  * Plugin URI: http://cf7skins.com
5
  * Description: Adds drag & drop Visual Editor with Templates & Styles to Contact Form 7. Requires Contact Form 7.
6
+ * Version: 2.3
7
  * Author: Neil Murray
8
  * Author URI: http://cf7skins.com
9
  * License: GPL-2.0+
30
  *
31
  * @since 0.1.0
32
  */
33
+ define( 'CF7SKINS_VERSION', '2.3' );
34
  define( 'CF7SKINS_OPTIONS', 'cf7skins' ); // Database option names
35
  define( 'CF7SKINS_TEXTDOMAIN', 'contact-form-7-skins' );
36
  define( 'CF7SKINS_FEATURE_FILTER', false ); // @since 0.4.0
168
  require_once( CF7SKINS_PATH . 'includes/skin.php' );
169
  require_once( CF7SKINS_PATH . 'includes/template.php' );
170
  require_once( CF7SKINS_PATH . 'includes/style.php' );
171
+ require_once( CF7SKINS_PATH . 'includes/label.php' );
172
  require_once( CF7SKINS_PATH . 'includes/cf7-connect.php' );
173
 
174
  if ( is_admin() ) {
175
  require_once( CF7SKINS_PATH . 'includes/admin.php' );
176
+ require_once( CF7SKINS_PATH . 'includes/admin-visual.php' ); // disabled in visual branch
177
  require_once( CF7SKINS_PATH . 'includes/tab.php' );
178
  require_once( CF7SKINS_PATH . 'includes/settings.php' );
179
  require_once( CF7SKINS_PATH . 'includes/admin-notice.php' );
180
  require_once( CF7SKINS_PATH . 'includes/export.php' );
181
  } else {
182
+ require_once( CF7SKINS_PATH . 'includes/front-visual.php' ); // disabled in visual branch
183
  }
184
+
185
  if ( ! class_exists( 'EDD_SL_Plugin_Updater' ) ) {
186
  require_once( CF7SKINS_PATH . 'includes/EDD_SL_Plugin_Updater.php' );
187
+ }
188
 
189
  // Display admin notifications
190
  } else {
js/init.js DELETED
@@ -1,3264 +0,0 @@
1
- /******/ (function(modules) { // webpackBootstrap
2
- /******/ // install a JSONP callback for chunk loading
3
- /******/ var parentJsonpFunction = window["webpackJsonp"];
4
- /******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {
5
- /******/ // add "moreModules" to the modules object,
6
- /******/ // then flag all "chunkIds" as loaded and fire callback
7
- /******/ var moduleId, chunkId, i = 0, resolves = [], result;
8
- /******/ for(;i < chunkIds.length; i++) {
9
- /******/ chunkId = chunkIds[i];
10
- /******/ if(installedChunks[chunkId]) {
11
- /******/ resolves.push(installedChunks[chunkId][0]);
12
- /******/ }
13
- /******/ installedChunks[chunkId] = 0;
14
- /******/ }
15
- /******/ for(moduleId in moreModules) {
16
- /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
17
- /******/ modules[moduleId] = moreModules[moduleId];
18
- /******/ }
19
- /******/ }
20
- /******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);
21
- /******/ while(resolves.length) {
22
- /******/ resolves.shift()();
23
- /******/ }
24
- /******/ if(executeModules) {
25
- /******/ for(i=0; i < executeModules.length; i++) {
26
- /******/ result = __webpack_require__(__webpack_require__.s = executeModules[i]);
27
- /******/ }
28
- /******/ }
29
- /******/ return result;
30
- /******/ };
31
- /******/
32
- /******/ // The module cache
33
- /******/ var installedModules = {};
34
- /******/
35
- /******/ // objects to store loaded and loading chunks
36
- /******/ var installedChunks = {
37
- /******/ 4: 0
38
- /******/ };
39
- /******/
40
- /******/ // The require function
41
- /******/ function __webpack_require__(moduleId) {
42
- /******/
43
- /******/ // Check if module is in cache
44
- /******/ if(installedModules[moduleId]) {
45
- /******/ return installedModules[moduleId].exports;
46
- /******/ }
47
- /******/ // Create a new module (and put it into the cache)
48
- /******/ var module = installedModules[moduleId] = {
49
- /******/ i: moduleId,
50
- /******/ l: false,
51
- /******/ exports: {}
52
- /******/ };
53
- /******/
54
- /******/ // Execute the module function
55
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
56
- /******/
57
- /******/ // Flag the module as loaded
58
- /******/ module.l = true;
59
- /******/
60
- /******/ // Return the exports of the module
61
- /******/ return module.exports;
62
- /******/ }
63
- /******/
64
- /******/ // This file contains only the entry chunk.
65
- /******/ // The chunk loading function for additional chunks
66
- /******/ __webpack_require__.e = function requireEnsure(chunkId) {
67
- /******/ var installedChunkData = installedChunks[chunkId];
68
- /******/ if(installedChunkData === 0) {
69
- /******/ return new Promise(function(resolve) { resolve(); });
70
- /******/ }
71
- /******/
72
- /******/ // a Promise means "currently loading".
73
- /******/ if(installedChunkData) {
74
- /******/ return installedChunkData[2];
75
- /******/ }
76
- /******/
77
- /******/ // setup Promise in chunk cache
78
- /******/ var promise = new Promise(function(resolve, reject) {
79
- /******/ installedChunkData = installedChunks[chunkId] = [resolve, reject];
80
- /******/ });
81
- /******/ installedChunkData[2] = promise;
82
- /******/
83
- /******/ // start chunk loading
84
- /******/ var head = document.getElementsByTagName('head')[0];
85
- /******/ var script = document.createElement('script');
86
- /******/ script.type = 'text/javascript';
87
- /******/ script.charset = 'utf-8';
88
- /******/ script.async = true;
89
- /******/ script.timeout = 120000;
90
- /******/
91
- /******/ if (__webpack_require__.nc) {
92
- /******/ script.setAttribute("nonce", __webpack_require__.nc);
93
- /******/ }
94
- /******/ script.src = __webpack_require__.p + "dist/" + chunkId + ".js";
95
- /******/ var timeout = setTimeout(onScriptComplete, 120000);
96
- /******/ script.onerror = script.onload = onScriptComplete;
97
- /******/ function onScriptComplete() {
98
- /******/ // avoid mem leaks in IE.
99
- /******/ script.onerror = script.onload = null;
100
- /******/ clearTimeout(timeout);
101
- /******/ var chunk = installedChunks[chunkId];
102
- /******/ if(chunk !== 0) {
103
- /******/ if(chunk) {
104
- /******/ chunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));
105
- /******/ }
106
- /******/ installedChunks[chunkId] = undefined;
107
- /******/ }
108
- /******/ };
109
- /******/ head.appendChild(script);
110
- /******/
111
- /******/ return promise;
112
- /******/ };
113
- /******/
114
- /******/ // expose the modules object (__webpack_modules__)
115
- /******/ __webpack_require__.m = modules;
116
- /******/
117
- /******/ // expose the module cache
118
- /******/ __webpack_require__.c = installedModules;
119
- /******/
120
- /******/ // define getter function for harmony exports
121
- /******/ __webpack_require__.d = function(exports, name, getter) {
122
- /******/ if(!__webpack_require__.o(exports, name)) {
123
- /******/ Object.defineProperty(exports, name, {
124
- /******/ configurable: false,
125
- /******/ enumerable: true,
126
- /******/ get: getter
127
- /******/ });
128
- /******/ }
129
- /******/ };
130
- /******/
131
- /******/ // getDefaultExport function for compatibility with non-harmony modules
132
- /******/ __webpack_require__.n = function(module) {
133
- /******/ var getter = module && module.__esModule ?
134
- /******/ function getDefault() { return module['default']; } :
135
- /******/ function getModuleExports() { return module; };
136
- /******/ __webpack_require__.d(getter, 'a', getter);
137
- /******/ return getter;
138
- /******/ };
139
- /******/
140
- /******/ // Object.prototype.hasOwnProperty.call
141
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
142
- /******/
143
- /******/ // __webpack_public_path__
144
- /******/ __webpack_require__.p = "";
145
- /******/
146
- /******/ // on error function for async loading
147
- /******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
148
- /******/ })
149
- /************************************************************************/
150
- /******/ ({
151
-
152
- /***/ 1:
153
- /***/ (function(module, exports, __webpack_require__) {
154
-
155
- "use strict";
156
- /* WEBPACK VAR INJECTION */(function(process) {
157
-
158
- if (process.env.NODE_ENV === 'production') {
159
- module.exports = __webpack_require__(233);
160
- } else {
161
- module.exports = __webpack_require__(234);
162
- }
163
-
164
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
165
-
166
- /***/ }),
167
-
168
- /***/ 108:
169
- /***/ (function(module, exports) {
170
-
171
- module.exports = function (it) {
172
- if (typeof it != 'function') throw TypeError(it + ' is not a function!');
173
- return it;
174
- };
175
-
176
-
177
- /***/ }),
178
-
179
- /***/ 109:
180
- /***/ (function(module, exports, __webpack_require__) {
181
-
182
- module.exports = !__webpack_require__(20) && !__webpack_require__(26)(function () {
183
- return Object.defineProperty(__webpack_require__(130)('div'), 'a', { get: function () { return 7; } }).a != 7;
184
- });
185
-
186
-
187
- /***/ }),
188
-
189
- /***/ 11:
190
- /***/ (function(module, exports, __webpack_require__) {
191
-
192
- var store = __webpack_require__(66)('wks');
193
- var uid = __webpack_require__(46);
194
- var Symbol = __webpack_require__(13).Symbol;
195
- var USE_SYMBOL = typeof Symbol == 'function';
196
-
197
- var $exports = module.exports = function (name) {
198
- return store[name] || (store[name] =
199
- USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
200
- };
201
-
202
- $exports.store = store;
203
-
204
-
205
- /***/ }),
206
-
207
- /***/ 110:
208
- /***/ (function(module, exports, __webpack_require__) {
209
-
210
- module.exports = __webpack_require__(35);
211
-
212
-
213
- /***/ }),
214
-
215
- /***/ 111:
216
- /***/ (function(module, exports, __webpack_require__) {
217
-
218
- var has = __webpack_require__(23);
219
- var toIObject = __webpack_require__(24);
220
- var arrayIndexOf = __webpack_require__(251)(false);
221
- var IE_PROTO = __webpack_require__(132)('IE_PROTO');
222
-
223
- module.exports = function (object, names) {
224
- var O = toIObject(object);
225
- var i = 0;
226
- var result = [];
227
- var key;
228
- for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
229
- // Don't enum bug & hidden keys
230
- while (names.length > i) if (has(O, key = names[i++])) {
231
- ~arrayIndexOf(result, key) || result.push(key);
232
- }
233
- return result;
234
- };
235
-
236
-
237
- /***/ }),
238
-
239
- /***/ 112:
240
- /***/ (function(module, exports, __webpack_require__) {
241
-
242
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
243
- var cof = __webpack_require__(37);
244
- // eslint-disable-next-line no-prototype-builtins
245
- module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
246
- return cof(it) == 'String' ? it.split('') : Object(it);
247
- };
248
-
249
-
250
- /***/ }),
251
-
252
- /***/ 113:
253
- /***/ (function(module, exports, __webpack_require__) {
254
-
255
- // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
256
- var has = __webpack_require__(23);
257
- var toObject = __webpack_require__(32);
258
- var IE_PROTO = __webpack_require__(132)('IE_PROTO');
259
- var ObjectProto = Object.prototype;
260
-
261
- module.exports = Object.getPrototypeOf || function (O) {
262
- O = toObject(O);
263
- if (has(O, IE_PROTO)) return O[IE_PROTO];
264
- if (typeof O.constructor == 'function' && O instanceof O.constructor) {
265
- return O.constructor.prototype;
266
- } return O instanceof Object ? ObjectProto : null;
267
- };
268
-
269
-
270
- /***/ }),
271
-
272
- /***/ 12:
273
- /***/ (function(module, exports, __webpack_require__) {
274
-
275
- var global = __webpack_require__(13);
276
- var core = __webpack_require__(3);
277
- var ctx = __webpack_require__(44);
278
- var hide = __webpack_require__(35);
279
- var PROTOTYPE = 'prototype';
280
-
281
- var $export = function (type, name, source) {
282
- var IS_FORCED = type & $export.F;
283
- var IS_GLOBAL = type & $export.G;
284
- var IS_STATIC = type & $export.S;
285
- var IS_PROTO = type & $export.P;
286
- var IS_BIND = type & $export.B;
287
- var IS_WRAP = type & $export.W;
288
- var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
289
- var expProto = exports[PROTOTYPE];
290
- var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
291
- var key, own, out;
292
- if (IS_GLOBAL) source = name;
293
- for (key in source) {
294
- // contains in native
295
- own = !IS_FORCED && target && target[key] !== undefined;
296
- if (own && key in exports) continue;
297
- // export native or passed
298
- out = own ? target[key] : source[key];
299
- // prevent global pollution for namespaces
300
- exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
301
- // bind timers to global for call from export context
302
- : IS_BIND && own ? ctx(out, global)
303
- // wrap global constructors for prevent change them in library
304
- : IS_WRAP && target[key] == out ? (function (C) {
305
- var F = function (a, b, c) {
306
- if (this instanceof C) {
307
- switch (arguments.length) {
308
- case 0: return new C();
309
- case 1: return new C(a);
310
- case 2: return new C(a, b);
311
- } return new C(a, b, c);
312
- } return C.apply(this, arguments);
313
- };
314
- F[PROTOTYPE] = C[PROTOTYPE];
315
- return F;
316
- // make static versions for prototype methods
317
- })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
318
- // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
319
- if (IS_PROTO) {
320
- (exports.virtual || (exports.virtual = {}))[key] = out;
321
- // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
322
- if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
323
- }
324
- }
325
- };
326
- // type bitmap
327
- $export.F = 1; // forced
328
- $export.G = 2; // global
329
- $export.S = 4; // static
330
- $export.P = 8; // proto
331
- $export.B = 16; // bind
332
- $export.W = 32; // wrap
333
- $export.U = 64; // safe
334
- $export.R = 128; // real proto method for `library`
335
- module.exports = $export;
336
-
337
-
338
- /***/ }),
339
-
340
- /***/ 128:
341
- /***/ (function(module, exports) {
342
-
343
- // 7.1.4 ToInteger
344
- var ceil = Math.ceil;
345
- var floor = Math.floor;
346
- module.exports = function (it) {
347
- return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
348
- };
349
-
350
-
351
- /***/ }),
352
-
353
- /***/ 129:
354
- /***/ (function(module, exports) {
355
-
356
- // 7.2.1 RequireObjectCoercible(argument)
357
- module.exports = function (it) {
358
- if (it == undefined) throw TypeError("Can't call method on " + it);
359
- return it;
360
- };
361
-
362
-
363
- /***/ }),
364
-
365
- /***/ 13:
366
- /***/ (function(module, exports) {
367
-
368
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
369
- var global = module.exports = typeof window != 'undefined' && window.Math == Math
370
- ? window : typeof self != 'undefined' && self.Math == Math ? self
371
- // eslint-disable-next-line no-new-func
372
- : Function('return this')();
373
- if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
374
-
375
-
376
- /***/ }),
377
-
378
- /***/ 130:
379
- /***/ (function(module, exports, __webpack_require__) {
380
-
381
- var isObject = __webpack_require__(19);
382
- var document = __webpack_require__(13).document;
383
- // typeof document.createElement is 'object' in old IE
384
- var is = isObject(document) && isObject(document.createElement);
385
- module.exports = function (it) {
386
- return is ? document.createElement(it) : {};
387
- };
388
-
389
-
390
- /***/ }),
391
-
392
- /***/ 131:
393
- /***/ (function(module, exports, __webpack_require__) {
394
-
395
- // 7.1.15 ToLength
396
- var toInteger = __webpack_require__(128);
397
- var min = Math.min;
398
- module.exports = function (it) {
399
- return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
400
- };
401
-
402
-
403
- /***/ }),
404
-
405
- /***/ 132:
406
- /***/ (function(module, exports, __webpack_require__) {
407
-
408
- var shared = __webpack_require__(66)('keys');
409
- var uid = __webpack_require__(46);
410
- module.exports = function (key) {
411
- return shared[key] || (shared[key] = uid(key));
412
- };
413
-
414
-
415
- /***/ }),
416
-
417
- /***/ 14:
418
- /***/ (function(module, exports, __webpack_require__) {
419
-
420
- var anObject = __webpack_require__(18);
421
- var IE8_DOM_DEFINE = __webpack_require__(109);
422
- var toPrimitive = __webpack_require__(50);
423
- var dP = Object.defineProperty;
424
-
425
- exports.f = __webpack_require__(20) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
426
- anObject(O);
427
- P = toPrimitive(P, true);
428
- anObject(Attributes);
429
- if (IE8_DOM_DEFINE) try {
430
- return dP(O, P, Attributes);
431
- } catch (e) { /* empty */ }
432
- if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
433
- if ('value' in Attributes) O[P] = Attributes.value;
434
- return O;
435
- };
436
-
437
-
438
- /***/ }),
439
-
440
- /***/ 166:
441
- /***/ (function(module, exports, __webpack_require__) {
442
-
443
- "use strict";
444
-
445
- var LIBRARY = __webpack_require__(43);
446
- var $export = __webpack_require__(12);
447
- var redefine = __webpack_require__(110);
448
- var hide = __webpack_require__(35);
449
- var has = __webpack_require__(23);
450
- var Iterators = __webpack_require__(45);
451
- var $iterCreate = __webpack_require__(249);
452
- var setToStringTag = __webpack_require__(57);
453
- var getPrototypeOf = __webpack_require__(113);
454
- var ITERATOR = __webpack_require__(11)('iterator');
455
- var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
456
- var FF_ITERATOR = '@@iterator';
457
- var KEYS = 'keys';
458
- var VALUES = 'values';
459
-
460
- var returnThis = function () { return this; };
461
-
462
- module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
463
- $iterCreate(Constructor, NAME, next);
464
- var getMethod = function (kind) {
465
- if (!BUGGY && kind in proto) return proto[kind];
466
- switch (kind) {
467
- case KEYS: return function keys() { return new Constructor(this, kind); };
468
- case VALUES: return function values() { return new Constructor(this, kind); };
469
- } return function entries() { return new Constructor(this, kind); };
470
- };
471
- var TAG = NAME + ' Iterator';
472
- var DEF_VALUES = DEFAULT == VALUES;
473
- var VALUES_BUG = false;
474
- var proto = Base.prototype;
475
- var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
476
- var $default = (!BUGGY && $native) || getMethod(DEFAULT);
477
- var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
478
- var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
479
- var methods, key, IteratorPrototype;
480
- // Fix native
481
- if ($anyNative) {
482
- IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
483
- if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
484
- // Set @@toStringTag to native iterators
485
- setToStringTag(IteratorPrototype, TAG, true);
486
- // fix for some old engines
487
- if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
488
- }
489
- }
490
- // fix Array#{values, @@iterator}.name in V8 / FF
491
- if (DEF_VALUES && $native && $native.name !== VALUES) {
492
- VALUES_BUG = true;
493
- $default = function values() { return $native.call(this); };
494
- }
495
- // Define iterator
496
- if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
497
- hide(proto, ITERATOR, $default);
498
- }
499
- // Plug for library
500
- Iterators[NAME] = $default;
501
- Iterators[TAG] = returnThis;
502
- if (DEFAULT) {
503
- methods = {
504
- values: DEF_VALUES ? $default : getMethod(VALUES),
505
- keys: IS_SET ? $default : getMethod(KEYS),
506
- entries: $entries
507
- };
508
- if (FORCED) for (key in methods) {
509
- if (!(key in proto)) redefine(proto, key, methods[key]);
510
- } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
511
- }
512
- return methods;
513
- };
514
-
515
-
516
- /***/ }),
517
-
518
- /***/ 167:
519
- /***/ (function(module, exports, __webpack_require__) {
520
-
521
- var document = __webpack_require__(13).document;
522
- module.exports = document && document.documentElement;
523
-
524
-
525
- /***/ }),
526
-
527
- /***/ 18:
528
- /***/ (function(module, exports, __webpack_require__) {
529
-
530
- var isObject = __webpack_require__(19);
531
- module.exports = function (it) {
532
- if (!isObject(it)) throw TypeError(it + ' is not an object!');
533
- return it;
534
- };
535
-
536
-
537
- /***/ }),
538
-
539
- /***/ 19:
540
- /***/ (function(module, exports) {
541
-
542
- module.exports = function (it) {
543
- return typeof it === 'object' ? it !== null : typeof it === 'function';
544
- };
545
-
546
-
547
- /***/ }),
548
-
549
- /***/ 20:
550
- /***/ (function(module, exports, __webpack_require__) {
551
-
552
- // Thank's IE8 for his funny defineProperty
553
- module.exports = !__webpack_require__(26)(function () {
554
- return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
555
- });
556
-
557
-
558
- /***/ }),
559
-
560
- /***/ 23:
561
- /***/ (function(module, exports) {
562
-
563
- var hasOwnProperty = {}.hasOwnProperty;
564
- module.exports = function (it, key) {
565
- return hasOwnProperty.call(it, key);
566
- };
567
-
568
-
569
- /***/ }),
570
-
571
- /***/ 233:
572
- /***/ (function(module, exports, __webpack_require__) {
573
-
574
- "use strict";
575
- /** @license React v16.5.2
576
- * react.production.min.js
577
- *
578
- * Copyright (c) Facebook, Inc. and its affiliates.
579
- *
580
- * This source code is licensed under the MIT license found in the
581
- * LICENSE file in the root directory of this source tree.
582
- */
583
-
584
- var m=__webpack_require__(42),n="function"===typeof Symbol&&Symbol.for,p=n?Symbol.for("react.element"):60103,q=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,t=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,v=n?Symbol.for("react.provider"):60109,w=n?Symbol.for("react.context"):60110,x=n?Symbol.for("react.async_mode"):60111,y=n?Symbol.for("react.forward_ref"):60112;n&&Symbol.for("react.placeholder");
585
- var z="function"===typeof Symbol&&Symbol.iterator;function A(a,b,d,c,e,g,h,f){if(!a){a=void 0;if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var k=[d,c,e,g,h,f],l=0;a=Error(b.replace(/%s/g,function(){return k[l++]}));a.name="Invariant Violation"}a.framesToPop=1;throw a;}}
586
- function B(a){for(var b=arguments.length-1,d="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=0;c<b;c++)d+="&args[]="+encodeURIComponent(arguments[c+1]);A(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",d)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D={};
587
- function E(a,b,d){this.props=a;this.context=b;this.refs=D;this.updater=d||C}E.prototype.isReactComponent={};E.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?B("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function F(){}F.prototype=E.prototype;function G(a,b,d){this.props=a;this.context=b;this.refs=D;this.updater=d||C}var H=G.prototype=new F;
588
- H.constructor=G;m(H,E.prototype);H.isPureReactComponent=!0;var I={current:null,currentDispatcher:null},J=Object.prototype.hasOwnProperty,K={key:!0,ref:!0,__self:!0,__source:!0};
589
- function L(a,b,d){var c=void 0,e={},g=null,h=null;if(null!=b)for(c in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(g=""+b.key),b)J.call(b,c)&&!K.hasOwnProperty(c)&&(e[c]=b[c]);var f=arguments.length-2;if(1===f)e.children=d;else if(1<f){for(var k=Array(f),l=0;l<f;l++)k[l]=arguments[l+2];e.children=k}if(a&&a.defaultProps)for(c in f=a.defaultProps,f)void 0===e[c]&&(e[c]=f[c]);return{$$typeof:p,type:a,key:g,ref:h,props:e,_owner:I.current}}
590
- function M(a,b){return{$$typeof:p,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function N(a){return"object"===typeof a&&null!==a&&a.$$typeof===p}function escape(a){var b={"=":"=0",":":"=2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var O=/\/+/g,P=[];function Q(a,b,d,c){if(P.length){var e=P.pop();e.result=a;e.keyPrefix=b;e.func=d;e.context=c;e.count=0;return e}return{result:a,keyPrefix:b,func:d,context:c,count:0}}
591
- function R(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>P.length&&P.push(a)}
592
- function S(a,b,d,c){var e=typeof a;if("undefined"===e||"boolean"===e)a=null;var g=!1;if(null===a)g=!0;else switch(e){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case p:case q:g=!0}}if(g)return d(c,a,""===b?"."+T(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var h=0;h<a.length;h++){e=a[h];var f=b+T(e,h);g+=S(e,f,d,c)}else if(null===a||"object"!==typeof a?f=null:(f=z&&a[z]||a["@@iterator"],f="function"===typeof f?f:null),"function"===typeof f)for(a=f.call(a),h=
593
- 0;!(e=a.next()).done;)e=e.value,f=b+T(e,h++),g+=S(e,f,d,c);else"object"===e&&(d=""+a,B("31","[object Object]"===d?"object with keys {"+Object.keys(a).join(", ")+"}":d,""));return g}function U(a,b,d){return null==a?0:S(a,"",b,d)}function T(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function V(a,b){a.func.call(a.context,b,a.count++)}
594
- function aa(a,b,d){var c=a.result,e=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?W(a,c,d,function(a){return a}):null!=a&&(N(a)&&(a=M(a,e+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(O,"$&/")+"/")+d)),c.push(a))}function W(a,b,d,c,e){var g="";null!=d&&(g=(""+d).replace(O,"$&/")+"/");b=Q(b,g,c,e);U(a,aa,b);R(b)}function ba(a,b){var d=I.currentDispatcher;null===d?B("277"):void 0;return d.readContext(a,b)}
595
- var X={Children:{map:function(a,b,d){if(null==a)return a;var c=[];W(a,c,null,b,d);return c},forEach:function(a,b,d){if(null==a)return a;b=Q(null,null,b,d);U(a,V,b);R(b)},count:function(a){return U(a,function(){return null},null)},toArray:function(a){var b=[];W(a,b,null,function(a){return a});return b},only:function(a){N(a)?void 0:B("143");return a}},createRef:function(){return{current:null}},Component:E,PureComponent:G,createContext:function(a,b){void 0===b&&(b=null);a={$$typeof:w,_calculateChangedBits:b,
596
- _currentValue:a,_currentValue2:a,Provider:null,Consumer:null,unstable_read:null};a.Provider={$$typeof:v,_context:a};a.Consumer=a;a.unstable_read=ba.bind(null,a);return a},forwardRef:function(a){return{$$typeof:y,render:a}},Fragment:r,StrictMode:t,unstable_AsyncMode:x,unstable_Profiler:u,createElement:L,cloneElement:function(a,b,d){null===a||void 0===a?B("267",a):void 0;var c=void 0,e=m({},a.props),g=a.key,h=a.ref,f=a._owner;if(null!=b){void 0!==b.ref&&(h=b.ref,f=I.current);void 0!==b.key&&(g=""+b.key);
597
- var k=void 0;a.type&&a.type.defaultProps&&(k=a.type.defaultProps);for(c in b)J.call(b,c)&&!K.hasOwnProperty(c)&&(e[c]=void 0===b[c]&&void 0!==k?k[c]:b[c])}c=arguments.length-2;if(1===c)e.children=d;else if(1<c){k=Array(c);for(var l=0;l<c;l++)k[l]=arguments[l+2];e.children=k}return{$$typeof:p,type:a.type,key:g,ref:h,props:e,_owner:f}},createFactory:function(a){var b=L.bind(null,a);b.type=a;return b},isValidElement:N,version:"16.5.2",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:I,
598
- assign:m}},Y={default:X},Z=Y&&X||Y;module.exports=Z.default||Z;
599
-
600
-
601
- /***/ }),
602
-
603
- /***/ 234:
604
- /***/ (function(module, exports, __webpack_require__) {
605
-
606
- "use strict";
607
- /* WEBPACK VAR INJECTION */(function(process) {/** @license React v16.5.2
608
- * react.development.js
609
- *
610
- * Copyright (c) Facebook, Inc. and its affiliates.
611
- *
612
- * This source code is licensed under the MIT license found in the
613
- * LICENSE file in the root directory of this source tree.
614
- */
615
-
616
-
617
-
618
-
619
-
620
- if (process.env.NODE_ENV !== "production") {
621
- (function() {
622
- 'use strict';
623
-
624
- var _assign = __webpack_require__(42);
625
- var checkPropTypes = __webpack_require__(235);
626
-
627
- // TODO: this is special because it gets imported during build.
628
-
629
- var ReactVersion = '16.5.2';
630
-
631
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
632
- // nor polyfill, then a plain number is used for performance.
633
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
634
-
635
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
636
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
637
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
638
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
639
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
640
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
641
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
642
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
643
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
644
- var REACT_PLACEHOLDER_TYPE = hasSymbol ? Symbol.for('react.placeholder') : 0xead1;
645
-
646
- var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
647
- var FAUX_ITERATOR_SYMBOL = '@@iterator';
648
-
649
- function getIteratorFn(maybeIterable) {
650
- if (maybeIterable === null || typeof maybeIterable !== 'object') {
651
- return null;
652
- }
653
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
654
- if (typeof maybeIterator === 'function') {
655
- return maybeIterator;
656
- }
657
- return null;
658
- }
659
-
660
- // Exports ReactDOM.createRoot
661
-
662
-
663
- // Experimental error-boundary API that can recover from errors within a single
664
- // render phase
665
-
666
- // Suspense
667
- var enableSuspense = false;
668
- // Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
669
-
670
-
671
- // In some cases, StrictMode should also double-render lifecycles.
672
- // This can be confusing for tests though,
673
- // And it can be bad for performance in production.
674
- // This feature flag can be used to control the behavior:
675
-
676
-
677
- // To preserve the "Pause on caught exceptions" behavior of the debugger, we
678
- // replay the begin phase of a failed component inside invokeGuardedCallback.
679
-
680
-
681
- // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
682
-
683
-
684
- // Warn about legacy context API
685
-
686
-
687
- // Gather advanced timing metrics for Profiler subtrees.
688
-
689
-
690
- // Trace which interactions trigger each commit.
691
-
692
-
693
- // Only used in www builds.
694
-
695
-
696
- // Only used in www builds.
697
-
698
-
699
- // React Fire: prevent the value and checked attributes from syncing
700
- // with their related DOM properties
701
-
702
- /**
703
- * Use invariant() to assert state which your program assumes to be true.
704
- *
705
- * Provide sprintf-style format (only %s is supported) and arguments
706
- * to provide information about what broke and what you were
707
- * expecting.
708
- *
709
- * The invariant message will be stripped in production, but the invariant
710
- * will remain to ensure logic does not differ in production.
711
- */
712
-
713
- var validateFormat = function () {};
714
-
715
- {
716
- validateFormat = function (format) {
717
- if (format === undefined) {
718
- throw new Error('invariant requires an error message argument');
719
- }
720
- };
721
- }
722
-
723
- function invariant(condition, format, a, b, c, d, e, f) {
724
- validateFormat(format);
725
-
726
- if (!condition) {
727
- var error = void 0;
728
- if (format === undefined) {
729
- error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
730
- } else {
731
- var args = [a, b, c, d, e, f];
732
- var argIndex = 0;
733
- error = new Error(format.replace(/%s/g, function () {
734
- return args[argIndex++];
735
- }));
736
- error.name = 'Invariant Violation';
737
- }
738
-
739
- error.framesToPop = 1; // we don't care about invariant's own frame
740
- throw error;
741
- }
742
- }
743
-
744
- // Relying on the `invariant()` implementation lets us
745
- // preserve the format and params in the www builds.
746
-
747
- /**
748
- * Forked from fbjs/warning:
749
- * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
750
- *
751
- * Only change is we use console.warn instead of console.error,
752
- * and do nothing when 'console' is not supported.
753
- * This really simplifies the code.
754
- * ---
755
- * Similar to invariant but only logs a warning if the condition is not met.
756
- * This can be used to log issues in development environments in critical
757
- * paths. Removing the logging code for production environments will keep the
758
- * same logic and follow the same code paths.
759
- */
760
-
761
- var lowPriorityWarning = function () {};
762
-
763
- {
764
- var printWarning = function (format) {
765
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
766
- args[_key - 1] = arguments[_key];
767
- }
768
-
769
- var argIndex = 0;
770
- var message = 'Warning: ' + format.replace(/%s/g, function () {
771
- return args[argIndex++];
772
- });
773
- if (typeof console !== 'undefined') {
774
- console.warn(message);
775
- }
776
- try {
777
- // --- Welcome to debugging React ---
778
- // This error was thrown as a convenience so that you can use this stack
779
- // to find the callsite that caused this warning to fire.
780
- throw new Error(message);
781
- } catch (x) {}
782
- };
783
-
784
- lowPriorityWarning = function (condition, format) {
785
- if (format === undefined) {
786
- throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');
787
- }
788
- if (!condition) {
789
- for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
790
- args[_key2 - 2] = arguments[_key2];
791
- }
792
-
793
- printWarning.apply(undefined, [format].concat(args));
794
- }
795
- };
796
- }
797
-
798
- var lowPriorityWarning$1 = lowPriorityWarning;
799
-
800
- /**
801
- * Similar to invariant but only logs a warning if the condition is not met.
802
- * This can be used to log issues in development environments in critical
803
- * paths. Removing the logging code for production environments will keep the
804
- * same logic and follow the same code paths.
805
- */
806
-
807
- var warningWithoutStack = function () {};
808
-
809
- {
810
- warningWithoutStack = function (condition, format) {
811
- for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
812
- args[_key - 2] = arguments[_key];
813
- }
814
-
815
- if (format === undefined) {
816
- throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
817
- }
818
- if (args.length > 8) {
819
- // Check before the condition to catch violations early.
820
- throw new Error('warningWithoutStack() currently supports at most 8 arguments.');
821
- }
822
- if (condition) {
823
- return;
824
- }
825
- if (typeof console !== 'undefined') {
826
- var _args$map = args.map(function (item) {
827
- return '' + item;
828
- }),
829
- a = _args$map[0],
830
- b = _args$map[1],
831
- c = _args$map[2],
832
- d = _args$map[3],
833
- e = _args$map[4],
834
- f = _args$map[5],
835
- g = _args$map[6],
836
- h = _args$map[7];
837
-
838
- var message = 'Warning: ' + format;
839
-
840
- // We intentionally don't use spread (or .apply) because it breaks IE9:
841
- // https://github.com/facebook/react/issues/13610
842
- switch (args.length) {
843
- case 0:
844
- console.error(message);
845
- break;
846
- case 1:
847
- console.error(message, a);
848
- break;
849
- case 2:
850
- console.error(message, a, b);
851
- break;
852
- case 3:
853
- console.error(message, a, b, c);
854
- break;
855
- case 4:
856
- console.error(message, a, b, c, d);
857
- break;
858
- case 5:
859
- console.error(message, a, b, c, d, e);
860
- break;
861
- case 6:
862
- console.error(message, a, b, c, d, e, f);
863
- break;
864
- case 7:
865
- console.error(message, a, b, c, d, e, f, g);
866
- break;
867
- case 8:
868
- console.error(message, a, b, c, d, e, f, g, h);
869
- break;
870
- default:
871
- throw new Error('warningWithoutStack() currently supports at most 8 arguments.');
872
- }
873
- }
874
- try {
875
- // --- Welcome to debugging React ---
876
- // This error was thrown as a convenience so that you can use this stack
877
- // to find the callsite that caused this warning to fire.
878
- var argIndex = 0;
879
- var _message = 'Warning: ' + format.replace(/%s/g, function () {
880
- return args[argIndex++];
881
- });
882
- throw new Error(_message);
883
- } catch (x) {}
884
- };
885
- }
886
-
887
- var warningWithoutStack$1 = warningWithoutStack;
888
-
889
- var didWarnStateUpdateForUnmountedComponent = {};
890
-
891
- function warnNoop(publicInstance, callerName) {
892
- {
893
- var _constructor = publicInstance.constructor;
894
- var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
895
- var warningKey = componentName + '.' + callerName;
896
- if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
897
- return;
898
- }
899
- warningWithoutStack$1(false, "Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
900
- didWarnStateUpdateForUnmountedComponent[warningKey] = true;
901
- }
902
- }
903
-
904
- /**
905
- * This is the abstract API for an update queue.
906
- */
907
- var ReactNoopUpdateQueue = {
908
- /**
909
- * Checks whether or not this composite component is mounted.
910
- * @param {ReactClass} publicInstance The instance we want to test.
911
- * @return {boolean} True if mounted, false otherwise.
912
- * @protected
913
- * @final
914
- */
915
- isMounted: function (publicInstance) {
916
- return false;
917
- },
918
-
919
- /**
920
- * Forces an update. This should only be invoked when it is known with
921
- * certainty that we are **not** in a DOM transaction.
922
- *
923
- * You may want to call this when you know that some deeper aspect of the
924
- * component's state has changed but `setState` was not called.
925
- *
926
- * This will not invoke `shouldComponentUpdate`, but it will invoke
927
- * `componentWillUpdate` and `componentDidUpdate`.
928
- *
929
- * @param {ReactClass} publicInstance The instance that should rerender.
930
- * @param {?function} callback Called after component is updated.
931
- * @param {?string} callerName name of the calling function in the public API.
932
- * @internal
933
- */
934
- enqueueForceUpdate: function (publicInstance, callback, callerName) {
935
- warnNoop(publicInstance, 'forceUpdate');
936
- },
937
-
938
- /**
939
- * Replaces all of the state. Always use this or `setState` to mutate state.
940
- * You should treat `this.state` as immutable.
941
- *
942
- * There is no guarantee that `this.state` will be immediately updated, so
943
- * accessing `this.state` after calling this method may return the old value.
944
- *
945
- * @param {ReactClass} publicInstance The instance that should rerender.
946
- * @param {object} completeState Next state.
947
- * @param {?function} callback Called after component is updated.
948
- * @param {?string} callerName name of the calling function in the public API.
949
- * @internal
950
- */
951
- enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
952
- warnNoop(publicInstance, 'replaceState');
953
- },
954
-
955
- /**
956
- * Sets a subset of the state. This only exists because _pendingState is
957
- * internal. This provides a merging strategy that is not available to deep
958
- * properties which is confusing. TODO: Expose pendingState or don't use it
959
- * during the merge.
960
- *
961
- * @param {ReactClass} publicInstance The instance that should rerender.
962
- * @param {object} partialState Next partial state to be merged with state.
963
- * @param {?function} callback Called after component is updated.
964
- * @param {?string} Name of the calling function in the public API.
965
- * @internal
966
- */
967
- enqueueSetState: function (publicInstance, partialState, callback, callerName) {
968
- warnNoop(publicInstance, 'setState');
969
- }
970
- };
971
-
972
- var emptyObject = {};
973
- {
974
- Object.freeze(emptyObject);
975
- }
976
-
977
- /**
978
- * Base class helpers for the updating state of a component.
979
- */
980
- function Component(props, context, updater) {
981
- this.props = props;
982
- this.context = context;
983
- // If a component has string refs, we will assign a different object later.
984
- this.refs = emptyObject;
985
- // We initialize the default updater but the real one gets injected by the
986
- // renderer.
987
- this.updater = updater || ReactNoopUpdateQueue;
988
- }
989
-
990
- Component.prototype.isReactComponent = {};
991
-
992
- /**
993
- * Sets a subset of the state. Always use this to mutate
994
- * state. You should treat `this.state` as immutable.
995
- *
996
- * There is no guarantee that `this.state` will be immediately updated, so
997
- * accessing `this.state` after calling this method may return the old value.
998
- *
999
- * There is no guarantee that calls to `setState` will run synchronously,
1000
- * as they may eventually be batched together. You can provide an optional
1001
- * callback that will be executed when the call to setState is actually
1002
- * completed.
1003
- *
1004
- * When a function is provided to setState, it will be called at some point in
1005
- * the future (not synchronously). It will be called with the up to date
1006
- * component arguments (state, props, context). These values can be different
1007
- * from this.* because your function may be called after receiveProps but before
1008
- * shouldComponentUpdate, and this new state, props, and context will not yet be
1009
- * assigned to this.
1010
- *
1011
- * @param {object|function} partialState Next partial state or function to
1012
- * produce next partial state to be merged with current state.
1013
- * @param {?function} callback Called after state is updated.
1014
- * @final
1015
- * @protected
1016
- */
1017
- Component.prototype.setState = function (partialState, callback) {
1018
- !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : void 0;
1019
- this.updater.enqueueSetState(this, partialState, callback, 'setState');
1020
- };
1021
-
1022
- /**
1023
- * Forces an update. This should only be invoked when it is known with
1024
- * certainty that we are **not** in a DOM transaction.
1025
- *
1026
- * You may want to call this when you know that some deeper aspect of the
1027
- * component's state has changed but `setState` was not called.
1028
- *
1029
- * This will not invoke `shouldComponentUpdate`, but it will invoke
1030
- * `componentWillUpdate` and `componentDidUpdate`.
1031
- *
1032
- * @param {?function} callback Called after update is complete.
1033
- * @final
1034
- * @protected
1035
- */
1036
- Component.prototype.forceUpdate = function (callback) {
1037
- this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
1038
- };
1039
-
1040
- /**
1041
- * Deprecated APIs. These APIs used to exist on classic React classes but since
1042
- * we would like to deprecate them, we're not going to move them over to this
1043
- * modern base class. Instead, we define a getter that warns if it's accessed.
1044
- */
1045
- {
1046
- var deprecatedAPIs = {
1047
- isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
1048
- replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
1049
- };
1050
- var defineDeprecationWarning = function (methodName, info) {
1051
- Object.defineProperty(Component.prototype, methodName, {
1052
- get: function () {
1053
- lowPriorityWarning$1(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
1054
- return undefined;
1055
- }
1056
- });
1057
- };
1058
- for (var fnName in deprecatedAPIs) {
1059
- if (deprecatedAPIs.hasOwnProperty(fnName)) {
1060
- defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
1061
- }
1062
- }
1063
- }
1064
-
1065
- function ComponentDummy() {}
1066
- ComponentDummy.prototype = Component.prototype;
1067
-
1068
- /**
1069
- * Convenience component with default shallow equality check for sCU.
1070
- */
1071
- function PureComponent(props, context, updater) {
1072
- this.props = props;
1073
- this.context = context;
1074
- // If a component has string refs, we will assign a different object later.
1075
- this.refs = emptyObject;
1076
- this.updater = updater || ReactNoopUpdateQueue;
1077
- }
1078
-
1079
- var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
1080
- pureComponentPrototype.constructor = PureComponent;
1081
- // Avoid an extra prototype jump for these methods.
1082
- _assign(pureComponentPrototype, Component.prototype);
1083
- pureComponentPrototype.isPureReactComponent = true;
1084
-
1085
- // an immutable object with a single mutable value
1086
- function createRef() {
1087
- var refObject = {
1088
- current: null
1089
- };
1090
- {
1091
- Object.seal(refObject);
1092
- }
1093
- return refObject;
1094
- }
1095
-
1096
- /**
1097
- * Keeps track of the current owner.
1098
- *
1099
- * The current owner is the component who should own any components that are
1100
- * currently being constructed.
1101
- */
1102
- var ReactCurrentOwner = {
1103
- /**
1104
- * @internal
1105
- * @type {ReactComponent}
1106
- */
1107
- current: null,
1108
- currentDispatcher: null
1109
- };
1110
-
1111
- var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
1112
-
1113
- var describeComponentFrame = function (name, source, ownerName) {
1114
- var sourceInfo = '';
1115
- if (source) {
1116
- var path = source.fileName;
1117
- var fileName = path.replace(BEFORE_SLASH_RE, '');
1118
- {
1119
- // In DEV, include code for a common special case:
1120
- // prefer "folder/index.js" instead of just "index.js".
1121
- if (/^index\./.test(fileName)) {
1122
- var match = path.match(BEFORE_SLASH_RE);
1123
- if (match) {
1124
- var pathBeforeSlash = match[1];
1125
- if (pathBeforeSlash) {
1126
- var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
1127
- fileName = folderName + '/' + fileName;
1128
- }
1129
- }
1130
- }
1131
- }
1132
- sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
1133
- } else if (ownerName) {
1134
- sourceInfo = ' (created by ' + ownerName + ')';
1135
- }
1136
- return '\n in ' + (name || 'Unknown') + sourceInfo;
1137
- };
1138
-
1139
- var Resolved = 1;
1140
-
1141
-
1142
-
1143
-
1144
- function refineResolvedThenable(thenable) {
1145
- return thenable._reactStatus === Resolved ? thenable._reactResult : null;
1146
- }
1147
-
1148
- function getComponentName(type) {
1149
- if (type == null) {
1150
- // Host root, text node or just invalid type.
1151
- return null;
1152
- }
1153
- {
1154
- if (typeof type.tag === 'number') {
1155
- warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
1156
- }
1157
- }
1158
- if (typeof type === 'function') {
1159
- return type.displayName || type.name || null;
1160
- }
1161
- if (typeof type === 'string') {
1162
- return type;
1163
- }
1164
- switch (type) {
1165
- case REACT_ASYNC_MODE_TYPE:
1166
- return 'AsyncMode';
1167
- case REACT_FRAGMENT_TYPE:
1168
- return 'Fragment';
1169
- case REACT_PORTAL_TYPE:
1170
- return 'Portal';
1171
- case REACT_PROFILER_TYPE:
1172
- return 'Profiler';
1173
- case REACT_STRICT_MODE_TYPE:
1174
- return 'StrictMode';
1175
- case REACT_PLACEHOLDER_TYPE:
1176
- return 'Placeholder';
1177
- }
1178
- if (typeof type === 'object') {
1179
- switch (type.$$typeof) {
1180
- case REACT_CONTEXT_TYPE:
1181
- return 'Context.Consumer';
1182
- case REACT_PROVIDER_TYPE:
1183
- return 'Context.Provider';
1184
- case REACT_FORWARD_REF_TYPE:
1185
- var renderFn = type.render;
1186
- var functionName = renderFn.displayName || renderFn.name || '';
1187
- return type.displayName || (functionName !== '' ? 'ForwardRef(' + functionName + ')' : 'ForwardRef');
1188
- }
1189
- if (typeof type.then === 'function') {
1190
- var thenable = type;
1191
- var resolvedThenable = refineResolvedThenable(thenable);
1192
- if (resolvedThenable) {
1193
- return getComponentName(resolvedThenable);
1194
- }
1195
- }
1196
- }
1197
- return null;
1198
- }
1199
-
1200
- var ReactDebugCurrentFrame = {};
1201
-
1202
- var currentlyValidatingElement = null;
1203
-
1204
- function setCurrentlyValidatingElement(element) {
1205
- {
1206
- currentlyValidatingElement = element;
1207
- }
1208
- }
1209
-
1210
- {
1211
- // Stack implementation injected by the current renderer.
1212
- ReactDebugCurrentFrame.getCurrentStack = null;
1213
-
1214
- ReactDebugCurrentFrame.getStackAddendum = function () {
1215
- var stack = '';
1216
-
1217
- // Add an extra top frame while an element is being validated
1218
- if (currentlyValidatingElement) {
1219
- var name = getComponentName(currentlyValidatingElement.type);
1220
- var owner = currentlyValidatingElement._owner;
1221
- stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));
1222
- }
1223
-
1224
- // Delegate to the injected renderer-specific implementation
1225
- var impl = ReactDebugCurrentFrame.getCurrentStack;
1226
- if (impl) {
1227
- stack += impl() || '';
1228
- }
1229
-
1230
- return stack;
1231
- };
1232
- }
1233
-
1234
- var ReactSharedInternals = {
1235
- ReactCurrentOwner: ReactCurrentOwner,
1236
- // Used by renderers to avoid bundling object-assign twice in UMD bundles:
1237
- assign: _assign
1238
- };
1239
-
1240
- {
1241
- _assign(ReactSharedInternals, {
1242
- // These should not be included in production.
1243
- ReactDebugCurrentFrame: ReactDebugCurrentFrame,
1244
- // Shim for React DOM 16.0.0 which still destructured (but not used) this.
1245
- // TODO: remove in React 17.0.
1246
- ReactComponentTreeHook: {}
1247
- });
1248
- }
1249
-
1250
- /**
1251
- * Similar to invariant but only logs a warning if the condition is not met.
1252
- * This can be used to log issues in development environments in critical
1253
- * paths. Removing the logging code for production environments will keep the
1254
- * same logic and follow the same code paths.
1255
- */
1256
-
1257
- var warning = warningWithoutStack$1;
1258
-
1259
- {
1260
- warning = function (condition, format) {
1261
- if (condition) {
1262
- return;
1263
- }
1264
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
1265
- var stack = ReactDebugCurrentFrame.getStackAddendum();
1266
- // eslint-disable-next-line react-internal/warning-and-invariant-args
1267
-
1268
- for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
1269
- args[_key - 2] = arguments[_key];
1270
- }
1271
-
1272
- warningWithoutStack$1.apply(undefined, [false, format + '%s'].concat(args, [stack]));
1273
- };
1274
- }
1275
-
1276
- var warning$1 = warning;
1277
-
1278
- var hasOwnProperty = Object.prototype.hasOwnProperty;
1279
-
1280
- var RESERVED_PROPS = {
1281
- key: true,
1282
- ref: true,
1283
- __self: true,
1284
- __source: true
1285
- };
1286
-
1287
- var specialPropKeyWarningShown = void 0;
1288
- var specialPropRefWarningShown = void 0;
1289
-
1290
- function hasValidRef(config) {
1291
- {
1292
- if (hasOwnProperty.call(config, 'ref')) {
1293
- var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
1294
- if (getter && getter.isReactWarning) {
1295
- return false;
1296
- }
1297
- }
1298
- }
1299
- return config.ref !== undefined;
1300
- }
1301
-
1302
- function hasValidKey(config) {
1303
- {
1304
- if (hasOwnProperty.call(config, 'key')) {
1305
- var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
1306
- if (getter && getter.isReactWarning) {
1307
- return false;
1308
- }
1309
- }
1310
- }
1311
- return config.key !== undefined;
1312
- }
1313
-
1314
- function defineKeyPropWarningGetter(props, displayName) {
1315
- var warnAboutAccessingKey = function () {
1316
- if (!specialPropKeyWarningShown) {
1317
- specialPropKeyWarningShown = true;
1318
- warningWithoutStack$1(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
1319
- }
1320
- };
1321
- warnAboutAccessingKey.isReactWarning = true;
1322
- Object.defineProperty(props, 'key', {
1323
- get: warnAboutAccessingKey,
1324
- configurable: true
1325
- });
1326
- }
1327
-
1328
- function defineRefPropWarningGetter(props, displayName) {
1329
- var warnAboutAccessingRef = function () {
1330
- if (!specialPropRefWarningShown) {
1331
- specialPropRefWarningShown = true;
1332
- warningWithoutStack$1(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
1333
- }
1334
- };
1335
- warnAboutAccessingRef.isReactWarning = true;
1336
- Object.defineProperty(props, 'ref', {
1337
- get: warnAboutAccessingRef,
1338
- configurable: true
1339
- });
1340
- }
1341
-
1342
- /**
1343
- * Factory method to create a new React element. This no longer adheres to
1344
- * the class pattern, so do not use new to call it. Also, no instanceof check
1345
- * will work. Instead test $$typeof field against Symbol.for('react.element') to check
1346
- * if something is a React Element.
1347
- *
1348
- * @param {*} type
1349
- * @param {*} key
1350
- * @param {string|object} ref
1351
- * @param {*} self A *temporary* helper to detect places where `this` is
1352
- * different from the `owner` when React.createElement is called, so that we
1353
- * can warn. We want to get rid of owner and replace string `ref`s with arrow
1354
- * functions, and as long as `this` and owner are the same, there will be no
1355
- * change in behavior.
1356
- * @param {*} source An annotation object (added by a transpiler or otherwise)
1357
- * indicating filename, line number, and/or other information.
1358
- * @param {*} owner
1359
- * @param {*} props
1360
- * @internal
1361
- */
1362
- var ReactElement = function (type, key, ref, self, source, owner, props) {
1363
- var element = {
1364
- // This tag allows us to uniquely identify this as a React Element
1365
- $$typeof: REACT_ELEMENT_TYPE,
1366
-
1367
- // Built-in properties that belong on the element
1368
- type: type,
1369
- key: key,
1370
- ref: ref,
1371
- props: props,
1372
-
1373
- // Record the component responsible for creating this element.
1374
- _owner: owner
1375
- };
1376
-
1377
- {
1378
- // The validation flag is currently mutative. We put it on
1379
- // an external backing store so that we can freeze the whole object.
1380
- // This can be replaced with a WeakMap once they are implemented in
1381
- // commonly used development environments.
1382
- element._store = {};
1383
-
1384
- // To make comparing ReactElements easier for testing purposes, we make
1385
- // the validation flag non-enumerable (where possible, which should
1386
- // include every environment we run tests in), so the test framework
1387
- // ignores it.
1388
- Object.defineProperty(element._store, 'validated', {
1389
- configurable: false,
1390
- enumerable: false,
1391
- writable: true,
1392
- value: false
1393
- });
1394
- // self and source are DEV only properties.
1395
- Object.defineProperty(element, '_self', {
1396
- configurable: false,
1397
- enumerable: false,
1398
- writable: false,
1399
- value: self
1400
- });
1401
- // Two elements created in two different places should be considered
1402
- // equal for testing purposes and therefore we hide it from enumeration.
1403
- Object.defineProperty(element, '_source', {
1404
- configurable: false,
1405
- enumerable: false,
1406
- writable: false,
1407
- value: source
1408
- });
1409
- if (Object.freeze) {
1410
- Object.freeze(element.props);
1411
- Object.freeze(element);
1412
- }
1413
- }
1414
-
1415
- return element;
1416
- };
1417
-
1418
- /**
1419
- * Create and return a new ReactElement of the given type.
1420
- * See https://reactjs.org/docs/react-api.html#createelement
1421
- */
1422
- function createElement(type, config, children) {
1423
- var propName = void 0;
1424
-
1425
- // Reserved names are extracted
1426
- var props = {};
1427
-
1428
- var key = null;
1429
- var ref = null;
1430
- var self = null;
1431
- var source = null;
1432
-
1433
- if (config != null) {
1434
- if (hasValidRef(config)) {
1435
- ref = config.ref;
1436
- }
1437
- if (hasValidKey(config)) {
1438
- key = '' + config.key;
1439
- }
1440
-
1441
- self = config.__self === undefined ? null : config.__self;
1442
- source = config.__source === undefined ? null : config.__source;
1443
- // Remaining properties are added to a new props object
1444
- for (propName in config) {
1445
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
1446
- props[propName] = config[propName];
1447
- }
1448
- }
1449
- }
1450
-
1451
- // Children can be more than one argument, and those are transferred onto
1452
- // the newly allocated props object.
1453
- var childrenLength = arguments.length - 2;
1454
- if (childrenLength === 1) {
1455
- props.children = children;
1456
- } else if (childrenLength > 1) {
1457
- var childArray = Array(childrenLength);
1458
- for (var i = 0; i < childrenLength; i++) {
1459
- childArray[i] = arguments[i + 2];
1460
- }
1461
- {
1462
- if (Object.freeze) {
1463
- Object.freeze(childArray);
1464
- }
1465
- }
1466
- props.children = childArray;
1467
- }
1468
-
1469
- // Resolve default props
1470
- if (type && type.defaultProps) {
1471
- var defaultProps = type.defaultProps;
1472
- for (propName in defaultProps) {
1473
- if (props[propName] === undefined) {
1474
- props[propName] = defaultProps[propName];
1475
- }
1476
- }
1477
- }
1478
- {
1479
- if (key || ref) {
1480
- var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
1481
- if (key) {
1482
- defineKeyPropWarningGetter(props, displayName);
1483
- }
1484
- if (ref) {
1485
- defineRefPropWarningGetter(props, displayName);
1486
- }
1487
- }
1488
- }
1489
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
1490
- }
1491
-
1492
- /**
1493
- * Return a function that produces ReactElements of a given type.
1494
- * See https://reactjs.org/docs/react-api.html#createfactory
1495
- */
1496
-
1497
-
1498
- function cloneAndReplaceKey(oldElement, newKey) {
1499
- var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
1500
-
1501
- return newElement;
1502
- }
1503
-
1504
- /**
1505
- * Clone and return a new ReactElement using element as the starting point.
1506
- * See https://reactjs.org/docs/react-api.html#cloneelement
1507
- */
1508
- function cloneElement(element, config, children) {
1509
- !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0;
1510
-
1511
- var propName = void 0;
1512
-
1513
- // Original props are copied
1514
- var props = _assign({}, element.props);
1515
-
1516
- // Reserved names are extracted
1517
- var key = element.key;
1518
- var ref = element.ref;
1519
- // Self is preserved since the owner is preserved.
1520
- var self = element._self;
1521
- // Source is preserved since cloneElement is unlikely to be targeted by a
1522
- // transpiler, and the original source is probably a better indicator of the
1523
- // true owner.
1524
- var source = element._source;
1525
-
1526
- // Owner will be preserved, unless ref is overridden
1527
- var owner = element._owner;
1528
-
1529
- if (config != null) {
1530
- if (hasValidRef(config)) {
1531
- // Silently steal the ref from the parent.
1532
- ref = config.ref;
1533
- owner = ReactCurrentOwner.current;
1534
- }
1535
- if (hasValidKey(config)) {
1536
- key = '' + config.key;
1537
- }
1538
-
1539
- // Remaining properties override existing props
1540
- var defaultProps = void 0;
1541
- if (element.type && element.type.defaultProps) {
1542
- defaultProps = element.type.defaultProps;
1543
- }
1544
- for (propName in config) {
1545
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
1546
- if (config[propName] === undefined && defaultProps !== undefined) {
1547
- // Resolve default props
1548
- props[propName] = defaultProps[propName];
1549
- } else {
1550
- props[propName] = config[propName];
1551
- }
1552
- }
1553
- }
1554
- }
1555
-
1556
- // Children can be more than one argument, and those are transferred onto
1557
- // the newly allocated props object.
1558
- var childrenLength = arguments.length - 2;
1559
- if (childrenLength === 1) {
1560
- props.children = children;
1561
- } else if (childrenLength > 1) {
1562
- var childArray = Array(childrenLength);
1563
- for (var i = 0; i < childrenLength; i++) {
1564
- childArray[i] = arguments[i + 2];
1565
- }
1566
- props.children = childArray;
1567
- }
1568
-
1569
- return ReactElement(element.type, key, ref, self, source, owner, props);
1570
- }
1571
-
1572
- /**
1573
- * Verifies the object is a ReactElement.
1574
- * See https://reactjs.org/docs/react-api.html#isvalidelement
1575
- * @param {?object} object
1576
- * @return {boolean} True if `object` is a ReactElement.
1577
- * @final
1578
- */
1579
- function isValidElement(object) {
1580
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
1581
- }
1582
-
1583
- var SEPARATOR = '.';
1584
- var SUBSEPARATOR = ':';
1585
-
1586
- /**
1587
- * Escape and wrap key so it is safe to use as a reactid
1588
- *
1589
- * @param {string} key to be escaped.
1590
- * @return {string} the escaped key.
1591
- */
1592
- function escape(key) {
1593
- var escapeRegex = /[=:]/g;
1594
- var escaperLookup = {
1595
- '=': '=0',
1596
- ':': '=2'
1597
- };
1598
- var escapedString = ('' + key).replace(escapeRegex, function (match) {
1599
- return escaperLookup[match];
1600
- });
1601
-
1602
- return '$' + escapedString;
1603
- }
1604
-
1605
- /**
1606
- * TODO: Test that a single child and an array with one item have the same key
1607
- * pattern.
1608
- */
1609
-
1610
- var didWarnAboutMaps = false;
1611
-
1612
- var userProvidedKeyEscapeRegex = /\/+/g;
1613
- function escapeUserProvidedKey(text) {
1614
- return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
1615
- }
1616
-
1617
- var POOL_SIZE = 10;
1618
- var traverseContextPool = [];
1619
- function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) {
1620
- if (traverseContextPool.length) {
1621
- var traverseContext = traverseContextPool.pop();
1622
- traverseContext.result = mapResult;
1623
- traverseContext.keyPrefix = keyPrefix;
1624
- traverseContext.func = mapFunction;
1625
- traverseContext.context = mapContext;
1626
- traverseContext.count = 0;
1627
- return traverseContext;
1628
- } else {
1629
- return {
1630
- result: mapResult,
1631
- keyPrefix: keyPrefix,
1632
- func: mapFunction,
1633
- context: mapContext,
1634
- count: 0
1635
- };
1636
- }
1637
- }
1638
-
1639
- function releaseTraverseContext(traverseContext) {
1640
- traverseContext.result = null;
1641
- traverseContext.keyPrefix = null;
1642
- traverseContext.func = null;
1643
- traverseContext.context = null;
1644
- traverseContext.count = 0;
1645
- if (traverseContextPool.length < POOL_SIZE) {
1646
- traverseContextPool.push(traverseContext);
1647
- }
1648
- }
1649
-
1650
- /**
1651
- * @param {?*} children Children tree container.
1652
- * @param {!string} nameSoFar Name of the key path so far.
1653
- * @param {!function} callback Callback to invoke with each child found.
1654
- * @param {?*} traverseContext Used to pass information throughout the traversal
1655
- * process.
1656
- * @return {!number} The number of children in this subtree.
1657
- */
1658
- function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
1659
- var type = typeof children;
1660
-
1661
- if (type === 'undefined' || type === 'boolean') {
1662
- // All of the above are perceived as null.
1663
- children = null;
1664
- }
1665
-
1666
- var invokeCallback = false;
1667
-
1668
- if (children === null) {
1669
- invokeCallback = true;
1670
- } else {
1671
- switch (type) {
1672
- case 'string':
1673
- case 'number':
1674
- invokeCallback = true;
1675
- break;
1676
- case 'object':
1677
- switch (children.$$typeof) {
1678
- case REACT_ELEMENT_TYPE:
1679
- case REACT_PORTAL_TYPE:
1680
- invokeCallback = true;
1681
- }
1682
- }
1683
- }
1684
-
1685
- if (invokeCallback) {
1686
- callback(traverseContext, children,
1687
- // If it's the only child, treat the name as if it was wrapped in an array
1688
- // so that it's consistent if the number of children grows.
1689
- nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
1690
- return 1;
1691
- }
1692
-
1693
- var child = void 0;
1694
- var nextName = void 0;
1695
- var subtreeCount = 0; // Count of children found in the current subtree.
1696
- var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
1697
-
1698
- if (Array.isArray(children)) {
1699
- for (var i = 0; i < children.length; i++) {
1700
- child = children[i];
1701
- nextName = nextNamePrefix + getComponentKey(child, i);
1702
- subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
1703
- }
1704
- } else {
1705
- var iteratorFn = getIteratorFn(children);
1706
- if (typeof iteratorFn === 'function') {
1707
- {
1708
- // Warn about using Maps as children
1709
- if (iteratorFn === children.entries) {
1710
- !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;
1711
- didWarnAboutMaps = true;
1712
- }
1713
- }
1714
-
1715
- var iterator = iteratorFn.call(children);
1716
- var step = void 0;
1717
- var ii = 0;
1718
- while (!(step = iterator.next()).done) {
1719
- child = step.value;
1720
- nextName = nextNamePrefix + getComponentKey(child, ii++);
1721
- subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
1722
- }
1723
- } else if (type === 'object') {
1724
- var addendum = '';
1725
- {
1726
- addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();
1727
- }
1728
- var childrenString = '' + children;
1729
- invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum);
1730
- }
1731
- }
1732
-
1733
- return subtreeCount;
1734
- }
1735
-
1736
- /**
1737
- * Traverses children that are typically specified as `props.children`, but
1738
- * might also be specified through attributes:
1739
- *
1740
- * - `traverseAllChildren(this.props.children, ...)`
1741
- * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
1742
- *
1743
- * The `traverseContext` is an optional argument that is passed through the
1744
- * entire traversal. It can be used to store accumulations or anything else that
1745
- * the callback might find relevant.
1746
- *
1747
- * @param {?*} children Children tree object.
1748
- * @param {!function} callback To invoke upon traversing each child.
1749
- * @param {?*} traverseContext Context for traversal.
1750
- * @return {!number} The number of children in this subtree.
1751
- */
1752
- function traverseAllChildren(children, callback, traverseContext) {
1753
- if (children == null) {
1754
- return 0;
1755
- }
1756
-
1757
- return traverseAllChildrenImpl(children, '', callback, traverseContext);
1758
- }
1759
-
1760
- /**
1761
- * Generate a key string that identifies a component within a set.
1762
- *
1763
- * @param {*} component A component that could contain a manual key.
1764
- * @param {number} index Index that is used if a manual key is not provided.
1765
- * @return {string}
1766
- */
1767
- function getComponentKey(component, index) {
1768
- // Do some typechecking here since we call this blindly. We want to ensure
1769
- // that we don't block potential future ES APIs.
1770
- if (typeof component === 'object' && component !== null && component.key != null) {
1771
- // Explicit key
1772
- return escape(component.key);
1773
- }
1774
- // Implicit key determined by the index in the set
1775
- return index.toString(36);
1776
- }
1777
-
1778
- function forEachSingleChild(bookKeeping, child, name) {
1779
- var func = bookKeeping.func,
1780
- context = bookKeeping.context;
1781
-
1782
- func.call(context, child, bookKeeping.count++);
1783
- }
1784
-
1785
- /**
1786
- * Iterates through children that are typically specified as `props.children`.
1787
- *
1788
- * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
1789
- *
1790
- * The provided forEachFunc(child, index) will be called for each
1791
- * leaf child.
1792
- *
1793
- * @param {?*} children Children tree container.
1794
- * @param {function(*, int)} forEachFunc
1795
- * @param {*} forEachContext Context for forEachContext.
1796
- */
1797
- function forEachChildren(children, forEachFunc, forEachContext) {
1798
- if (children == null) {
1799
- return children;
1800
- }
1801
- var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);
1802
- traverseAllChildren(children, forEachSingleChild, traverseContext);
1803
- releaseTraverseContext(traverseContext);
1804
- }
1805
-
1806
- function mapSingleChildIntoContext(bookKeeping, child, childKey) {
1807
- var result = bookKeeping.result,
1808
- keyPrefix = bookKeeping.keyPrefix,
1809
- func = bookKeeping.func,
1810
- context = bookKeeping.context;
1811
-
1812
-
1813
- var mappedChild = func.call(context, child, bookKeeping.count++);
1814
- if (Array.isArray(mappedChild)) {
1815
- mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) {
1816
- return c;
1817
- });
1818
- } else if (mappedChild != null) {
1819
- if (isValidElement(mappedChild)) {
1820
- mappedChild = cloneAndReplaceKey(mappedChild,
1821
- // Keep both the (mapped) and old keys if they differ, just as
1822
- // traverseAllChildren used to do for objects as children
1823
- keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
1824
- }
1825
- result.push(mappedChild);
1826
- }
1827
- }
1828
-
1829
- function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
1830
- var escapedPrefix = '';
1831
- if (prefix != null) {
1832
- escapedPrefix = escapeUserProvidedKey(prefix) + '/';
1833
- }
1834
- var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context);
1835
- traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
1836
- releaseTraverseContext(traverseContext);
1837
- }
1838
-
1839
- /**
1840
- * Maps children that are typically specified as `props.children`.
1841
- *
1842
- * See https://reactjs.org/docs/react-api.html#reactchildrenmap
1843
- *
1844
- * The provided mapFunction(child, key, index) will be called for each
1845
- * leaf child.
1846
- *
1847
- * @param {?*} children Children tree container.
1848
- * @param {function(*, int)} func The map function.
1849
- * @param {*} context Context for mapFunction.
1850
- * @return {object} Object containing the ordered map of results.
1851
- */
1852
- function mapChildren(children, func, context) {
1853
- if (children == null) {
1854
- return children;
1855
- }
1856
- var result = [];
1857
- mapIntoWithKeyPrefixInternal(children, result, null, func, context);
1858
- return result;
1859
- }
1860
-
1861
- /**
1862
- * Count the number of children that are typically specified as
1863
- * `props.children`.
1864
- *
1865
- * See https://reactjs.org/docs/react-api.html#reactchildrencount
1866
- *
1867
- * @param {?*} children Children tree container.
1868
- * @return {number} The number of children.
1869
- */
1870
- function countChildren(children) {
1871
- return traverseAllChildren(children, function () {
1872
- return null;
1873
- }, null);
1874
- }
1875
-
1876
- /**
1877
- * Flatten a children object (typically specified as `props.children`) and
1878
- * return an array with appropriately re-keyed children.
1879
- *
1880
- * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
1881
- */
1882
- function toArray(children) {
1883
- var result = [];
1884
- mapIntoWithKeyPrefixInternal(children, result, null, function (child) {
1885
- return child;
1886
- });
1887
- return result;
1888
- }
1889
-
1890
- /**
1891
- * Returns the first child in a collection of children and verifies that there
1892
- * is only one child in the collection.
1893
- *
1894
- * See https://reactjs.org/docs/react-api.html#reactchildrenonly
1895
- *
1896
- * The current implementation of this function assumes that a single child gets
1897
- * passed without a wrapper, but the purpose of this helper function is to
1898
- * abstract away the particular structure of children.
1899
- *
1900
- * @param {?object} children Child collection structure.
1901
- * @return {ReactElement} The first and only `ReactElement` contained in the
1902
- * structure.
1903
- */
1904
- function onlyChild(children) {
1905
- !isValidElement(children) ? invariant(false, 'React.Children.only expected to receive a single React element child.') : void 0;
1906
- return children;
1907
- }
1908
-
1909
- function readContext(context, observedBits) {
1910
- var dispatcher = ReactCurrentOwner.currentDispatcher;
1911
- !(dispatcher !== null) ? invariant(false, 'Context.unstable_read(): Context can only be read while React is rendering, e.g. inside the render method or getDerivedStateFromProps.') : void 0;
1912
- return dispatcher.readContext(context, observedBits);
1913
- }
1914
-
1915
- function createContext(defaultValue, calculateChangedBits) {
1916
- if (calculateChangedBits === undefined) {
1917
- calculateChangedBits = null;
1918
- } else {
1919
- {
1920
- !(calculateChangedBits === null || typeof calculateChangedBits === 'function') ? warningWithoutStack$1(false, 'createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits) : void 0;
1921
- }
1922
- }
1923
-
1924
- var context = {
1925
- $$typeof: REACT_CONTEXT_TYPE,
1926
- _calculateChangedBits: calculateChangedBits,
1927
- // As a workaround to support multiple concurrent renderers, we categorize
1928
- // some renderers as primary and others as secondary. We only expect
1929
- // there to be two concurrent renderers at most: React Native (primary) and
1930
- // Fabric (secondary); React DOM (primary) and React ART (secondary).
1931
- // Secondary renderers store their context values on separate fields.
1932
- _currentValue: defaultValue,
1933
- _currentValue2: defaultValue,
1934
- // These are circular
1935
- Provider: null,
1936
- Consumer: null,
1937
- unstable_read: null
1938
- };
1939
-
1940
- context.Provider = {
1941
- $$typeof: REACT_PROVIDER_TYPE,
1942
- _context: context
1943
- };
1944
- context.Consumer = context;
1945
- context.unstable_read = readContext.bind(null, context);
1946
-
1947
- {
1948
- context._currentRenderer = null;
1949
- context._currentRenderer2 = null;
1950
- }
1951
-
1952
- return context;
1953
- }
1954
-
1955
- function lazy(ctor) {
1956
- var thenable = null;
1957
- return {
1958
- then: function (resolve, reject) {
1959
- if (thenable === null) {
1960
- // Lazily create thenable by wrapping in an extra thenable.
1961
- thenable = ctor();
1962
- ctor = null;
1963
- }
1964
- return thenable.then(resolve, reject);
1965
- },
1966
-
1967
- // React uses these fields to store the result.
1968
- _reactStatus: -1,
1969
- _reactResult: null
1970
- };
1971
- }
1972
-
1973
- function forwardRef(render) {
1974
- {
1975
- if (typeof render !== 'function') {
1976
- warningWithoutStack$1(false, 'forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
1977
- } else {
1978
- !(
1979
- // Do not warn for 0 arguments because it could be due to usage of the 'arguments' object
1980
- render.length === 0 || render.length === 2) ? warningWithoutStack$1(false, 'forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.') : void 0;
1981
- }
1982
-
1983
- if (render != null) {
1984
- !(render.defaultProps == null && render.propTypes == null) ? warningWithoutStack$1(false, 'forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?') : void 0;
1985
- }
1986
- }
1987
-
1988
- return {
1989
- $$typeof: REACT_FORWARD_REF_TYPE,
1990
- render: render
1991
- };
1992
- }
1993
-
1994
- function isValidElementType(type) {
1995
- return typeof type === 'string' || typeof type === 'function' ||
1996
- // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1997
- type === REACT_FRAGMENT_TYPE || type === REACT_ASYNC_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_PLACEHOLDER_TYPE || typeof type === 'object' && type !== null && (typeof type.then === 'function' || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
1998
- }
1999
-
2000
- /**
2001
- * ReactElementValidator provides a wrapper around a element factory
2002
- * which validates the props passed to the element. This is intended to be
2003
- * used only in DEV and could be replaced by a static type checker for languages
2004
- * that support it.
2005
- */
2006
-
2007
- var propTypesMisspellWarningShown = void 0;
2008
-
2009
- {
2010
- propTypesMisspellWarningShown = false;
2011
- }
2012
-
2013
- function getDeclarationErrorAddendum() {
2014
- if (ReactCurrentOwner.current) {
2015
- var name = getComponentName(ReactCurrentOwner.current.type);
2016
- if (name) {
2017
- return '\n\nCheck the render method of `' + name + '`.';
2018
- }
2019
- }
2020
- return '';
2021
- }
2022
-
2023
- function getSourceInfoErrorAddendum(elementProps) {
2024
- if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) {
2025
- var source = elementProps.__source;
2026
- var fileName = source.fileName.replace(/^.*[\\\/]/, '');
2027
- var lineNumber = source.lineNumber;
2028
- return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
2029
- }
2030
- return '';
2031
- }
2032
-
2033
- /**
2034
- * Warn if there's no key explicitly set on dynamic arrays of children or
2035
- * object keys are not valid. This allows us to keep track of children between
2036
- * updates.
2037
- */
2038
- var ownerHasKeyUseWarning = {};
2039
-
2040
- function getCurrentComponentErrorInfo(parentType) {
2041
- var info = getDeclarationErrorAddendum();
2042
-
2043
- if (!info) {
2044
- var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
2045
- if (parentName) {
2046
- info = '\n\nCheck the top-level render call using <' + parentName + '>.';
2047
- }
2048
- }
2049
- return info;
2050
- }
2051
-
2052
- /**
2053
- * Warn if the element doesn't have an explicit key assigned to it.
2054
- * This element is in an array. The array could grow and shrink or be
2055
- * reordered. All children that haven't already been validated are required to
2056
- * have a "key" property assigned to it. Error statuses are cached so a warning
2057
- * will only be shown once.
2058
- *
2059
- * @internal
2060
- * @param {ReactElement} element Element that requires a key.
2061
- * @param {*} parentType element's parent's type.
2062
- */
2063
- function validateExplicitKey(element, parentType) {
2064
- if (!element._store || element._store.validated || element.key != null) {
2065
- return;
2066
- }
2067
- element._store.validated = true;
2068
-
2069
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
2070
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
2071
- return;
2072
- }
2073
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
2074
-
2075
- // Usually the current owner is the offender, but if it accepts children as a
2076
- // property, it may be the creator of the child that's responsible for
2077
- // assigning it a key.
2078
- var childOwner = '';
2079
- if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
2080
- // Give the component that originally created this child.
2081
- childOwner = ' It was passed a child from ' + getComponentName(element._owner.type) + '.';
2082
- }
2083
-
2084
- setCurrentlyValidatingElement(element);
2085
- {
2086
- warning$1(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner);
2087
- }
2088
- setCurrentlyValidatingElement(null);
2089
- }
2090
-
2091
- /**
2092
- * Ensure that every element either is passed in a static location, in an
2093
- * array with an explicit keys property defined, or in an object literal
2094
- * with valid key property.
2095
- *
2096
- * @internal
2097
- * @param {ReactNode} node Statically passed child of any type.
2098
- * @param {*} parentType node's parent's type.
2099
- */
2100
- function validateChildKeys(node, parentType) {
2101
- if (typeof node !== 'object') {
2102
- return;
2103
- }
2104
- if (Array.isArray(node)) {
2105
- for (var i = 0; i < node.length; i++) {
2106
- var child = node[i];
2107
- if (isValidElement(child)) {
2108
- validateExplicitKey(child, parentType);
2109
- }
2110
- }
2111
- } else if (isValidElement(node)) {
2112
- // This element was passed in a valid location.
2113
- if (node._store) {
2114
- node._store.validated = true;
2115
- }
2116
- } else if (node) {
2117
- var iteratorFn = getIteratorFn(node);
2118
- if (typeof iteratorFn === 'function') {
2119
- // Entry iterators used to provide implicit keys,
2120
- // but now we print a separate warning for them later.
2121
- if (iteratorFn !== node.entries) {
2122
- var iterator = iteratorFn.call(node);
2123
- var step = void 0;
2124
- while (!(step = iterator.next()).done) {
2125
- if (isValidElement(step.value)) {
2126
- validateExplicitKey(step.value, parentType);
2127
- }
2128
- }
2129
- }
2130
- }
2131
- }
2132
- }
2133
-
2134
- /**
2135
- * Given an element, validate that its props follow the propTypes definition,
2136
- * provided by the type.
2137
- *
2138
- * @param {ReactElement} element
2139
- */
2140
- function validatePropTypes(element) {
2141
- var type = element.type;
2142
- var name = void 0,
2143
- propTypes = void 0;
2144
- if (typeof type === 'function') {
2145
- // Class or functional component
2146
- name = type.displayName || type.name;
2147
- propTypes = type.propTypes;
2148
- } else if (typeof type === 'object' && type !== null && type.$$typeof === REACT_FORWARD_REF_TYPE) {
2149
- // ForwardRef
2150
- var functionName = type.render.displayName || type.render.name || '';
2151
- name = type.displayName || (functionName !== '' ? 'ForwardRef(' + functionName + ')' : 'ForwardRef');
2152
- propTypes = type.propTypes;
2153
- } else {
2154
- return;
2155
- }
2156
- if (propTypes) {
2157
- setCurrentlyValidatingElement(element);
2158
- checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum);
2159
- setCurrentlyValidatingElement(null);
2160
- } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
2161
- propTypesMisspellWarningShown = true;
2162
- warningWithoutStack$1(false, 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
2163
- }
2164
- if (typeof type.getDefaultProps === 'function') {
2165
- !type.getDefaultProps.isReactClassApproved ? warningWithoutStack$1(false, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;
2166
- }
2167
- }
2168
-
2169
- /**
2170
- * Given a fragment, validate that it can only be provided with fragment props
2171
- * @param {ReactElement} fragment
2172
- */
2173
- function validateFragmentProps(fragment) {
2174
- setCurrentlyValidatingElement(fragment);
2175
-
2176
- var keys = Object.keys(fragment.props);
2177
- for (var i = 0; i < keys.length; i++) {
2178
- var key = keys[i];
2179
- if (key !== 'children' && key !== 'key') {
2180
- warning$1(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
2181
- break;
2182
- }
2183
- }
2184
-
2185
- if (fragment.ref !== null) {
2186
- warning$1(false, 'Invalid attribute `ref` supplied to `React.Fragment`.');
2187
- }
2188
-
2189
- setCurrentlyValidatingElement(null);
2190
- }
2191
-
2192
- function createElementWithValidation(type, props, children) {
2193
- var validType = isValidElementType(type);
2194
-
2195
- // We warn in this case but don't throw. We expect the element creation to
2196
- // succeed and there will likely be errors in render.
2197
- if (!validType) {
2198
- var info = '';
2199
- if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
2200
- info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
2201
- }
2202
-
2203
- var sourceInfo = getSourceInfoErrorAddendum(props);
2204
- if (sourceInfo) {
2205
- info += sourceInfo;
2206
- } else {
2207
- info += getDeclarationErrorAddendum();
2208
- }
2209
-
2210
- var typeString = void 0;
2211
- if (type === null) {
2212
- typeString = 'null';
2213
- } else if (Array.isArray(type)) {
2214
- typeString = 'array';
2215
- } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
2216
- typeString = '<' + (getComponentName(type.type) || 'Unknown') + ' />';
2217
- info = ' Did you accidentally export a JSX literal instead of a component?';
2218
- } else {
2219
- typeString = typeof type;
2220
- }
2221
-
2222
- warning$1(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
2223
- }
2224
-
2225
- var element = createElement.apply(this, arguments);
2226
-
2227
- // The result can be nullish if a mock or a custom function is used.
2228
- // TODO: Drop this when these are no longer allowed as the type argument.
2229
- if (element == null) {
2230
- return element;
2231
- }
2232
-
2233
- // Skip key warning if the type isn't valid since our key validation logic
2234
- // doesn't expect a non-string/function type and can throw confusing errors.
2235
- // We don't want exception behavior to differ between dev and prod.
2236
- // (Rendering will throw with a helpful message and as soon as the type is
2237
- // fixed, the key warnings will appear.)
2238
- if (validType) {
2239
- for (var i = 2; i < arguments.length; i++) {
2240
- validateChildKeys(arguments[i], type);
2241
- }
2242
- }
2243
-
2244
- if (type === REACT_FRAGMENT_TYPE) {
2245
- validateFragmentProps(element);
2246
- } else {
2247
- validatePropTypes(element);
2248
- }
2249
-
2250
- return element;
2251
- }
2252
-
2253
- function createFactoryWithValidation(type) {
2254
- var validatedFactory = createElementWithValidation.bind(null, type);
2255
- validatedFactory.type = type;
2256
- // Legacy hook: remove it
2257
- {
2258
- Object.defineProperty(validatedFactory, 'type', {
2259
- enumerable: false,
2260
- get: function () {
2261
- lowPriorityWarning$1(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
2262
- Object.defineProperty(this, 'type', {
2263
- value: type
2264
- });
2265
- return type;
2266
- }
2267
- });
2268
- }
2269
-
2270
- return validatedFactory;
2271
- }
2272
-
2273
- function cloneElementWithValidation(element, props, children) {
2274
- var newElement = cloneElement.apply(this, arguments);
2275
- for (var i = 2; i < arguments.length; i++) {
2276
- validateChildKeys(arguments[i], newElement.type);
2277
- }
2278
- validatePropTypes(newElement);
2279
- return newElement;
2280
- }
2281
-
2282
- var React = {
2283
- Children: {
2284
- map: mapChildren,
2285
- forEach: forEachChildren,
2286
- count: countChildren,
2287
- toArray: toArray,
2288
- only: onlyChild
2289
- },
2290
-
2291
- createRef: createRef,
2292
- Component: Component,
2293
- PureComponent: PureComponent,
2294
-
2295
- createContext: createContext,
2296
- forwardRef: forwardRef,
2297
-
2298
- Fragment: REACT_FRAGMENT_TYPE,
2299
- StrictMode: REACT_STRICT_MODE_TYPE,
2300
- unstable_AsyncMode: REACT_ASYNC_MODE_TYPE,
2301
- unstable_Profiler: REACT_PROFILER_TYPE,
2302
-
2303
- createElement: createElementWithValidation,
2304
- cloneElement: cloneElementWithValidation,
2305
- createFactory: createFactoryWithValidation,
2306
- isValidElement: isValidElement,
2307
-
2308
- version: ReactVersion,
2309
-
2310
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactSharedInternals
2311
- };
2312
-
2313
- if (enableSuspense) {
2314
- React.Placeholder = REACT_PLACEHOLDER_TYPE;
2315
- React.lazy = lazy;
2316
- }
2317
-
2318
-
2319
-
2320
- var React$2 = Object.freeze({
2321
- default: React
2322
- });
2323
-
2324
- var React$3 = ( React$2 && React ) || React$2;
2325
-
2326
- // TODO: decide on the top-level export form.
2327
- // This is hacky but makes it work with both Rollup and Jest.
2328
- var react = React$3.default || React$3;
2329
-
2330
- module.exports = react;
2331
- })();
2332
- }
2333
-
2334
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
2335
-
2336
- /***/ }),
2337
-
2338
- /***/ 235:
2339
- /***/ (function(module, exports, __webpack_require__) {
2340
-
2341
- "use strict";
2342
- /* WEBPACK VAR INJECTION */(function(process) {/**
2343
- * Copyright (c) 2013-present, Facebook, Inc.
2344
- *
2345
- * This source code is licensed under the MIT license found in the
2346
- * LICENSE file in the root directory of this source tree.
2347
- */
2348
-
2349
-
2350
-
2351
- var printWarning = function() {};
2352
-
2353
- if (process.env.NODE_ENV !== 'production') {
2354
- var ReactPropTypesSecret = __webpack_require__(236);
2355
- var loggedTypeFailures = {};
2356
-
2357
- printWarning = function(text) {
2358
- var message = 'Warning: ' + text;
2359
- if (typeof console !== 'undefined') {
2360
- console.error(message);
2361
- }
2362
- try {
2363
- // --- Welcome to debugging React ---
2364
- // This error was thrown as a convenience so that you can use this stack
2365
- // to find the callsite that caused this warning to fire.
2366
- throw new Error(message);
2367
- } catch (x) {}
2368
- };
2369
- }
2370
-
2371
- /**
2372
- * Assert that the values match with the type specs.
2373
- * Error messages are memorized and will only be shown once.
2374
- *
2375
- * @param {object} typeSpecs Map of name to a ReactPropType
2376
- * @param {object} values Runtime values that need to be type-checked
2377
- * @param {string} location e.g. "prop", "context", "child context"
2378
- * @param {string} componentName Name of the component for error messages.
2379
- * @param {?Function} getStack Returns the component stack.
2380
- * @private
2381
- */
2382
- function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
2383
- if (process.env.NODE_ENV !== 'production') {
2384
- for (var typeSpecName in typeSpecs) {
2385
- if (typeSpecs.hasOwnProperty(typeSpecName)) {
2386
- var error;
2387
- // Prop type validation may throw. In case they do, we don't want to
2388
- // fail the render phase where it didn't fail before. So we log it.
2389
- // After these have been cleaned up, we'll let them throw.
2390
- try {
2391
- // This is intentionally an invariant that gets caught. It's the same
2392
- // behavior as without this statement except with a better message.
2393
- if (typeof typeSpecs[typeSpecName] !== 'function') {
2394
- var err = Error(
2395
- (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
2396
- 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
2397
- );
2398
- err.name = 'Invariant Violation';
2399
- throw err;
2400
- }
2401
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
2402
- } catch (ex) {
2403
- error = ex;
2404
- }
2405
- if (error && !(error instanceof Error)) {
2406
- printWarning(
2407
- (componentName || 'React class') + ': type specification of ' +
2408
- location + ' `' + typeSpecName + '` is invalid; the type checker ' +
2409
- 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
2410
- 'You may have forgotten to pass an argument to the type checker ' +
2411
- 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
2412
- 'shape all require an argument).'
2413
- )
2414
-
2415
- }
2416
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
2417
- // Only monitor this failure once because there tends to be a lot of the
2418
- // same error.
2419
- loggedTypeFailures[error.message] = true;
2420
-
2421
- var stack = getStack ? getStack() : '';
2422
-
2423
- printWarning(
2424
- 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
2425
- );
2426
- }
2427
- }
2428
- }
2429
- }
2430
- }
2431
-
2432
- module.exports = checkPropTypes;
2433
-
2434
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
2435
-
2436
- /***/ }),
2437
-
2438
- /***/ 236:
2439
- /***/ (function(module, exports, __webpack_require__) {
2440
-
2441
- "use strict";
2442
- /**
2443
- * Copyright (c) 2013-present, Facebook, Inc.
2444
- *
2445
- * This source code is licensed under the MIT license found in the
2446
- * LICENSE file in the root directory of this source tree.
2447
- */
2448
-
2449
-
2450
-
2451
- var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
2452
-
2453
- module.exports = ReactPropTypesSecret;
2454
-
2455
-
2456
- /***/ }),
2457
-
2458
- /***/ 24:
2459
- /***/ (function(module, exports, __webpack_require__) {
2460
-
2461
- // to indexed object, toObject with fallback for non-array-like ES3 strings
2462
- var IObject = __webpack_require__(112);
2463
- var defined = __webpack_require__(129);
2464
- module.exports = function (it) {
2465
- return IObject(defined(it));
2466
- };
2467
-
2468
-
2469
- /***/ }),
2470
-
2471
- /***/ 248:
2472
- /***/ (function(module, exports, __webpack_require__) {
2473
-
2474
- var toInteger = __webpack_require__(128);
2475
- var defined = __webpack_require__(129);
2476
- // true -> String#at
2477
- // false -> String#codePointAt
2478
- module.exports = function (TO_STRING) {
2479
- return function (that, pos) {
2480
- var s = String(defined(that));
2481
- var i = toInteger(pos);
2482
- var l = s.length;
2483
- var a, b;
2484
- if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
2485
- a = s.charCodeAt(i);
2486
- return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
2487
- ? TO_STRING ? s.charAt(i) : a
2488
- : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
2489
- };
2490
- };
2491
-
2492
-
2493
- /***/ }),
2494
-
2495
- /***/ 249:
2496
- /***/ (function(module, exports, __webpack_require__) {
2497
-
2498
- "use strict";
2499
-
2500
- var create = __webpack_require__(51);
2501
- var descriptor = __webpack_require__(36);
2502
- var setToStringTag = __webpack_require__(57);
2503
- var IteratorPrototype = {};
2504
-
2505
- // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
2506
- __webpack_require__(35)(IteratorPrototype, __webpack_require__(11)('iterator'), function () { return this; });
2507
-
2508
- module.exports = function (Constructor, NAME, next) {
2509
- Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
2510
- setToStringTag(Constructor, NAME + ' Iterator');
2511
- };
2512
-
2513
-
2514
- /***/ }),
2515
-
2516
- /***/ 250:
2517
- /***/ (function(module, exports, __webpack_require__) {
2518
-
2519
- var dP = __webpack_require__(14);
2520
- var anObject = __webpack_require__(18);
2521
- var getKeys = __webpack_require__(27);
2522
-
2523
- module.exports = __webpack_require__(20) ? Object.defineProperties : function defineProperties(O, Properties) {
2524
- anObject(O);
2525
- var keys = getKeys(Properties);
2526
- var length = keys.length;
2527
- var i = 0;
2528
- var P;
2529
- while (length > i) dP.f(O, P = keys[i++], Properties[P]);
2530
- return O;
2531
- };
2532
-
2533
-
2534
- /***/ }),
2535
-
2536
- /***/ 251:
2537
- /***/ (function(module, exports, __webpack_require__) {
2538
-
2539
- // false -> Array#indexOf
2540
- // true -> Array#includes
2541
- var toIObject = __webpack_require__(24);
2542
- var toLength = __webpack_require__(131);
2543
- var toAbsoluteIndex = __webpack_require__(252);
2544
- module.exports = function (IS_INCLUDES) {
2545
- return function ($this, el, fromIndex) {
2546
- var O = toIObject($this);
2547
- var length = toLength(O.length);
2548
- var index = toAbsoluteIndex(fromIndex, length);
2549
- var value;
2550
- // Array#includes uses SameValueZero equality algorithm
2551
- // eslint-disable-next-line no-self-compare
2552
- if (IS_INCLUDES && el != el) while (length > index) {
2553
- value = O[index++];
2554
- // eslint-disable-next-line no-self-compare
2555
- if (value != value) return true;
2556
- // Array#indexOf ignores holes, Array#includes - not
2557
- } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
2558
- if (O[index] === el) return IS_INCLUDES || index || 0;
2559
- } return !IS_INCLUDES && -1;
2560
- };
2561
- };
2562
-
2563
-
2564
- /***/ }),
2565
-
2566
- /***/ 252:
2567
- /***/ (function(module, exports, __webpack_require__) {
2568
-
2569
- var toInteger = __webpack_require__(128);
2570
- var max = Math.max;
2571
- var min = Math.min;
2572
- module.exports = function (index, length) {
2573
- index = toInteger(index);
2574
- return index < 0 ? max(index + length, 0) : min(index, length);
2575
- };
2576
-
2577
-
2578
- /***/ }),
2579
-
2580
- /***/ 255:
2581
- /***/ (function(module, exports, __webpack_require__) {
2582
-
2583
- "use strict";
2584
-
2585
- var addToUnscopables = __webpack_require__(256);
2586
- var step = __webpack_require__(257);
2587
- var Iterators = __webpack_require__(45);
2588
- var toIObject = __webpack_require__(24);
2589
-
2590
- // 22.1.3.4 Array.prototype.entries()
2591
- // 22.1.3.13 Array.prototype.keys()
2592
- // 22.1.3.29 Array.prototype.values()
2593
- // 22.1.3.30 Array.prototype[@@iterator]()
2594
- module.exports = __webpack_require__(166)(Array, 'Array', function (iterated, kind) {
2595
- this._t = toIObject(iterated); // target
2596
- this._i = 0; // next index
2597
- this._k = kind; // kind
2598
- // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
2599
- }, function () {
2600
- var O = this._t;
2601
- var kind = this._k;
2602
- var index = this._i++;
2603
- if (!O || index >= O.length) {
2604
- this._t = undefined;
2605
- return step(1);
2606
- }
2607
- if (kind == 'keys') return step(0, index);
2608
- if (kind == 'values') return step(0, O[index]);
2609
- return step(0, [index, O[index]]);
2610
- }, 'values');
2611
-
2612
- // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
2613
- Iterators.Arguments = Iterators.Array;
2614
-
2615
- addToUnscopables('keys');
2616
- addToUnscopables('values');
2617
- addToUnscopables('entries');
2618
-
2619
-
2620
- /***/ }),
2621
-
2622
- /***/ 256:
2623
- /***/ (function(module, exports) {
2624
-
2625
- module.exports = function () { /* empty */ };
2626
-
2627
-
2628
- /***/ }),
2629
-
2630
- /***/ 257:
2631
- /***/ (function(module, exports) {
2632
-
2633
- module.exports = function (done, value) {
2634
- return { value: value, done: !!done };
2635
- };
2636
-
2637
-
2638
- /***/ }),
2639
-
2640
- /***/ 26:
2641
- /***/ (function(module, exports) {
2642
-
2643
- module.exports = function (exec) {
2644
- try {
2645
- return !!exec();
2646
- } catch (e) {
2647
- return true;
2648
- }
2649
- };
2650
-
2651
-
2652
- /***/ }),
2653
-
2654
- /***/ 27:
2655
- /***/ (function(module, exports, __webpack_require__) {
2656
-
2657
- // 19.1.2.14 / 15.2.3.14 Object.keys(O)
2658
- var $keys = __webpack_require__(111);
2659
- var enumBugKeys = __webpack_require__(67);
2660
-
2661
- module.exports = Object.keys || function keys(O) {
2662
- return $keys(O, enumBugKeys);
2663
- };
2664
-
2665
-
2666
- /***/ }),
2667
-
2668
- /***/ 28:
2669
- /***/ (function(module, exports) {
2670
-
2671
- exports.f = {}.propertyIsEnumerable;
2672
-
2673
-
2674
- /***/ }),
2675
-
2676
- /***/ 3:
2677
- /***/ (function(module, exports) {
2678
-
2679
- var core = module.exports = { version: '2.5.3' };
2680
- if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
2681
-
2682
-
2683
- /***/ }),
2684
-
2685
- /***/ 32:
2686
- /***/ (function(module, exports, __webpack_require__) {
2687
-
2688
- // 7.1.13 ToObject(argument)
2689
- var defined = __webpack_require__(129);
2690
- module.exports = function (it) {
2691
- return Object(defined(it));
2692
- };
2693
-
2694
-
2695
- /***/ }),
2696
-
2697
- /***/ 34:
2698
- /***/ (function(module, exports, __webpack_require__) {
2699
-
2700
- "use strict";
2701
-
2702
- var $at = __webpack_require__(248)(true);
2703
-
2704
- // 21.1.3.27 String.prototype[@@iterator]()
2705
- __webpack_require__(166)(String, 'String', function (iterated) {
2706
- this._t = String(iterated); // target
2707
- this._i = 0; // next index
2708
- // 21.1.5.2.1 %StringIteratorPrototype%.next()
2709
- }, function () {
2710
- var O = this._t;
2711
- var index = this._i;
2712
- var point;
2713
- if (index >= O.length) return { value: undefined, done: true };
2714
- point = $at(O, index);
2715
- this._i += point.length;
2716
- return { value: point, done: false };
2717
- });
2718
-
2719
-
2720
- /***/ }),
2721
-
2722
- /***/ 35:
2723
- /***/ (function(module, exports, __webpack_require__) {
2724
-
2725
- var dP = __webpack_require__(14);
2726
- var createDesc = __webpack_require__(36);
2727
- module.exports = __webpack_require__(20) ? function (object, key, value) {
2728
- return dP.f(object, key, createDesc(1, value));
2729
- } : function (object, key, value) {
2730
- object[key] = value;
2731
- return object;
2732
- };
2733
-
2734
-
2735
- /***/ }),
2736
-
2737
- /***/ 36:
2738
- /***/ (function(module, exports) {
2739
-
2740
- module.exports = function (bitmap, value) {
2741
- return {
2742
- enumerable: !(bitmap & 1),
2743
- configurable: !(bitmap & 2),
2744
- writable: !(bitmap & 4),
2745
- value: value
2746
- };
2747
- };
2748
-
2749
-
2750
- /***/ }),
2751
-
2752
- /***/ 37:
2753
- /***/ (function(module, exports) {
2754
-
2755
- var toString = {}.toString;
2756
-
2757
- module.exports = function (it) {
2758
- return toString.call(it).slice(8, -1);
2759
- };
2760
-
2761
-
2762
- /***/ }),
2763
-
2764
- /***/ 38:
2765
- /***/ (function(module, exports) {
2766
-
2767
- exports.f = Object.getOwnPropertySymbols;
2768
-
2769
-
2770
- /***/ }),
2771
-
2772
- /***/ 42:
2773
- /***/ (function(module, exports, __webpack_require__) {
2774
-
2775
- "use strict";
2776
- /*
2777
- object-assign
2778
- (c) Sindre Sorhus
2779
- @license MIT
2780
- */
2781
-
2782
-
2783
- /* eslint-disable no-unused-vars */
2784
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
2785
- var hasOwnProperty = Object.prototype.hasOwnProperty;
2786
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
2787
-
2788
- function toObject(val) {
2789
- if (val === null || val === undefined) {
2790
- throw new TypeError('Object.assign cannot be called with null or undefined');
2791
- }
2792
-
2793
- return Object(val);
2794
- }
2795
-
2796
- function shouldUseNative() {
2797
- try {
2798
- if (!Object.assign) {
2799
- return false;
2800
- }
2801
-
2802
- // Detect buggy property enumeration order in older V8 versions.
2803
-
2804
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
2805
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
2806
- test1[5] = 'de';
2807
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
2808
- return false;
2809
- }
2810
-
2811
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
2812
- var test2 = {};
2813
- for (var i = 0; i < 10; i++) {
2814
- test2['_' + String.fromCharCode(i)] = i;
2815
- }
2816
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
2817
- return test2[n];
2818
- });
2819
- if (order2.join('') !== '0123456789') {
2820
- return false;
2821
- }
2822
-
2823
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
2824
- var test3 = {};
2825
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
2826
- test3[letter] = letter;
2827
- });
2828
- if (Object.keys(Object.assign({}, test3)).join('') !==
2829
- 'abcdefghijklmnopqrst') {
2830
- return false;
2831
- }
2832
-
2833
- return true;
2834
- } catch (err) {
2835
- // We don't expect any of the above to throw, but better to be safe.
2836
- return false;
2837
- }
2838
- }
2839
-
2840
- module.exports = shouldUseNative() ? Object.assign : function (target, source) {
2841
- var from;
2842
- var to = toObject(target);
2843
- var symbols;
2844
-
2845
- for (var s = 1; s < arguments.length; s++) {
2846
- from = Object(arguments[s]);
2847
-
2848
- for (var key in from) {
2849
- if (hasOwnProperty.call(from, key)) {
2850
- to[key] = from[key];
2851
- }
2852
- }
2853
-
2854
- if (getOwnPropertySymbols) {
2855
- symbols = getOwnPropertySymbols(from);
2856
- for (var i = 0; i < symbols.length; i++) {
2857
- if (propIsEnumerable.call(from, symbols[i])) {
2858
- to[symbols[i]] = from[symbols[i]];
2859
- }
2860
- }
2861
- }
2862
- }
2863
-
2864
- return to;
2865
- };
2866
-
2867
-
2868
- /***/ }),
2869
-
2870
- /***/ 43:
2871
- /***/ (function(module, exports) {
2872
-
2873
- module.exports = true;
2874
-
2875
-
2876
- /***/ }),
2877
-
2878
- /***/ 44:
2879
- /***/ (function(module, exports, __webpack_require__) {
2880
-
2881
- // optional / simple context binding
2882
- var aFunction = __webpack_require__(108);
2883
- module.exports = function (fn, that, length) {
2884
- aFunction(fn);
2885
- if (that === undefined) return fn;
2886
- switch (length) {
2887
- case 1: return function (a) {
2888
- return fn.call(that, a);
2889
- };
2890
- case 2: return function (a, b) {
2891
- return fn.call(that, a, b);
2892
- };
2893
- case 3: return function (a, b, c) {
2894
- return fn.call(that, a, b, c);
2895
- };
2896
- }
2897
- return function (/* ...args */) {
2898
- return fn.apply(that, arguments);
2899
- };
2900
- };
2901
-
2902
-
2903
- /***/ }),
2904
-
2905
- /***/ 45:
2906
- /***/ (function(module, exports) {
2907
-
2908
- module.exports = {};
2909
-
2910
-
2911
- /***/ }),
2912
-
2913
- /***/ 46:
2914
- /***/ (function(module, exports) {
2915
-
2916
- var id = 0;
2917
- var px = Math.random();
2918
- module.exports = function (key) {
2919
- return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
2920
- };
2921
-
2922
-
2923
- /***/ }),
2924
-
2925
- /***/ 47:
2926
- /***/ (function(module, exports, __webpack_require__) {
2927
-
2928
- __webpack_require__(255);
2929
- var global = __webpack_require__(13);
2930
- var hide = __webpack_require__(35);
2931
- var Iterators = __webpack_require__(45);
2932
- var TO_STRING_TAG = __webpack_require__(11)('toStringTag');
2933
-
2934
- var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
2935
- 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
2936
- 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +
2937
- 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +
2938
- 'TextTrackList,TouchList').split(',');
2939
-
2940
- for (var i = 0; i < DOMIterables.length; i++) {
2941
- var NAME = DOMIterables[i];
2942
- var Collection = global[NAME];
2943
- var proto = Collection && Collection.prototype;
2944
- if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
2945
- Iterators[NAME] = Iterators.Array;
2946
- }
2947
-
2948
-
2949
- /***/ }),
2950
-
2951
- /***/ 50:
2952
- /***/ (function(module, exports, __webpack_require__) {
2953
-
2954
- // 7.1.1 ToPrimitive(input [, PreferredType])
2955
- var isObject = __webpack_require__(19);
2956
- // instead of the ES6 spec version, we didn't implement @@toPrimitive case
2957
- // and the second argument - flag - preferred type is a string
2958
- module.exports = function (it, S) {
2959
- if (!isObject(it)) return it;
2960
- var fn, val;
2961
- if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
2962
- if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
2963
- if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
2964
- throw TypeError("Can't convert object to primitive value");
2965
- };
2966
-
2967
-
2968
- /***/ }),
2969
-
2970
- /***/ 51:
2971
- /***/ (function(module, exports, __webpack_require__) {
2972
-
2973
- // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
2974
- var anObject = __webpack_require__(18);
2975
- var dPs = __webpack_require__(250);
2976
- var enumBugKeys = __webpack_require__(67);
2977
- var IE_PROTO = __webpack_require__(132)('IE_PROTO');
2978
- var Empty = function () { /* empty */ };
2979
- var PROTOTYPE = 'prototype';
2980
-
2981
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
2982
- var createDict = function () {
2983
- // Thrash, waste and sodomy: IE GC bug
2984
- var iframe = __webpack_require__(130)('iframe');
2985
- var i = enumBugKeys.length;
2986
- var lt = '<';
2987
- var gt = '>';
2988
- var iframeDocument;
2989
- iframe.style.display = 'none';
2990
- __webpack_require__(167).appendChild(iframe);
2991
- iframe.src = 'javascript:'; // eslint-disable-line no-script-url
2992
- // createDict = iframe.contentWindow.Object;
2993
- // html.removeChild(iframe);
2994
- iframeDocument = iframe.contentWindow.document;
2995
- iframeDocument.open();
2996
- iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
2997
- iframeDocument.close();
2998
- createDict = iframeDocument.F;
2999
- while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
3000
- return createDict();
3001
- };
3002
-
3003
- module.exports = Object.create || function create(O, Properties) {
3004
- var result;
3005
- if (O !== null) {
3006
- Empty[PROTOTYPE] = anObject(O);
3007
- result = new Empty();
3008
- Empty[PROTOTYPE] = null;
3009
- // add "__proto__" for Object.getPrototypeOf polyfill
3010
- result[IE_PROTO] = O;
3011
- } else result = createDict();
3012
- return Properties === undefined ? result : dPs(result, Properties);
3013
- };
3014
-
3015
-
3016
- /***/ }),
3017
-
3018
- /***/ 57:
3019
- /***/ (function(module, exports, __webpack_require__) {
3020
-
3021
- var def = __webpack_require__(14).f;
3022
- var has = __webpack_require__(23);
3023
- var TAG = __webpack_require__(11)('toStringTag');
3024
-
3025
- module.exports = function (it, tag, stat) {
3026
- if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
3027
- };
3028
-
3029
-
3030
- /***/ }),
3031
-
3032
- /***/ 60:
3033
- /***/ (function(module, exports, __webpack_require__) {
3034
-
3035
- // most Object methods by ES6 should accept primitives
3036
- var $export = __webpack_require__(12);
3037
- var core = __webpack_require__(3);
3038
- var fails = __webpack_require__(26);
3039
- module.exports = function (KEY, exec) {
3040
- var fn = (core.Object || {})[KEY] || Object[KEY];
3041
- var exp = {};
3042
- exp[KEY] = exec(fn);
3043
- $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
3044
- };
3045
-
3046
-
3047
- /***/ }),
3048
-
3049
- /***/ 66:
3050
- /***/ (function(module, exports, __webpack_require__) {
3051
-
3052
- var global = __webpack_require__(13);
3053
- var SHARED = '__core-js_shared__';
3054
- var store = global[SHARED] || (global[SHARED] = {});
3055
- module.exports = function (key) {
3056
- return store[key] || (store[key] = {});
3057
- };
3058
-
3059
-
3060
- /***/ }),
3061
-
3062
- /***/ 67:
3063
- /***/ (function(module, exports) {
3064
-
3065
- // IE 8- don't enum bug keys
3066
- module.exports = (
3067
- 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
3068
- ).split(',');
3069
-
3070
-
3071
- /***/ }),
3072
-
3073
- /***/ 8:
3074
- /***/ (function(module, exports) {
3075
-
3076
- // shim for using process in browser
3077
- var process = module.exports = {};
3078
-
3079
- // cached from whatever global is present so that test runners that stub it
3080
- // don't break things. But we need to wrap it in a try catch in case it is
3081
- // wrapped in strict mode code which doesn't define any globals. It's inside a
3082
- // function because try/catches deoptimize in certain engines.
3083
-
3084
- var cachedSetTimeout;
3085
- var cachedClearTimeout;
3086
-
3087
- function defaultSetTimout() {
3088
- throw new Error('setTimeout has not been defined');
3089
- }
3090
- function defaultClearTimeout () {
3091
- throw new Error('clearTimeout has not been defined');
3092
- }
3093
- (function () {
3094
- try {
3095
- if (typeof setTimeout === 'function') {
3096
- cachedSetTimeout = setTimeout;
3097
- } else {
3098
- cachedSetTimeout = defaultSetTimout;
3099
- }
3100
- } catch (e) {
3101
- cachedSetTimeout = defaultSetTimout;
3102
- }
3103
- try {
3104
- if (typeof clearTimeout === 'function') {
3105
- cachedClearTimeout = clearTimeout;
3106
- } else {
3107
- cachedClearTimeout = defaultClearTimeout;
3108
- }
3109
- } catch (e) {
3110
- cachedClearTimeout = defaultClearTimeout;
3111
- }
3112
- } ())
3113
- function runTimeout(fun) {
3114
- if (cachedSetTimeout === setTimeout) {
3115
- //normal enviroments in sane situations
3116
- return setTimeout(fun, 0);
3117
- }
3118
- // if setTimeout wasn't available but was latter defined
3119
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
3120
- cachedSetTimeout = setTimeout;
3121
- return setTimeout(fun, 0);
3122
- }
3123
- try {
3124
- // when when somebody has screwed with setTimeout but no I.E. maddness
3125
- return cachedSetTimeout(fun, 0);
3126
- } catch(e){
3127
- try {
3128
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
3129
- return cachedSetTimeout.call(null, fun, 0);
3130
- } catch(e){
3131
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
3132
- return cachedSetTimeout.call(this, fun, 0);
3133
- }
3134
- }
3135
-
3136
-
3137
- }
3138
- function runClearTimeout(marker) {
3139
- if (cachedClearTimeout === clearTimeout) {
3140
- //normal enviroments in sane situations
3141
- return clearTimeout(marker);
3142
- }
3143
- // if clearTimeout wasn't available but was latter defined
3144
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
3145
- cachedClearTimeout = clearTimeout;
3146
- return clearTimeout(marker);
3147
- }
3148
- try {
3149
- // when when somebody has screwed with setTimeout but no I.E. maddness
3150
- return cachedClearTimeout(marker);
3151
- } catch (e){
3152
- try {
3153
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
3154
- return cachedClearTimeout.call(null, marker);
3155
- } catch (e){
3156
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
3157
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
3158
- return cachedClearTimeout.call(this, marker);
3159
- }
3160
- }
3161
-
3162
-
3163
-
3164
- }
3165
- var queue = [];
3166
- var draining = false;
3167
- var currentQueue;
3168
- var queueIndex = -1;
3169
-
3170
- function cleanUpNextTick() {
3171
- if (!draining || !currentQueue) {
3172
- return;
3173
- }
3174
- draining = false;
3175
- if (currentQueue.length) {
3176
- queue = currentQueue.concat(queue);
3177
- } else {
3178
- queueIndex = -1;
3179
- }
3180
- if (queue.length) {
3181
- drainQueue();
3182
- }
3183
- }
3184
-
3185
- function drainQueue() {
3186
- if (draining) {
3187
- return;
3188
- }
3189
- var timeout = runTimeout(cleanUpNextTick);
3190
- draining = true;
3191
-
3192
- var len = queue.length;
3193
- while(len) {
3194
- currentQueue = queue;
3195
- queue = [];
3196
- while (++queueIndex < len) {
3197
- if (currentQueue) {
3198
- currentQueue[queueIndex].run();
3199
- }
3200
- }
3201
- queueIndex = -1;
3202
- len = queue.length;
3203
- }
3204
- currentQueue = null;
3205
- draining = false;
3206
- runClearTimeout(timeout);
3207
- }
3208
-
3209
- process.nextTick = function (fun) {
3210
- var args = new Array(arguments.length - 1);
3211
- if (arguments.length > 1) {
3212
- for (var i = 1; i < arguments.length; i++) {
3213
- args[i - 1] = arguments[i];
3214
- }
3215
- }
3216
- queue.push(new Item(fun, args));
3217
- if (queue.length === 1 && !draining) {
3218
- runTimeout(drainQueue);
3219
- }
3220
- };
3221
-
3222
- // v8 likes predictible objects
3223
- function Item(fun, array) {
3224
- this.fun = fun;
3225
- this.array = array;
3226
- }
3227
- Item.prototype.run = function () {
3228
- this.fun.apply(null, this.array);
3229
- };
3230
- process.title = 'browser';
3231
- process.browser = true;
3232
- process.env = {};
3233
- process.argv = [];
3234
- process.version = ''; // empty string to avoid regexp issues
3235
- process.versions = {};
3236
-
3237
- function noop() {}
3238
-
3239
- process.on = noop;
3240
- process.addListener = noop;
3241
- process.once = noop;
3242
- process.off = noop;
3243
- process.removeListener = noop;
3244
- process.removeAllListeners = noop;
3245
- process.emit = noop;
3246
- process.prependListener = noop;
3247
- process.prependOnceListener = noop;
3248
-
3249
- process.listeners = function (name) { return [] }
3250
-
3251
- process.binding = function (name) {
3252
- throw new Error('process.binding is not supported');
3253
- };
3254
-
3255
- process.cwd = function () { return '/' };
3256
- process.chdir = function (dir) {
3257
- throw new Error('process.chdir is not supported');
3258
- };
3259
- process.umask = function() { return 0; };
3260
-
3261
-
3262
- /***/ })
3263
-
3264
- /******/ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/lodash.min.js ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @license
3
+ * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
4
+ */
5
+ ;(function(){function n(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function t(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u<i;){var o=n[u];t(e,o,r(o),n)}return e}function r(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&false!==t(n[r],r,n););return n}function e(n,t){for(var r=null==n?0:n.length;r--&&false!==t(n[r],r,n););return n}function u(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return false;
6
+ return true}function i(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[u++]=o)}return i}function o(n,t){return!(null==n||!n.length)&&-1<v(n,t,0)}function f(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return true;return false}function c(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function a(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function l(n,t,r,e){var u=-1,i=null==n?0:n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);
7
+ return r}function s(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function h(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return true;return false}function p(n,t,r){var e;return r(n,function(n,r,u){if(t(n,r,u))return e=r,false}),e}function _(n,t,r,e){var u=n.length;for(r+=e?1:-1;e?r--:++r<u;)if(t(n[r],r,n))return r;return-1}function v(n,t,r){if(t===t)n:{--r;for(var e=n.length;++r<e;)if(n[r]===t){n=r;break n}n=-1}else n=_(n,d,r);return n}function g(n,t,r,e){
8
+ --r;for(var u=n.length;++r<u;)if(e(n[r],t))return r;return-1}function d(n){return n!==n}function y(n,t){var r=null==n?0:n.length;return r?m(n,t)/r:F}function b(n){return function(t){return null==t?T:t[n]}}function x(n){return function(t){return null==n?T:n[t]}}function j(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=false,n):t(r,n,u,i)}),r}function w(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}function m(n,t){for(var r,e=-1,u=n.length;++e<u;){var i=t(n[e]);i!==T&&(r=r===T?i:r+i)}return r;
9
+ }function A(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function k(n,t){return c(t,function(t){return[t,n[t]]})}function E(n){return function(t){return n(t)}}function S(n,t){return c(t,function(t){return n[t]})}function O(n,t){return n.has(t)}function I(n,t){for(var r=-1,e=n.length;++r<e&&-1<v(t,n[r],0););return r}function R(n,t){for(var r=n.length;r--&&-1<v(t,n[r],0););return r}function z(n){return"\\"+Ln[n]}function W(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n];
10
+ }),r}function U(n,t){return function(r){return n(t(r))}}function B(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r];o!==t&&"__lodash_placeholder__"!==o||(n[r]="__lodash_placeholder__",i[u++]=r)}return i}function L(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}function C(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function D(n){if(Rn.test(n)){for(var t=On.lastIndex=0;On.test(n);)++t;n=t}else n=Qn(n);return n}function M(n){return Rn.test(n)?n.match(On)||[]:n.split("");
11
+ }var T,$=1/0,F=NaN,N=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],P=/\b__p\+='';/g,Z=/\b(__p\+=)''\+/g,q=/(__e\(.*?\)|\b__t\))\+'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,G=RegExp(V.source),H=RegExp(K.source),J=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nn=/^\w*$/,tn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rn=/[\\^$.*+?()[\]{}|]/g,en=RegExp(rn.source),un=/^\s+|\s+$/g,on=/^\s+/,fn=/\s+$/,cn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,an=/\{\n\/\* \[wrapped with (.+)\] \*/,ln=/,? & /,sn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hn=/\\(\\)?/g,pn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_n=/\w*$/,vn=/^[-+]0x[0-9a-f]+$/i,gn=/^0b[01]+$/i,dn=/^\[object .+?Constructor\]$/,yn=/^0o[0-7]+$/i,bn=/^(?:0|[1-9]\d*)$/,xn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,jn=/($^)/,wn=/['\n\r\u2028\u2029\\]/g,mn="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",An="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+mn,kn="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",En=RegExp("['\u2019]","g"),Sn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),On=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+kn+mn,"g"),In=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",An].join("|"),"g"),Rn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),zn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Wn="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Un={};
12
+ Un["[object Float32Array]"]=Un["[object Float64Array]"]=Un["[object Int8Array]"]=Un["[object Int16Array]"]=Un["[object Int32Array]"]=Un["[object Uint8Array]"]=Un["[object Uint8ClampedArray]"]=Un["[object Uint16Array]"]=Un["[object Uint32Array]"]=true,Un["[object Arguments]"]=Un["[object Array]"]=Un["[object ArrayBuffer]"]=Un["[object Boolean]"]=Un["[object DataView]"]=Un["[object Date]"]=Un["[object Error]"]=Un["[object Function]"]=Un["[object Map]"]=Un["[object Number]"]=Un["[object Object]"]=Un["[object RegExp]"]=Un["[object Set]"]=Un["[object String]"]=Un["[object WeakMap]"]=false;
13
+ var Bn={};Bn["[object Arguments]"]=Bn["[object Array]"]=Bn["[object ArrayBuffer]"]=Bn["[object DataView]"]=Bn["[object Boolean]"]=Bn["[object Date]"]=Bn["[object Float32Array]"]=Bn["[object Float64Array]"]=Bn["[object Int8Array]"]=Bn["[object Int16Array]"]=Bn["[object Int32Array]"]=Bn["[object Map]"]=Bn["[object Number]"]=Bn["[object Object]"]=Bn["[object RegExp]"]=Bn["[object Set]"]=Bn["[object String]"]=Bn["[object Symbol]"]=Bn["[object Uint8Array]"]=Bn["[object Uint8ClampedArray]"]=Bn["[object Uint16Array]"]=Bn["[object Uint32Array]"]=true,
14
+ Bn["[object Error]"]=Bn["[object Function]"]=Bn["[object WeakMap]"]=false;var Ln={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Cn=parseFloat,Dn=parseInt,Mn=typeof global=="object"&&global&&global.Object===Object&&global,Tn=typeof self=="object"&&self&&self.Object===Object&&self,$n=Mn||Tn||Function("return this")(),Fn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Nn=Fn&&typeof module=="object"&&module&&!module.nodeType&&module,Pn=Nn&&Nn.exports===Fn,Zn=Pn&&Mn.process,qn=function(){
15
+ try{var n=Nn&&Nn.require&&Nn.require("util").types;return n?n:Zn&&Zn.binding&&Zn.binding("util")}catch(n){}}(),Vn=qn&&qn.isArrayBuffer,Kn=qn&&qn.isDate,Gn=qn&&qn.isMap,Hn=qn&&qn.isRegExp,Jn=qn&&qn.isSet,Yn=qn&&qn.isTypedArray,Qn=b("length"),Xn=x({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e",
16
+ "\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a",
17
+ "\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I",
18
+ "\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r",
19
+ "\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ",
20
+ "\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),nt=x({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),tt=x({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),rt=function x(mn){function An(n){if(yu(n)&&!ff(n)&&!(n instanceof Ln)){if(n instanceof On)return n;if(oi.call(n,"__wrapped__"))return Fe(n)}return new On(n)}function kn(){}function On(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=T}function Ln(n){
21
+ this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Mn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Tn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Fn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Nn(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new Fn;++t<r;)this.add(n[t]);
22
+ }function Zn(n){this.size=(this.__data__=new Tn(n)).size}function qn(n,t){var r,e=ff(n),u=!e&&of(n),i=!e&&!u&&af(n),o=!e&&!u&&!i&&_f(n),u=(e=e||u||i||o)?A(n.length,ni):[],f=u.length;for(r in n)!t&&!oi.call(n,r)||e&&("length"==r||i&&("offset"==r||"parent"==r)||o&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||Se(r,f))||u.push(r);return u}function Qn(n){var t=n.length;return t?n[ir(0,t-1)]:T}function et(n,t){return De(Lr(n),pt(t,0,n.length))}function ut(n){return De(Lr(n))}function it(n,t,r){(r===T||lu(n[t],r))&&(r!==T||t in n)||st(n,t,r);
23
+ }function ot(n,t,r){var e=n[t];oi.call(n,t)&&lu(e,r)&&(r!==T||t in n)||st(n,t,r)}function ft(n,t){for(var r=n.length;r--;)if(lu(n[r][0],t))return r;return-1}function ct(n,t,r,e){return uo(n,function(n,u,i){t(e,n,r(n),i)}),e}function at(n,t){return n&&Cr(t,Wu(t),n)}function lt(n,t){return n&&Cr(t,Uu(t),n)}function st(n,t,r){"__proto__"==t&&Ai?Ai(n,t,{configurable:true,enumerable:true,value:r,writable:true}):n[t]=r}function ht(n,t){for(var r=-1,e=t.length,u=Ku(e),i=null==n;++r<e;)u[r]=i?T:Ru(n,t[r]);return u;
24
+ }function pt(n,t,r){return n===n&&(r!==T&&(n=n<=r?n:r),t!==T&&(n=n>=t?n:t)),n}function _t(n,t,e,u,i,o){var f,c=1&t,a=2&t,l=4&t;if(e&&(f=i?e(n,u,i,o):e(n)),f!==T)return f;if(!du(n))return n;if(u=ff(n)){if(f=me(n),!c)return Lr(n,f)}else{var s=vo(n),h="[object Function]"==s||"[object GeneratorFunction]"==s;if(af(n))return Ir(n,c);if("[object Object]"==s||"[object Arguments]"==s||h&&!i){if(f=a||h?{}:Ae(n),!c)return a?Mr(n,lt(f,n)):Dr(n,at(f,n))}else{if(!Bn[s])return i?n:{};f=ke(n,s,c)}}if(o||(o=new Zn),
25
+ i=o.get(n))return i;if(o.set(n,f),pf(n))return n.forEach(function(r){f.add(_t(r,t,e,r,n,o))}),f;if(sf(n))return n.forEach(function(r,u){f.set(u,_t(r,t,e,u,n,o))}),f;var a=l?a?ve:_e:a?Uu:Wu,p=u?T:a(n);return r(p||n,function(r,u){p&&(u=r,r=n[u]),ot(f,u,_t(r,t,e,u,n,o))}),f}function vt(n){var t=Wu(n);return function(r){return gt(r,n,t)}}function gt(n,t,r){var e=r.length;if(null==n)return!e;for(n=Qu(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===T&&!(u in n)||!i(o))return false}return true}function dt(n,t,r){if(typeof n!="function")throw new ti("Expected a function");
26
+ return bo(function(){n.apply(T,r)},t)}function yt(n,t,r,e){var u=-1,i=o,a=true,l=n.length,s=[],h=t.length;if(!l)return s;r&&(t=c(t,E(r))),e?(i=f,a=false):200<=t.length&&(i=O,a=false,t=new Nn(t));n:for(;++u<l;){var p=n[u],_=null==r?p:r(p),p=e||0!==p?p:0;if(a&&_===_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else i(t,_,e)||s.push(p)}return s}function bt(n,t){var r=true;return uo(n,function(n,e,u){return r=!!t(n,e,u)}),r}function xt(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],o=t(i);if(null!=o&&(f===T?o===o&&!wu(o):r(o,f)))var f=o,c=i;
27
+ }return c}function jt(n,t){var r=[];return uo(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function wt(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=Ee),u||(u=[]);++i<o;){var f=n[i];0<t&&r(f)?1<t?wt(f,t-1,r,e,u):a(u,f):e||(u[u.length]=f)}return u}function mt(n,t){return n&&oo(n,t,Wu)}function At(n,t){return n&&fo(n,t,Wu)}function kt(n,t){return i(t,function(t){return _u(n[t])})}function Et(n,t){t=Sr(t,n);for(var r=0,e=t.length;null!=n&&r<e;)n=n[Me(t[r++])];return r&&r==e?n:T}function St(n,t,r){return t=t(n),
28
+ ff(n)?t:a(t,r(n))}function Ot(n){if(null==n)return n===T?"[object Undefined]":"[object Null]";if(mi&&mi in Qu(n)){var t=oi.call(n,mi),r=n[mi];try{n[mi]=T;var e=true}catch(n){}var u=ai.call(n);e&&(t?n[mi]=r:delete n[mi]),n=u}else n=ai.call(n);return n}function It(n,t){return n>t}function Rt(n,t){return null!=n&&oi.call(n,t)}function zt(n,t){return null!=n&&t in Qu(n)}function Wt(n,t,r){for(var e=r?f:o,u=n[0].length,i=n.length,a=i,l=Ku(i),s=1/0,h=[];a--;){var p=n[a];a&&t&&(p=c(p,E(t))),s=Ci(p.length,s),
29
+ l[a]=!r&&(t||120<=u&&120<=p.length)?new Nn(a&&p):T}var p=n[0],_=-1,v=l[0];n:for(;++_<u&&h.length<s;){var g=p[_],d=t?t(g):g,g=r||0!==g?g:0;if(v?!O(v,d):!e(h,d,r)){for(a=i;--a;){var y=l[a];if(y?!O(y,d):!e(n[a],d,r))continue n}v&&v.push(d),h.push(g)}}return h}function Ut(n,t,r,e){return mt(n,function(n,u,i){t(e,r(n),u,i)}),e}function Bt(t,r,e){return r=Sr(r,t),t=2>r.length?t:Et(t,hr(r,0,-1)),r=null==t?t:t[Me(Ve(r))],null==r?T:n(r,t,e)}function Lt(n){return yu(n)&&"[object Arguments]"==Ot(n)}function Ct(n){
30
+ return yu(n)&&"[object ArrayBuffer]"==Ot(n)}function Dt(n){return yu(n)&&"[object Date]"==Ot(n)}function Mt(n,t,r,e,u){if(n===t)return true;if(null==n||null==t||!yu(n)&&!yu(t))return n!==n&&t!==t;n:{var i=ff(n),o=ff(t),f=i?"[object Array]":vo(n),c=o?"[object Array]":vo(t),f="[object Arguments]"==f?"[object Object]":f,c="[object Arguments]"==c?"[object Object]":c,a="[object Object]"==f,o="[object Object]"==c;if((c=f==c)&&af(n)){if(!af(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Zn),t=i||_f(n)?se(n,t,r,e,Mt,u):he(n,t,f,r,e,Mt,u);else{
31
+ if(!(1&r)&&(i=a&&oi.call(n,"__wrapped__"),f=o&&oi.call(t,"__wrapped__"),i||f)){n=i?n.value():n,t=f?t.value():t,u||(u=new Zn),t=Mt(n,t,r,e,u);break n}if(c)t:if(u||(u=new Zn),i=1&r,f=_e(n),o=f.length,c=_e(t).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in t:oi.call(t,l))){t=false;break t}}if((c=u.get(n))&&u.get(t))t=c==t;else{c=true,u.set(n,t),u.set(t,n);for(var s=i;++a<o;){var l=f[a],h=n[l],p=t[l];if(e)var _=i?e(p,h,l,t,n,u):e(h,p,l,n,t,u);if(_===T?h!==p&&!Mt(h,p,r,e,u):!_){c=false;break}s||(s="constructor"==l);
32
+ }c&&!s&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(c=false)),u.delete(n),u.delete(t),t=c}}else t=false;else t=false}}return t}function Tt(n){return yu(n)&&"[object Map]"==vo(n)}function $t(n,t,r,e){var u=r.length,i=u,o=!e;if(null==n)return!i;for(n=Qu(n);u--;){var f=r[u];if(o&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return false}for(;++u<i;){var f=r[u],c=f[0],a=n[c],l=f[1];if(o&&f[2]){if(a===T&&!(c in n))return false;
33
+ }else{if(f=new Zn,e)var s=e(a,l,c,n,t,f);if(s===T?!Mt(l,a,3,e,f):!s)return false}}return true}function Ft(n){return!(!du(n)||ci&&ci in n)&&(_u(n)?hi:dn).test(Te(n))}function Nt(n){return yu(n)&&"[object RegExp]"==Ot(n)}function Pt(n){return yu(n)&&"[object Set]"==vo(n)}function Zt(n){return yu(n)&&gu(n.length)&&!!Un[Ot(n)]}function qt(n){return typeof n=="function"?n:null==n?$u:typeof n=="object"?ff(n)?Jt(n[0],n[1]):Ht(n):Zu(n)}function Vt(n){if(!ze(n))return Bi(n);var t,r=[];for(t in Qu(n))oi.call(n,t)&&"constructor"!=t&&r.push(t);
34
+ return r}function Kt(n,t){return n<t}function Gt(n,t){var r=-1,e=su(n)?Ku(n.length):[];return uo(n,function(n,u,i){e[++r]=t(n,u,i)}),e}function Ht(n){var t=xe(n);return 1==t.length&&t[0][2]?We(t[0][0],t[0][1]):function(r){return r===n||$t(r,n,t)}}function Jt(n,t){return Ie(n)&&t===t&&!du(t)?We(Me(n),t):function(r){var e=Ru(r,n);return e===T&&e===t?zu(r,n):Mt(t,e,3)}}function Yt(n,t,r,e,u){n!==t&&oo(t,function(i,o){if(du(i)){u||(u=new Zn);var f=u,c=Be(n,o),a=Be(t,o),l=f.get(a);if(!l){var l=e?e(c,a,o+"",n,t,f):T,s=l===T;
35
+ if(s){var h=ff(a),p=!h&&af(a),_=!h&&!p&&_f(a),l=a;h||p||_?ff(c)?l=c:hu(c)?l=Lr(c):p?(s=false,l=Ir(a,true)):_?(s=false,l=zr(a,true)):l=[]:xu(a)||of(a)?(l=c,of(c)?l=Ou(c):du(c)&&!_u(c)||(l=Ae(a))):s=false}s&&(f.set(a,l),Yt(l,a,r,e,f),f.delete(a))}it(n,o,l)}else f=e?e(Be(n,o),i,o+"",n,t,u):T,f===T&&(f=i),it(n,o,f)},Uu)}function Qt(n,t){var r=n.length;if(r)return t+=0>t?r:0,Se(t,r)?n[t]:T}function Xt(n,t,r){var e=-1;return t=c(t.length?t:[$u],E(ye())),n=Gt(n,function(n,r,u){return{a:c(t,function(t){return t(n)}),
36
+ b:++e,c:n}}),w(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e<o;){var c=Wr(u[e],i[e]);if(c){if(e>=f){e=c;break n}e=c*("desc"==r[e]?-1:1);break n}}e=n.b-t.b}return e})}function nr(n,t){return tr(n,t,function(t,r){return zu(n,r)})}function tr(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=Et(n,o);r(f,o)&&lr(i,Sr(o,n),f)}return i}function rr(n){return function(t){return Et(t,n)}}function er(n,t,r,e){var u=e?g:v,i=-1,o=t.length,f=n;for(n===t&&(t=Lr(t)),r&&(f=c(n,E(r)));++i<o;)for(var a=0,l=t[i],l=r?r(l):l;-1<(a=u(f,l,a,e));)f!==n&&xi.call(f,a,1),
37
+ xi.call(n,a,1);return n}function ur(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];if(r==e||u!==i){var i=u;Se(u)?xi.call(n,u,1):xr(n,u)}}return n}function ir(n,t){return n+Ii(Ti()*(t-n+1))}function or(n,t){var r="";if(!n||1>t||9007199254740991<t)return r;do t%2&&(r+=n),(t=Ii(t/2))&&(n+=n);while(t);return r}function fr(n,t){return xo(Ue(n,t,$u),n+"")}function cr(n){return Qn(Lu(n))}function ar(n,t){var r=Lu(n);return De(r,pt(t,0,r.length))}function lr(n,t,r,e){if(!du(n))return n;t=Sr(t,n);for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++u<i;){
38
+ var c=Me(t[u]),a=r;if(u!=o){var l=f[c],a=e?e(l,c,f):T;a===T&&(a=du(l)?l:Se(t[u+1])?[]:{})}ot(f,c,a),f=f[c]}return n}function sr(n){return De(Lu(n))}function hr(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Ku(u);++e<u;)r[e]=n[e+t];return r}function pr(n,t){var r;return uo(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function _r(n,t,r){var e=0,u=null==n?e:n.length;if(typeof t=="number"&&t===t&&2147483647>=u){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!wu(o)&&(r?o<=t:o<t)?e=i+1:u=i;
39
+ }return u}return vr(n,t,$u,r)}function vr(n,t,r,e){t=r(t);for(var u=0,i=null==n?0:n.length,o=t!==t,f=null===t,c=wu(t),a=t===T;u<i;){var l=Ii((u+i)/2),s=r(n[l]),h=s!==T,p=null===s,_=s===s,v=wu(s);(o?e||_:a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):p||v?0:e?s<=t:s<t)?u=l+1:i=l}return Ci(i,4294967294)}function gr(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r],f=t?t(o):o;if(!r||!lu(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function dr(n){return typeof n=="number"?n:wu(n)?F:+n}function yr(n){
40
+ if(typeof n=="string")return n;if(ff(n))return c(n,yr)+"";if(wu(n))return ro?ro.call(n):"";var t=n+"";return"0"==t&&1/n==-$?"-0":t}function br(n,t,r){var e=-1,u=o,i=n.length,c=true,a=[],l=a;if(r)c=false,u=f;else if(200<=i){if(u=t?null:so(n))return L(u);c=false,u=O,l=new Nn}else l=t?[]:a;n:for(;++e<i;){var s=n[e],h=t?t(s):s,s=r||0!==s?s:0;if(c&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue n;t&&l.push(h),a.push(s)}else u(l,h,r)||(l!==a&&l.push(h),a.push(s))}return a}function xr(n,t){return t=Sr(t,n),
41
+ n=2>t.length?n:Et(n,hr(t,0,-1)),null==n||delete n[Me(Ve(t))]}function jr(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?hr(n,e?0:i,e?i+1:u):hr(n,e?i+1:0,e?u:i)}function wr(n,t){var r=n;return r instanceof Ln&&(r=r.value()),l(t,function(n,t){return t.func.apply(t.thisArg,a([n],t.args))},r)}function mr(n,t,r){var e=n.length;if(2>e)return e?br(n[0]):[];for(var u=-1,i=Ku(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=yt(i[u]||o,n[f],t,r));return br(wt(i,1),t,r)}function Ar(n,t,r){
42
+ for(var e=-1,u=n.length,i=t.length,o={};++e<u;)r(o,n[e],e<i?t[e]:T);return o}function kr(n){return hu(n)?n:[]}function Er(n){return typeof n=="function"?n:$u}function Sr(n,t){return ff(n)?n:Ie(n,t)?[n]:jo(Iu(n))}function Or(n,t,r){var e=n.length;return r=r===T?e:r,!t&&r>=e?n:hr(n,t,r)}function Ir(n,t){if(t)return n.slice();var r=n.length,r=gi?gi(r):new n.constructor(r);return n.copy(r),r}function Rr(n){var t=new n.constructor(n.byteLength);return new vi(t).set(new vi(n)),t}function zr(n,t){return new n.constructor(t?Rr(n.buffer):n.buffer,n.byteOffset,n.length);
43
+ }function Wr(n,t){if(n!==t){var r=n!==T,e=null===n,u=n===n,i=wu(n),o=t!==T,f=null===t,c=t===t,a=wu(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n<t||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function Ur(n,t,r,e){var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Li(i-o,0),l=Ku(c+a);for(e=!e;++f<c;)l[f]=t[f];for(;++u<o;)(e||u<i)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l}function Br(n,t,r,e){var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=Li(i-f,0),s=Ku(l+a);
44
+ for(e=!e;++u<l;)s[u]=n[u];for(l=u;++c<a;)s[l+c]=t[c];for(;++o<f;)(e||u<i)&&(s[l+r[o]]=n[u++]);return s}function Lr(n,t){var r=-1,e=n.length;for(t||(t=Ku(e));++r<e;)t[r]=n[r];return t}function Cr(n,t,r,e){var u=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var f=t[i],c=e?e(r[f],n[f],f,r,n):T;c===T&&(c=n[f]),u?st(r,f,c):ot(r,f,c)}return r}function Dr(n,t){return Cr(n,po(n),t)}function Mr(n,t){return Cr(n,_o(n),t)}function Tr(n,r){return function(e,u){var i=ff(e)?t:ct,o=r?r():{};return i(e,n,ye(u,2),o);
45
+ }}function $r(n){return fr(function(t,r){var e=-1,u=r.length,i=1<u?r[u-1]:T,o=2<u?r[2]:T,i=3<n.length&&typeof i=="function"?(u--,i):T;for(o&&Oe(r[0],r[1],o)&&(i=3>u?T:i,u=1),t=Qu(t);++e<u;)(o=r[e])&&n(t,o,e,i);return t})}function Fr(n,t){return function(r,e){if(null==r)return r;if(!su(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=Qu(r);(t?i--:++i<u)&&false!==e(o[i],i,o););return r}}function Nr(n){return function(t,r,e){var u=-1,i=Qu(t);e=e(t);for(var o=e.length;o--;){var f=e[n?o:++u];if(false===r(i[f],f,i))break;
46
+ }return t}}function Pr(n,t,r){function e(){return(this&&this!==$n&&this instanceof e?i:n).apply(u?r:this,arguments)}var u=1&t,i=Vr(n);return e}function Zr(n){return function(t){t=Iu(t);var r=Rn.test(t)?M(t):T,e=r?r[0]:t.charAt(0);return t=r?Or(r,1).join(""):t.slice(1),e[n]()+t}}function qr(n){return function(t){return l(Mu(Du(t).replace(En,"")),n,"")}}function Vr(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:
47
+ return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=eo(n.prototype),t=n.apply(r,t);return du(t)?t:r}}function Kr(t,r,e){function u(){for(var o=arguments.length,f=Ku(o),c=o,a=de(u);c--;)f[c]=arguments[c];return c=3>o&&f[0]!==a&&f[o-1]!==a?[]:B(f,a),o-=c.length,o<e?ue(t,r,Jr,u.placeholder,T,f,c,T,T,e-o):n(this&&this!==$n&&this instanceof u?i:t,this,f);
48
+ }var i=Vr(t);return u}function Gr(n){return function(t,r,e){var u=Qu(t);if(!su(t)){var i=ye(r,3);t=Wu(t),r=function(n){return i(u[n],n,u)}}return r=n(t,r,e),-1<r?u[i?t[r]:r]:T}}function Hr(n){return pe(function(t){var r=t.length,e=r,u=On.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if(typeof i!="function")throw new ti("Expected a function");if(u&&!o&&"wrapper"==ge(i))var o=new On([],true)}for(e=o?e:r;++e<r;)var i=t[e],u=ge(i),f="wrapper"==u?ho(i):T,o=f&&Re(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?o[ge(f[0])].apply(o,f[3]):1==i.length&&Re(i)?o[u]():o.thru(i);
49
+ return function(){var n=arguments,e=n[0];if(o&&1==n.length&&ff(e))return o.plant(e).value();for(var u=0,n=r?t[u].apply(this,n):e;++u<r;)n=t[u].call(this,n);return n}})}function Jr(n,t,r,e,u,i,o,f,c,a){function l(){for(var d=arguments.length,y=Ku(d),b=d;b--;)y[b]=arguments[b];if(_){var x,j=de(l),b=y.length;for(x=0;b--;)y[b]===j&&++x}if(e&&(y=Ur(y,e,u,_)),i&&(y=Br(y,i,o,_)),d-=x,_&&d<a)return j=B(y,j),ue(n,t,Jr,l.placeholder,r,y,j,f,c,a-d);if(j=h?r:this,b=p?j[n]:n,d=y.length,f){x=y.length;for(var w=Ci(f.length,x),m=Lr(y);w--;){
50
+ var A=f[w];y[w]=Se(A,x)?m[A]:T}}else v&&1<d&&y.reverse();return s&&c<d&&(y.length=c),this&&this!==$n&&this instanceof l&&(b=g||Vr(b)),b.apply(j,y)}var s=128&t,h=1&t,p=2&t,_=24&t,v=512&t,g=p?T:Vr(n);return l}function Yr(n,t){return function(r,e){return Ut(r,n,t(e),{})}}function Qr(n,t){return function(r,e){var u;if(r===T&&e===T)return t;if(r!==T&&(u=r),e!==T){if(u===T)return e;typeof r=="string"||typeof e=="string"?(r=yr(r),e=yr(e)):(r=dr(r),e=dr(e)),u=n(r,e)}return u}}function Xr(t){return pe(function(r){
51
+ return r=c(r,E(ye())),fr(function(e){var u=this;return t(r,function(t){return n(t,u,e)})})})}function ne(n,t){t=t===T?" ":yr(t);var r=t.length;return 2>r?r?or(t,n):t:(r=or(t,Oi(n/D(t))),Rn.test(t)?Or(M(r),0,n).join(""):r.slice(0,n))}function te(t,r,e,u){function i(){for(var r=-1,c=arguments.length,a=-1,l=u.length,s=Ku(l+c),h=this&&this!==$n&&this instanceof i?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++r];return n(h,o?e:this,s)}var o=1&r,f=Vr(t);return i}function re(n){return function(t,r,e){
52
+ e&&typeof e!="number"&&Oe(t,r,e)&&(r=e=T),t=Au(t),r===T?(r=t,t=0):r=Au(r),e=e===T?t<r?1:-1:Au(e);var u=-1;r=Li(Oi((r-t)/(e||1)),0);for(var i=Ku(r);r--;)i[n?r:++u]=t,t+=e;return i}}function ee(n){return function(t,r){return typeof t=="string"&&typeof r=="string"||(t=Su(t),r=Su(r)),n(t,r)}}function ue(n,t,r,e,u,i,o,f,c,a){var l=8&t,s=l?o:T;o=l?T:o;var h=l?i:T;return i=l?T:i,t=(t|(l?32:64))&~(l?64:32),4&t||(t&=-4),u=[n,t,u,h,s,i,o,f,c,a],r=r.apply(T,u),Re(n)&&yo(r,u),r.placeholder=e,Le(r,n,t)}function ie(n){
53
+ var t=Yu[n];return function(n,r){if(n=Su(n),r=null==r?0:Ci(ku(r),292)){var e=(Iu(n)+"e").split("e"),e=t(e[0]+"e"+(+e[1]+r)),e=(Iu(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return t(n)}}function oe(n){return function(t){var r=vo(t);return"[object Map]"==r?W(t):"[object Set]"==r?C(t):k(t,n(t))}}function fe(n,t,r,e,u,i,o,f){var c=2&t;if(!c&&typeof n!="function")throw new ti("Expected a function");var a=e?e.length:0;if(a||(t&=-97,e=u=T),o=o===T?o:Li(ku(o),0),f=f===T?f:ku(f),a-=u?u.length:0,64&t){
54
+ var l=e,s=u;e=u=T}var h=c?T:ho(n);return i=[n,t,r,e,u,l,s,i,o,f],h&&(r=i[1],n=h[1],t=r|n,e=128==n&&8==r||128==n&&256==r&&i[7].length<=h[8]||384==n&&h[7].length<=h[8]&&8==r,131>t||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Ur(e,r,h[4]):r,i[4]=e?B(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Br(e,r,h[6]):r,i[6]=e?B(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Ci(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=t),n=i[0],t=i[1],
55
+ r=i[2],e=i[3],u=i[4],f=i[9]=i[9]===T?c?0:n.length:Li(i[9]-a,0),!f&&24&t&&(t&=-25),c=t&&1!=t?8==t||16==t?Kr(n,t,f):32!=t&&33!=t||u.length?Jr.apply(T,i):te(n,t,r,e):Pr(n,t,r),Le((h?co:yo)(c,i),n,t)}function ce(n,t,r,e){return n===T||lu(n,ei[r])&&!oi.call(e,r)?t:n}function ae(n,t,r,e,u,i){return du(n)&&du(t)&&(i.set(t,n),Yt(n,t,T,ae,i),i.delete(t)),n}function le(n){return xu(n)?T:n}function se(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t;
56
+ var c=-1,a=true,l=2&r?new Nn:T;for(i.set(n,t),i.set(t,n);++c<f;){var s=n[c],p=t[c];if(e)var _=o?e(p,s,c,t,n,i):e(s,p,c,n,t,i);if(_!==T){if(_)continue;a=false;break}if(l){if(!h(t,function(n,t){if(!O(l,t)&&(s===n||u(s,n,r,e,i)))return l.push(t)})){a=false;break}}else if(s!==p&&!u(s,p,r,e,i)){a=false;break}}return i.delete(n),i.delete(t),a}function he(n,t,r,e,u,i,o){switch(r){case"[object DataView]":if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)break;n=n.buffer,t=t.buffer;case"[object ArrayBuffer]":
57
+ if(n.byteLength!=t.byteLength||!i(new vi(n),new vi(t)))break;return true;case"[object Boolean]":case"[object Date]":case"[object Number]":return lu(+n,+t);case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object RegExp]":case"[object String]":return n==t+"";case"[object Map]":var f=W;case"[object Set]":if(f||(f=L),n.size!=t.size&&!(1&e))break;return(r=o.get(n))?r==t:(e|=2,o.set(n,t),t=se(f(n),f(t),e,u,i,o),o.delete(n),t);case"[object Symbol]":if(to)return to.call(n)==to.call(t)}
58
+ return false}function pe(n){return xo(Ue(n,T,Ze),n+"")}function _e(n){return St(n,Wu,po)}function ve(n){return St(n,Uu,_o)}function ge(n){for(var t=n.name+"",r=Gi[t],e=oi.call(Gi,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function de(n){return(oi.call(An,"placeholder")?An:n).placeholder}function ye(){var n=An.iteratee||Fu,n=n===Fu?qt:n;return arguments.length?n(arguments[0],arguments[1]):n}function be(n,t){var r=n.__data__,e=typeof t;return("string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t)?r[typeof t=="string"?"string":"hash"]:r.map;
59
+ }function xe(n){for(var t=Wu(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,u===u&&!du(u)]}return t}function je(n,t){var r=null==n?T:n[t];return Ft(r)?r:T}function we(n,t,r){t=Sr(t,n);for(var e=-1,u=t.length,i=false;++e<u;){var o=Me(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:(u=null==n?0:n.length,!!u&&gu(u)&&Se(o,u)&&(ff(n)||of(n)))}function me(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&oi.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Ae(n){
60
+ return typeof n.constructor!="function"||ze(n)?{}:eo(di(n))}function ke(n,t,r){var e=n.constructor;switch(t){case"[object ArrayBuffer]":return Rr(n);case"[object Boolean]":case"[object Date]":return new e(+n);case"[object DataView]":return t=r?Rr(n.buffer):n.buffer,new n.constructor(t,n.byteOffset,n.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":
61
+ case"[object Uint16Array]":case"[object Uint32Array]":return zr(n,r);case"[object Map]":return new e;case"[object Number]":case"[object String]":return new e(n);case"[object RegExp]":return t=new n.constructor(n.source,_n.exec(n)),t.lastIndex=n.lastIndex,t;case"[object Set]":return new e;case"[object Symbol]":return to?Qu(to.call(n)):{}}}function Ee(n){return ff(n)||of(n)||!!(ji&&n&&n[ji])}function Se(n,t){var r=typeof n;return t=null==t?9007199254740991:t,!!t&&("number"==r||"symbol"!=r&&bn.test(n))&&-1<n&&0==n%1&&n<t;
62
+ }function Oe(n,t,r){if(!du(r))return false;var e=typeof t;return!!("number"==e?su(r)&&Se(t,r.length):"string"==e&&t in r)&&lu(r[t],n)}function Ie(n,t){if(ff(n))return false;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!wu(n))||(nn.test(n)||!X.test(n)||null!=t&&n in Qu(t))}function Re(n){var t=ge(n),r=An[t];return typeof r=="function"&&t in Ln.prototype&&(n===r||(t=ho(r),!!t&&n===t[0]))}function ze(n){var t=n&&n.constructor;return n===(typeof t=="function"&&t.prototype||ei)}function We(n,t){
63
+ return function(r){return null!=r&&(r[n]===t&&(t!==T||n in Qu(r)))}}function Ue(t,r,e){return r=Li(r===T?t.length-1:r,0),function(){for(var u=arguments,i=-1,o=Li(u.length-r,0),f=Ku(o);++i<o;)f[i]=u[r+i];for(i=-1,o=Ku(r+1);++i<r;)o[i]=u[i];return o[r]=e(f),n(t,this,o)}}function Be(n,t){if("__proto__"!=t)return n[t]}function Le(n,t,r){var e=t+"";t=xo;var u,i=$e;return u=(u=e.match(an))?u[1].split(ln):[],r=i(u,r),(i=r.length)&&(u=i-1,r[u]=(1<i?"& ":"")+r[u],r=r.join(2<i?", ":" "),e=e.replace(cn,"{\n/* [wrapped with "+r+"] */\n")),
64
+ t(n,e)}function Ce(n){var t=0,r=0;return function(){var e=Di(),u=16-(e-r);if(r=e,0<u){if(800<=++t)return arguments[0]}else t=0;return n.apply(T,arguments)}}function De(n,t){var r=-1,e=n.length,u=e-1;for(t=t===T?e:t;++r<t;){var e=ir(r,u),i=n[e];n[e]=n[r],n[r]=i}return n.length=t,n}function Me(n){if(typeof n=="string"||wu(n))return n;var t=n+"";return"0"==t&&1/n==-$?"-0":t}function Te(n){if(null!=n){try{return ii.call(n)}catch(n){}return n+""}return""}function $e(n,t){return r(N,function(r){var e="_."+r[0];
65
+ t&r[1]&&!o(n,e)&&n.push(e)}),n.sort()}function Fe(n){if(n instanceof Ln)return n.clone();var t=new On(n.__wrapped__,n.__chain__);return t.__actions__=Lr(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function Ne(n,t,r){var e=null==n?0:n.length;return e?(r=null==r?0:ku(r),0>r&&(r=Li(e+r,0)),_(n,ye(t,3),r)):-1}function Pe(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==T&&(u=ku(r),u=0>r?Li(e+u,0):Ci(u,e-1)),_(n,ye(t,3),u,true)}function Ze(n){return(null==n?0:n.length)?wt(n,1):[];
66
+ }function qe(n){return n&&n.length?n[0]:T}function Ve(n){var t=null==n?0:n.length;return t?n[t-1]:T}function Ke(n,t){return n&&n.length&&t&&t.length?er(n,t):n}function Ge(n){return null==n?n:$i.call(n)}function He(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){if(hu(n))return t=Li(n.length,t),true}),A(t,function(t){return c(n,b(t))})}function Je(t,r){if(!t||!t.length)return[];var e=He(t);return null==r?e:c(e,function(t){return n(r,T,t)})}function Ye(n){return n=An(n),n.__chain__=true,n;
67
+ }function Qe(n,t){return t(n)}function Xe(){return this}function nu(n,t){return(ff(n)?r:uo)(n,ye(t,3))}function tu(n,t){return(ff(n)?e:io)(n,ye(t,3))}function ru(n,t){return(ff(n)?c:Gt)(n,ye(t,3))}function eu(n,t,r){return t=r?T:t,t=n&&null==t?n.length:t,fe(n,128,T,T,T,T,t)}function uu(n,t){var r;if(typeof t!="function")throw new ti("Expected a function");return n=ku(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=T),r}}function iu(n,t,r){return t=r?T:t,n=fe(n,8,T,T,T,T,T,t),n.placeholder=iu.placeholder,
68
+ n}function ou(n,t,r){return t=r?T:t,n=fe(n,16,T,T,T,T,T,t),n.placeholder=ou.placeholder,n}function fu(n,t,r){function e(t){var r=c,e=a;return c=a=T,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===T||r>=t||0>r||g&&n>=l}function i(){var n=Go();if(u(n))return o(n);var r,e=bo;r=n-_,n=t-(n-p),r=g?Ci(n,l-r):n,h=e(i,r)}function o(n){return h=T,d&&c?e(n):(c=a=T,s)}function f(){var n=Go(),r=u(n);if(c=arguments,a=this,p=n,r){if(h===T)return _=n=p,h=bo(i,t),v?e(n):s;if(g)return h=bo(i,t),e(p)}return h===T&&(h=bo(i,t)),
69
+ s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!="function")throw new ti("Expected a function");return t=Su(t)||0,du(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Li(Su(r.maxWait)||0,t):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==T&&lo(h),_=0,c=p=a=h=T},f.flush=function(){return h===T?s:o(Go())},f}function cu(n,t){if(typeof n!="function"||null!=t&&typeof t!="function")throw new ti("Expected a function");var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;return i.has(u)?i.get(u):(e=n.apply(this,e),
70
+ r.cache=i.set(u,e)||i,e)};return r.cache=new(cu.Cache||Fn),r}function au(n){if(typeof n!="function")throw new ti("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function lu(n,t){return n===t||n!==n&&t!==t}function su(n){return null!=n&&gu(n.length)&&!_u(n)}function hu(n){return yu(n)&&su(n)}function pu(n){if(!yu(n))return false;
71
+ var t=Ot(n);return"[object Error]"==t||"[object DOMException]"==t||typeof n.message=="string"&&typeof n.name=="string"&&!xu(n)}function _u(n){return!!du(n)&&(n=Ot(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function vu(n){return typeof n=="number"&&n==ku(n)}function gu(n){return typeof n=="number"&&-1<n&&0==n%1&&9007199254740991>=n}function du(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function yu(n){return null!=n&&typeof n=="object";
72
+ }function bu(n){return typeof n=="number"||yu(n)&&"[object Number]"==Ot(n)}function xu(n){return!(!yu(n)||"[object Object]"!=Ot(n))&&(n=di(n),null===n||(n=oi.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&ii.call(n)==li))}function ju(n){return typeof n=="string"||!ff(n)&&yu(n)&&"[object String]"==Ot(n)}function wu(n){return typeof n=="symbol"||yu(n)&&"[object Symbol]"==Ot(n)}function mu(n){if(!n)return[];if(su(n))return ju(n)?M(n):Lr(n);if(wi&&n[wi]){n=n[wi]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);
73
+ return r}return t=vo(n),("[object Map]"==t?W:"[object Set]"==t?L:Lu)(n)}function Au(n){return n?(n=Su(n),n===$||n===-$?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function ku(n){n=Au(n);var t=n%1;return n===n?t?n-t:n:0}function Eu(n){return n?pt(ku(n),0,4294967295):0}function Su(n){if(typeof n=="number")return n;if(wu(n))return F;if(du(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n,n=du(n)?n+"":n),typeof n!="string")return 0===n?n:+n;n=n.replace(un,"");var t=gn.test(n);return t||yn.test(n)?Dn(n.slice(2),t?2:8):vn.test(n)?F:+n;
74
+ }function Ou(n){return Cr(n,Uu(n))}function Iu(n){return null==n?"":yr(n)}function Ru(n,t,r){return n=null==n?T:Et(n,t),n===T?r:n}function zu(n,t){return null!=n&&we(n,t,zt)}function Wu(n){return su(n)?qn(n):Vt(n)}function Uu(n){if(su(n))n=qn(n,true);else if(du(n)){var t,r=ze(n),e=[];for(t in n)("constructor"!=t||!r&&oi.call(n,t))&&e.push(t);n=e}else{if(t=[],null!=n)for(r in Qu(n))t.push(r);n=t}return n}function Bu(n,t){if(null==n)return{};var r=c(ve(n),function(n){return[n]});return t=ye(t),tr(n,r,function(n,r){
75
+ return t(n,r[0])})}function Lu(n){return null==n?[]:S(n,Wu(n))}function Cu(n){return $f(Iu(n).toLowerCase())}function Du(n){return(n=Iu(n))&&n.replace(xn,Xn).replace(Sn,"")}function Mu(n,t,r){return n=Iu(n),t=r?T:t,t===T?zn.test(n)?n.match(In)||[]:n.match(sn)||[]:n.match(t)||[]}function Tu(n){return function(){return n}}function $u(n){return n}function Fu(n){return qt(typeof n=="function"?n:_t(n,1))}function Nu(n,t,e){var u=Wu(t),i=kt(t,u);null!=e||du(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=kt(t,Wu(t)));
76
+ var o=!(du(e)&&"chain"in e&&!e.chain),f=_u(n);return r(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Lr(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})}),n}function Pu(){}function Zu(n){return Ie(n)?b(Me(n)):rr(n)}function qu(){return[]}function Vu(){return false}mn=null==mn?$n:rt.defaults($n.Object(),mn,rt.pick($n,Wn));var Ku=mn.Array,Gu=mn.Date,Hu=mn.Error,Ju=mn.Function,Yu=mn.Math,Qu=mn.Object,Xu=mn.RegExp,ni=mn.String,ti=mn.TypeError,ri=Ku.prototype,ei=Qu.prototype,ui=mn["__core-js_shared__"],ii=Ju.prototype.toString,oi=ei.hasOwnProperty,fi=0,ci=function(){
77
+ var n=/[^.]+$/.exec(ui&&ui.keys&&ui.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),ai=ei.toString,li=ii.call(Qu),si=$n._,hi=Xu("^"+ii.call(oi).replace(rn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pi=Pn?mn.Buffer:T,_i=mn.Symbol,vi=mn.Uint8Array,gi=pi?pi.allocUnsafe:T,di=U(Qu.getPrototypeOf,Qu),yi=Qu.create,bi=ei.propertyIsEnumerable,xi=ri.splice,ji=_i?_i.isConcatSpreadable:T,wi=_i?_i.iterator:T,mi=_i?_i.toStringTag:T,Ai=function(){try{var n=je(Qu,"defineProperty");
78
+ return n({},"",{}),n}catch(n){}}(),ki=mn.clearTimeout!==$n.clearTimeout&&mn.clearTimeout,Ei=Gu&&Gu.now!==$n.Date.now&&Gu.now,Si=mn.setTimeout!==$n.setTimeout&&mn.setTimeout,Oi=Yu.ceil,Ii=Yu.floor,Ri=Qu.getOwnPropertySymbols,zi=pi?pi.isBuffer:T,Wi=mn.isFinite,Ui=ri.join,Bi=U(Qu.keys,Qu),Li=Yu.max,Ci=Yu.min,Di=Gu.now,Mi=mn.parseInt,Ti=Yu.random,$i=ri.reverse,Fi=je(mn,"DataView"),Ni=je(mn,"Map"),Pi=je(mn,"Promise"),Zi=je(mn,"Set"),qi=je(mn,"WeakMap"),Vi=je(Qu,"create"),Ki=qi&&new qi,Gi={},Hi=Te(Fi),Ji=Te(Ni),Yi=Te(Pi),Qi=Te(Zi),Xi=Te(qi),no=_i?_i.prototype:T,to=no?no.valueOf:T,ro=no?no.toString:T,eo=function(){
79
+ function n(){}return function(t){return du(t)?yi?yi(t):(n.prototype=t,t=new n,n.prototype=T,t):{}}}();An.templateSettings={escape:J,evaluate:Y,interpolate:Q,variable:"",imports:{_:An}},An.prototype=kn.prototype,An.prototype.constructor=An,On.prototype=eo(kn.prototype),On.prototype.constructor=On,Ln.prototype=eo(kn.prototype),Ln.prototype.constructor=Ln,Mn.prototype.clear=function(){this.__data__=Vi?Vi(null):{},this.size=0},Mn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n],
80
+ this.size-=n?1:0,n},Mn.prototype.get=function(n){var t=this.__data__;return Vi?(n=t[n],"__lodash_hash_undefined__"===n?T:n):oi.call(t,n)?t[n]:T},Mn.prototype.has=function(n){var t=this.__data__;return Vi?t[n]!==T:oi.call(t,n)},Mn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Vi&&t===T?"__lodash_hash_undefined__":t,this},Tn.prototype.clear=function(){this.__data__=[],this.size=0},Tn.prototype.delete=function(n){var t=this.__data__;return n=ft(t,n),!(0>n)&&(n==t.length-1?t.pop():xi.call(t,n,1),
81
+ --this.size,true)},Tn.prototype.get=function(n){var t=this.__data__;return n=ft(t,n),0>n?T:t[n][1]},Tn.prototype.has=function(n){return-1<ft(this.__data__,n)},Tn.prototype.set=function(n,t){var r=this.__data__,e=ft(r,n);return 0>e?(++this.size,r.push([n,t])):r[e][1]=t,this},Fn.prototype.clear=function(){this.size=0,this.__data__={hash:new Mn,map:new(Ni||Tn),string:new Mn}},Fn.prototype.delete=function(n){return n=be(this,n).delete(n),this.size-=n?1:0,n},Fn.prototype.get=function(n){return be(this,n).get(n);
82
+ },Fn.prototype.has=function(n){return be(this,n).has(n)},Fn.prototype.set=function(n,t){var r=be(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},Nn.prototype.add=Nn.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},Nn.prototype.has=function(n){return this.__data__.has(n)},Zn.prototype.clear=function(){this.__data__=new Tn,this.size=0},Zn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Zn.prototype.get=function(n){
83
+ return this.__data__.get(n)},Zn.prototype.has=function(n){return this.__data__.has(n)},Zn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Tn){var e=r.__data__;if(!Ni||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Fn(e)}return r.set(n,t),this.size=r.size,this};var uo=Fr(mt),io=Fr(At,true),oo=Nr(),fo=Nr(true),co=Ki?function(n,t){return Ki.set(n,t),n}:$u,ao=Ai?function(n,t){return Ai(n,"toString",{configurable:true,enumerable:false,value:Tu(t),writable:true})}:$u,lo=ki||function(n){
84
+ return $n.clearTimeout(n)},so=Zi&&1/L(new Zi([,-0]))[1]==$?function(n){return new Zi(n)}:Pu,ho=Ki?function(n){return Ki.get(n)}:Pu,po=Ri?function(n){return null==n?[]:(n=Qu(n),i(Ri(n),function(t){return bi.call(n,t)}))}:qu,_o=Ri?function(n){for(var t=[];n;)a(t,po(n)),n=di(n);return t}:qu,vo=Ot;(Fi&&"[object DataView]"!=vo(new Fi(new ArrayBuffer(1)))||Ni&&"[object Map]"!=vo(new Ni)||Pi&&"[object Promise]"!=vo(Pi.resolve())||Zi&&"[object Set]"!=vo(new Zi)||qi&&"[object WeakMap]"!=vo(new qi))&&(vo=function(n){
85
+ var t=Ot(n);if(n=(n="[object Object]"==t?n.constructor:T)?Te(n):"")switch(n){case Hi:return"[object DataView]";case Ji:return"[object Map]";case Yi:return"[object Promise]";case Qi:return"[object Set]";case Xi:return"[object WeakMap]"}return t});var go=ui?_u:Vu,yo=Ce(co),bo=Si||function(n,t){return $n.setTimeout(n,t)},xo=Ce(ao),jo=function(n){n=cu(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(tn,function(n,r,e,u){
86
+ t.push(e?u.replace(hn,"$1"):r||n)}),t}),wo=fr(function(n,t){return hu(n)?yt(n,wt(t,1,hu,true)):[]}),mo=fr(function(n,t){var r=Ve(t);return hu(r)&&(r=T),hu(n)?yt(n,wt(t,1,hu,true),ye(r,2)):[]}),Ao=fr(function(n,t){var r=Ve(t);return hu(r)&&(r=T),hu(n)?yt(n,wt(t,1,hu,true),T,r):[]}),ko=fr(function(n){var t=c(n,kr);return t.length&&t[0]===n[0]?Wt(t):[]}),Eo=fr(function(n){var t=Ve(n),r=c(n,kr);return t===Ve(r)?t=T:r.pop(),r.length&&r[0]===n[0]?Wt(r,ye(t,2)):[]}),So=fr(function(n){var t=Ve(n),r=c(n,kr);return(t=typeof t=="function"?t:T)&&r.pop(),
87
+ r.length&&r[0]===n[0]?Wt(r,T,t):[]}),Oo=fr(Ke),Io=pe(function(n,t){var r=null==n?0:n.length,e=ht(n,t);return ur(n,c(t,function(n){return Se(n,r)?+n:n}).sort(Wr)),e}),Ro=fr(function(n){return br(wt(n,1,hu,true))}),zo=fr(function(n){var t=Ve(n);return hu(t)&&(t=T),br(wt(n,1,hu,true),ye(t,2))}),Wo=fr(function(n){var t=Ve(n),t=typeof t=="function"?t:T;return br(wt(n,1,hu,true),T,t)}),Uo=fr(function(n,t){return hu(n)?yt(n,t):[]}),Bo=fr(function(n){return mr(i(n,hu))}),Lo=fr(function(n){var t=Ve(n);return hu(t)&&(t=T),
88
+ mr(i(n,hu),ye(t,2))}),Co=fr(function(n){var t=Ve(n),t=typeof t=="function"?t:T;return mr(i(n,hu),T,t)}),Do=fr(He),Mo=fr(function(n){var t=n.length,t=1<t?n[t-1]:T,t=typeof t=="function"?(n.pop(),t):T;return Je(n,t)}),To=pe(function(n){var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return ht(t,n)};return!(1<t||this.__actions__.length)&&e instanceof Ln&&Se(r)?(e=e.slice(r,+r+(t?1:0)),e.__actions__.push({func:Qe,args:[u],thisArg:T}),new On(e,this.__chain__).thru(function(n){return t&&!n.length&&n.push(T),
89
+ n})):this.thru(u)}),$o=Tr(function(n,t,r){oi.call(n,r)?++n[r]:st(n,r,1)}),Fo=Gr(Ne),No=Gr(Pe),Po=Tr(function(n,t,r){oi.call(n,r)?n[r].push(t):st(n,r,[t])}),Zo=fr(function(t,r,e){var u=-1,i=typeof r=="function",o=su(t)?Ku(t.length):[];return uo(t,function(t){o[++u]=i?n(r,t,e):Bt(t,r,e)}),o}),qo=Tr(function(n,t,r){st(n,r,t)}),Vo=Tr(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),Ko=fr(function(n,t){if(null==n)return[];var r=t.length;return 1<r&&Oe(n,t[0],t[1])?t=[]:2<r&&Oe(t[0],t[1],t[2])&&(t=[t[0]]),
90
+ Xt(n,wt(t,1),[])}),Go=Ei||function(){return $n.Date.now()},Ho=fr(function(n,t,r){var e=1;if(r.length)var u=B(r,de(Ho)),e=32|e;return fe(n,e,t,r,u)}),Jo=fr(function(n,t,r){var e=3;if(r.length)var u=B(r,de(Jo)),e=32|e;return fe(t,e,n,r,u)}),Yo=fr(function(n,t){return dt(n,1,t)}),Qo=fr(function(n,t,r){return dt(n,Su(t)||0,r)});cu.Cache=Fn;var Xo=fr(function(t,r){r=1==r.length&&ff(r[0])?c(r[0],E(ye())):c(wt(r,1),E(ye()));var e=r.length;return fr(function(u){for(var i=-1,o=Ci(u.length,e);++i<o;)u[i]=r[i].call(this,u[i]);
91
+ return n(t,this,u)})}),nf=fr(function(n,t){return fe(n,32,T,t,B(t,de(nf)))}),tf=fr(function(n,t){return fe(n,64,T,t,B(t,de(tf)))}),rf=pe(function(n,t){return fe(n,256,T,T,T,t)}),ef=ee(It),uf=ee(function(n,t){return n>=t}),of=Lt(function(){return arguments}())?Lt:function(n){return yu(n)&&oi.call(n,"callee")&&!bi.call(n,"callee")},ff=Ku.isArray,cf=Vn?E(Vn):Ct,af=zi||Vu,lf=Kn?E(Kn):Dt,sf=Gn?E(Gn):Tt,hf=Hn?E(Hn):Nt,pf=Jn?E(Jn):Pt,_f=Yn?E(Yn):Zt,vf=ee(Kt),gf=ee(function(n,t){return n<=t}),df=$r(function(n,t){
92
+ if(ze(t)||su(t))Cr(t,Wu(t),n);else for(var r in t)oi.call(t,r)&&ot(n,r,t[r])}),yf=$r(function(n,t){Cr(t,Uu(t),n)}),bf=$r(function(n,t,r,e){Cr(t,Uu(t),n,e)}),xf=$r(function(n,t,r,e){Cr(t,Wu(t),n,e)}),jf=pe(ht),wf=fr(function(n,t){n=Qu(n);var r=-1,e=t.length,u=2<e?t[2]:T;for(u&&Oe(t[0],t[1],u)&&(e=1);++r<e;)for(var u=t[r],i=Uu(u),o=-1,f=i.length;++o<f;){var c=i[o],a=n[c];(a===T||lu(a,ei[c])&&!oi.call(n,c))&&(n[c]=u[c])}return n}),mf=fr(function(t){return t.push(T,ae),n(Of,T,t)}),Af=Yr(function(n,t,r){
93
+ null!=t&&typeof t.toString!="function"&&(t=ai.call(t)),n[t]=r},Tu($u)),kf=Yr(function(n,t,r){null!=t&&typeof t.toString!="function"&&(t=ai.call(t)),oi.call(n,t)?n[t].push(r):n[t]=[r]},ye),Ef=fr(Bt),Sf=$r(function(n,t,r){Yt(n,t,r)}),Of=$r(function(n,t,r,e){Yt(n,t,r,e)}),If=pe(function(n,t){var r={};if(null==n)return r;var e=false;t=c(t,function(t){return t=Sr(t,n),e||(e=1<t.length),t}),Cr(n,ve(n),r),e&&(r=_t(r,7,le));for(var u=t.length;u--;)xr(r,t[u]);return r}),Rf=pe(function(n,t){return null==n?{}:nr(n,t);
94
+ }),zf=oe(Wu),Wf=oe(Uu),Uf=qr(function(n,t,r){return t=t.toLowerCase(),n+(r?Cu(t):t)}),Bf=qr(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Lf=qr(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Cf=Zr("toLowerCase"),Df=qr(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()}),Mf=qr(function(n,t,r){return n+(r?" ":"")+$f(t)}),Tf=qr(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),$f=Zr("toUpperCase"),Ff=fr(function(t,r){try{return n(t,T,r)}catch(n){return pu(n)?n:new Hu(n)}}),Nf=pe(function(n,t){
95
+ return r(t,function(t){t=Me(t),st(n,t,Ho(n[t],n))}),n}),Pf=Hr(),Zf=Hr(true),qf=fr(function(n,t){return function(r){return Bt(r,n,t)}}),Vf=fr(function(n,t){return function(r){return Bt(n,r,t)}}),Kf=Xr(c),Gf=Xr(u),Hf=Xr(h),Jf=re(),Yf=re(true),Qf=Qr(function(n,t){return n+t},0),Xf=ie("ceil"),nc=Qr(function(n,t){return n/t},1),tc=ie("floor"),rc=Qr(function(n,t){return n*t},1),ec=ie("round"),uc=Qr(function(n,t){return n-t},0);return An.after=function(n,t){if(typeof t!="function")throw new ti("Expected a function");
96
+ return n=ku(n),function(){if(1>--n)return t.apply(this,arguments)}},An.ary=eu,An.assign=df,An.assignIn=yf,An.assignInWith=bf,An.assignWith=xf,An.at=jf,An.before=uu,An.bind=Ho,An.bindAll=Nf,An.bindKey=Jo,An.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return ff(n)?n:[n]},An.chain=Ye,An.chunk=function(n,t,r){if(t=(r?Oe(n,t,r):t===T)?1:Li(ku(t),0),r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=Ku(Oi(r/t));e<r;)i[u++]=hr(n,e,e+=t);return i},An.compact=function(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){
97
+ var i=n[t];i&&(u[e++]=i)}return u},An.concat=function(){var n=arguments.length;if(!n)return[];for(var t=Ku(n-1),r=arguments[0];n--;)t[n-1]=arguments[n];return a(ff(r)?Lr(r):[r],wt(t,1))},An.cond=function(t){var r=null==t?0:t.length,e=ye();return t=r?c(t,function(n){if("function"!=typeof n[1])throw new ti("Expected a function");return[e(n[0]),n[1]]}):[],fr(function(e){for(var u=-1;++u<r;){var i=t[u];if(n(i[0],this,e))return n(i[1],this,e)}})},An.conforms=function(n){return vt(_t(n,1))},An.constant=Tu,
98
+ An.countBy=$o,An.create=function(n,t){var r=eo(n);return null==t?r:at(r,t)},An.curry=iu,An.curryRight=ou,An.debounce=fu,An.defaults=wf,An.defaultsDeep=mf,An.defer=Yo,An.delay=Qo,An.difference=wo,An.differenceBy=mo,An.differenceWith=Ao,An.drop=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:ku(t),hr(n,0>t?0:t,e)):[]},An.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:ku(t),t=e-t,hr(n,0,0>t?0:t)):[]},An.dropRightWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),true,true):[];
99
+ },An.dropWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),true):[]},An.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!="number"&&Oe(n,t,r)&&(r=0,e=u),u=n.length,r=ku(r),0>r&&(r=-r>u?0:u+r),e=e===T||e>u?u:ku(e),0>e&&(e+=u),e=r>e?0:Eu(e);r<e;)n[r++]=t;return n},An.filter=function(n,t){return(ff(n)?i:jt)(n,ye(t,3))},An.flatMap=function(n,t){return wt(ru(n,t),1)},An.flatMapDeep=function(n,t){return wt(ru(n,t),$)},An.flatMapDepth=function(n,t,r){return r=r===T?1:ku(r),
100
+ wt(ru(n,t),r)},An.flatten=Ze,An.flattenDeep=function(n){return(null==n?0:n.length)?wt(n,$):[]},An.flattenDepth=function(n,t){return null!=n&&n.length?(t=t===T?1:ku(t),wt(n,t)):[]},An.flip=function(n){return fe(n,512)},An.flow=Pf,An.flowRight=Zf,An.fromPairs=function(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){var u=n[t];e[u[0]]=u[1]}return e},An.functions=function(n){return null==n?[]:kt(n,Wu(n))},An.functionsIn=function(n){return null==n?[]:kt(n,Uu(n))},An.groupBy=Po,An.initial=function(n){
101
+ return(null==n?0:n.length)?hr(n,0,-1):[]},An.intersection=ko,An.intersectionBy=Eo,An.intersectionWith=So,An.invert=Af,An.invertBy=kf,An.invokeMap=Zo,An.iteratee=Fu,An.keyBy=qo,An.keys=Wu,An.keysIn=Uu,An.map=ru,An.mapKeys=function(n,t){var r={};return t=ye(t,3),mt(n,function(n,e,u){st(r,t(n,e,u),n)}),r},An.mapValues=function(n,t){var r={};return t=ye(t,3),mt(n,function(n,e,u){st(r,e,t(n,e,u))}),r},An.matches=function(n){return Ht(_t(n,1))},An.matchesProperty=function(n,t){return Jt(n,_t(t,1))},An.memoize=cu,
102
+ An.merge=Sf,An.mergeWith=Of,An.method=qf,An.methodOf=Vf,An.mixin=Nu,An.negate=au,An.nthArg=function(n){return n=ku(n),fr(function(t){return Qt(t,n)})},An.omit=If,An.omitBy=function(n,t){return Bu(n,au(ye(t)))},An.once=function(n){return uu(2,n)},An.orderBy=function(n,t,r,e){return null==n?[]:(ff(t)||(t=null==t?[]:[t]),r=e?T:r,ff(r)||(r=null==r?[]:[r]),Xt(n,t,r))},An.over=Kf,An.overArgs=Xo,An.overEvery=Gf,An.overSome=Hf,An.partial=nf,An.partialRight=tf,An.partition=Vo,An.pick=Rf,An.pickBy=Bu,An.property=Zu,
103
+ An.propertyOf=function(n){return function(t){return null==n?T:Et(n,t)}},An.pull=Oo,An.pullAll=Ke,An.pullAllBy=function(n,t,r){return n&&n.length&&t&&t.length?er(n,t,ye(r,2)):n},An.pullAllWith=function(n,t,r){return n&&n.length&&t&&t.length?er(n,t,T,r):n},An.pullAt=Io,An.range=Jf,An.rangeRight=Yf,An.rearg=rf,An.reject=function(n,t){return(ff(n)?i:jt)(n,au(ye(t,3)))},An.remove=function(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=ye(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),
104
+ u.push(e))}return ur(n,u),r},An.rest=function(n,t){if(typeof n!="function")throw new ti("Expected a function");return t=t===T?t:ku(t),fr(n,t)},An.reverse=Ge,An.sampleSize=function(n,t,r){return t=(r?Oe(n,t,r):t===T)?1:ku(t),(ff(n)?et:ar)(n,t)},An.set=function(n,t,r){return null==n?n:lr(n,t,r)},An.setWith=function(n,t,r,e){return e=typeof e=="function"?e:T,null==n?n:lr(n,t,r,e)},An.shuffle=function(n){return(ff(n)?ut:sr)(n)},An.slice=function(n,t,r){var e=null==n?0:n.length;return e?(r&&typeof r!="number"&&Oe(n,t,r)?(t=0,
105
+ r=e):(t=null==t?0:ku(t),r=r===T?e:ku(r)),hr(n,t,r)):[]},An.sortBy=Ko,An.sortedUniq=function(n){return n&&n.length?gr(n):[]},An.sortedUniqBy=function(n,t){return n&&n.length?gr(n,ye(t,2)):[]},An.split=function(n,t,r){return r&&typeof r!="number"&&Oe(n,t,r)&&(t=r=T),r=r===T?4294967295:r>>>0,r?(n=Iu(n))&&(typeof t=="string"||null!=t&&!hf(t))&&(t=yr(t),!t&&Rn.test(n))?Or(M(n),0,r):n.split(t,r):[]},An.spread=function(t,r){if(typeof t!="function")throw new ti("Expected a function");return r=null==r?0:Li(ku(r),0),
106
+ fr(function(e){var u=e[r];return e=Or(e,0,r),u&&a(e,u),n(t,this,e)})},An.tail=function(n){var t=null==n?0:n.length;return t?hr(n,1,t):[]},An.take=function(n,t,r){return n&&n.length?(t=r||t===T?1:ku(t),hr(n,0,0>t?0:t)):[]},An.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:ku(t),t=e-t,hr(n,0>t?0:t,e)):[]},An.takeRightWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),false,true):[]},An.takeWhile=function(n,t){return n&&n.length?jr(n,ye(t,3)):[]},An.tap=function(n,t){return t(n),
107
+ n},An.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new ti("Expected a function");return du(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),fu(n,t,{leading:e,maxWait:t,trailing:u})},An.thru=Qe,An.toArray=mu,An.toPairs=zf,An.toPairsIn=Wf,An.toPath=function(n){return ff(n)?c(n,Me):wu(n)?[n]:Lr(jo(Iu(n)))},An.toPlainObject=Ou,An.transform=function(n,t,e){var u=ff(n),i=u||af(n)||_f(n);if(t=ye(t,4),null==e){var o=n&&n.constructor;e=i?u?new o:[]:du(n)&&_u(o)?eo(di(n)):{};
108
+ }return(i?r:mt)(n,function(n,r,u){return t(e,n,r,u)}),e},An.unary=function(n){return eu(n,1)},An.union=Ro,An.unionBy=zo,An.unionWith=Wo,An.uniq=function(n){return n&&n.length?br(n):[]},An.uniqBy=function(n,t){return n&&n.length?br(n,ye(t,2)):[]},An.uniqWith=function(n,t){return t=typeof t=="function"?t:T,n&&n.length?br(n,T,t):[]},An.unset=function(n,t){return null==n||xr(n,t)},An.unzip=He,An.unzipWith=Je,An.update=function(n,t,r){return null!=n&&(r=Er(r),n=lr(n,t,r(Et(n,t)),void 0)),n},An.updateWith=function(n,t,r,e){
109
+ return e=typeof e=="function"?e:T,null!=n&&(r=Er(r),n=lr(n,t,r(Et(n,t)),e)),n},An.values=Lu,An.valuesIn=function(n){return null==n?[]:S(n,Uu(n))},An.without=Uo,An.words=Mu,An.wrap=function(n,t){return nf(Er(t),n)},An.xor=Bo,An.xorBy=Lo,An.xorWith=Co,An.zip=Do,An.zipObject=function(n,t){return Ar(n||[],t||[],ot)},An.zipObjectDeep=function(n,t){return Ar(n||[],t||[],lr)},An.zipWith=Mo,An.entries=zf,An.entriesIn=Wf,An.extend=yf,An.extendWith=bf,Nu(An,An),An.add=Qf,An.attempt=Ff,An.camelCase=Uf,An.capitalize=Cu,
110
+ An.ceil=Xf,An.clamp=function(n,t,r){return r===T&&(r=t,t=T),r!==T&&(r=Su(r),r=r===r?r:0),t!==T&&(t=Su(t),t=t===t?t:0),pt(Su(n),t,r)},An.clone=function(n){return _t(n,4)},An.cloneDeep=function(n){return _t(n,5)},An.cloneDeepWith=function(n,t){return t=typeof t=="function"?t:T,_t(n,5,t)},An.cloneWith=function(n,t){return t=typeof t=="function"?t:T,_t(n,4,t)},An.conformsTo=function(n,t){return null==t||gt(n,t,Wu(t))},An.deburr=Du,An.defaultTo=function(n,t){return null==n||n!==n?t:n},An.divide=nc,An.endsWith=function(n,t,r){
111
+ n=Iu(n),t=yr(t);var e=n.length,e=r=r===T?e:pt(ku(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},An.eq=lu,An.escape=function(n){return(n=Iu(n))&&H.test(n)?n.replace(K,nt):n},An.escapeRegExp=function(n){return(n=Iu(n))&&en.test(n)?n.replace(rn,"\\$&"):n},An.every=function(n,t,r){var e=ff(n)?u:bt;return r&&Oe(n,t,r)&&(t=T),e(n,ye(t,3))},An.find=Fo,An.findIndex=Ne,An.findKey=function(n,t){return p(n,ye(t,3),mt)},An.findLast=No,An.findLastIndex=Pe,An.findLastKey=function(n,t){return p(n,ye(t,3),At);
112
+ },An.floor=tc,An.forEach=nu,An.forEachRight=tu,An.forIn=function(n,t){return null==n?n:oo(n,ye(t,3),Uu)},An.forInRight=function(n,t){return null==n?n:fo(n,ye(t,3),Uu)},An.forOwn=function(n,t){return n&&mt(n,ye(t,3))},An.forOwnRight=function(n,t){return n&&At(n,ye(t,3))},An.get=Ru,An.gt=ef,An.gte=uf,An.has=function(n,t){return null!=n&&we(n,t,Rt)},An.hasIn=zu,An.head=qe,An.identity=$u,An.includes=function(n,t,r,e){return n=su(n)?n:Lu(n),r=r&&!e?ku(r):0,e=n.length,0>r&&(r=Li(e+r,0)),ju(n)?r<=e&&-1<n.indexOf(t,r):!!e&&-1<v(n,t,r);
113
+ },An.indexOf=function(n,t,r){var e=null==n?0:n.length;return e?(r=null==r?0:ku(r),0>r&&(r=Li(e+r,0)),v(n,t,r)):-1},An.inRange=function(n,t,r){return t=Au(t),r===T?(r=t,t=0):r=Au(r),n=Su(n),n>=Ci(t,r)&&n<Li(t,r)},An.invoke=Ef,An.isArguments=of,An.isArray=ff,An.isArrayBuffer=cf,An.isArrayLike=su,An.isArrayLikeObject=hu,An.isBoolean=function(n){return true===n||false===n||yu(n)&&"[object Boolean]"==Ot(n)},An.isBuffer=af,An.isDate=lf,An.isElement=function(n){return yu(n)&&1===n.nodeType&&!xu(n)},An.isEmpty=function(n){
114
+ if(null==n)return true;if(su(n)&&(ff(n)||typeof n=="string"||typeof n.splice=="function"||af(n)||_f(n)||of(n)))return!n.length;var t=vo(n);if("[object Map]"==t||"[object Set]"==t)return!n.size;if(ze(n))return!Vt(n).length;for(var r in n)if(oi.call(n,r))return false;return true},An.isEqual=function(n,t){return Mt(n,t)},An.isEqualWith=function(n,t,r){var e=(r=typeof r=="function"?r:T)?r(n,t):T;return e===T?Mt(n,t,T,r):!!e},An.isError=pu,An.isFinite=function(n){return typeof n=="number"&&Wi(n)},An.isFunction=_u,
115
+ An.isInteger=vu,An.isLength=gu,An.isMap=sf,An.isMatch=function(n,t){return n===t||$t(n,t,xe(t))},An.isMatchWith=function(n,t,r){return r=typeof r=="function"?r:T,$t(n,t,xe(t),r)},An.isNaN=function(n){return bu(n)&&n!=+n},An.isNative=function(n){if(go(n))throw new Hu("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ft(n)},An.isNil=function(n){return null==n},An.isNull=function(n){return null===n},An.isNumber=bu,An.isObject=du,An.isObjectLike=yu,An.isPlainObject=xu,An.isRegExp=hf,
116
+ An.isSafeInteger=function(n){return vu(n)&&-9007199254740991<=n&&9007199254740991>=n},An.isSet=pf,An.isString=ju,An.isSymbol=wu,An.isTypedArray=_f,An.isUndefined=function(n){return n===T},An.isWeakMap=function(n){return yu(n)&&"[object WeakMap]"==vo(n)},An.isWeakSet=function(n){return yu(n)&&"[object WeakSet]"==Ot(n)},An.join=function(n,t){return null==n?"":Ui.call(n,t)},An.kebabCase=Bf,An.last=Ve,An.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==T&&(u=ku(r),u=0>u?Li(e+u,0):Ci(u,e-1)),
117
+ t===t)n:{for(r=u+1;r--;)if(n[r]===t){n=r;break n}n=r}else n=_(n,d,u,true);return n},An.lowerCase=Lf,An.lowerFirst=Cf,An.lt=vf,An.lte=gf,An.max=function(n){return n&&n.length?xt(n,$u,It):T},An.maxBy=function(n,t){return n&&n.length?xt(n,ye(t,2),It):T},An.mean=function(n){return y(n,$u)},An.meanBy=function(n,t){return y(n,ye(t,2))},An.min=function(n){return n&&n.length?xt(n,$u,Kt):T},An.minBy=function(n,t){return n&&n.length?xt(n,ye(t,2),Kt):T},An.stubArray=qu,An.stubFalse=Vu,An.stubObject=function(){
118
+ return{}},An.stubString=function(){return""},An.stubTrue=function(){return true},An.multiply=rc,An.nth=function(n,t){return n&&n.length?Qt(n,ku(t)):T},An.noConflict=function(){return $n._===this&&($n._=si),this},An.noop=Pu,An.now=Go,An.pad=function(n,t,r){n=Iu(n);var e=(t=ku(t))?D(n):0;return!t||e>=t?n:(t=(t-e)/2,ne(Ii(t),r)+n+ne(Oi(t),r))},An.padEnd=function(n,t,r){n=Iu(n);var e=(t=ku(t))?D(n):0;return t&&e<t?n+ne(t-e,r):n},An.padStart=function(n,t,r){n=Iu(n);var e=(t=ku(t))?D(n):0;return t&&e<t?ne(t-e,r)+n:n;
119
+ },An.parseInt=function(n,t,r){return r||null==t?t=0:t&&(t=+t),Mi(Iu(n).replace(on,""),t||0)},An.random=function(n,t,r){if(r&&typeof r!="boolean"&&Oe(n,t,r)&&(t=r=T),r===T&&(typeof t=="boolean"?(r=t,t=T):typeof n=="boolean"&&(r=n,n=T)),n===T&&t===T?(n=0,t=1):(n=Au(n),t===T?(t=n,n=0):t=Au(t)),n>t){var e=n;n=t,t=e}return r||n%1||t%1?(r=Ti(),Ci(n+r*(t-n+Cn("1e-"+((r+"").length-1))),t)):ir(n,t)},An.reduce=function(n,t,r){var e=ff(n)?l:j,u=3>arguments.length;return e(n,ye(t,4),r,u,uo)},An.reduceRight=function(n,t,r){
120
+ var e=ff(n)?s:j,u=3>arguments.length;return e(n,ye(t,4),r,u,io)},An.repeat=function(n,t,r){return t=(r?Oe(n,t,r):t===T)?1:ku(t),or(Iu(n),t)},An.replace=function(){var n=arguments,t=Iu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},An.result=function(n,t,r){t=Sr(t,n);var e=-1,u=t.length;for(u||(u=1,n=T);++e<u;){var i=null==n?T:n[Me(t[e])];i===T&&(e=u,i=r),n=_u(i)?i.call(n):i}return n},An.round=ec,An.runInContext=x,An.sample=function(n){return(ff(n)?Qn:cr)(n)},An.size=function(n){if(null==n)return 0;
121
+ if(su(n))return ju(n)?D(n):n.length;var t=vo(n);return"[object Map]"==t||"[object Set]"==t?n.size:Vt(n).length},An.snakeCase=Df,An.some=function(n,t,r){var e=ff(n)?h:pr;return r&&Oe(n,t,r)&&(t=T),e(n,ye(t,3))},An.sortedIndex=function(n,t){return _r(n,t)},An.sortedIndexBy=function(n,t,r){return vr(n,t,ye(r,2))},An.sortedIndexOf=function(n,t){var r=null==n?0:n.length;if(r){var e=_r(n,t);if(e<r&&lu(n[e],t))return e}return-1},An.sortedLastIndex=function(n,t){return _r(n,t,true)},An.sortedLastIndexBy=function(n,t,r){
122
+ return vr(n,t,ye(r,2),true)},An.sortedLastIndexOf=function(n,t){if(null==n?0:n.length){var r=_r(n,t,true)-1;if(lu(n[r],t))return r}return-1},An.startCase=Mf,An.startsWith=function(n,t,r){return n=Iu(n),r=null==r?0:pt(ku(r),0,n.length),t=yr(t),n.slice(r,r+t.length)==t},An.subtract=uc,An.sum=function(n){return n&&n.length?m(n,$u):0},An.sumBy=function(n,t){return n&&n.length?m(n,ye(t,2)):0},An.template=function(n,t,r){var e=An.templateSettings;r&&Oe(n,t,r)&&(t=T),n=Iu(n),t=bf({},t,e,ce),r=bf({},t.imports,e.imports,ce);
123
+ var u,i,o=Wu(r),f=S(r,o),c=0;r=t.interpolate||jn;var a="__p+='";r=Xu((t.escape||jn).source+"|"+r.source+"|"+(r===Q?pn:jn).source+"|"+(t.evaluate||jn).source+"|$","g");var l="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,o,f,l){return e||(e=o),a+=n.slice(c,l).replace(wn,z),r&&(u=true,a+="'+__e("+r+")+'"),f&&(i=true,a+="';"+f+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+t.length,t}),a+="';",(t=t.variable)||(a="with(obj){"+a+"}"),a=(i?a.replace(P,""):a).replace(Z,"$1").replace(q,"$1;"),
124
+ a="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",t=Ff(function(){return Ju(o,l+"return "+a).apply(T,f)}),t.source=a,pu(t))throw t;return t},An.times=function(n,t){if(n=ku(n),1>n||9007199254740991<n)return[];var r=4294967295,e=Ci(n,4294967295);for(t=ye(t),n-=4294967295,e=A(e,t);++r<n;)t(r);return e},An.toFinite=Au,An.toInteger=ku,An.toLength=Eu,An.toLower=function(n){
125
+ return Iu(n).toLowerCase()},An.toNumber=Su,An.toSafeInteger=function(n){return n?pt(ku(n),-9007199254740991,9007199254740991):0===n?n:0},An.toString=Iu,An.toUpper=function(n){return Iu(n).toUpperCase()},An.trim=function(n,t,r){return(n=Iu(n))&&(r||t===T)?n.replace(un,""):n&&(t=yr(t))?(n=M(n),r=M(t),t=I(n,r),r=R(n,r)+1,Or(n,t,r).join("")):n},An.trimEnd=function(n,t,r){return(n=Iu(n))&&(r||t===T)?n.replace(fn,""):n&&(t=yr(t))?(n=M(n),t=R(n,M(t))+1,Or(n,0,t).join("")):n},An.trimStart=function(n,t,r){
126
+ return(n=Iu(n))&&(r||t===T)?n.replace(on,""):n&&(t=yr(t))?(n=M(n),t=I(n,M(t)),Or(n,t).join("")):n},An.truncate=function(n,t){var r=30,e="...";if(du(t))var u="separator"in t?t.separator:u,r="length"in t?ku(t.length):r,e="omission"in t?yr(t.omission):e;n=Iu(n);var i=n.length;if(Rn.test(n))var o=M(n),i=o.length;if(r>=i)return n;if(i=r-D(e),1>i)return e;if(r=o?Or(o,0,i).join(""):n.slice(0,i),u===T)return r+e;if(o&&(i+=r.length-i),hf(u)){if(n.slice(i).search(u)){var f=r;for(u.global||(u=Xu(u.source,Iu(_n.exec(u))+"g")),
127
+ u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===T?i:c)}}else n.indexOf(yr(u),i)!=i&&(u=r.lastIndexOf(u),-1<u&&(r=r.slice(0,u)));return r+e},An.unescape=function(n){return(n=Iu(n))&&G.test(n)?n.replace(V,tt):n},An.uniqueId=function(n){var t=++fi;return Iu(n)+t},An.upperCase=Tf,An.upperFirst=$f,An.each=nu,An.eachRight=tu,An.first=qe,Nu(An,function(){var n={};return mt(An,function(t,r){oi.call(An.prototype,r)||(n[r]=t)}),n}(),{chain:false}),An.VERSION="4.17.11",r("bind bindKey curry curryRight partial partialRight".split(" "),function(n){
128
+ An[n].placeholder=An}),r(["drop","take"],function(n,t){Ln.prototype[n]=function(r){r=r===T?1:Li(ku(r),0);var e=this.__filtered__&&!t?new Ln(this):this.clone();return e.__filtered__?e.__takeCount__=Ci(r,e.__takeCount__):e.__views__.push({size:Ci(r,4294967295),type:n+(0>e.__dir__?"Right":"")}),e},Ln.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){var r=t+1,e=1==r||3==r;Ln.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({
129
+ iteratee:ye(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){var r="take"+(t?"Right":"");Ln.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Ln.prototype[n]=function(){return this.__filtered__?new Ln(this):this[r](1)}}),Ln.prototype.compact=function(){return this.filter($u)},Ln.prototype.find=function(n){return this.filter(n).head()},Ln.prototype.findLast=function(n){return this.reverse().find(n);
130
+ },Ln.prototype.invokeMap=fr(function(n,t){return typeof n=="function"?new Ln(this):this.map(function(r){return Bt(r,n,t)})}),Ln.prototype.reject=function(n){return this.filter(au(ye(n)))},Ln.prototype.slice=function(n,t){n=ku(n);var r=this;return r.__filtered__&&(0<n||0>t)?new Ln(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==T&&(t=ku(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Ln.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Ln.prototype.toArray=function(){return this.take(4294967295);
131
+ },mt(Ln.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=An[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(An.prototype[t]=function(){var t=this.__wrapped__,o=e?[1]:arguments,f=t instanceof Ln,c=o[0],l=f||ff(t),s=function(n){return n=u.apply(An,a([n],o)),e&&h?n[0]:n};l&&r&&typeof c=="function"&&1!=c.length&&(f=l=false);var h=this.__chain__,p=!!this.__actions__.length,c=i&&!h,f=f&&!p;return!i&&l?(t=f?t:new Ln(this),t=n.apply(t,o),t.__actions__.push({
132
+ func:Qe,args:[s],thisArg:T}),new On(t,h)):c&&f?n.apply(this,o):(t=this.thru(s),c?e?t.value()[0]:t.value():t)})}),r("pop push shift sort splice unshift".split(" "),function(n){var t=ri[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);An.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(ff(u)?u:[],n)}return this[r](function(r){return t.apply(ff(r)?r:[],n)})}}),mt(Ln.prototype,function(n,t){var r=An[t];if(r){var e=r.name+"";
133
+ (Gi[e]||(Gi[e]=[])).push({name:t,func:r})}}),Gi[Jr(T,2).name]=[{name:"wrapper",func:T}],Ln.prototype.clone=function(){var n=new Ln(this.__wrapped__);return n.__actions__=Lr(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Lr(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Lr(this.__views__),n},Ln.prototype.reverse=function(){if(this.__filtered__){var n=new Ln(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n;
134
+ },Ln.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=ff(t),u=0>r,i=e?t.length:0;n=0;for(var o=i,f=this.__views__,c=-1,a=f.length;++c<a;){var l=f[c],s=l.size;switch(l.type){case"drop":n+=s;break;case"dropRight":o-=s;break;case"take":o=Ci(o,n+s);break;case"takeRight":n=Li(n,o-s)}}if(n={start:n,end:o},o=n.start,f=n.end,n=f-o,o=u?f:o-1,f=this.__iteratees__,c=f.length,a=0,l=Ci(n,this.__takeCount__),!e||!u&&i==n&&l==n)return wr(t,this.__actions__);e=[];n:for(;n--&&a<l;){for(o+=r,
135
+ u=-1,i=t[o];++u<c;){var h=f[u],s=h.type,h=(0,h.iteratee)(i);if(2==s)i=h;else if(!h){if(1==s)continue n;break n}}e[a++]=i}return e},An.prototype.at=To,An.prototype.chain=function(){return Ye(this)},An.prototype.commit=function(){return new On(this.value(),this.__chain__)},An.prototype.next=function(){this.__values__===T&&(this.__values__=mu(this.value()));var n=this.__index__>=this.__values__.length;return{done:n,value:n?T:this.__values__[this.__index__++]}},An.prototype.plant=function(n){for(var t,r=this;r instanceof kn;){
136
+ var e=Fe(r);e.__index__=0,e.__values__=T,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},An.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Ln?(this.__actions__.length&&(n=new Ln(this)),n=n.reverse(),n.__actions__.push({func:Qe,args:[Ge],thisArg:T}),new On(n,this.__chain__)):this.thru(Ge)},An.prototype.toJSON=An.prototype.valueOf=An.prototype.value=function(){return wr(this.__wrapped__,this.__actions__)},An.prototype.first=An.prototype.head,wi&&(An.prototype[wi]=Xe),
137
+ An}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?($n._=rt, define(function(){return rt})):Nn?((Nn.exports=rt)._=rt,Fn._=rt):$n._=rt}).call(this);
js/react-dom.production.min.js ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /** @license React v16.8.5
2
+ * react-dom.production.min.js
3
+ *
4
+ * Copyright (c) Facebook, Inc. and its affiliates.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ /*
10
+ Modernizr 3.0.0pre (Custom Build) | MIT
11
+ */
12
+ 'use strict';(function(da,pb){"object"===typeof exports&&"undefined"!==typeof module?module.exports=pb(require("react")):"function"===typeof define&&define.amd?define(["react"],pb):da.ReactDOM=pb(da.React)})(this,function(da){function pb(a,b,c,d,e,f,g,h){if(!a){a=void 0;if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[c,d,e,f,g,h],k=0;a=Error(b.replace(/%s/g,function(){return l[k++]}));
13
+ a.name="Invariant Violation"}a.framesToPop=1;throw a;}}function n(a){for(var b=arguments.length-1,c="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=0;d<b;d++)c+="&args[]="+encodeURIComponent(arguments[d+1]);pb(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",c)}function rh(a,b,c,d,e,f,g,h,l){qb=!1;$b=null;sh.apply(th,arguments)}function uh(a,b,c,d,e,f,g,h,l){rh.apply(this,arguments);
14
+ if(qb){if(qb){var k=$b;qb=!1;$b=null}else n("198"),k=void 0;ac||(ac=!0,Yc=k)}}function Ee(){if(bc)for(var a in Na){var b=Na[a],c=bc.indexOf(a);-1<c?void 0:n("96",a);if(!cc[c]){b.extractEvents?void 0:n("97",a);cc[c]=b;c=b.eventTypes;for(var d in c){var e=void 0;var f=c[d],g=b,h=d;Zc.hasOwnProperty(h)?n("99",h):void 0;Zc[h]=f;var l=f.phasedRegistrationNames;if(l){for(e in l)l.hasOwnProperty(e)&&Fe(l[e],g,h);e=!0}else f.registrationName?(Fe(f.registrationName,g,h),e=!0):e=!1;e?void 0:n("98",d,a)}}}}
15
+ function Fe(a,b,c){Oa[a]?n("100",a):void 0;Oa[a]=b;$c[a]=b.eventTypes[c].dependencies}function Ge(a,b,c){var d=a.type||"unknown-event";a.currentTarget=He(c);uh(d,b,void 0,a);a.currentTarget=null}function Pa(a,b){null==b?n("30"):void 0;if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function ad(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}function Ie(a,b){var c=a.stateNode;if(!c)return null;
16
+ var d=bd(c);if(!d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;c&&"function"!==typeof c?n("231",b,typeof c):void 0;return c}function cd(a){null!==a&&(rb=Pa(rb,a));a=rb;
17
+ rb=null;if(a&&(ad(a,vh),rb?n("95"):void 0,ac))throw a=Yc,ac=!1,Yc=null,a;}function dc(a){if(a[ea])return a[ea];for(;!a[ea];)if(a.parentNode)a=a.parentNode;else return null;a=a[ea];return 5===a.tag||6===a.tag?a:null}function Je(a){a=a[ea];return!a||5!==a.tag&&6!==a.tag?null:a}function Da(a){if(5===a.tag||6===a.tag)return a.stateNode;n("33")}function dd(a){return a[ec]||null}function fa(a){do a=a.return;while(a&&5!==a.tag);return a?a:null}function Ke(a,b,c){if(b=Ie(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=
18
+ Pa(c._dispatchListeners,b),c._dispatchInstances=Pa(c._dispatchInstances,a)}function wh(a){if(a&&a.dispatchConfig.phasedRegistrationNames){for(var b=a._targetInst,c=[];b;)c.push(b),b=fa(b);for(b=c.length;0<b--;)Ke(c[b],"captured",a);for(b=0;b<c.length;b++)Ke(c[b],"bubbled",a)}}function ed(a,b,c){a&&c&&c.dispatchConfig.registrationName&&(b=Ie(a,c.dispatchConfig.registrationName))&&(c._dispatchListeners=Pa(c._dispatchListeners,b),c._dispatchInstances=Pa(c._dispatchInstances,a))}function xh(a){a&&a.dispatchConfig.registrationName&&
19
+ ed(a._targetInst,null,a)}function Qa(a){ad(a,wh)}function fc(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}function gc(a){if(fd[a])return fd[a];if(!Ra[a])return a;var b=Ra[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Le)return fd[a]=b[c];return a}function Me(){if(hc)return hc;var a,b=gd,c=b.length,d,e="value"in qa?qa.value:qa.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return hc=e.slice(a,
20
+ 1<d?1-d:void 0)}function ic(){return!0}function jc(){return!1}function J(a,b,c,d){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var e in a)a.hasOwnProperty(e)&&((b=a[e])?this[e]=b(c):"target"===e?this.target=d:this[e]=c[e]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?ic:jc;this.isPropagationStopped=jc;return this}function yh(a,b,c,d){if(this.eventPool.length){var e=this.eventPool.pop();this.call(e,a,b,c,d);
21
+ return e}return new this(a,b,c,d)}function zh(a){a instanceof this?void 0:n("279");a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function Ne(a){a.eventPool=[];a.getPooled=yh;a.release=zh}function Oe(a,b){switch(a){case "keyup":return-1!==Ah.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "blur":return!0;default:return!1}}function Pe(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}function Bh(a,b){switch(a){case "compositionend":return Pe(b);
22
+ case "keypress":if(32!==b.which)return null;Qe=!0;return Re;case "textInput":return a=b.data,a===Re&&Qe?null:a;default:return null}}function Ch(a,b){if(Sa)return"compositionend"===a||!hd&&Oe(a,b)?(a=Me(),hc=gd=qa=null,Sa=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case "compositionend":return Se&&"ko"!==b.locale?null:b.data;
23
+ default:return null}}function Te(a){if(a=Ue(a)){"function"!==typeof id?n("280"):void 0;var b=bd(a.stateNode);id(a.stateNode,a.type,b)}}function Ve(a){Ta?Ua?Ua.push(a):Ua=[a]:Ta=a}function We(){if(Ta){var a=Ta,b=Ua;Ua=Ta=null;Te(a);if(b)for(a=0;a<b.length;a++)Te(b[a])}}function Xe(a,b){if(jd)return a(b);jd=!0;try{return Ye(a,b)}finally{if(jd=!1,null!==Ta||null!==Ua)Ze(),We()}}function $e(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!Dh[a.type]:"textarea"===b?!0:!1}function kd(a){a=
24
+ a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}function af(a){if(!ra)return!1;a="on"+a;var b=a in document;b||(b=document.createElement("div"),b.setAttribute(a,"return;"),b="function"===typeof b[a]);return b}function bf(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}function Eh(a){var b=bf(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=
25
+ ""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=null;delete a[b]}}}}function kc(a){a._valueTracker||(a._valueTracker=Eh(a))}function cf(a){if(!a)return!1;
26
+ var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=bf(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function sb(a){if(null===a||"object"!==typeof a)return null;a=df&&a[df]||a["@@iterator"];return"function"===typeof a?a:null}function sa(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case ld:return"ConcurrentMode";case ta:return"Fragment";case Va:return"Portal";case lc:return"Profiler";
27
+ case md:return"StrictMode";case nd:return"Suspense"}if("object"===typeof a)switch(a.$$typeof){case ef:return"Context.Consumer";case ff:return"Context.Provider";case od:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");case pd:return sa(a.type);case gf:if(a=1===a._status?a._result:null)return sa(a)}return null}function qd(a){var b="";do{a:switch(a.tag){case 3:case 4:case 6:case 7:case 10:case 9:var c="";break a;default:var d=a._debugOwner,e=
28
+ a._debugSource,f=sa(a.type);c=null;d&&(c=sa(d.type));d=f;f="";e?f=" (at "+e.fileName.replace(Fh,"")+":"+e.lineNumber+")":c&&(f=" (created by "+c+")");c="\n in "+(d||"Unknown")+f}b+=c;a=a.return}while(a);return b}function Gh(a){if(hf.call(jf,a))return!0;if(hf.call(kf,a))return!1;if(Hh.test(a))return jf[a]=!0;kf[a]=!0;return!1}function Ih(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;
29
+ a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}function Jh(a,b,c,d){if(null===b||"undefined"===typeof b||Ih(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function K(a,b,c,d,e){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b}function rd(a,b,c,d){var e=A.hasOwnProperty(b)?
30
+ A[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]?!1:!0;f||(Jh(b,c,e,d)&&(c=null),d||null===e?Gh(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}function ua(a){switch(typeof a){case "boolean":case "number":case "object":case "string":case "undefined":return a;
31
+ default:return""}}function sd(a,b){var c=b.checked;return B({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function lf(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=ua(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function mf(a,b){b=b.checked;null!=b&&rd(a,"checked",b,!1)}function td(a,
32
+ b){mf(a,b);var c=ua(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?ud(a,b.type,c):b.hasOwnProperty("defaultValue")&&ud(a,b.type,ua(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}function nf(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;
33
+ if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!a.defaultChecked;a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)}function ud(a,b,c){if("number"!==b||a.ownerDocument.activeElement!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}function of(a,b,c){a=J.getPooled(pf.change,a,b,
34
+ c);a.type="change";Ve(c);Qa(a);return a}function Kh(a){cd(a)}function mc(a){var b=Da(a);if(cf(b))return a}function Lh(a,b){if("change"===a)return b}function qf(){tb&&(tb.detachEvent("onpropertychange",rf),ub=tb=null)}function rf(a){"value"===a.propertyName&&mc(ub)&&(a=of(ub,a,kd(a)),Xe(Kh,a))}function Mh(a,b,c){"focus"===a?(qf(),tb=b,ub=c,tb.attachEvent("onpropertychange",rf)):"blur"===a&&qf()}function Nh(a,b){if("selectionchange"===a||"keyup"===a||"keydown"===a)return mc(ub)}function Oh(a,b){if("click"===
35
+ a)return mc(b)}function Ph(a,b){if("input"===a||"change"===a)return mc(b)}function Qh(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Rh[a])?!!b[a]:!1}function vd(a){return Qh}function Ea(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}function vb(a,b){if(Ea(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!Sh.call(b,c[d])||!Ea(a[c[d]],
36
+ b[c[d]]))return!1;return!0}function wb(a){var b=a;if(a.alternate)for(;b.return;)b=b.return;else{if(0!==(b.effectTag&2))return 1;for(;b.return;)if(b=b.return,0!==(b.effectTag&2))return 1}return 3===b.tag?2:3}function sf(a){2!==wb(a)?n("188"):void 0}function Th(a){var b=a.alternate;if(!b)return b=wb(a),3===b?n("188"):void 0,1===b?null:a;for(var c=a,d=b;;){var e=c.return,f=e?e.alternate:null;if(!e||!f)break;if(e.child===f.child){for(var g=e.child;g;){if(g===c)return sf(e),a;if(g===d)return sf(e),b;g=
37
+ g.sibling}n("188")}if(c.return!==d.return)c=e,d=f;else{g=!1;for(var h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}g?void 0:n("189")}}c.alternate!==d?n("190"):void 0}3!==c.tag?n("188"):void 0;return c.stateNode.current===c?a:b}function tf(a){a=Th(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;
38
+ for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}function nc(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function uf(a,b){var c=a[0];a=a[1];var d="on"+(a[0].toUpperCase()+a.slice(1));b={phasedRegistrationNames:{bubbled:d,captured:d+"Capture"},dependencies:[c],isInteractive:b};vf[a]=b;wd[c]=b}function Uh(a){var b=a.targetInst,c=b;do{if(!c){a.ancestors.push(c);
39
+ break}var d;for(d=c;d.return;)d=d.return;d=3!==d.tag?null:d.stateNode.containerInfo;if(!d)break;a.ancestors.push(c);c=dc(d)}while(c);for(c=0;c<a.ancestors.length;c++){b=a.ancestors[c];var e=kd(a.nativeEvent);d=a.topLevelType;for(var f=a.nativeEvent,g=null,h=0;h<cc.length;h++){var l=cc[h];l&&(l=l.extractEvents(d,b,f,e))&&(g=Pa(g,l))}cd(g)}}function r(a,b){if(!b)return null;var c=(wf(a)?xf:oc).bind(null,a);b.addEventListener(a,c,!1)}function pc(a,b){if(!b)return null;var c=(wf(a)?xf:oc).bind(null,a);
40
+ b.addEventListener(a,c,!0)}function xf(a,b){yf(oc,a,b)}function oc(a,b){if(qc){var c=kd(b);c=dc(c);null===c||"number"!==typeof c.tag||2===wb(c)||(c=null);if(rc.length){var d=rc.pop();d.topLevelType=a;d.nativeEvent=b;d.targetInst=c;a=d}else a={topLevelType:a,nativeEvent:b,targetInst:c,ancestors:[]};try{Xe(Uh,a)}finally{a.topLevelType=null,a.nativeEvent=null,a.targetInst=null,a.ancestors.length=0,10>rc.length&&rc.push(a)}}}function zf(a){Object.prototype.hasOwnProperty.call(a,sc)||(a[sc]=Vh++,Af[a[sc]]=
41
+ {});return Af[a[sc]]}function xd(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}function Bf(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Cf(a,b){var c=Bf(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Bf(c)}}function Df(a,b){return a&&b?a===
42
+ b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Df(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function Ef(){for(var a=window,b=xd();b instanceof a.HTMLIFrameElement;){try{a=b.contentDocument.defaultView}catch(c){break}b=xd(a.document)}return b}function yd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||
43
+ "true"===a.contentEditable)}function Wh(){var a=Ef();if(yd(a)){if("selectionStart"in a)var b={start:a.selectionStart,end:a.selectionEnd};else a:{b=(b=a.ownerDocument)&&b.defaultView||window;var c=b.getSelection&&b.getSelection();if(c&&0!==c.rangeCount){b=c.anchorNode;var d=c.anchorOffset,e=c.focusNode;c=c.focusOffset;try{b.nodeType,e.nodeType}catch(cj){b=null;break a}var f=0,g=-1,h=-1,l=0,k=0,m=a,n=null;b:for(;;){for(var p;;){m!==b||0!==d&&3!==m.nodeType||(g=f+d);m!==e||0!==c&&3!==m.nodeType||(h=
44
+ f+c);3===m.nodeType&&(f+=m.nodeValue.length);if(null===(p=m.firstChild))break;n=m;m=p}for(;;){if(m===a)break b;n===b&&++l===d&&(g=f);n===e&&++k===c&&(h=f);if(null!==(p=m.nextSibling))break;m=n;n=m.parentNode}m=p}b=-1===g||-1===h?null:{start:g,end:h}}else b=null}b=b||{start:0,end:0}}else b=null;return{focusedElem:a,selectionRange:b}}function Xh(a){var b=Ef(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Df(c.ownerDocument.documentElement,c)){if(null!==d&&yd(c))if(b=d.start,a=d.end,
45
+ void 0===a&&(a=b),"selectionStart"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Cf(c,f);var g=Cf(c,d);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),
46
+ a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});"function"===typeof c.focus&&c.focus();for(c=0;c<b.length;c++)a=b[c],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}}function Gf(a,b){var c=b.window===b?b.document:9===b.nodeType?b:b.ownerDocument;if(zd||null==Wa||Wa!==xd(c))return null;c=Wa;"selectionStart"in c&&yd(c)?c={start:c.selectionStart,
47
+ end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset});return xb&&vb(xb,c)?null:(xb=c,a=J.getPooled(Hf.select,Ad,a,b),a.type="select",a.target=Wa,Qa(a),a)}function Yh(a){var b="";da.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function Bd(a,b){a=B({children:void 0},b);if(b=Yh(b.children))a.children=b;return a}function Xa(a,b,c,d){a=a.options;if(b){b=
48
+ {};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+ua(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}function Cd(a,b){null!=b.dangerouslySetInnerHTML?n("91"):void 0;return B({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}
49
+ function If(a,b){var c=b.value;null==c&&(c=b.defaultValue,b=b.children,null!=b&&(null!=c?n("92"):void 0,Array.isArray(b)&&(1>=b.length?void 0:n("93"),b=b[0]),c=b),null==c&&(c=""));a._wrapperState={initialValue:ua(c)}}function Jf(a,b){var c=ua(b.value),d=ua(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function Kf(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";
50
+ default:return"http://www.w3.org/1999/xhtml"}}function Dd(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?Kf(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}function Lf(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||yb.hasOwnProperty(a)&&yb[a]?(""+b).trim():b+"px"}function Mf(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=Lf(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,
51
+ e):a[c]=e}}function Ed(a,b){b&&(Zh[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML?n("137",a,""):void 0),null!=b.dangerouslySetInnerHTML&&(null!=b.children?n("60"):void 0,"object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML?void 0:n("61")),null!=b.style&&"object"!==typeof b.style?n("62",""):void 0)}function Fd(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;
52
+ default:return!0}}function ha(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=zf(a);b=$c[b];for(var d=0;d<b.length;d++){var e=b[d];if(!c.hasOwnProperty(e)||!c[e]){switch(e){case "scroll":pc("scroll",a);break;case "focus":case "blur":pc("focus",a);pc("blur",a);c.blur=!0;c.focus=!0;break;case "cancel":case "close":af(e)&&pc(e,a);break;case "invalid":case "submit":case "reset":break;default:-1===zb.indexOf(e)&&r(e,a)}c[e]=!0}}}function tc(){}function Nf(a,b){switch(a){case "button":case "input":case "select":case "textarea":return!!b.autoFocus}return!1}
53
+ function Gd(a,b){return"textarea"===a||"option"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}function $h(a,b,c,d,e,f){a[ec]=e;"input"===c&&"radio"===e.type&&null!=e.name&&mf(a,e);Fd(c,d);d=Fd(c,e);for(f=0;f<b.length;f+=2){var g=b[f],h=b[f+1];"style"===g?Mf(a,h):"dangerouslySetInnerHTML"===g?Of(a,h):"children"===g?Ab(a,h):rd(a,g,h,d)}switch(c){case "input":td(a,
54
+ e);break;case "textarea":Jf(a,e);break;case "select":b=a._wrapperState.wasMultiple,a._wrapperState.wasMultiple=!!e.multiple,c=e.value,null!=c?Xa(a,!!e.multiple,c,!1):b!==!!e.multiple&&(null!=e.defaultValue?Xa(a,!!e.multiple,e.defaultValue,!0):Xa(a,!!e.multiple,e.multiple?[]:"",!1))}}function Hd(a){for(a=a.nextSibling;a&&1!==a.nodeType&&3!==a.nodeType;)a=a.nextSibling;return a}function Pf(a){for(a=a.firstChild;a&&1!==a.nodeType&&3!==a.nodeType;)a=a.nextSibling;return a}function D(a,b){0>Ya||(a.current=
55
+ Id[Ya],Id[Ya]=null,Ya--)}function L(a,b,c){Ya++;Id[Ya]=a.current;a.current=b}function Za(a,b){var c=a.type.contextTypes;if(!c)return va;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function E(a){a=a.childContextTypes;return null!==a&&void 0!==a}function uc(a){D(M,a);
56
+ D(F,a)}function Jd(a){D(M,a);D(F,a)}function Qf(a,b,c){F.current!==va?n("168"):void 0;L(F,b,a);L(M,c,a)}function Rf(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)e in a?void 0:n("108",sa(b)||"Unknown",e);return B({},c,d)}function vc(a){var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||va;Fa=F.current;L(F,b,a);L(M,M.current,a);return!0}function Sf(a,b,c){var d=a.stateNode;d?void 0:n("169");c?(b=
57
+ Rf(a,b,Fa),d.__reactInternalMemoizedMergedChildContext=b,D(M,a),D(F,a),L(F,b,a)):D(M,a);L(M,c,a)}function Tf(a){return function(b){try{return a(b)}catch(c){}}}function ai(a){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);Kd=Tf(function(a){return b.onCommitFiberRoot(c,a)});Ld=Tf(function(a){return b.onCommitFiberUnmount(c,a)})}catch(d){}return!0}function bi(a,b,c,d){this.tag=a;this.key=
58
+ c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.contextDependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childExpirationTime=this.expirationTime=0;this.alternate=null}function Md(a){a=a.prototype;return!(!a||!a.isReactComponent)}function ci(a){if("function"===typeof a)return Md(a)?1:0;if(void 0!==a&&
59
+ null!==a){a=a.$$typeof;if(a===od)return 11;if(a===pd)return 14}return 2}function Ga(a,b,c){c=a.alternate;null===c?(c=S(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.effectTag=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null);c.childExpirationTime=a.childExpirationTime;c.expirationTime=a.expirationTime;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;
60
+ c.contextDependencies=a.contextDependencies;c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}function wc(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)Md(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case ta:return wa(c.children,e,f,b);case ld:return Uf(c,e|3,f,b);case md:return Uf(c,e|2,f,b);case lc:return a=S(12,c,b,e|4),a.elementType=lc,a.type=lc,a.expirationTime=f,a;case nd:return a=S(13,c,b,e),b=nd,a.elementType=b,a.type=b,a.expirationTime=f,a;default:if("object"===typeof a&&
61
+ null!==a)switch(a.$$typeof){case ff:g=10;break a;case ef:g=9;break a;case od:g=11;break a;case pd:g=14;break a;case gf:g=16;d=null;break a}n("130",null==a?a:typeof a,"")}b=S(g,c,b,e);b.elementType=a;b.type=d;b.expirationTime=f;return b}function wa(a,b,c,d){a=S(7,a,d,b);a.expirationTime=c;return a}function Uf(a,b,c,d){a=S(8,a,d,b);b=0===(b&1)?md:ld;a.elementType=b;a.type=b;a.expirationTime=c;return a}function Nd(a,b,c){a=S(6,a,null,b);a.expirationTime=c;return a}function Od(a,b,c){b=S(4,null!==a.children?
62
+ a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}function Bb(a,b){a.didError=!1;var c=a.earliestPendingTime;0===c?a.earliestPendingTime=a.latestPendingTime=b:c<b?a.earliestPendingTime=b:a.latestPendingTime>b&&(a.latestPendingTime=b);xc(b,a)}function di(a,b){a.didError=!1;if(0===b)a.earliestPendingTime=0,a.latestPendingTime=0,a.earliestSuspendedTime=0,a.latestSuspendedTime=0,a.latestPingedTime=0;else{b<
63
+ a.latestPingedTime&&(a.latestPingedTime=0);var c=a.latestPendingTime;0!==c&&(c>b?a.earliestPendingTime=a.latestPendingTime=0:a.earliestPendingTime>b&&(a.earliestPendingTime=a.latestPendingTime));c=a.earliestSuspendedTime;0===c?Bb(a,b):b<a.latestSuspendedTime?(a.earliestSuspendedTime=0,a.latestSuspendedTime=0,a.latestPingedTime=0,Bb(a,b)):b>c&&Bb(a,b)}xc(0,a)}function Vf(a,b){a.didError=!1;a.latestPingedTime>=b&&(a.latestPingedTime=0);var c=a.earliestPendingTime,d=a.latestPendingTime;c===b?a.earliestPendingTime=
64
+ d===b?a.latestPendingTime=0:d:d===b&&(a.latestPendingTime=c);c=a.earliestSuspendedTime;d=a.latestSuspendedTime;0===c?a.earliestSuspendedTime=a.latestSuspendedTime=b:c<b?a.earliestSuspendedTime=b:d>b&&(a.latestSuspendedTime=b);xc(b,a)}function Wf(a,b){var c=a.earliestPendingTime;a=a.earliestSuspendedTime;c>b&&(b=c);a>b&&(b=a);return b}function xc(a,b){var c=b.earliestSuspendedTime,d=b.latestSuspendedTime,e=b.earliestPendingTime,f=b.latestPingedTime;e=0!==e?e:f;0===e&&(0===a||d<a)&&(e=d);a=e;0!==a&&
65
+ c>a&&(a=c);b.nextExpirationTimeToWorkOn=e;b.expirationTime=a}function P(a,b){if(a&&a.defaultProps){b=B({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c])}return b}function ei(a){var b=a._result;switch(a._status){case 1:return b;case 2:throw b;case 0:throw b;default:a._status=0;b=a._ctor;b=b();b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)});switch(a._status){case 1:return a._result;case 2:throw a._result;
66
+ }a._result=b;throw b;}}function yc(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:B({},b,c);a.memoizedState=c;d=a.updateQueue;null!==d&&0===a.expirationTime&&(d.baseState=c)}function Xf(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!vb(c,d)||!vb(e,f):!0}function Yf(a,b,c,d){var e=!1;d=va;var f=b.contextType;"object"===typeof f&&null!==f?f=T(f):(d=E(b)?Fa:F.current,e=b.contextTypes,
67
+ f=(e=null!==e&&void 0!==e)?Za(a,d):va);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=zc;a.stateNode=b;b._reactInternalFiber=a;e&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=d,a.__reactInternalMemoizedMaskedChildContext=f);return b}function Zf(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==
68
+ a&&zc.enqueueReplaceState(b,b.state,null)}function Pd(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=$f;var f=b.contextType;"object"===typeof f&&null!==f?e.context=T(f):(f=E(b)?Fa:F.current,e.context=Za(a,f));f=a.updateQueue;null!==f&&(Cb(a,f,c,e,d),e.state=a.memoizedState);f=b.getDerivedStateFromProps;"function"===typeof f&&(yc(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==typeof e.UNSAFE_componentWillMount&&
69
+ "function"!==typeof e.componentWillMount||(b=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&zc.enqueueReplaceState(e,e.state,null),f=a.updateQueue,null!==f&&(Cb(a,f,c,e,d),e.state=a.memoizedState));"function"===typeof e.componentDidMount&&(a.effectTag|=4)}function Db(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;var d=void 0;c&&(1!==
70
+ c.tag?n("309"):void 0,d=c.stateNode);d?void 0:n("147",a);var e=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===$f&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}"string"!==typeof a?n("284"):void 0;c._owner?void 0:n("290",a)}return a}function Ac(a,b){"textarea"!==a.type&&n("31","[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+"}":b,"")}function ag(a){function b(b,
71
+ c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b,c){a=Ga(a,b,c);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.effectTag=2,c):d;b.effectTag=
72
+ 2;return c}function g(b){a&&null===b.alternate&&(b.effectTag=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=Nd(c,a.mode,d),b.return=a,b;b=e(b,c,d);b.return=a;return b}function l(a,b,c,d){if(null!==b&&b.elementType===c.type)return d=e(b,c.props,d),d.ref=Db(a,b,c),d.return=a,d;d=wc(c.type,c.key,c.props,null,a.mode,d);d.ref=Db(a,b,c);d.return=a;return d}function k(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=
73
+ Od(c,a.mode,d),b.return=a,b;b=e(b,c.children||[],d);b.return=a;return b}function m(a,b,c,d,f){if(null===b||7!==b.tag)return b=wa(c,a.mode,d,f),b.return=a,b;b=e(b,c,d);b.return=a;return b}function Ff(a,b,c){if("string"===typeof b||"number"===typeof b)return b=Nd(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case Bc:return c=wc(b.type,b.key,b.props,null,a.mode,c),c.ref=Db(a,null,b),c.return=a,c;case Va:return b=Od(b,a.mode,c),b.return=a,b}if(Cc(b)||sb(b))return b=
74
+ wa(b,a.mode,c,null),b.return=a,b;Ac(a,b)}return null}function p(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case Bc:return c.key===e?c.type===ta?m(a,b,c.props.children,d,e):l(a,b,c,d):null;case Va:return c.key===e?k(a,b,c,d):null}if(Cc(c)||sb(c))return null!==e?null:m(a,b,c,d,null);Ac(a,c)}return null}function r(a,b,c,d,e){if("string"===typeof d||"number"===typeof d)return a=
75
+ a.get(c)||null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case Bc:return a=a.get(null===d.key?c:d.key)||null,d.type===ta?m(b,a,d.props.children,e,d.key):l(b,a,d,e);case Va:return a=a.get(null===d.key?c:d.key)||null,k(b,a,d,e)}if(Cc(d)||sb(d))return a=a.get(c)||null,m(b,a,d,e,null);Ac(b,d)}return null}function u(e,g,h,k){for(var l=null,m=null,n=g,q=g=0,v=null;null!==n&&q<h.length;q++){n.index>q?(v=n,n=null):v=n.sibling;var Q=p(e,n,h[q],k);if(null===Q){null===n&&(n=v);break}a&&
76
+ n&&null===Q.alternate&&b(e,n);g=f(Q,g,q);null===m?l=Q:m.sibling=Q;m=Q;n=v}if(q===h.length)return c(e,n),l;if(null===n){for(;q<h.length;q++)if(n=Ff(e,h[q],k))g=f(n,g,q),null===m?l=n:m.sibling=n,m=n;return l}for(n=d(e,n);q<h.length;q++)if(v=r(n,e,q,h[q],k))a&&null!==v.alternate&&n.delete(null===v.key?q:v.key),g=f(v,g,q),null===m?l=v:m.sibling=v,m=v;a&&n.forEach(function(a){return b(e,a)});return l}function x(e,g,h,k){var l=sb(h);"function"!==typeof l?n("150"):void 0;h=l.call(h);null==h?n("151"):void 0;
77
+ for(var m=l=null,q=g,v=g=0,Q=null,t=h.next();null!==q&&!t.done;v++,t=h.next()){q.index>v?(Q=q,q=null):Q=q.sibling;var u=p(e,q,t.value,k);if(null===u){q||(q=Q);break}a&&q&&null===u.alternate&&b(e,q);g=f(u,g,v);null===m?l=u:m.sibling=u;m=u;q=Q}if(t.done)return c(e,q),l;if(null===q){for(;!t.done;v++,t=h.next())t=Ff(e,t.value,k),null!==t&&(g=f(t,g,v),null===m?l=t:m.sibling=t,m=t);return l}for(q=d(e,q);!t.done;v++,t=h.next())t=r(q,e,v,t.value,k),null!==t&&(a&&null!==t.alternate&&q.delete(null===t.key?
78
+ v:t.key),g=f(t,g,v),null===m?l=t:m.sibling=t,m=t);a&&q.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===ta&&null===f.key;k&&(f=f.props.children);var l="object"===typeof f&&null!==f;if(l)switch(f.$$typeof){case Bc:a:{l=f.key;for(k=d;null!==k;){if(k.key===l)if(7===k.tag?f.type===ta:k.elementType===f.type){c(a,k.sibling);d=e(k,f.type===ta?f.props.children:f.props,h);d.ref=Db(a,k,f);d.return=a;a=d;break a}else{c(a,k);break}else b(a,k);
79
+ k=k.sibling}f.type===ta?(d=wa(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=wc(f.type,f.key,f.props,null,a.mode,h),h.ref=Db(a,d,f),h.return=a,a=h)}return g(a);case Va:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[],h);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=Od(f,a.mode,h);d.return=a;a=d}return g(a)}if("string"===typeof f||"number"===
80
+ typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f,h),d.return=a,a=d):(c(a,d),d=Nd(f,a.mode,h),d.return=a,a=d),g(a);if(Cc(f))return u(a,d,f,h);if(sb(f))return x(a,d,f,h);l&&Ac(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 0:h=a.type,n("152",h.displayName||h.name||"Component")}return c(a,d)}}function Ha(a){a===Eb?n("174"):void 0;return a}function Qd(a,b){L(Fb,b,a);L(Gb,a,a);L(U,Eb,a);var c=b.nodeType;switch(c){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Dd(null,
81
+ "");break;default:c=8===c?b.parentNode:b,b=c.namespaceURI||null,c=c.tagName,b=Dd(b,c)}D(U,a);L(U,b,a)}function $a(a){D(U,a);D(Gb,a);D(Fb,a)}function bg(a){Ha(Fb.current);var b=Ha(U.current);var c=Dd(b,a.type);b!==c&&(L(Gb,a,a),L(U,c,a))}function Rd(a){Gb.current===a&&(D(U,a),D(Gb,a))}function V(){n("321")}function Sd(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!Ea(a[c],b[c]))return!1;return!0}function Td(a,b,c,d,e,f){Hb=f;xa=b;W=null!==a?a.memoizedState:null;Dc.current=null===
82
+ W?fi:cg;b=c(d,e);if(Ib){do Ib=!1,Jb+=1,W=null!==a?a.memoizedState:null,ab=bb,X=G=y=null,Dc.current=cg,b=c(d,e);while(Ib);ia=null;Jb=0}Dc.current=Ud;a=xa;a.memoizedState=bb;a.expirationTime=Kb;a.updateQueue=X;a.effectTag|=Lb;a=null!==y&&null!==y.next;Hb=0;ab=G=bb=W=y=xa=null;Kb=0;X=null;Lb=0;a?n("300"):void 0;return b}function Vd(){Dc.current=Ud;Hb=0;ab=G=bb=W=y=xa=null;Kb=0;X=null;Lb=0;Ib=!1;ia=null;Jb=0}function cb(){var a={memoizedState:null,baseState:null,queue:null,baseUpdate:null,next:null};
83
+ null===G?bb=G=a:G=G.next=a;return G}function Mb(){if(null!==ab)G=ab,ab=G.next,y=W,W=null!==y?y.next:null;else{null===W?n("310"):void 0;y=W;var a={memoizedState:y.memoizedState,baseState:y.baseState,queue:y.queue,baseUpdate:y.baseUpdate,next:null};G=null===G?bb=a:G.next=a;W=y.next}return G}function dg(a,b){return"function"===typeof b?b(a):b}function eg(a,b,c){b=Mb();c=b.queue;null===c?n("311"):void 0;if(0<Jb){var d=c.dispatch;if(null!==ia){var e=ia.get(c);if(void 0!==e){ia.delete(c);var f=b.memoizedState;
84
+ do f=a(f,e.action),e=e.next;while(null!==e);Ea(f,b.memoizedState)||(ja=!0);b.memoizedState=f;b.baseUpdate===c.last&&(b.baseState=f);c.eagerReducer=a;c.eagerState=f;return[f,d]}}return[b.memoizedState,d]}d=c.last;var g=b.baseUpdate;f=b.baseState;null!==g?(null!==d&&(d.next=null),d=g.next):d=null!==d?d.next:null;if(null!==d){var h=e=null,l=d,k=!1;do{var m=l.expirationTime;m<Hb?(k||(k=!0,h=g,e=f),m>Kb&&(Kb=m)):f=l.eagerReducer===a?l.eagerState:a(f,l.action);g=l;l=l.next}while(null!==l&&l!==d);k||(h=
85
+ g,e=f);Ea(f,b.memoizedState)||(ja=!0);b.memoizedState=f;b.baseUpdate=h;b.baseState=e;c.eagerReducer=a;c.eagerState=f}return[b.memoizedState,c.dispatch]}function Wd(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};null===X?(X={lastEffect:null},X.lastEffect=a.next=a):(b=X.lastEffect,null===b?X.lastEffect=a.next=a:(c=b.next,b.next=a,a.next=c,X.lastEffect=a));return a}function Xd(a,b,c,d){var e=cb();Lb|=a;e.memoizedState=Wd(b,c,void 0,void 0===d?null:d)}function Yd(a,b,c,d){var e=Mb();d=void 0===
86
+ d?null:d;var f=void 0;if(null!==y){var g=y.memoizedState;f=g.destroy;if(null!==d&&Sd(d,g.deps)){Wd(db,c,f,d);return}}Lb|=a;e.memoizedState=Wd(b,c,f,d)}function fg(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function gg(a,b){}function hg(a,b,c){25>Jb?void 0:n("301");var d=a.alternate;if(a===xa||null!==d&&d===xa)if(Ib=!0,a={expirationTime:Hb,action:c,eagerReducer:null,eagerState:null,next:null},null===
87
+ ia&&(ia=new Map),c=ia.get(b),void 0===c)ia.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}else{eb();var e=ka();e=fb(e,a);var f={expirationTime:e,action:c,eagerReducer:null,eagerState:null,next:null},g=b.last;if(null===g)f.next=f;else{var h=g.next;null!==h&&(f.next=h);g.next=f}b.last=f;if(0===a.expirationTime&&(null===d||0===d.expirationTime)&&(d=b.eagerReducer,null!==d))try{var l=b.eagerState,k=d(l,c);f.eagerReducer=d;f.eagerState=k;if(Ea(k,l))return}catch(m){}finally{}ya(a,e)}}function ig(a,
88
+ b){var c=S(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function jg(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}function kg(a){if(Ia){var b=
89
+ gb;if(b){var c=b;if(!jg(a,b)){b=Hd(c);if(!b||!jg(a,b)){a.effectTag|=2;Ia=!1;la=a;return}ig(la,c)}la=a;gb=Pf(b)}else a.effectTag|=2,Ia=!1,la=a}}function lg(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&18!==a.tag;)a=a.return;la=a}function Zd(a){if(a!==la)return!1;if(!Ia)return lg(a),Ia=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!Gd(b,a.memoizedProps))for(b=gb;b;)ig(a,b),b=Hd(b);lg(a);gb=la?Hd(a.stateNode):null;return!0}function $d(){gb=la=null;Ia=!1}function N(a,b,c,d){b.child=null===
90
+ a?ae(b,null,c,d):hb(b,a.child,c,d)}function mg(a,b,c,d,e){c=c.render;var f=b.ref;ib(b,e);d=Td(a,b,c,d,f,e);if(null!==a&&!ja)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),ma(a,b,e);b.effectTag|=1;N(a,b,d,e);return b.child}function ng(a,b,c,d,e,f){if(null===a){var g=c.type;if("function"===typeof g&&!Md(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,og(a,b,g,d,e,f);a=wc(c.type,null,d,null,b.mode,f);a.ref=
91
+ b.ref;a.return=b;return b.child=a}g=a.child;if(e<f&&(e=g.memoizedProps,c=c.compare,c=null!==c?c:vb,c(e,d)&&a.ref===b.ref))return ma(a,b,f);b.effectTag|=1;a=Ga(g,d,f);a.ref=b.ref;a.return=b;return b.child=a}function og(a,b,c,d,e,f){return null!==a&&vb(a.memoizedProps,d)&&a.ref===b.ref&&(ja=!1,e<f)?ma(a,b,f):be(a,b,c,d,f)}function pg(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.effectTag|=128}function be(a,b,c,d,e){var f=E(c)?Fa:F.current;f=Za(b,f);ib(b,e);c=Td(a,b,c,d,f,e);if(null!==
92
+ a&&!ja)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),ma(a,b,e);b.effectTag|=1;N(a,b,c,e);return b.child}function qg(a,b,c,d,e){if(E(c)){var f=!0;vc(b)}else f=!1;ib(b,e);if(null===b.stateNode)null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2),Yf(b,c,d,e),Pd(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var l=g.context,k=c.contextType;"object"===typeof k&&null!==k?k=T(k):(k=E(c)?Fa:F.current,k=Za(b,k));var m=
93
+ c.getDerivedStateFromProps,n="function"===typeof m||"function"===typeof g.getSnapshotBeforeUpdate;n||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==d||l!==k)&&Zf(b,g,d,k);za=!1;var p=b.memoizedState;l=g.state=p;var r=b.updateQueue;null!==r&&(Cb(b,r,d,g,e),l=b.memoizedState);h!==d||p!==l||M.current||za?("function"===typeof m&&(yc(b,c,m,d),l=b.memoizedState),(h=za||Xf(b,c,h,d,p,l,k))?(n||"function"!==typeof g.UNSAFE_componentWillMount&&
94
+ "function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),"function"===typeof g.componentDidMount&&(b.effectTag|=4)):("function"===typeof g.componentDidMount&&(b.effectTag|=4),b.memoizedProps=d,b.memoizedState=l),g.props=d,g.state=l,g.context=k,d=h):("function"===typeof g.componentDidMount&&(b.effectTag|=4),d=!1)}else g=b.stateNode,h=b.memoizedProps,g.props=b.type===b.elementType?
95
+ h:P(b.type,h),l=g.context,k=c.contextType,"object"===typeof k&&null!==k?k=T(k):(k=E(c)?Fa:F.current,k=Za(b,k)),m=c.getDerivedStateFromProps,(n="function"===typeof m||"function"===typeof g.getSnapshotBeforeUpdate)||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==d||l!==k)&&Zf(b,g,d,k),za=!1,l=b.memoizedState,p=g.state=l,r=b.updateQueue,null!==r&&(Cb(b,r,d,g,e),p=b.memoizedState),h!==d||l!==p||M.current||za?("function"===typeof m&&(yc(b,
96
+ c,m,d),p=b.memoizedState),(m=za||Xf(b,c,h,d,l,p,k))?(n||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,p,k),"function"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,p,k)),"function"===typeof g.componentDidUpdate&&(b.effectTag|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.effectTag|=256)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&l===
97
+ a.memoizedState||(b.effectTag|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&l===a.memoizedState||(b.effectTag|=256),b.memoizedProps=d,b.memoizedState=p),g.props=d,g.state=p,g.context=k,d=m):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&l===a.memoizedState||(b.effectTag|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&l===a.memoizedState||(b.effectTag|=256),d=!1);return ce(a,b,c,d,f,e)}function ce(a,b,c,d,e,f){pg(a,b);var g=0!==(b.effectTag&
98
+ 64);if(!d&&!g)return e&&Sf(b,c,!1),ma(a,b,f);d=b.stateNode;gi.current=b;var h=g&&"function"!==typeof c.getDerivedStateFromError?null:d.render();b.effectTag|=1;null!==a&&g?(b.child=hb(b,a.child,null,f),b.child=hb(b,null,h,f)):N(a,b,h,f);b.memoizedState=d.state;e&&Sf(b,c,!0);return b.child}function rg(a){var b=a.stateNode;b.pendingContext?Qf(a,b.pendingContext,b.pendingContext!==b.context):b.context&&Qf(a,b.context,!1);Qd(a,b.containerInfo)}function sg(a,b,c){var d=b.mode,e=b.pendingProps,f=b.memoizedState;
99
+ if(0===(b.effectTag&64)){f=null;var g=!1}else f={timedOutAt:null!==f?f.timedOutAt:0},g=!0,b.effectTag&=-65;if(null===a)if(g){var h=e.fallback;a=wa(null,d,0,null);0===(b.mode&1)&&(a.child=null!==b.memoizedState?b.child.child:b.child);d=wa(h,d,c,null);a.sibling=d;c=a;c.return=d.return=b}else c=d=ae(b,null,e.children,c);else null!==a.memoizedState?(d=a.child,h=d.sibling,g?(c=e.fallback,e=Ga(d,d.pendingProps,0),0===(b.mode&1)&&(g=null!==b.memoizedState?b.child.child:b.child,g!==d.child&&(e.child=g)),
100
+ d=e.sibling=Ga(h,c,h.expirationTime),c=e,e.childExpirationTime=0,c.return=d.return=b):c=d=hb(b,d.child,e.children,c)):(h=a.child,g?(g=e.fallback,e=wa(null,d,0,null),e.child=h,0===(b.mode&1)&&(e.child=null!==b.memoizedState?b.child.child:b.child),d=e.sibling=wa(g,d,c,null),d.effectTag|=2,c=e,e.childExpirationTime=0,c.return=d.return=b):d=c=hb(b,h,e.children,c)),b.stateNode=a.stateNode;b.memoizedState=f;b.child=c;return d}function ma(a,b,c){null!==a&&(b.contextDependencies=a.contextDependencies);if(b.childExpirationTime<
101
+ c)return null;null!==a&&b.child!==a.child?n("153"):void 0;if(null!==b.child){a=b.child;c=Ga(a,a.pendingProps,a.expirationTime);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Ga(a,a.pendingProps,a.expirationTime),c.return=b;c.sibling=null}return b.child}function hi(a,b,c){var d=b.expirationTime;if(null!==a)if(a.memoizedProps!==b.pendingProps||M.current)ja=!0;else{if(d<c){ja=!1;switch(b.tag){case 3:rg(b);$d();break;case 5:bg(b);break;case 1:E(b.type)&&vc(b);break;case 4:Qd(b,b.stateNode.containerInfo);
102
+ break;case 10:tg(b,b.memoizedProps.value);break;case 13:if(null!==b.memoizedState){d=b.child.childExpirationTime;if(0!==d&&d>=c)return sg(a,b,c);b=ma(a,b,c);return null!==b?b.sibling:null}}return ma(a,b,c)}}else ja=!1;b.expirationTime=0;switch(b.tag){case 2:d=b.elementType;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;var e=Za(b,F.current);ib(b,c);e=Td(null,b,d,a,e,c);b.effectTag|=1;if("object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=
103
+ 1;Vd();if(E(d)){var f=!0;vc(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;var g=d.getDerivedStateFromProps;"function"===typeof g&&yc(b,d,g,a);e.updater=zc;b.stateNode=e;e._reactInternalFiber=b;Pd(b,d,a,c);b=ce(null,b,d,!0,f,c)}else b.tag=0,N(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);f=b.pendingProps;a=ei(e);b.type=a;e=b.tag=ci(a);f=P(a,f);g=void 0;switch(e){case 0:g=be(null,b,a,f,c);break;case 1:g=
104
+ qg(null,b,a,f,c);break;case 11:g=mg(null,b,a,f,c);break;case 14:g=ng(null,b,a,P(a.type,f),d,c);break;default:n("306",a,"")}return g;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:P(d,e),be(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:P(d,e),qg(a,b,d,e,c);case 3:rg(b);d=b.updateQueue;null===d?n("282"):void 0;e=b.memoizedState;e=null!==e?e.element:null;Cb(b,d,b.pendingProps,null,c);d=b.memoizedState.element;if(d===e)$d(),b=ma(a,b,c);else{e=b.stateNode;if(e=
105
+ (null===a||null===a.child)&&e.hydrate)gb=Pf(b.stateNode.containerInfo),la=b,e=Ia=!0;e?(b.effectTag|=2,b.child=ae(b,null,d,c)):(N(a,b,d,c),$d());b=b.child}return b;case 5:return bg(b),null===a&&kg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Gd(d,e)?g=null:null!==f&&Gd(d,f)&&(b.effectTag|=16),pg(a,b),1!==c&&b.mode&1&&e.hidden?(b.expirationTime=b.childExpirationTime=1,b=null):(N(a,b,g,c),b=b.child),b;case 6:return null===a&&kg(b),null;case 13:return sg(a,b,c);case 4:return Qd(b,
106
+ b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=hb(b,null,d,c):N(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:P(d,e),mg(a,b,d,e,c);case 7:return N(a,b,b.pendingProps,c),b.child;case 8:return N(a,b,b.pendingProps.children,c),b.child;case 12:return N(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;tg(b,f);if(null!==g){var h=g.value;f=Ea(h,f)?0:("function"===typeof d._calculateChangedBits?
107
+ d._calculateChangedBits(h,f):1073741823)|0;if(0===f){if(g.children===e.children&&!M.current){b=ma(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var l=h.contextDependencies;if(null!==l){g=h.child;for(var k=l.first;null!==k;){if(k.context===d&&0!==(k.observedBits&f)){1===h.tag&&(k=Aa(c),k.tag=Ec,na(h,k));h.expirationTime<c&&(h.expirationTime=c);k=h.alternate;null!==k&&k.expirationTime<c&&(k.expirationTime=c);k=c;for(var m=h.return;null!==m;){var p=m.alternate;if(m.childExpirationTime<
108
+ k)m.childExpirationTime=k,null!==p&&p.childExpirationTime<k&&(p.childExpirationTime=k);else if(null!==p&&p.childExpirationTime<k)p.childExpirationTime=k;else break;m=m.return}l.expirationTime<c&&(l.expirationTime=c);break}k=k.next}}else g=10===h.tag?h.type===b.type?null:h.child:h.child;if(null!==g)g.return=h;else for(g=h;null!==g;){if(g===b){g=null;break}h=g.sibling;if(null!==h){h.return=g.return;g=h;break}g=g.return}h=g}}N(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,f=b.pendingProps,
109
+ d=f.children,ib(b,c),e=T(e,f.unstable_observedBits),d=d(e),b.effectTag|=1,N(a,b,d,c),b.child;case 14:return e=b.type,f=P(e,b.pendingProps),f=P(e.type,f),ng(a,b,e,f,d,c);case 15:return og(a,b,b.type,b.pendingProps,d,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:P(d,e),null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2),b.tag=1,E(d)?(a=!0,vc(b)):a=!1,ib(b,c),Yf(b,d,e,c),Pd(b,d,e,c),ce(null,b,d,!0,a,c)}n("156")}function tg(a,b){var c=a.type._context;L(de,c._currentValue,
110
+ a);c._currentValue=b}function ee(a){var b=de.current;D(de,a);a.type._context._currentValue=b}function ib(a,b){Nb=a;Ob=Ja=null;var c=a.contextDependencies;null!==c&&c.expirationTime>=b&&(ja=!0);a.contextDependencies=null}function T(a,b){if(Ob!==a&&!1!==b&&0!==b){if("number"!==typeof b||1073741823===b)Ob=a,b=1073741823;b={context:a,observedBits:b,next:null};null===Ja?(null===Nb?n("308"):void 0,Ja=b,Nb.contextDependencies={first:b,expirationTime:0}):Ja=Ja.next=b}return a._currentValue}function Fc(a){return{baseState:a,
111
+ firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function fe(a){return{baseState:a.baseState,firstUpdate:a.firstUpdate,lastUpdate:a.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Aa(a){return{expirationTime:a,tag:ug,payload:null,callback:null,next:null,nextEffect:null}}function Gc(a,
112
+ b){null===a.lastUpdate?a.firstUpdate=a.lastUpdate=b:(a.lastUpdate.next=b,a.lastUpdate=b)}function na(a,b){var c=a.alternate;if(null===c){var d=a.updateQueue;var e=null;null===d&&(d=a.updateQueue=Fc(a.memoizedState))}else d=a.updateQueue,e=c.updateQueue,null===d?null===e?(d=a.updateQueue=Fc(a.memoizedState),e=c.updateQueue=Fc(c.memoizedState)):d=a.updateQueue=fe(e):null===e&&(e=c.updateQueue=fe(d));null===e||d===e?Gc(d,b):null===d.lastUpdate||null===e.lastUpdate?(Gc(d,b),Gc(e,b)):(Gc(d,b),e.lastUpdate=
113
+ b)}function vg(a,b){var c=a.updateQueue;c=null===c?a.updateQueue=Fc(a.memoizedState):wg(a,c);null===c.lastCapturedUpdate?c.firstCapturedUpdate=c.lastCapturedUpdate=b:(c.lastCapturedUpdate.next=b,c.lastCapturedUpdate=b)}function wg(a,b){var c=a.alternate;null!==c&&b===c.updateQueue&&(b=a.updateQueue=fe(b));return b}function xg(a,b,c,d,e,f){switch(c.tag){case yg:return a=c.payload,"function"===typeof a?a.call(f,d,e):a;case ge:a.effectTag=a.effectTag&-2049|64;case ug:a=c.payload;e="function"===typeof a?
114
+ a.call(f,d,e):a;if(null===e||void 0===e)break;return B({},d,e);case Ec:za=!0}return d}function Cb(a,b,c,d,e){za=!1;b=wg(a,b);for(var f=b.baseState,g=null,h=0,l=b.firstUpdate,k=f;null!==l;){var m=l.expirationTime;m<e?(null===g&&(g=l,f=k),h<m&&(h=m)):(k=xg(a,b,l,k,c,d),null!==l.callback&&(a.effectTag|=32,l.nextEffect=null,null===b.lastEffect?b.firstEffect=b.lastEffect=l:(b.lastEffect.nextEffect=l,b.lastEffect=l)));l=l.next}m=null;for(l=b.firstCapturedUpdate;null!==l;){var n=l.expirationTime;n<e?(null===
115
+ m&&(m=l,null===g&&(f=k)),h<n&&(h=n)):(k=xg(a,b,l,k,c,d),null!==l.callback&&(a.effectTag|=32,l.nextEffect=null,null===b.lastCapturedEffect?b.firstCapturedEffect=b.lastCapturedEffect=l:(b.lastCapturedEffect.nextEffect=l,b.lastCapturedEffect=l)));l=l.next}null===g&&(b.lastUpdate=null);null===m?b.lastCapturedUpdate=null:a.effectTag|=32;null===g&&null===m&&(f=k);b.baseState=f;b.firstUpdate=g;b.firstCapturedUpdate=m;a.expirationTime=h;a.memoizedState=k}function zg(a,b,c,d){null!==b.firstCapturedUpdate&&
116
+ (null!==b.lastUpdate&&(b.lastUpdate.next=b.firstCapturedUpdate,b.lastUpdate=b.lastCapturedUpdate),b.firstCapturedUpdate=b.lastCapturedUpdate=null);Ag(b.firstEffect,c);b.firstEffect=b.lastEffect=null;Ag(b.firstCapturedEffect,c);b.firstCapturedEffect=b.lastCapturedEffect=null}function Ag(a,b){for(;null!==a;){var c=a.callback;if(null!==c){a.callback=null;var d=b;"function"!==typeof c?n("191",c):void 0;c.call(d)}a=a.nextEffect}}function Hc(a,b){return{value:a,source:b,stack:qd(b)}}function Pb(a){a.effectTag|=
117
+ 4}function Bg(a,b){var c=b.source,d=b.stack;null===d&&null!==c&&(d=qd(c));null!==c&&sa(c.type);b=b.value;null!==a&&1===a.tag&&sa(a.type);try{console.error(b)}catch(e){setTimeout(function(){throw e;})}}function Cg(a){var b=a.ref;if(null!==b)if("function"===typeof b)try{b(null)}catch(c){Ka(a,c)}else b.current=null}function Qb(a,b,c){c=c.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do{if((d.tag&a)!==db){var e=d.destroy;d.destroy=void 0;void 0!==e&&e()}(d.tag&b)!==db&&(e=d.create,
118
+ d.destroy=e());d=d.next}while(d!==c)}}function ii(a,b){for(var c=a;;){if(5===c.tag){var d=c.stateNode;if(b)d.style.display="none";else{d=c.stateNode;var e=c.memoizedProps.style;e=void 0!==e&&null!==e&&e.hasOwnProperty("display")?e.display:null;d.style.display=Lf("display",e)}}else if(6===c.tag)c.stateNode.nodeValue=b?"":c.memoizedProps;else if(13===c.tag&&null!==c.memoizedState){d=c.child.sibling;d.return=c;c=d;continue}else if(null!==c.child){c.child.return=c;c=c.child;continue}if(c===a)break;for(;null===
119
+ c.sibling;){if(null===c.return||c.return===a)return;c=c.return}c.sibling.return=c.return;c=c.sibling}}function Dg(a){"function"===typeof Ld&&Ld(a);switch(a.tag){case 0:case 11:case 14:case 15:var b=a.updateQueue;if(null!==b&&(b=b.lastEffect,null!==b)){var c=b=b.next;do{var d=c.destroy;if(void 0!==d){var e=a;try{d()}catch(f){Ka(e,f)}}c=c.next}while(c!==b)}break;case 1:Cg(a);b=a.stateNode;if("function"===typeof b.componentWillUnmount)try{b.props=a.memoizedProps,b.state=a.memoizedState,b.componentWillUnmount()}catch(f){Ka(a,
120
+ f)}break;case 5:Cg(a);break;case 4:Eg(a)}}function Fg(a){return 5===a.tag||3===a.tag||4===a.tag}function Gg(a){a:{for(var b=a.return;null!==b;){if(Fg(b)){var c=b;break a}b=b.return}n("160");c=void 0}var d=b=void 0;switch(c.tag){case 5:b=c.stateNode;d=!1;break;case 3:b=c.stateNode.containerInfo;d=!0;break;case 4:b=c.stateNode.containerInfo;d=!0;break;default:n("161")}c.effectTag&16&&(Ab(b,""),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||Fg(c.return)){c=null;break a}c=
121
+ c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.effectTag&2)continue b;if(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}for(var e=a;;){if(5===e.tag||6===e.tag)if(c)if(d){var f=b,g=e.stateNode,h=c;8===f.nodeType?f.parentNode.insertBefore(g,h):f.insertBefore(g,h)}else b.insertBefore(e.stateNode,c);else d?(g=b,h=e.stateNode,8===g.nodeType?(f=g.parentNode,f.insertBefore(h,g)):(f=g,f.appendChild(h)),
122
+ g=g._reactRootContainer,null!==g&&void 0!==g||null!==f.onclick||(f.onclick=tc)):b.appendChild(e.stateNode);else if(4!==e.tag&&null!==e.child){e.child.return=e;e=e.child;continue}if(e===a)break;for(;null===e.sibling;){if(null===e.return||e.return===a)return;e=e.return}e.sibling.return=e.return;e=e.sibling}}function Eg(a){for(var b=a,c=!1,d=void 0,e=void 0;;){if(!c){c=b.return;a:for(;;){null===c?n("160"):void 0;switch(c.tag){case 5:d=c.stateNode;e=!1;break a;case 3:d=c.stateNode.containerInfo;e=!0;
123
+ break a;case 4:d=c.stateNode.containerInfo;e=!0;break a}c=c.return}c=!0}if(5===b.tag||6===b.tag){a:for(var f=b,g=f;;)if(Dg(g),null!==g.child&&4!==g.tag)g.child.return=g,g=g.child;else{if(g===f)break;for(;null===g.sibling;){if(null===g.return||g.return===f)break a;g=g.return}g.sibling.return=g.return;g=g.sibling}e?(f=d,g=b.stateNode,8===f.nodeType?f.parentNode.removeChild(g):f.removeChild(g)):d.removeChild(b.stateNode)}else if(4===b.tag){if(null!==b.child){d=b.stateNode.containerInfo;e=!0;b.child.return=
124
+ b;b=b.child;continue}}else if(Dg(b),null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return;b=b.return;4===b.tag&&(c=!1)}b.sibling.return=b.return;b=b.sibling}}function Hg(a,b){switch(b.tag){case 0:case 11:case 14:case 15:Qb(Rb,ji,b);break;case 1:break;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps;a=null!==a?a.memoizedProps:d;var e=b.type,f=b.updateQueue;b.updateQueue=null;null!==f&&$h(c,f,e,a,d,b)}break;case 6:null===
125
+ b.stateNode?n("162"):void 0;b.stateNode.nodeValue=b.memoizedProps;break;case 3:break;case 12:break;case 13:c=b.memoizedState;d=void 0;a=b;null===c?d=!1:(d=!0,a=b.child,0===c.timedOutAt&&(c.timedOutAt=ka()));null!==a&&ii(a,d);c=b.updateQueue;if(null!==c){b.updateQueue=null;var g=b.stateNode;null===g&&(g=b.stateNode=new ki);c.forEach(function(a){var c=li.bind(null,b,a);g.has(a)||(g.add(a),a.then(c,c))})}break;case 17:break;default:n("163")}}function he(a,b,c){c=Aa(c);c.tag=ge;c.payload={element:null};
126
+ var d=b.value;c.callback=function(){ie(d);Bg(a,b)};return c}function Ig(a,b,c){c=Aa(c);c.tag=ge;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){return d(e)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){"function"!==typeof d&&(null===Ba?Ba=new Set([this]):Ba.add(this));var c=b.value,e=b.stack;Bg(a,b);this.componentDidCatch(c,{componentStack:null!==e?e:""})});return c}function mi(a,b){switch(a.tag){case 1:return E(a.type)&&
127
+ uc(a),b=a.effectTag,b&2048?(a.effectTag=b&-2049|64,a):null;case 3:return $a(a),Jd(a),b=a.effectTag,0!==(b&64)?n("285"):void 0,a.effectTag=b&-2049|64,a;case 5:return Rd(a),null;case 13:return b=a.effectTag,b&2048?(a.effectTag=b&-2049|64,a):null;case 18:return null;case 4:return $a(a),null;case 10:return ee(a),null;default:return null}}function Jg(){if(null!==x)for(var a=x.return;null!==a;){var b=a;switch(b.tag){case 1:var c=b.type.childContextTypes;null!==c&&void 0!==c&&uc(b);break;case 3:$a(b);Jd(b);
128
+ break;case 5:Rd(b);break;case 4:$a(b);break;case 10:ee(b)}a=a.return}Y=null;H=0;La=-1;je=!1;x=null}function ni(){for(;null!==p;){var a=p.effectTag;a&16&&Ab(p.stateNode,"");if(a&128){var b=p.alternate;null!==b&&(b=b.ref,null!==b&&("function"===typeof b?b(null):b.current=null))}switch(a&14){case 2:Gg(p);p.effectTag&=-3;break;case 6:Gg(p);p.effectTag&=-3;Hg(p.alternate,p);break;case 4:Hg(p.alternate,p);break;case 8:a=p,Eg(a),a.return=null,a.child=null,a.memoizedState=null,a.updateQueue=null,a=a.alternate,
129
+ null!==a&&(a.return=null,a.child=null,a.memoizedState=null,a.updateQueue=null)}p=p.nextEffect}}function oi(){for(;null!==p;){if(p.effectTag&256)a:{var a=p.alternate,b=p;switch(b.tag){case 0:case 11:case 15:Qb(pi,db,b);break a;case 1:if(b.effectTag&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:P(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}break a;case 3:case 5:case 6:case 4:case 17:break a;default:n("163")}}p=p.nextEffect}}
130
+ function qi(a,b){for(;null!==p;){var c=p.effectTag;if(c&36){var d=p.alternate,e=p,f=b;switch(e.tag){case 0:case 11:case 15:Qb(ri,Sb,e);break;case 1:var g=e.stateNode;if(e.effectTag&4)if(null===d)g.componentDidMount();else{var h=e.elementType===e.type?d.memoizedProps:P(e.type,d.memoizedProps);g.componentDidUpdate(h,d.memoizedState,g.__reactInternalSnapshotBeforeUpdate)}d=e.updateQueue;null!==d&&zg(e,d,g,f);break;case 3:d=e.updateQueue;if(null!==d){g=null;if(null!==e.child)switch(e.child.tag){case 5:g=
131
+ e.child.stateNode;break;case 1:g=e.child.stateNode}zg(e,d,g,f)}break;case 5:f=e.stateNode;null===d&&e.effectTag&4&&Nf(e.type,e.memoizedProps)&&f.focus();break;case 6:break;case 4:break;case 12:break;case 13:break;case 17:break;default:n("163")}}c&128&&(e=p.ref,null!==e&&(f=p.stateNode,"function"===typeof e?e(f):e.current=f));c&512&&(ke=a);p=p.nextEffect}}function si(a,b){Ic=Jc=ke=null;var c=w;w=!0;do{if(b.effectTag&512){var d=!1,e=void 0;try{var f=b;Qb(le,db,f);Qb(db,me,f)}catch(g){d=!0,e=g}d&&Ka(b,
132
+ e)}b=b.nextEffect}while(null!==b);w=c;c=a.expirationTime;0!==c&&Kc(a,c);z||w||Z(1073741823,!1)}function eb(){null!==Jc&&ti(Jc);null!==Ic&&Ic()}function ui(a,b){Lc=Ca=!0;a.current===b?n("177"):void 0;var c=a.pendingCommitExpirationTime;0===c?n("261"):void 0;a.pendingCommitExpirationTime=0;var d=b.expirationTime,e=b.childExpirationTime;di(a,e>d?e:d);Kg.current=null;d=void 0;1<b.effectTag?null!==b.lastEffect?(b.lastEffect.nextEffect=b,d=b.firstEffect):d=b:d=b.firstEffect;ne=qc;oe=Wh();qc=!1;for(p=d;null!==
133
+ p;){e=!1;var f=void 0;try{oi()}catch(h){e=!0,f=h}e&&(null===p?n("178"):void 0,Ka(p,f),null!==p&&(p=p.nextEffect))}for(p=d;null!==p;){e=!1;f=void 0;try{ni()}catch(h){e=!0,f=h}e&&(null===p?n("178"):void 0,Ka(p,f),null!==p&&(p=p.nextEffect))}Xh(oe);oe=null;qc=!!ne;ne=null;a.current=b;for(p=d;null!==p;){e=!1;f=void 0;try{qi(a,c)}catch(h){e=!0,f=h}e&&(null===p?n("178"):void 0,Ka(p,f),null!==p&&(p=p.nextEffect))}if(null!==d&&null!==ke){var g=si.bind(null,a,d);Jc=Mc(Lg,function(){return vi(g)});Ic=g}Ca=
134
+ Lc=!1;"function"===typeof Kd&&Kd(b.stateNode);c=b.expirationTime;b=b.childExpirationTime;b=b>c?b:c;0===b&&(Ba=null);wi(a,b)}function Mg(a){for(;;){var b=a.alternate,c=a.return,d=a.sibling;if(0===(a.effectTag&1024)){x=a;a:{var e=b;b=a;var f=H;var g=b.pendingProps;switch(b.tag){case 2:break;case 16:break;case 15:case 0:break;case 1:E(b.type)&&uc(b);break;case 3:$a(b);Jd(b);g=b.stateNode;g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null);if(null===e||null===e.child)Zd(b),b.effectTag&=
135
+ -3;pe(b);break;case 5:Rd(b);var h=Ha(Fb.current);f=b.type;if(null!==e&&null!=b.stateNode)Ng(e,b,f,g,h),e.ref!==b.ref&&(b.effectTag|=128);else if(g){var l=Ha(U.current);if(Zd(b)){g=b;e=g.stateNode;var k=g.type,m=g.memoizedProps,p=h;e[ea]=g;e[ec]=m;f=void 0;h=k;switch(h){case "iframe":case "object":r("load",e);break;case "video":case "audio":for(k=0;k<zb.length;k++)r(zb[k],e);break;case "source":r("error",e);break;case "img":case "image":case "link":r("error",e);r("load",e);break;case "form":r("reset",
136
+ e);r("submit",e);break;case "details":r("toggle",e);break;case "input":lf(e,m);r("invalid",e);ha(p,"onChange");break;case "select":e._wrapperState={wasMultiple:!!m.multiple};r("invalid",e);ha(p,"onChange");break;case "textarea":If(e,m),r("invalid",e),ha(p,"onChange")}Ed(h,m);k=null;for(f in m)m.hasOwnProperty(f)&&(l=m[f],"children"===f?"string"===typeof l?e.textContent!==l&&(k=["children",l]):"number"===typeof l&&e.textContent!==""+l&&(k=["children",""+l]):Oa.hasOwnProperty(f)&&null!=l&&ha(p,f));
137
+ switch(h){case "input":kc(e);nf(e,m,!0);break;case "textarea":kc(e);f=e.textContent;f===e._wrapperState.initialValue&&(e.value=f);break;case "select":case "option":break;default:"function"===typeof m.onClick&&(e.onclick=tc)}f=k;g.updateQueue=f;g=null!==f?!0:!1;g&&Pb(b)}else{m=b;p=f;e=g;k=9===h.nodeType?h:h.ownerDocument;"http://www.w3.org/1999/xhtml"===l&&(l=Kf(p));"http://www.w3.org/1999/xhtml"===l?"script"===p?(e=k.createElement("div"),e.innerHTML="<script>\x3c/script>",k=e.removeChild(e.firstChild)):
138
+ "string"===typeof e.is?k=k.createElement(p,{is:e.is}):(k=k.createElement(p),"select"===p&&(p=k,e.multiple?p.multiple=!0:e.size&&(p.size=e.size))):k=k.createElementNS(l,p);e=k;e[ea]=m;e[ec]=g;Og(e,b,!1,!1);m=e;k=f;p=g;var t=h,y=Fd(k,p);switch(k){case "iframe":case "object":r("load",m);h=p;break;case "video":case "audio":for(h=0;h<zb.length;h++)r(zb[h],m);h=p;break;case "source":r("error",m);h=p;break;case "img":case "image":case "link":r("error",m);r("load",m);h=p;break;case "form":r("reset",m);r("submit",
139
+ m);h=p;break;case "details":r("toggle",m);h=p;break;case "input":lf(m,p);h=sd(m,p);r("invalid",m);ha(t,"onChange");break;case "option":h=Bd(m,p);break;case "select":m._wrapperState={wasMultiple:!!p.multiple};h=B({},p,{value:void 0});r("invalid",m);ha(t,"onChange");break;case "textarea":If(m,p);h=Cd(m,p);r("invalid",m);ha(t,"onChange");break;default:h=p}Ed(k,h);l=void 0;var u=k,w=m,v=h;for(l in v)if(v.hasOwnProperty(l)){var q=v[l];"style"===l?Mf(w,q):"dangerouslySetInnerHTML"===l?(q=q?q.__html:void 0,
140
+ null!=q&&Of(w,q)):"children"===l?"string"===typeof q?("textarea"!==u||""!==q)&&Ab(w,q):"number"===typeof q&&Ab(w,""+q):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(Oa.hasOwnProperty(l)?null!=q&&ha(t,l):null!=q&&rd(w,l,q,y))}switch(k){case "input":kc(m);nf(m,p,!1);break;case "textarea":kc(m);h=m.textContent;h===m._wrapperState.initialValue&&(m.value=h);break;case "option":null!=p.value&&m.setAttribute("value",""+ua(p.value));break;case "select":h=m;m=p;h.multiple=
141
+ !!m.multiple;p=m.value;null!=p?Xa(h,!!m.multiple,p,!1):null!=m.defaultValue&&Xa(h,!!m.multiple,m.defaultValue,!0);break;default:"function"===typeof h.onClick&&(m.onclick=tc)}(g=Nf(f,g))&&Pb(b);b.stateNode=e}null!==b.ref&&(b.effectTag|=128)}else null===b.stateNode?n("166"):void 0;break;case 6:e&&null!=b.stateNode?Pg(e,b,e.memoizedProps,g):("string"!==typeof g&&(null===b.stateNode?n("166"):void 0),e=Ha(Fb.current),Ha(U.current),Zd(b)?(g=b,f=g.stateNode,e=g.memoizedProps,f[ea]=g,(g=f.nodeValue!==e)&&
142
+ Pb(b)):(f=b,g=(9===e.nodeType?e:e.ownerDocument).createTextNode(g),g[ea]=b,f.stateNode=g));break;case 11:break;case 13:g=b.memoizedState;if(0!==(b.effectTag&64)){b.expirationTime=f;x=b;break a}g=null!==g;f=null!==e&&null!==e.memoizedState;null!==e&&!g&&f&&(e=e.child.sibling,null!==e&&(h=b.firstEffect,null!==h?(b.firstEffect=e,e.nextEffect=h):(b.firstEffect=b.lastEffect=e,e.nextEffect=null),e.effectTag=8));if(g||f)b.effectTag|=4;break;case 7:break;case 8:break;case 12:break;case 4:$a(b);pe(b);break;
143
+ case 10:ee(b);break;case 9:break;case 14:break;case 17:E(b.type)&&uc(b);break;case 18:break;default:n("156")}x=null}b=a;if(1===H||1!==b.childExpirationTime){g=0;for(f=b.child;null!==f;)e=f.expirationTime,h=f.childExpirationTime,e>g&&(g=e),h>g&&(g=h),f=f.sibling;b.childExpirationTime=g}if(null!==x)return x;null!==c&&0===(c.effectTag&1024)&&(null===c.firstEffect&&(c.firstEffect=a.firstEffect),null!==a.lastEffect&&(null!==c.lastEffect&&(c.lastEffect.nextEffect=a.firstEffect),c.lastEffect=a.lastEffect),
144
+ 1<a.effectTag&&(null!==c.lastEffect?c.lastEffect.nextEffect=a:c.firstEffect=a,c.lastEffect=a))}else{a=mi(a,H);if(null!==a)return a.effectTag&=1023,a;null!==c&&(c.firstEffect=c.lastEffect=null,c.effectTag|=1024)}if(null!==d)return d;if(null!==c)a=c;else break}return null}function Qg(a){var b=hi(a.alternate,a,H);a.memoizedProps=a.pendingProps;null===b&&(b=Mg(a));Kg.current=null;return b}function Rg(a,b){Ca?n("243"):void 0;eb();Ca=!0;var c=qe.current;qe.current=Ud;var d=a.nextExpirationTimeToWorkOn;
145
+ if(d!==H||a!==Y||null===x)Jg(),Y=a,H=d,x=Ga(Y.current,null,H),a.pendingCommitExpirationTime=0;var e=!1;do{try{if(b)for(;null!==x&&!Nc();)x=Qg(x);else for(;null!==x;)x=Qg(x)}catch(v){if(Ob=Ja=Nb=null,Vd(),null===x)e=!0,ie(v);else{null===x?n("271"):void 0;var f=x,g=f.return;if(null===g)e=!0,ie(v);else{a:{var h=a,l=g,k=f,m=v;g=H;k.effectTag|=1024;k.firstEffect=k.lastEffect=null;if(null!==m&&"object"===typeof m&&"function"===typeof m.then){var p=m;m=l;var t=-1,r=-1;do{if(13===m.tag){var u=m.alternate;
146
+ if(null!==u&&(u=u.memoizedState,null!==u)){r=10*(1073741822-u.timedOutAt);break}u=m.pendingProps.maxDuration;if("number"===typeof u)if(0>=u)t=0;else if(-1===t||u<t)t=u}m=m.return}while(null!==m);m=l;do{if(u=13===m.tag)u=void 0===m.memoizedProps.fallback?!1:null===m.memoizedState;if(u){l=m.updateQueue;null===l?(l=new Set,l.add(p),m.updateQueue=l):l.add(p);if(0===(m.mode&1)){m.effectTag|=64;k.effectTag&=-1957;1===k.tag&&(null===k.alternate?k.tag=17:(g=Aa(1073741823),g.tag=Ec,na(k,g)));k.expirationTime=
147
+ 1073741823;break a}k=h;l=g;var w=k.pingCache;null===w?(w=k.pingCache=new xi,u=new Set,w.set(p,u)):(u=w.get(p),void 0===u&&(u=new Set,w.set(p,u)));u.has(l)||(u.add(l),k=yi.bind(null,k,p,l),p.then(k,k));-1===t?h=1073741823:(-1===r&&(r=10*(1073741822-Wf(h,g))-5E3),h=r+t);0<=h&&La<h&&(La=h);m.effectTag|=2048;m.expirationTime=g;break a}m=m.return}while(null!==m);m=Error((sa(k.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+
148
+ qd(k))}je=!0;m=Hc(m,k);h=l;do{switch(h.tag){case 3:h.effectTag|=2048;h.expirationTime=g;g=he(h,m,g);vg(h,g);break a;case 1:if(t=m,r=h.type,k=h.stateNode,0===(h.effectTag&64)&&("function"===typeof r.getDerivedStateFromError||null!==k&&"function"===typeof k.componentDidCatch&&(null===Ba||!Ba.has(k)))){h.effectTag|=2048;h.expirationTime=g;g=Ig(h,t,g);vg(h,g);break a}}h=h.return}while(null!==h)}x=Mg(f);continue}}}break}while(1);Ca=!1;qe.current=c;Ob=Ja=Nb=null;Vd();if(e)Y=null,a.finishedWork=null;else if(null!==
149
+ x)a.finishedWork=null;else{c=a.current.alternate;null===c?n("281"):void 0;Y=null;if(je){e=a.latestPendingTime;f=a.latestSuspendedTime;g=a.latestPingedTime;if(0!==e&&e<d||0!==f&&f<d||0!==g&&g<d){Vf(a,d);re(a,c,d,a.expirationTime,-1);return}if(!a.didError&&b){a.didError=!0;d=a.nextExpirationTimeToWorkOn=d;b=a.expirationTime=1073741823;re(a,c,d,b,-1);return}}b&&-1!==La?(Vf(a,d),b=10*(1073741822-Wf(a,d)),b<La&&(La=b),b=10*(1073741822-ka()),b=La-b,re(a,c,d,a.expirationTime,0>b?0:b)):(a.pendingCommitExpirationTime=
150
+ d,a.finishedWork=c)}}function Ka(a,b){for(var c=a.return;null!==c;){switch(c.tag){case 1:var d=c.stateNode;if("function"===typeof c.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===Ba||!Ba.has(d))){a=Hc(b,a);a=Ig(c,a,1073741823);na(c,a);ya(c,1073741823);return}break;case 3:a=Hc(b,a);a=he(c,a,1073741823);na(c,a);ya(c,1073741823);return}c=c.return}3===a.tag&&(c=Hc(b,a),c=he(a,c,1073741823),na(a,c),ya(a,1073741823))}function fb(a,b){var c=zi(),d=void 0;if(0===(b.mode&1))d=
151
+ 1073741823;else if(Ca&&!Lc)d=H;else{switch(c){case se:d=1073741823;break;case te:d=1073741822-10*(((1073741822-a+15)/10|0)+1);break;case Lg:d=1073741822-25*(((1073741822-a+500)/25|0)+1);break;case Ai:case Bi:d=1;break;default:n("313")}null!==Y&&d===H&&--d}c===te&&(0===oa||d<oa)&&(oa=d);return d}function yi(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);if(null!==Y&&H===c)Y=null;else if(b=a.earliestSuspendedTime,d=a.latestSuspendedTime,0!==b&&c<=b&&c>=d){a.didError=!1;b=a.latestPingedTime;if(0===b||
152
+ b>c)a.latestPingedTime=c;xc(c,a);c=a.expirationTime;0!==c&&Kc(a,c)}}function li(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=ka();b=fb(b,a);a=Sg(a,b);null!==a&&(Bb(a,b),b=a.expirationTime,0!==b&&Kc(a,b))}function Sg(a,b){a.expirationTime<b&&(a.expirationTime=b);var c=a.alternate;null!==c&&c.expirationTime<b&&(c.expirationTime=b);var d=a.return,e=null;if(null===d&&3===a.tag)e=a.stateNode;else for(;null!==d;){c=d.alternate;d.childExpirationTime<b&&(d.childExpirationTime=b);null!==c&&c.childExpirationTime<
153
+ b&&(c.childExpirationTime=b);if(null===d.return&&3===d.tag){e=d.stateNode;break}d=d.return}return e}function ya(a,b){a=Sg(a,b);null!==a&&(!Ca&&0!==H&&b>H&&Jg(),Bb(a,b),Ca&&!Lc&&Y===a||Kc(a,a.expirationTime),Tb>Ci&&(Tb=0,n("185")))}function Tg(a,b,c,d,e){return Mc(se,function(){return a(b,c,d,e)})}function Ub(){aa=1073741822-((ue()-ve)/10|0)}function Ug(a,b){if(0!==Oc){if(b<Oc)return;null!==Pc&&Vg(Pc)}Oc=b;a=ue()-ve;Pc=Wg(Di,{timeout:10*(1073741822-b)-a})}function re(a,b,c,d,e){a.expirationTime=d;
154
+ 0!==e||Nc()?0<e&&(a.timeoutHandle=Ei(Fi.bind(null,a,b,c),e)):(a.pendingCommitExpirationTime=c,a.finishedWork=b)}function Fi(a,b,c){a.pendingCommitExpirationTime=c;a.finishedWork=b;Ub();jb=aa;Xg(a,c)}function wi(a,b){a.expirationTime=b;a.finishedWork=null}function ka(){if(w)return jb;Qc();if(0===C||1===C)Ub(),jb=aa;return jb}function Kc(a,b){null===a.nextScheduledRoot?(a.expirationTime=b,null===I?(ba=I=a,a.nextScheduledRoot=a):(I=I.nextScheduledRoot=a,I.nextScheduledRoot=ba)):b>a.expirationTime&&(a.expirationTime=
155
+ b);w||(z?Rc&&(ca=a,C=1073741823,Sc(a,1073741823,!1)):1073741823===b?Z(1073741823,!1):Ug(a,b))}function Qc(){var a=0,b=null;if(null!==I)for(var c=I,d=ba;null!==d;){var e=d.expirationTime;if(0===e){null===c||null===I?n("244"):void 0;if(d===d.nextScheduledRoot){ba=I=d.nextScheduledRoot=null;break}else if(d===ba)ba=e=d.nextScheduledRoot,I.nextScheduledRoot=e,d.nextScheduledRoot=null;else if(d===I){I=c;I.nextScheduledRoot=ba;d.nextScheduledRoot=null;break}else c.nextScheduledRoot=d.nextScheduledRoot,d.nextScheduledRoot=
156
+ null;d=c.nextScheduledRoot}else{e>a&&(a=e,b=d);if(d===I)break;if(1073741823===a)break;c=d;d=d.nextScheduledRoot}}ca=b;C=a}function Nc(){return Tc?!0:Gi()?Tc=!0:!1}function Di(){try{if(!Nc()&&null!==ba){Ub();var a=ba;do{var b=a.expirationTime;0!==b&&aa<=b&&(a.nextExpirationTimeToWorkOn=aa);a=a.nextScheduledRoot}while(a!==ba)}Z(0,!0)}finally{Tc=!1}}function Z(a,b){Qc();if(b)for(Ub(),jb=aa;null!==ca&&0!==C&&a<=C&&!(Tc&&aa>C);)Sc(ca,C,aa>C),Qc(),Ub(),jb=aa;else for(;null!==ca&&0!==C&&a<=C;)Sc(ca,C,!1),
157
+ Qc();b&&(Oc=0,Pc=null);0!==C&&Ug(ca,C);Tb=0;we=null;if(null!==kb)for(a=kb,kb=null,b=0;b<a.length;b++){var c=a[b];try{c._onComplete()}catch(d){lb||(lb=!0,Uc=d)}}if(lb)throw a=Uc,Uc=null,lb=!1,a;}function Xg(a,b){w?n("253"):void 0;ca=a;C=b;Sc(a,b,!1);Z(1073741823,!1)}function Sc(a,b,c){w?n("245"):void 0;w=!0;if(c){var d=a.finishedWork;null!==d?Vc(a,d,b):(a.finishedWork=null,d=a.timeoutHandle,-1!==d&&(a.timeoutHandle=-1,Yg(d)),Rg(a,c),d=a.finishedWork,null!==d&&(Nc()?a.finishedWork=d:Vc(a,d,b)))}else d=
158
+ a.finishedWork,null!==d?Vc(a,d,b):(a.finishedWork=null,d=a.timeoutHandle,-1!==d&&(a.timeoutHandle=-1,Yg(d)),Rg(a,c),d=a.finishedWork,null!==d&&Vc(a,d,b));w=!1}function Vc(a,b,c){var d=a.firstBatch;if(null!==d&&d._expirationTime>=c&&(null===kb?kb=[d]:kb.push(d),d._defer)){a.finishedWork=b;a.expirationTime=0;return}a.finishedWork=null;a===we?Tb++:(we=a,Tb=0);Mc(se,function(){ui(a,b)})}function ie(a){null===ca?n("246"):void 0;ca.expirationTime=0;lb||(lb=!0,Uc=a)}function Zg(a,b){var c=z;z=!0;try{return a(b)}finally{(z=
159
+ c)||w||Z(1073741823,!1)}}function $g(a,b){if(z&&!Rc){Rc=!0;try{return a(b)}finally{Rc=!1}}return a(b)}function ah(a,b,c){z||w||0===oa||(Z(oa,!1),oa=0);var d=z;z=!0;try{return Mc(te,function(){return a(b,c)})}finally{(z=d)||w||Z(1073741823,!1)}}function bh(a,b,c,d,e){var f=b.current;a:if(c){c=c._reactInternalFiber;b:{2===wb(c)&&1===c.tag?void 0:n("170");var g=c;do{switch(g.tag){case 3:g=g.stateNode.context;break b;case 1:if(E(g.type)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break b}}g=
160
+ g.return}while(null!==g);n("171");g=void 0}if(1===c.tag){var h=c.type;if(E(h)){c=Rf(c,h,g);break a}}c=g}else c=va;null===b.context?b.context=c:b.pendingContext=c;b=e;e=Aa(d);e.payload={element:a};b=void 0===b?null:b;null!==b&&(e.callback=b);eb();na(f,e);ya(f,d);return d}function xe(a,b,c,d){var e=b.current,f=ka();e=fb(f,e);return bh(a,b,c,e,d)}function ye(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function Hi(a,b,c){var d=
161
+ 3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Va,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}function Vb(a){var b=1073741822-25*(((1073741822-ka()+500)/25|0)+1);b>=ze&&(b=ze-1);this._expirationTime=ze=b;this._root=a;this._callbacks=this._next=null;this._hasChildren=this._didComplete=!1;this._children=null;this._defer=!0}function mb(){this._callbacks=null;this._didCommit=!1;this._onCommit=this._onCommit.bind(this)}function nb(a,b,c){b=S(3,null,null,
162
+ b?3:0);a={current:b,containerInfo:a,pendingChildren:null,pingCache:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,didError:!1,pendingCommitExpirationTime:0,finishedWork:null,timeoutHandle:-1,context:null,pendingContext:null,hydrate:c,nextExpirationTimeToWorkOn:0,expirationTime:0,firstBatch:null,nextScheduledRoot:null};this._internalRoot=b.stateNode=a}function ob(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||
163
+ " react-mount-point-unstable "!==a.nodeValue))}function Ii(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute("data-reactroot")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new nb(a,!1,b)}function Wc(a,b,c,d,e){var f=c._reactRootContainer;if(f){if("function"===typeof e){var g=e;e=function(){var a=ye(f._internalRoot);g.call(a)}}null!=a?f.legacy_renderSubtreeIntoContainer(a,b,e):f.render(b,e)}else{f=c._reactRootContainer=Ii(c,d);if("function"===
164
+ typeof e){var h=e;e=function(){var a=ye(f._internalRoot);h.call(a)}}$g(function(){null!=a?f.legacy_renderSubtreeIntoContainer(a,b,e):f.render(b,e)})}return ye(f._internalRoot)}function ch(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;ob(b)?void 0:n("200");return Hi(a,b,null,c)}da?void 0:n("227");var sh=function(a,b,c,d,e,f,g,h,l){var k=Array.prototype.slice.call(arguments,3);try{b.apply(c,k)}catch(m){this.onError(m)}},qb=!1,$b=null,ac=!1,Yc=null,th={onError:function(a){qb=
165
+ !0;$b=a}},bc=null,Na={},cc=[],Zc={},Oa={},$c={},bd=null,Ue=null,He=null,rb=null,vh=function(a){if(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))for(var d=0;d<b.length&&!a.isPropagationStopped();d++)Ge(a,b[d],c[d]);else b&&Ge(a,b,c);a._dispatchListeners=null;a._dispatchInstances=null;a.isPersistent()||a.constructor.release(a)}},Ae={injectEventPluginOrder:function(a){bc?n("101"):void 0;bc=Array.prototype.slice.call(a);Ee()},injectEventPluginsByName:function(a){var b=!1,c;
166
+ for(c in a)if(a.hasOwnProperty(c)){var d=a[c];Na.hasOwnProperty(c)&&Na[c]===d||(Na[c]?n("102",c):void 0,Na[c]=d,b=!0)}b&&Ee()}},dh=Math.random().toString(36).slice(2),ea="__reactInternalInstance$"+dh,ec="__reactEventHandlers$"+dh,ra=!("undefined"===typeof window||!window.document||!window.document.createElement),Ra={animationend:fc("Animation","AnimationEnd"),animationiteration:fc("Animation","AnimationIteration"),animationstart:fc("Animation","AnimationStart"),transitionend:fc("Transition","TransitionEnd")},
167
+ fd={},Le={};ra&&(Le=document.createElement("div").style,"AnimationEvent"in window||(delete Ra.animationend.animation,delete Ra.animationiteration.animation,delete Ra.animationstart.animation),"TransitionEvent"in window||delete Ra.transitionend.transition);var eh=gc("animationend"),fh=gc("animationiteration"),gh=gc("animationstart"),hh=gc("transitionend"),zb="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),
168
+ qa=null,gd=null,hc=null,B=da.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign;B(J.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=ic)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=ic)},persist:function(){this.isPersistent=
169
+ ic},isPersistent:jc,destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=jc;this._dispatchInstances=this._dispatchListeners=null}});J.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};J.extend=function(a){function b(){return c.apply(this,
170
+ arguments)}var c=this,d=function(){};d.prototype=c.prototype;d=new d;B(d,b.prototype);b.prototype=d;b.prototype.constructor=b;b.Interface=B({},c.Interface,a);b.extend=c.extend;Ne(b);return b};Ne(J);var Ji=J.extend({data:null}),Ki=J.extend({data:null}),Ah=[9,13,27,32],hd=ra&&"CompositionEvent"in window,Wb=null;ra&&"documentMode"in document&&(Wb=document.documentMode);var Li=ra&&"TextEvent"in window&&!Wb,Se=ra&&(!hd||Wb&&8<Wb&&11>=Wb),Re=String.fromCharCode(32),pa={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",
171
+ captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",
172
+ captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Qe=!1,Sa=!1,Mi={eventTypes:pa,extractEvents:function(a,b,c,d){var e=void 0;var f=void 0;if(hd)b:{switch(a){case "compositionstart":e=pa.compositionStart;break b;case "compositionend":e=pa.compositionEnd;break b;case "compositionupdate":e=pa.compositionUpdate;break b}e=void 0}else Sa?Oe(a,c)&&(e=pa.compositionEnd):"keydown"===a&&229===c.keyCode&&(e=pa.compositionStart);e?(Se&&
173
+ "ko"!==c.locale&&(Sa||e!==pa.compositionStart?e===pa.compositionEnd&&Sa&&(f=Me()):(qa=d,gd="value"in qa?qa.value:qa.textContent,Sa=!0)),e=Ji.getPooled(e,b,c,d),f?e.data=f:(f=Pe(c),null!==f&&(e.data=f)),Qa(e),f=e):f=null;(a=Li?Bh(a,c):Ch(a,c))?(b=Ki.getPooled(pa.beforeInput,b,c,d),b.data=a,Qa(b)):b=null;return null===f?b:null===b?f:[f,b]}},id=null,Ta=null,Ua=null,Ye=function(a,b){return a(b)},yf=function(a,b,c){return a(b,c)},Ze=function(){},jd=!1,Dh={color:!0,date:!0,datetime:!0,"datetime-local":!0,
174
+ email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},Ma=da.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Ma.hasOwnProperty("ReactCurrentDispatcher")||(Ma.ReactCurrentDispatcher={current:null});var Fh=/^(.*)[\\\/]/,O="function"===typeof Symbol&&Symbol.for,Bc=O?Symbol.for("react.element"):60103,Va=O?Symbol.for("react.portal"):60106,ta=O?Symbol.for("react.fragment"):60107,md=O?Symbol.for("react.strict_mode"):60108,lc=O?Symbol.for("react.profiler"):60114,
175
+ ff=O?Symbol.for("react.provider"):60109,ef=O?Symbol.for("react.context"):60110,ld=O?Symbol.for("react.concurrent_mode"):60111,od=O?Symbol.for("react.forward_ref"):60112,nd=O?Symbol.for("react.suspense"):60113,pd=O?Symbol.for("react.memo"):60115,gf=O?Symbol.for("react.lazy"):60116,df="function"===typeof Symbol&&Symbol.iterator,Hh=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,
176
+ hf=Object.prototype.hasOwnProperty,kf={},jf={},A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){A[a]=new K(a,0,!1,a,null)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];A[b]=new K(b,1,!1,a[1],null)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){A[a]=new K(a,2,!1,
177
+ a.toLowerCase(),null)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){A[a]=new K(a,2,!1,a,null)});"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){A[a]=new K(a,3,!1,a.toLowerCase(),null)});["checked","multiple","muted","selected"].forEach(function(a){A[a]=new K(a,3,!0,a,null)});["capture",
178
+ "download"].forEach(function(a){A[a]=new K(a,4,!1,a,null)});["cols","rows","size","span"].forEach(function(a){A[a]=new K(a,6,!1,a,null)});["rowSpan","start"].forEach(function(a){A[a]=new K(a,5,!1,a.toLowerCase(),null)});var Be=/[\-:]([a-z])/g,Ce=function(a){return a[1].toUpperCase()};"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=
179
+ a.replace(Be,Ce);A[b]=new K(b,1,!1,a,null)});"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(Be,Ce);A[b]=new K(b,1,!1,a,"http://www.w3.org/1999/xlink")});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(Be,Ce);A[b]=new K(b,1,!1,a,"http://www.w3.org/XML/1998/namespace")});["tabIndex","crossOrigin"].forEach(function(a){A[a]=new K(a,1,!1,a.toLowerCase(),null)});var pf={change:{phasedRegistrationNames:{bubbled:"onChange",
180
+ captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}},tb=null,ub=null,De=!1;ra&&(De=af("input")&&(!document.documentMode||9<document.documentMode));var Ni={eventTypes:pf,_isInputEventSupported:De,extractEvents:function(a,b,c,d){var e=b?Da(b):window,f=void 0,g=void 0,h=e.nodeName&&e.nodeName.toLowerCase();"select"===h||"input"===h&&"file"===e.type?f=Lh:$e(e)?De?f=Ph:(f=Nh,g=Mh):(h=e.nodeName)&&"input"===h.toLowerCase()&&("checkbox"===e.type||
181
+ "radio"===e.type)&&(f=Oh);if(f&&(f=f(a,b)))return of(f,c,d);g&&g(a,e,b);"blur"===a&&(a=e._wrapperState)&&a.controlled&&"number"===e.type&&ud(e,"number",e.value)}},Xb=J.extend({view:null,detail:null}),Rh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},ih=0,jh=0,kh=!1,lh=!1,Yb=Xb.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:vd,button:null,buttons:null,relatedTarget:function(a){return a.relatedTarget||
182
+ (a.fromElement===a.srcElement?a.toElement:a.fromElement)},movementX:function(a){if("movementX"in a)return a.movementX;var b=ih;ih=a.screenX;return kh?"mousemove"===a.type?a.screenX-b:0:(kh=!0,0)},movementY:function(a){if("movementY"in a)return a.movementY;var b=jh;jh=a.screenY;return lh?"mousemove"===a.type?a.screenY-b:0:(lh=!0,0)}}),mh=Yb.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Zb={mouseEnter:{registrationName:"onMouseEnter",
183
+ dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Oi={eventTypes:Zb,extractEvents:function(a,b,c,d){var e="mouseover"===a||"pointerover"===a,f="mouseout"===a||"pointerout"===a;if(e&&(c.relatedTarget||c.fromElement)||!f&&!e)return null;e=d.window===
184
+ d?d:(e=d.ownerDocument)?e.defaultView||e.parentWindow:window;f?(f=b,b=(b=c.relatedTarget||c.toElement)?dc(b):null):f=null;if(f===b)return null;var g=void 0,h=void 0,l=void 0,k=void 0;if("mouseout"===a||"mouseover"===a)g=Yb,h=Zb.mouseLeave,l=Zb.mouseEnter,k="mouse";else if("pointerout"===a||"pointerover"===a)g=mh,h=Zb.pointerLeave,l=Zb.pointerEnter,k="pointer";var m=null==f?e:Da(f);e=null==b?e:Da(b);a=g.getPooled(h,f,c,d);a.type=k+"leave";a.target=m;a.relatedTarget=e;c=g.getPooled(l,b,c,d);c.type=
185
+ k+"enter";c.target=e;c.relatedTarget=m;d=b;if(f&&d)a:{b=f;e=d;k=0;for(g=b;g;g=fa(g))k++;g=0;for(l=e;l;l=fa(l))g++;for(;0<k-g;)b=fa(b),k--;for(;0<g-k;)e=fa(e),g--;for(;k--;){if(b===e||b===e.alternate)break a;b=fa(b);e=fa(e)}b=null}else b=null;e=b;for(b=[];f&&f!==e;){k=f.alternate;if(null!==k&&k===e)break;b.push(f);f=fa(f)}for(f=[];d&&d!==e;){k=d.alternate;if(null!==k&&k===e)break;f.push(d);d=fa(d)}for(d=0;d<b.length;d++)ed(b[d],"bubbled",a);for(d=f.length;0<d--;)ed(f[d],"captured",c);return[a,c]}},
186
+ Sh=Object.prototype.hasOwnProperty,Pi=J.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Qi=J.extend({clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),Ri=Xb.extend({relatedTarget:null}),Si={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ti={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",
187
+ 16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Ui=Xb.extend({key:function(a){if(a.key){var b=Si[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=nc(a),13===a?"Enter":
188
+ String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?Ti[a.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:vd,charCode:function(a){return"keypress"===a.type?nc(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===a.type?nc(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),Vi=Yb.extend({dataTransfer:null}),Wi=Xb.extend({touches:null,targetTouches:null,
189
+ changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:vd}),Xi=J.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),Yi=Yb.extend({deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:null,deltaMode:null}),Zi=[["abort","abort"],[eh,"animationEnd"],[fh,"animationIteration"],[gh,"animationStart"],["canplay",
190
+ "canPlay"],["canplaythrough","canPlayThrough"],["drag","drag"],["dragenter","dragEnter"],["dragexit","dragExit"],["dragleave","dragLeave"],["dragover","dragOver"],["durationchange","durationChange"],["emptied","emptied"],["encrypted","encrypted"],["ended","ended"],["error","error"],["gotpointercapture","gotPointerCapture"],["load","load"],["loadeddata","loadedData"],["loadedmetadata","loadedMetadata"],["loadstart","loadStart"],["lostpointercapture","lostPointerCapture"],["mousemove","mouseMove"],
191
+ ["mouseout","mouseOut"],["mouseover","mouseOver"],["playing","playing"],["pointermove","pointerMove"],["pointerout","pointerOut"],["pointerover","pointerOver"],["progress","progress"],["scroll","scroll"],["seeking","seeking"],["stalled","stalled"],["suspend","suspend"],["timeupdate","timeUpdate"],["toggle","toggle"],["touchmove","touchMove"],[hh,"transitionEnd"],["waiting","waiting"],["wheel","wheel"]],vf={},wd={};[["blur","blur"],["cancel","cancel"],["click","click"],["close","close"],["contextmenu",
192
+ "contextMenu"],["copy","copy"],["cut","cut"],["auxclick","auxClick"],["dblclick","doubleClick"],["dragend","dragEnd"],["dragstart","dragStart"],["drop","drop"],["focus","focus"],["input","input"],["invalid","invalid"],["keydown","keyDown"],["keypress","keyPress"],["keyup","keyUp"],["mousedown","mouseDown"],["mouseup","mouseUp"],["paste","paste"],["pause","pause"],["play","play"],["pointercancel","pointerCancel"],["pointerdown","pointerDown"],["pointerup","pointerUp"],["ratechange","rateChange"],["reset",
193
+ "reset"],["seeked","seeked"],["submit","submit"],["touchcancel","touchCancel"],["touchend","touchEnd"],["touchstart","touchStart"],["volumechange","volumeChange"]].forEach(function(a){uf(a,!0)});Zi.forEach(function(a){uf(a,!1)});var nh={eventTypes:vf,isInteractiveTopLevelEventType:function(a){a=wd[a];return void 0!==a&&!0===a.isInteractive},extractEvents:function(a,b,c,d){var e=wd[a];if(!e)return null;switch(a){case "keypress":if(0===nc(c))return null;case "keydown":case "keyup":a=Ui;break;case "blur":case "focus":a=
194
+ Ri;break;case "click":if(2===c.button)return null;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":a=Yb;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":a=Vi;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":a=Wi;break;case eh:case fh:case gh:a=Pi;break;case hh:a=Xi;break;case "scroll":a=Xb;break;case "wheel":a=
195
+ Yi;break;case "copy":case "cut":case "paste":a=Qi;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":a=mh;break;default:a=J}b=a.getPooled(e,b,c,d);Qa(b);return b}},wf=nh.isInteractiveTopLevelEventType,rc=[],qc=!0,Af={},Vh=0,sc="_reactListenersID"+(""+Math.random()).slice(2),$i=ra&&"documentMode"in document&&11>=document.documentMode,Hf={select:{phasedRegistrationNames:{bubbled:"onSelect",
196
+ captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Wa=null,Ad=null,xb=null,zd=!1,aj={eventTypes:Hf,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:9===d.nodeType?d:d.ownerDocument,f;if(!(f=!e)){a:{e=zf(e);f=$c.onSelect;for(var g=0;g<f.length;g++){var h=f[g];if(!e.hasOwnProperty(h)||!e[h]){e=!1;break a}}e=!0}f=!e}if(f)return null;e=b?Da(b):window;switch(a){case "focus":if($e(e)||"true"===e.contentEditable)Wa=
197
+ e,Ad=b,xb=null;break;case "blur":xb=Ad=Wa=null;break;case "mousedown":zd=!0;break;case "contextmenu":case "mouseup":case "dragend":return zd=!1,Gf(c,d);case "selectionchange":if($i)break;case "keydown":case "keyup":return Gf(c,d)}return null}};Ae.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" "));(function(a,b,c){bd=a;Ue=b;He=c})(dd,Je,Da);Ae.injectEventPluginsByName({SimpleEventPlugin:nh,EnterLeaveEventPlugin:Oi,
198
+ ChangeEventPlugin:Ni,SelectEventPlugin:aj,BeforeInputEventPlugin:Mi});var Xc=void 0,Of=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if("http://www.w3.org/2000/svg"!==a.namespaceURI||"innerHTML"in a)a.innerHTML=b;else{Xc=Xc||document.createElement("div");Xc.innerHTML="<svg>"+b+"</svg>";for(b=Xc.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}}),
199
+ Ab=function(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b},yb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,
200
+ lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},bj=["Webkit","ms","Moz","O"];Object.keys(yb).forEach(function(a){bj.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);yb[b]=yb[a]})});var Zh=B({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,
201
+ source:!0,track:!0,wbr:!0}),R=da.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler,Vg=R.unstable_cancelCallback,ue=R.unstable_now,Wg=R.unstable_scheduleCallback,Gi=R.unstable_shouldYield,Mc=R.unstable_runWithPriority,zi=R.unstable_getCurrentPriorityLevel,se=R.unstable_ImmediatePriority,te=R.unstable_UserBlockingPriority,Lg=R.unstable_NormalPriority,Ai=R.unstable_LowPriority,Bi=R.unstable_IdlePriority,ne=null,oe=null,Ei="function"===typeof setTimeout?setTimeout:void 0,Yg="function"===typeof clearTimeout?
202
+ clearTimeout:void 0,vi=Wg,ti=Vg;new Set;var Id=[],Ya=-1,va={},F={current:va},M={current:!1},Fa=va,Kd=null,Ld=null,S=function(a,b,c,d){return new bi(a,b,c,d)},$f=(new da.Component).refs,zc={isMounted:function(a){return(a=a._reactInternalFiber)?2===wb(a):!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;var d=ka();d=fb(d,a);var e=Aa(d);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);eb();na(a,e);ya(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=ka();d=fb(d,a);var e=
203
+ Aa(d);e.tag=yg;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);eb();na(a,e);ya(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=ka();c=fb(c,a);var d=Aa(c);d.tag=Ec;void 0!==b&&null!==b&&(d.callback=b);eb();na(a,d);ya(a,c)}},Cc=Array.isArray,hb=ag(!0),ae=ag(!1),Eb={},U={current:Eb},Gb={current:Eb},Fb={current:Eb},db=0,pi=2,Rb=4,ji=8,ri=16,Sb=32,me=64,le=128,Dc=Ma.ReactCurrentDispatcher,Hb=0,xa=null,y=null,W=null,bb=null,G=null,ab=null,Kb=0,X=null,Lb=0,Ib=!1,ia=null,Jb=0,Ud={readContext:T,
204
+ useCallback:V,useContext:V,useEffect:V,useImperativeHandle:V,useLayoutEffect:V,useMemo:V,useReducer:V,useRef:V,useState:V,useDebugValue:V},fi={readContext:T,useCallback:function(a,b){cb().memoizedState=[a,void 0===b?null:b];return a},useContext:T,useEffect:function(a,b){return Xd(516,le|me,a,b)},useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Xd(4,Rb|Sb,fg.bind(null,b,a),c)},useLayoutEffect:function(a,b){return Xd(4,Rb|Sb,a,b)},useMemo:function(a,b){var c=cb();
205
+ b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=cb();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={last:null,dispatch:null,eagerReducer:a,eagerState:b};a=a.dispatch=hg.bind(null,xa,a);return[d.memoizedState,a]},useRef:function(a){var b=cb();a={current:a};return b.memoizedState=a},useState:function(a){var b=cb();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={last:null,dispatch:null,eagerReducer:dg,eagerState:a};a=a.dispatch=
206
+ hg.bind(null,xa,a);return[b.memoizedState,a]},useDebugValue:gg},cg={readContext:T,useCallback:function(a,b){var c=Mb();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Sd(b,d[1]))return d[0];c.memoizedState=[a,b];return a},useContext:T,useEffect:function(a,b){return Yd(516,le|me,a,b)},useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Yd(4,Rb|Sb,fg.bind(null,b,a),c)},useLayoutEffect:function(a,b){return Yd(4,Rb|Sb,a,b)},useMemo:function(a,b){var c=
207
+ Mb();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Sd(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a},useReducer:eg,useRef:function(a){return Mb().memoizedState},useState:function(a){return eg(dg,a)},useDebugValue:gg},la=null,gb=null,Ia=!1,gi=Ma.ReactCurrentOwner,ja=!1,de={current:null},Nb=null,Ja=null,Ob=null,ug=0,yg=1,Ec=2,ge=3,za=!1,Og=void 0,pe=void 0,Ng=void 0,Pg=void 0;Og=function(a,b,c,d){for(c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);
208
+ else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};pe=function(a){};Ng=function(a,b,c,d,e){var f=a.memoizedProps;if(f!==d){var g=b.stateNode;Ha(U.current);a=null;switch(c){case "input":f=sd(g,f);d=sd(g,d);a=[];break;case "option":f=Bd(g,f);d=Bd(g,d);a=[];break;case "select":f=B({},f,{value:void 0});d=B({},d,{value:void 0});a=[];break;case "textarea":f=
209
+ Cd(g,f);d=Cd(g,d);a=[];break;default:"function"!==typeof f.onClick&&"function"===typeof d.onClick&&(g.onclick=tc)}Ed(c,d);g=c=void 0;var h=null;for(c in f)if(!d.hasOwnProperty(c)&&f.hasOwnProperty(c)&&null!=f[c])if("style"===c){var l=f[c];for(g in l)l.hasOwnProperty(g)&&(h||(h={}),h[g]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(Oa.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in d){var k=
210
+ d[c];l=null!=f?f[c]:void 0;if(d.hasOwnProperty(c)&&k!==l&&(null!=k||null!=l))if("style"===c)if(l){for(g in l)!l.hasOwnProperty(g)||k&&k.hasOwnProperty(g)||(h||(h={}),h[g]="");for(g in k)k.hasOwnProperty(g)&&l[g]!==k[g]&&(h||(h={}),h[g]=k[g])}else h||(a||(a=[]),a.push(c,h)),h=k;else"dangerouslySetInnerHTML"===c?(k=k?k.__html:void 0,l=l?l.__html:void 0,null!=k&&l!==k&&(a=a||[]).push(c,""+k)):"children"===c?l===k||"string"!==typeof k&&"number"!==typeof k||(a=a||[]).push(c,""+k):"suppressContentEditableWarning"!==
211
+ c&&"suppressHydrationWarning"!==c&&(Oa.hasOwnProperty(c)?(null!=k&&ha(e,c),a||l===k||(a=[])):(a=a||[]).push(c,k))}h&&(a=a||[]).push("style",h);e=a;(b.updateQueue=e)&&Pb(b)}};Pg=function(a,b,c,d){c!==d&&Pb(b)};var ki="function"===typeof WeakSet?WeakSet:Set,xi="function"===typeof WeakMap?WeakMap:Map,qe=Ma.ReactCurrentDispatcher,Kg=Ma.ReactCurrentOwner,ze=1073741822,Ca=!1,x=null,Y=null,H=0,La=-1,je=!1,p=null,Lc=!1,ke=null,Jc=null,Ic=null,Ba=null,ba=null,I=null,Oc=0,Pc=void 0,w=!1,ca=null,C=0,oa=0,lb=
212
+ !1,Uc=null,z=!1,Rc=!1,kb=null,ve=ue(),aa=1073741822-(ve/10|0),jb=aa,Ci=50,Tb=0,we=null,Tc=!1;id=function(a,b,c){switch(b){case "input":td(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=dd(d);e?void 0:n("90");cf(d);td(d,e)}}}break;case "textarea":Jf(a,c);break;case "select":b=c.value,null!=b&&Xa(a,!!c.multiple,b,!1)}};Vb.prototype.render=
213
+ function(a){this._defer?void 0:n("250");this._hasChildren=!0;this._children=a;var b=this._root._internalRoot,c=this._expirationTime,d=new mb;bh(a,b,null,c,d._onCommit);return d};Vb.prototype.then=function(a){if(this._didComplete)a();else{var b=this._callbacks;null===b&&(b=this._callbacks=[]);b.push(a)}};Vb.prototype.commit=function(){var a=this._root._internalRoot,b=a.firstBatch;this._defer&&null!==b?void 0:n("251");if(this._hasChildren){var c=this._expirationTime;if(b!==this){this._hasChildren&&
214
+ (c=this._expirationTime=b._expirationTime,this.render(this._children));for(var d=null,e=b;e!==this;)d=e,e=e._next;null===d?n("251"):void 0;d._next=e._next;this._next=b;a.firstBatch=this}this._defer=!1;Xg(a,c);b=this._next;this._next=null;b=a.firstBatch=b;null!==b&&b._hasChildren&&b.render(b._children)}else this._next=null,this._defer=!1};Vb.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var a=this._callbacks;if(null!==a)for(var b=0;b<a.length;b++)(0,a[b])()}};mb.prototype.then=
215
+ function(a){if(this._didCommit)a();else{var b=this._callbacks;null===b&&(b=this._callbacks=[]);b.push(a)}};mb.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var a=this._callbacks;if(null!==a)for(var b=0;b<a.length;b++){var c=a[b];"function"!==typeof c?n("191",c):void 0;c()}}};nb.prototype.render=function(a,b){var c=this._internalRoot,d=new mb;b=void 0===b?null:b;null!==b&&d.then(b);xe(a,c,null,d._onCommit);return d};nb.prototype.unmount=function(a){var b=this._internalRoot,
216
+ c=new mb;a=void 0===a?null:a;null!==a&&c.then(a);xe(null,b,null,c._onCommit);return c};nb.prototype.legacy_renderSubtreeIntoContainer=function(a,b,c){var d=this._internalRoot,e=new mb;c=void 0===c?null:c;null!==c&&e.then(c);xe(b,d,a,e._onCommit);return e};nb.prototype.createBatch=function(){var a=new Vb(this),b=a._expirationTime,c=this._internalRoot,d=c.firstBatch;if(null===d)c.firstBatch=a,a._next=null;else{for(c=null;null!==d&&d._expirationTime>=b;)c=d,d=d._next;a._next=d;null!==c&&(c._next=a)}return a};
217
+ (function(a,b,c){Ye=a;yf=b;Ze=c})(Zg,ah,function(){w||0===oa||(Z(oa,!1),oa=0)});var oh={createPortal:ch,findDOMNode:function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternalFiber;void 0===b&&("function"===typeof a.render?n("188"):n("268",Object.keys(a)));a=tf(b);a=null===a?null:a.stateNode;return a},hydrate:function(a,b,c){ob(b)?void 0:n("200");return Wc(null,a,b,!0,c)},render:function(a,b,c){ob(b)?void 0:n("200");return Wc(null,a,b,!1,c)},unstable_renderSubtreeIntoContainer:function(a,
218
+ b,c,d){ob(c)?void 0:n("200");null==a||void 0===a._reactInternalFiber?n("38"):void 0;return Wc(a,b,c,!1,d)},unmountComponentAtNode:function(a){ob(a)?void 0:n("40");return a._reactRootContainer?($g(function(){Wc(null,null,a,!1,function(){a._reactRootContainer=null})}),!0):!1},unstable_createPortal:function(){return ch.apply(void 0,arguments)},unstable_batchedUpdates:Zg,unstable_interactiveUpdates:ah,flushSync:function(a,b){w?n("187"):void 0;var c=z;z=!0;try{return Tg(a,b)}finally{z=c,Z(1073741823,!1)}},
219
+ unstable_createRoot:function(a,b){ob(a)?void 0:n("299","unstable_createRoot");return new nb(a,!0,null!=b&&!0===b.hydrate)},unstable_flushControlled:function(a){var b=z;z=!0;try{Tg(a)}finally{(z=b)||w||Z(1073741823,!1)}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{Events:[Je,Da,dd,Ae.injectEventPluginsByName,Zc,Qa,function(a){ad(a,xh)},Ve,We,oc,cd]}};(function(a){var b=a.findFiberByHostInstance;return ai(B({},a,{overrideProps:null,currentDispatcherRef:Ma.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=
220
+ tf(a);return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):null}}))})({findFiberByHostInstance:dc,bundleType:0,version:"16.8.5",rendererPackageName:"react-dom"});var ph={default:oh},qh=ph&&oh||ph;return qh.default||qh});
js/react.production.min.js ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /** @license React v16.8.5
2
+ * react.production.min.js
3
+ *
4
+ * Copyright (c) Facebook, Inc. and its affiliates.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ 'use strict';(function(N,q){"object"===typeof exports&&"undefined"!==typeof module?module.exports=q():"function"===typeof define&&define.amd?define(q):N.React=q()})(this,function(){function N(a,b,d,g,p,c,e,h){if(!a){a=void 0;if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var n=[d,g,p,c,e,h],f=0;a=Error(b.replace(/%s/g,function(){return n[f++]}));a.name="Invariant Violation"}a.framesToPop=1;
10
+ throw a;}}function q(a){for(var b=arguments.length-1,d="https://reactjs.org/docs/error-decoder.html?invariant="+a,g=0;g<b;g++)d+="&args[]="+encodeURIComponent(arguments[g+1]);N(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",d)}function t(a,b,d){this.props=a;this.context=b;this.refs=ba;this.updater=d||ca}function da(){}function O(a,b,d){this.props=a;this.context=b;this.refs=ba;this.updater=d||
11
+ ca}function u(){if(!x){var a=c.expirationTime;C?P():C=!0;D(ta,a)}}function Q(){var a=c,b=c.next;if(c===b)c=null;else{var d=c.previous;c=d.next=b;b.previous=d}a.next=a.previous=null;d=a.callback;b=a.expirationTime;a=a.priorityLevel;var g=f,p=E;f=a;E=b;try{var n=d()}finally{f=g,E=p}if("function"===typeof n)if(n={callback:n,priorityLevel:a,expirationTime:b,next:null,previous:null},null===c)c=n.next=n.previous=n;else{d=null;a=c;do{if(a.expirationTime>=b){d=a;break}a=a.next}while(a!==c);null===d?d=c:d===
12
+ c&&(c=n,u());b=d.previous;b.next=d.previous=n;n.next=d;n.previous=b}}function F(){if(-1===k&&null!==c&&1===c.priorityLevel){x=!0;try{do Q();while(null!==c&&1===c.priorityLevel)}finally{x=!1,null!==c?u():C=!1}}}function ta(a){x=!0;var b=G;G=a;try{if(a)for(;null!==c;){var d=l();if(c.expirationTime<=d){do Q();while(null!==c&&c.expirationTime<=d)}else break}else if(null!==c){do Q();while(null!==c&&!H())}}finally{x=!1,G=b,null!==c?u():C=!1,F()}}function ea(a,b,d){var g=void 0,p={},c=null,e=null;if(null!=
13
+ b)for(g in void 0!==b.ref&&(e=b.ref),void 0!==b.key&&(c=""+b.key),b)fa.call(b,g)&&!ha.hasOwnProperty(g)&&(p[g]=b[g]);var h=arguments.length-2;if(1===h)p.children=d;else if(1<h){for(var f=Array(h),k=0;k<h;k++)f[k]=arguments[k+2];p.children=f}if(a&&a.defaultProps)for(g in h=a.defaultProps,h)void 0===p[g]&&(p[g]=h[g]);return{$$typeof:y,type:a,key:c,ref:e,props:p,_owner:R.current}}function ua(a,b){return{$$typeof:y,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function S(a){return"object"===
14
+ typeof a&&null!==a&&a.$$typeof===y}function va(a){var b={"=":"=0",":":"=2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}function ia(a,b,d,g){if(I.length){var c=I.pop();c.result=a;c.keyPrefix=b;c.func=d;c.context=g;c.count=0;return c}return{result:a,keyPrefix:b,func:d,context:g,count:0}}function ja(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>I.length&&I.push(a)}function T(a,b,d,g){var c=typeof a;if("undefined"===c||"boolean"===c)a=null;var e=!1;if(null===
15
+ a)e=!0;else switch(c){case "string":case "number":e=!0;break;case "object":switch(a.$$typeof){case y:case wa:e=!0}}if(e)return d(g,a,""===b?"."+U(a,0):b),1;e=0;b=""===b?".":b+":";if(Array.isArray(a))for(var f=0;f<a.length;f++){c=a[f];var h=b+U(c,f);e+=T(c,h,d,g)}else if(null===a||"object"!==typeof a?h=null:(h=ka&&a[ka]||a["@@iterator"],h="function"===typeof h?h:null),"function"===typeof h)for(a=h.call(a),f=0;!(c=a.next()).done;)c=c.value,h=b+U(c,f++),e+=T(c,h,d,g);else"object"===c&&(d=""+a,q("31",
16
+ "[object Object]"===d?"object with keys {"+Object.keys(a).join(", ")+"}":d,""));return e}function V(a,b,d){return null==a?0:T(a,"",b,d)}function U(a,b){return"object"===typeof a&&null!==a&&null!=a.key?va(a.key):b.toString(36)}function xa(a,b,d){a.func.call(a.context,b,a.count++)}function ya(a,b,d){var g=a.result,c=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?W(a,g,d,function(a){return a}):null!=a&&(S(a)&&(a=ua(a,c+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(la,"$&/")+"/")+
17
+ d)),g.push(a))}function W(a,b,d,g,c){var e="";null!=d&&(e=(""+d).replace(la,"$&/")+"/");b=ia(b,e,g,c);V(a,ya,b);ja(b)}function m(){var a=ma.current;null===a?q("321"):void 0;return a}var e="function"===typeof Symbol&&Symbol.for,y=e?Symbol.for("react.element"):60103,wa=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,X=e?Symbol.for("react.strict_mode"):60108,za=e?Symbol.for("react.profiler"):60114,Aa=e?Symbol.for("react.provider"):60109,Ba=e?Symbol.for("react.context"):60110,
18
+ Ca=e?Symbol.for("react.concurrent_mode"):60111,Da=e?Symbol.for("react.forward_ref"):60112,Ea=e?Symbol.for("react.suspense"):60113,Fa=e?Symbol.for("react.memo"):60115,Ga=e?Symbol.for("react.lazy"):60116,ka="function"===typeof Symbol&&Symbol.iterator,na=Object.getOwnPropertySymbols,Ha=Object.prototype.hasOwnProperty,Ia=Object.prototype.propertyIsEnumerable,J=function(){try{if(!Object.assign)return!1;var a=new String("abc");a[5]="de";if("5"===Object.getOwnPropertyNames(a)[0])return!1;var b={};for(a=
19
+ 0;10>a;a++)b["_"+String.fromCharCode(a)]=a;if("0123456789"!==Object.getOwnPropertyNames(b).map(function(a){return b[a]}).join(""))return!1;var d={};"abcdefghijklmnopqrst".split("").forEach(function(a){d[a]=a});return"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},d)).join("")?!1:!0}catch(g){return!1}}()?Object.assign:function(a,b){if(null===a||void 0===a)throw new TypeError("Object.assign cannot be called with null or undefined");var d=Object(a);for(var c,e=1;e<arguments.length;e++){var f=Object(arguments[e]);
20
+ for(var k in f)Ha.call(f,k)&&(d[k]=f[k]);if(na){c=na(f);for(var h=0;h<c.length;h++)Ia.call(f,c[h])&&(d[c[h]]=f[c[h]])}}return d},ca={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,d){},enqueueReplaceState:function(a,b,d,c){},enqueueSetState:function(a,b,d,c){}},ba={};t.prototype.isReactComponent={};t.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?q("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};t.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,
21
+ a,"forceUpdate")};da.prototype=t.prototype;e=O.prototype=new da;e.constructor=O;J(e,t.prototype);e.isPureReactComponent=!0;var c=null,G=!1,f=3,k=-1,E=-1,x=!1,C=!1,Ja=Date,Ka="function"===typeof setTimeout?setTimeout:void 0,La="function"===typeof clearTimeout?clearTimeout:void 0,oa="function"===typeof requestAnimationFrame?requestAnimationFrame:void 0,pa="function"===typeof cancelAnimationFrame?cancelAnimationFrame:void 0,qa,ra,Y=function(a){qa=oa(function(b){La(ra);a(b)});ra=Ka(function(){pa(qa);
22
+ a(l())},100)};if("object"===typeof performance&&"function"===typeof performance.now){var Ma=performance;var l=function(){return Ma.now()}}else l=function(){return Ja.now()};e=null;"undefined"!==typeof window?e=window:"undefined"!==typeof global&&(e=global);if(e&&e._schedMock){e=e._schedMock;var D=e[0];var P=e[1];var H=e[2];l=e[3]}else if("undefined"===typeof window||"function"!==typeof MessageChannel){var v=null,Na=function(a){if(null!==v)try{v(a)}finally{v=null}};D=function(a,b){null!==v?setTimeout(D,
23
+ 0,a):(v=a,setTimeout(Na,0,!1))};P=function(){v=null};H=function(){return!1}}else{"undefined"!==typeof console&&("function"!==typeof oa&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!==typeof pa&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var w=null,K=!1,z=-1,A=!1,Z=!1,L=0,
24
+ M=33,B=33;H=function(){return L<=l()};e=new MessageChannel;var sa=e.port2;e.port1.onmessage=function(a){K=!1;a=w;var b=z;w=null;z=-1;var d=l(),c=!1;if(0>=L-d)if(-1!==b&&b<=d)c=!0;else{A||(A=!0,Y(aa));w=a;z=b;return}if(null!==a){Z=!0;try{a(c)}finally{Z=!1}}};var aa=function(a){if(null!==w){Y(aa);var b=a-L+B;b<B&&M<B?(8>b&&(b=8),B=b<M?M:b):M=b;L=a+B;K||(K=!0,sa.postMessage(void 0))}else A=!1};D=function(a,b){w=a;z=b;Z||0>b?sa.postMessage(void 0):A||(A=!0,Y(aa))};P=function(){w=null;K=!1;z=-1}}var Oa=
25
+ 0,ma={current:null},R={current:null};e={ReactCurrentDispatcher:ma,ReactCurrentOwner:R,assign:J};J(e,{Scheduler:{unstable_cancelCallback:function(a){var b=a.next;if(null!==b){if(b===a)c=null;else{a===c&&(c=b);var d=a.previous;d.next=b;b.previous=d}a.next=a.previous=null}},unstable_shouldYield:function(){return!G&&(null!==c&&c.expirationTime<E||H())},unstable_now:l,unstable_scheduleCallback:function(a,b){var d=-1!==k?k:l();if("object"===typeof b&&null!==b&&"number"===typeof b.timeout)b=d+b.timeout;
26
+ else switch(f){case 1:b=d+-1;break;case 2:b=d+250;break;case 5:b=d+1073741823;break;case 4:b=d+1E4;break;default:b=d+5E3}a={callback:a,priorityLevel:f,expirationTime:b,next:null,previous:null};if(null===c)c=a.next=a.previous=a,u();else{d=null;var g=c;do{if(g.expirationTime>b){d=g;break}g=g.next}while(g!==c);null===d?d=c:d===c&&(c=a,u());b=d.previous;b.next=d.previous=a;a.next=d;a.previous=b}return a},unstable_runWithPriority:function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=
27
+ 3}var d=f,c=k;f=a;k=l();try{return b()}finally{f=d,k=c,F()}},unstable_next:function(a){switch(f){case 1:case 2:case 3:var b=3;break;default:b=f}var d=f,c=k;f=b;k=l();try{return a()}finally{f=d,k=c,F()}},unstable_wrapCallback:function(a){var b=f;return function(){var d=f,c=k;f=b;k=l();try{return a.apply(this,arguments)}finally{f=d,k=c,F()}}},unstable_getFirstCallbackNode:function(){return c},unstable_pauseExecution:function(){},unstable_continueExecution:function(){null!==c&&u()},unstable_getCurrentPriorityLevel:function(){return f},
28
+ unstable_IdlePriority:5,unstable_ImmediatePriority:1,unstable_LowPriority:4,unstable_NormalPriority:3,unstable_UserBlockingPriority:2},SchedulerTracing:{__interactionsRef:null,__subscriberRef:null,unstable_clear:function(a){return a()},unstable_getCurrent:function(){return null},unstable_getThreadID:function(){return++Oa},unstable_subscribe:function(a){},unstable_trace:function(a,b,d){return d()},unstable_unsubscribe:function(a){},unstable_wrap:function(a){return a}}});var fa=Object.prototype.hasOwnProperty,
29
+ ha={key:!0,ref:!0,__self:!0,__source:!0},la=/\/+/g,I=[];r={Children:{map:function(a,b,d){if(null==a)return a;var c=[];W(a,c,null,b,d);return c},forEach:function(a,b,d){if(null==a)return a;b=ia(null,null,b,d);V(a,xa,b);ja(b)},count:function(a){return V(a,function(){return null},null)},toArray:function(a){var b=[];W(a,b,null,function(a){return a});return b},only:function(a){S(a)?void 0:q("143");return a}},createRef:function(){return{current:null}},Component:t,PureComponent:O,createContext:function(a,
30
+ b){void 0===b&&(b=null);a={$$typeof:Ba,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:Aa,_context:a};return a.Consumer=a},forwardRef:function(a){return{$$typeof:Da,render:a}},lazy:function(a){return{$$typeof:Ga,_ctor:a,_status:-1,_result:null}},memo:function(a,b){return{$$typeof:Fa,type:a,compare:void 0===b?null:b}},useCallback:function(a,b){return m().useCallback(a,b)},useContext:function(a,b){return m().useContext(a,b)},
31
+ useEffect:function(a,b){return m().useEffect(a,b)},useImperativeHandle:function(a,b,d){return m().useImperativeHandle(a,b,d)},useDebugValue:function(a,b){},useLayoutEffect:function(a,b){return m().useLayoutEffect(a,b)},useMemo:function(a,b){return m().useMemo(a,b)},useReducer:function(a,b,d){return m().useReducer(a,b,d)},useRef:function(a){return m().useRef(a)},useState:function(a){return m().useState(a)},Fragment:r,StrictMode:X,Suspense:Ea,createElement:ea,cloneElement:function(a,b,d){null===a||
32
+ void 0===a?q("267",a):void 0;var c=void 0,e=J({},a.props),f=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=R.current);void 0!==b.key&&(f=""+b.key);var l=void 0;a.type&&a.type.defaultProps&&(l=a.type.defaultProps);for(c in b)fa.call(b,c)&&!ha.hasOwnProperty(c)&&(e[c]=void 0===b[c]&&void 0!==l?l[c]:b[c])}c=arguments.length-2;if(1===c)e.children=d;else if(1<c){l=Array(c);for(var m=0;m<c;m++)l[m]=arguments[m+2];e.children=l}return{$$typeof:y,type:a.type,key:f,ref:k,props:e,_owner:h}},
33
+ createFactory:function(a){var b=ea.bind(null,a);b.type=a;return b},isValidElement:S,version:"16.8.5",unstable_ConcurrentMode:Ca,unstable_Profiler:za,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:e};r=(X={default:r},r)||X;return r.default||r});
js/visual.js DELETED
@@ -1,81161 +0,0 @@
1
- webpackJsonp([0],[
2
- /* 0 */
3
- /***/ (function(module, exports, __webpack_require__) {
4
-
5
- /* WEBPACK VAR INJECTION */(function(process) {/**
6
- * Copyright (c) 2013-present, Facebook, Inc.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */
11
-
12
- if (process.env.NODE_ENV !== 'production') {
13
- var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
14
- Symbol.for &&
15
- Symbol.for('react.element')) ||
16
- 0xeac7;
17
-
18
- var isValidElement = function(object) {
19
- return typeof object === 'object' &&
20
- object !== null &&
21
- object.$$typeof === REACT_ELEMENT_TYPE;
22
- };
23
-
24
- // By explicitly using `prop-types` you are opting into new development behavior.
25
- // http://fb.me/prop-types-in-prod
26
- var throwOnDirectAccess = true;
27
- module.exports = __webpack_require__(258)(isValidElement, throwOnDirectAccess);
28
- } else {
29
- // By explicitly using `prop-types` you are opting into new production behavior.
30
- // http://fb.me/prop-types-in-prod
31
- module.exports = __webpack_require__(259)();
32
- }
33
-
34
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
35
-
36
- /***/ }),
37
- /* 1 */,
38
- /* 2 */
39
- /***/ (function(module, exports, __webpack_require__) {
40
-
41
- "use strict";
42
-
43
-
44
- exports.__esModule = true;
45
-
46
- exports.default = function (instance, Constructor) {
47
- if (!(instance instanceof Constructor)) {
48
- throw new TypeError("Cannot call a class as a function");
49
- }
50
- };
51
-
52
- /***/ }),
53
- /* 3 */,
54
- /* 4 */
55
- /***/ (function(module, exports, __webpack_require__) {
56
-
57
- "use strict";
58
-
59
-
60
- exports.__esModule = true;
61
-
62
- var _defineProperty = __webpack_require__(61);
63
-
64
- var _defineProperty2 = _interopRequireDefault(_defineProperty);
65
-
66
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
67
-
68
- exports.default = function () {
69
- function defineProperties(target, props) {
70
- for (var i = 0; i < props.length; i++) {
71
- var descriptor = props[i];
72
- descriptor.enumerable = descriptor.enumerable || false;
73
- descriptor.configurable = true;
74
- if ("value" in descriptor) descriptor.writable = true;
75
- (0, _defineProperty2.default)(target, descriptor.key, descriptor);
76
- }
77
- }
78
-
79
- return function (Constructor, protoProps, staticProps) {
80
- if (protoProps) defineProperties(Constructor.prototype, protoProps);
81
- if (staticProps) defineProperties(Constructor, staticProps);
82
- return Constructor;
83
- };
84
- }();
85
-
86
- /***/ }),
87
- /* 5 */
88
- /***/ (function(module, exports, __webpack_require__) {
89
-
90
- "use strict";
91
-
92
-
93
- exports.__esModule = true;
94
-
95
- var _typeof2 = __webpack_require__(29);
96
-
97
- var _typeof3 = _interopRequireDefault(_typeof2);
98
-
99
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
100
-
101
- exports.default = function (self, call) {
102
- if (!self) {
103
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
104
- }
105
-
106
- return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self;
107
- };
108
-
109
- /***/ }),
110
- /* 6 */
111
- /***/ (function(module, exports, __webpack_require__) {
112
-
113
- "use strict";
114
-
115
-
116
- exports.__esModule = true;
117
-
118
- var _setPrototypeOf = __webpack_require__(90);
119
-
120
- var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);
121
-
122
- var _create = __webpack_require__(94);
123
-
124
- var _create2 = _interopRequireDefault(_create);
125
-
126
- var _typeof2 = __webpack_require__(29);
127
-
128
- var _typeof3 = _interopRequireDefault(_typeof2);
129
-
130
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
131
-
132
- exports.default = function (subClass, superClass) {
133
- if (typeof superClass !== "function" && superClass !== null) {
134
- throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass)));
135
- }
136
-
137
- subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {
138
- constructor: {
139
- value: subClass,
140
- enumerable: false,
141
- writable: true,
142
- configurable: true
143
- }
144
- });
145
- if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;
146
- };
147
-
148
- /***/ }),
149
- /* 7 */
150
- /***/ (function(module, exports, __webpack_require__) {
151
-
152
- "use strict";
153
-
154
-
155
- exports.__esModule = true;
156
-
157
- var _assign = __webpack_require__(68);
158
-
159
- var _assign2 = _interopRequireDefault(_assign);
160
-
161
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
162
-
163
- exports.default = _assign2.default || function (target) {
164
- for (var i = 1; i < arguments.length; i++) {
165
- var source = arguments[i];
166
-
167
- for (var key in source) {
168
- if (Object.prototype.hasOwnProperty.call(source, key)) {
169
- target[key] = source[key];
170
- }
171
- }
172
- }
173
-
174
- return target;
175
- };
176
-
177
- /***/ }),
178
- /* 8 */,
179
- /* 9 */
180
- /***/ (function(module, exports, __webpack_require__) {
181
-
182
- module.exports = { "default": __webpack_require__(86), __esModule: true };
183
-
184
- /***/ }),
185
- /* 10 */
186
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
187
-
188
- "use strict";
189
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
190
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1);
191
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
192
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_ScalingCellSizeAndPositionManager__ = __webpack_require__(137);
193
-
194
-
195
-
196
- var babelPluginFlowReactPropTypes_proptype_CellPosition = {
197
- columnIndex: __webpack_require__(0).number.isRequired,
198
- rowIndex: __webpack_require__(0).number.isRequired
199
- };
200
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_CellPosition', {
201
- value: babelPluginFlowReactPropTypes_proptype_CellPosition,
202
- configurable: true
203
- });
204
- var babelPluginFlowReactPropTypes_proptype_CellRendererParams = {
205
- columnIndex: __webpack_require__(0).number.isRequired,
206
- isScrolling: __webpack_require__(0).bool.isRequired,
207
- isVisible: __webpack_require__(0).bool.isRequired,
208
- key: __webpack_require__(0).string.isRequired,
209
- parent: __webpack_require__(0).object.isRequired,
210
- rowIndex: __webpack_require__(0).number.isRequired,
211
- style: __webpack_require__(0).object.isRequired
212
- };
213
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_CellRendererParams', {
214
- value: babelPluginFlowReactPropTypes_proptype_CellRendererParams,
215
- configurable: true
216
- });
217
-
218
- var babelPluginFlowReactPropTypes_proptype_CellRenderer = __webpack_require__(0).func;
219
-
220
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_CellRenderer', {
221
- value: babelPluginFlowReactPropTypes_proptype_CellRenderer,
222
- configurable: true
223
- });
224
- var babelPluginFlowReactPropTypes_proptype_CellRangeRendererParams = {
225
- cellCache: __webpack_require__(0).object.isRequired,
226
- cellRenderer: __webpack_require__(0).func.isRequired,
227
- columnSizeAndPositionManager: typeof __WEBPACK_IMPORTED_MODULE_1__utils_ScalingCellSizeAndPositionManager__["a" /* default */] === 'function' ? __webpack_require__(0).instanceOf(__WEBPACK_IMPORTED_MODULE_1__utils_ScalingCellSizeAndPositionManager__["a" /* default */]).isRequired : __webpack_require__(0).any.isRequired,
228
- columnStartIndex: __webpack_require__(0).number.isRequired,
229
- columnStopIndex: __webpack_require__(0).number.isRequired,
230
- deferredMeasurementCache: __webpack_require__(0).object,
231
- horizontalOffsetAdjustment: __webpack_require__(0).number.isRequired,
232
- isScrolling: __webpack_require__(0).bool.isRequired,
233
- parent: __webpack_require__(0).object.isRequired,
234
- rowSizeAndPositionManager: typeof __WEBPACK_IMPORTED_MODULE_1__utils_ScalingCellSizeAndPositionManager__["a" /* default */] === 'function' ? __webpack_require__(0).instanceOf(__WEBPACK_IMPORTED_MODULE_1__utils_ScalingCellSizeAndPositionManager__["a" /* default */]).isRequired : __webpack_require__(0).any.isRequired,
235
- rowStartIndex: __webpack_require__(0).number.isRequired,
236
- rowStopIndex: __webpack_require__(0).number.isRequired,
237
- scrollLeft: __webpack_require__(0).number.isRequired,
238
- scrollTop: __webpack_require__(0).number.isRequired,
239
- styleCache: __webpack_require__(0).object.isRequired,
240
- verticalOffsetAdjustment: __webpack_require__(0).number.isRequired,
241
- visibleColumnIndices: __webpack_require__(0).object.isRequired,
242
- visibleRowIndices: __webpack_require__(0).object.isRequired
243
- };
244
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_CellRangeRendererParams', {
245
- value: babelPluginFlowReactPropTypes_proptype_CellRangeRendererParams,
246
- configurable: true
247
- });
248
-
249
- var babelPluginFlowReactPropTypes_proptype_CellRangeRenderer = __webpack_require__(0).func;
250
-
251
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_CellRangeRenderer', {
252
- value: babelPluginFlowReactPropTypes_proptype_CellRangeRenderer,
253
- configurable: true
254
- });
255
-
256
- var babelPluginFlowReactPropTypes_proptype_CellSizeGetter = __webpack_require__(0).func;
257
-
258
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_CellSizeGetter', {
259
- value: babelPluginFlowReactPropTypes_proptype_CellSizeGetter,
260
- configurable: true
261
- });
262
-
263
- var babelPluginFlowReactPropTypes_proptype_CellSize = __webpack_require__(0).oneOfType([__webpack_require__(0).func, __webpack_require__(0).number]);
264
-
265
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_CellSize', {
266
- value: babelPluginFlowReactPropTypes_proptype_CellSize,
267
- configurable: true
268
- });
269
-
270
- var babelPluginFlowReactPropTypes_proptype_NoContentRenderer = __webpack_require__(0).func;
271
-
272
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_NoContentRenderer', {
273
- value: babelPluginFlowReactPropTypes_proptype_NoContentRenderer,
274
- configurable: true
275
- });
276
- var babelPluginFlowReactPropTypes_proptype_Scroll = {
277
- clientHeight: __webpack_require__(0).number.isRequired,
278
- clientWidth: __webpack_require__(0).number.isRequired,
279
- scrollHeight: __webpack_require__(0).number.isRequired,
280
- scrollLeft: __webpack_require__(0).number.isRequired,
281
- scrollTop: __webpack_require__(0).number.isRequired,
282
- scrollWidth: __webpack_require__(0).number.isRequired
283
- };
284
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_Scroll', {
285
- value: babelPluginFlowReactPropTypes_proptype_Scroll,
286
- configurable: true
287
- });
288
- var babelPluginFlowReactPropTypes_proptype_ScrollbarPresenceChange = {
289
- horizontal: __webpack_require__(0).bool.isRequired,
290
- vertical: __webpack_require__(0).bool.isRequired,
291
- size: __webpack_require__(0).number.isRequired
292
- };
293
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_ScrollbarPresenceChange', {
294
- value: babelPluginFlowReactPropTypes_proptype_ScrollbarPresenceChange,
295
- configurable: true
296
- });
297
- var babelPluginFlowReactPropTypes_proptype_RenderedSection = {
298
- columnOverscanStartIndex: __webpack_require__(0).number.isRequired,
299
- columnOverscanStopIndex: __webpack_require__(0).number.isRequired,
300
- columnStartIndex: __webpack_require__(0).number.isRequired,
301
- columnStopIndex: __webpack_require__(0).number.isRequired,
302
- rowOverscanStartIndex: __webpack_require__(0).number.isRequired,
303
- rowOverscanStopIndex: __webpack_require__(0).number.isRequired,
304
- rowStartIndex: __webpack_require__(0).number.isRequired,
305
- rowStopIndex: __webpack_require__(0).number.isRequired
306
- };
307
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_RenderedSection', {
308
- value: babelPluginFlowReactPropTypes_proptype_RenderedSection,
309
- configurable: true
310
- });
311
- var babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetterParams = {
312
- // One of SCROLL_DIRECTION_HORIZONTAL or SCROLL_DIRECTION_VERTICAL
313
- direction: __webpack_require__(0).oneOf(['horizontal', 'vertical']).isRequired,
314
-
315
-
316
- // One of SCROLL_DIRECTION_BACKWARD or SCROLL_DIRECTION_FORWARD
317
- scrollDirection: __webpack_require__(0).oneOf([-1, 1]).isRequired,
318
-
319
-
320
- // Number of rows or columns in the current axis
321
- cellCount: __webpack_require__(0).number.isRequired,
322
-
323
-
324
- // Maximum number of cells to over-render in either direction
325
- overscanCellsCount: __webpack_require__(0).number.isRequired,
326
-
327
-
328
- // Begin of range of visible cells
329
- startIndex: __webpack_require__(0).number.isRequired,
330
-
331
-
332
- // End of range of visible cells
333
- stopIndex: __webpack_require__(0).number.isRequired
334
- };
335
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetterParams', {
336
- value: babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetterParams,
337
- configurable: true
338
- });
339
- var babelPluginFlowReactPropTypes_proptype_OverscanIndices = {
340
- overscanStartIndex: __webpack_require__(0).number.isRequired,
341
- overscanStopIndex: __webpack_require__(0).number.isRequired
342
- };
343
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_OverscanIndices', {
344
- value: babelPluginFlowReactPropTypes_proptype_OverscanIndices,
345
- configurable: true
346
- });
347
-
348
- var babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetter = __webpack_require__(0).func;
349
-
350
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetter', {
351
- value: babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetter,
352
- configurable: true
353
- });
354
-
355
- var babelPluginFlowReactPropTypes_proptype_Alignment = __webpack_require__(0).oneOf(['auto', 'end', 'start', 'center']);
356
-
357
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_Alignment', {
358
- value: babelPluginFlowReactPropTypes_proptype_Alignment,
359
- configurable: true
360
- });
361
- var babelPluginFlowReactPropTypes_proptype_VisibleCellRange = {
362
- start: __webpack_require__(0).number,
363
- stop: __webpack_require__(0).number
364
- };
365
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_VisibleCellRange', {
366
- value: babelPluginFlowReactPropTypes_proptype_VisibleCellRange,
367
- configurable: true
368
- });
369
-
370
- /***/ }),
371
- /* 11 */,
372
- /* 12 */,
373
- /* 13 */,
374
- /* 14 */,
375
- /* 15 */
376
- /***/ (function(module, exports) {
377
-
378
- /*
379
- MIT License http://www.opensource.org/licenses/mit-license.php
380
- Author Tobias Koppers @sokra
381
- */
382
- // css base code, injected by the css-loader
383
- module.exports = function(useSourceMap) {
384
- var list = [];
385
-
386
- // return the list of modules as css string
387
- list.toString = function toString() {
388
- return this.map(function (item) {
389
- var content = cssWithMappingToString(item, useSourceMap);
390
- if(item[2]) {
391
- return "@media " + item[2] + "{" + content + "}";
392
- } else {
393
- return content;
394
- }
395
- }).join("");
396
- };
397
-
398
- // import a list of modules into the list
399
- list.i = function(modules, mediaQuery) {
400
- if(typeof modules === "string")
401
- modules = [[null, modules, ""]];
402
- var alreadyImportedModules = {};
403
- for(var i = 0; i < this.length; i++) {
404
- var id = this[i][0];
405
- if(typeof id === "number")
406
- alreadyImportedModules[id] = true;
407
- }
408
- for(i = 0; i < modules.length; i++) {
409
- var item = modules[i];
410
- // skip already imported module
411
- // this implementation is not 100% perfect for weird media query combinations
412
- // when a module is imported multiple times with different media queries.
413
- // I hope this will never occur (Hey this way we have smaller bundles)
414
- if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
415
- if(mediaQuery && !item[2]) {
416
- item[2] = mediaQuery;
417
- } else if(mediaQuery) {
418
- item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
419
- }
420
- list.push(item);
421
- }
422
- }
423
- };
424
- return list;
425
- };
426
-
427
- function cssWithMappingToString(item, useSourceMap) {
428
- var content = item[1] || '';
429
- var cssMapping = item[3];
430
- if (!cssMapping) {
431
- return content;
432
- }
433
-
434
- if (useSourceMap && typeof btoa === 'function') {
435
- var sourceMapping = toComment(cssMapping);
436
- var sourceURLs = cssMapping.sources.map(function (source) {
437
- return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'
438
- });
439
-
440
- return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
441
- }
442
-
443
- return [content].join('\n');
444
- }
445
-
446
- // Adapted from convert-source-map (MIT)
447
- function toComment(sourceMap) {
448
- // eslint-disable-next-line no-undef
449
- var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
450
- var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
451
-
452
- return '/*# ' + data + ' */';
453
- }
454
-
455
-
456
- /***/ }),
457
- /* 16 */
458
- /***/ (function(module, exports, __webpack_require__) {
459
-
460
- /*
461
- MIT License http://www.opensource.org/licenses/mit-license.php
462
- Author Tobias Koppers @sokra
463
- */
464
-
465
- var stylesInDom = {};
466
-
467
- var memoize = function (fn) {
468
- var memo;
469
-
470
- return function () {
471
- if (typeof memo === "undefined") memo = fn.apply(this, arguments);
472
- return memo;
473
- };
474
- };
475
-
476
- var isOldIE = memoize(function () {
477
- // Test for IE <= 9 as proposed by Browserhacks
478
- // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
479
- // Tests for existence of standard globals is to allow style-loader
480
- // to operate correctly into non-standard environments
481
- // @see https://github.com/webpack-contrib/style-loader/issues/177
482
- return window && document && document.all && !window.atob;
483
- });
484
-
485
- var getElement = (function (fn) {
486
- var memo = {};
487
-
488
- return function(selector) {
489
- if (typeof memo[selector] === "undefined") {
490
- var styleTarget = fn.call(this, selector);
491
- // Special case to return head of iframe instead of iframe itself
492
- if (styleTarget instanceof window.HTMLIFrameElement) {
493
- try {
494
- // This will throw an exception if access to iframe is blocked
495
- // due to cross-origin restrictions
496
- styleTarget = styleTarget.contentDocument.head;
497
- } catch(e) {
498
- styleTarget = null;
499
- }
500
- }
501
- memo[selector] = styleTarget;
502
- }
503
- return memo[selector]
504
- };
505
- })(function (target) {
506
- return document.querySelector(target)
507
- });
508
-
509
- var singleton = null;
510
- var singletonCounter = 0;
511
- var stylesInsertedAtTop = [];
512
-
513
- var fixUrls = __webpack_require__(104);
514
-
515
- module.exports = function(list, options) {
516
- if (typeof DEBUG !== "undefined" && DEBUG) {
517
- if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
518
- }
519
-
520
- options = options || {};
521
-
522
- options.attrs = typeof options.attrs === "object" ? options.attrs : {};
523
-
524
- // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
525
- // tags it will allow on a page
526
- if (!options.singleton) options.singleton = isOldIE();
527
-
528
- // By default, add <style> tags to the <head> element
529
- if (!options.insertInto) options.insertInto = "head";
530
-
531
- // By default, add <style> tags to the bottom of the target
532
- if (!options.insertAt) options.insertAt = "bottom";
533
-
534
- var styles = listToStyles(list, options);
535
-
536
- addStylesToDom(styles, options);
537
-
538
- return function update (newList) {
539
- var mayRemove = [];
540
-
541
- for (var i = 0; i < styles.length; i++) {
542
- var item = styles[i];
543
- var domStyle = stylesInDom[item.id];
544
-
545
- domStyle.refs--;
546
- mayRemove.push(domStyle);
547
- }
548
-
549
- if(newList) {
550
- var newStyles = listToStyles(newList, options);
551
- addStylesToDom(newStyles, options);
552
- }
553
-
554
- for (var i = 0; i < mayRemove.length; i++) {
555
- var domStyle = mayRemove[i];
556
-
557
- if(domStyle.refs === 0) {
558
- for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();
559
-
560
- delete stylesInDom[domStyle.id];
561
- }
562
- }
563
- };
564
- };
565
-
566
- function addStylesToDom (styles, options) {
567
- for (var i = 0; i < styles.length; i++) {
568
- var item = styles[i];
569
- var domStyle = stylesInDom[item.id];
570
-
571
- if(domStyle) {
572
- domStyle.refs++;
573
-
574
- for(var j = 0; j < domStyle.parts.length; j++) {
575
- domStyle.parts[j](item.parts[j]);
576
- }
577
-
578
- for(; j < item.parts.length; j++) {
579
- domStyle.parts.push(addStyle(item.parts[j], options));
580
- }
581
- } else {
582
- var parts = [];
583
-
584
- for(var j = 0; j < item.parts.length; j++) {
585
- parts.push(addStyle(item.parts[j], options));
586
- }
587
-
588
- stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
589
- }
590
- }
591
- }
592
-
593
- function listToStyles (list, options) {
594
- var styles = [];
595
- var newStyles = {};
596
-
597
- for (var i = 0; i < list.length; i++) {
598
- var item = list[i];
599
- var id = options.base ? item[0] + options.base : item[0];
600
- var css = item[1];
601
- var media = item[2];
602
- var sourceMap = item[3];
603
- var part = {css: css, media: media, sourceMap: sourceMap};
604
-
605
- if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
606
- else newStyles[id].parts.push(part);
607
- }
608
-
609
- return styles;
610
- }
611
-
612
- function insertStyleElement (options, style) {
613
- var target = getElement(options.insertInto)
614
-
615
- if (!target) {
616
- throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
617
- }
618
-
619
- var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];
620
-
621
- if (options.insertAt === "top") {
622
- if (!lastStyleElementInsertedAtTop) {
623
- target.insertBefore(style, target.firstChild);
624
- } else if (lastStyleElementInsertedAtTop.nextSibling) {
625
- target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
626
- } else {
627
- target.appendChild(style);
628
- }
629
- stylesInsertedAtTop.push(style);
630
- } else if (options.insertAt === "bottom") {
631
- target.appendChild(style);
632
- } else if (typeof options.insertAt === "object" && options.insertAt.before) {
633
- var nextSibling = getElement(options.insertInto + " " + options.insertAt.before);
634
- target.insertBefore(style, nextSibling);
635
- } else {
636
- throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
637
- }
638
- }
639
-
640
- function removeStyleElement (style) {
641
- if (style.parentNode === null) return false;
642
- style.parentNode.removeChild(style);
643
-
644
- var idx = stylesInsertedAtTop.indexOf(style);
645
- if(idx >= 0) {
646
- stylesInsertedAtTop.splice(idx, 1);
647
- }
648
- }
649
-
650
- function createStyleElement (options) {
651
- var style = document.createElement("style");
652
-
653
- options.attrs.type = "text/css";
654
-
655
- addAttrs(style, options.attrs);
656
- insertStyleElement(options, style);
657
-
658
- return style;
659
- }
660
-
661
- function createLinkElement (options) {
662
- var link = document.createElement("link");
663
-
664
- options.attrs.type = "text/css";
665
- options.attrs.rel = "stylesheet";
666
-
667
- addAttrs(link, options.attrs);
668
- insertStyleElement(options, link);
669
-
670
- return link;
671
- }
672
-
673
- function addAttrs (el, attrs) {
674
- Object.keys(attrs).forEach(function (key) {
675
- el.setAttribute(key, attrs[key]);
676
- });
677
- }
678
-
679
- function addStyle (obj, options) {
680
- var style, update, remove, result;
681
-
682
- // If a transform function was defined, run it on the css
683
- if (options.transform && obj.css) {
684
- result = options.transform(obj.css);
685
-
686
- if (result) {
687
- // If transform returns a value, use that instead of the original css.
688
- // This allows running runtime transformations on the css.
689
- obj.css = result;
690
- } else {
691
- // If the transform function returns a falsy value, don't add this css.
692
- // This allows conditional loading of css
693
- return function() {
694
- // noop
695
- };
696
- }
697
- }
698
-
699
- if (options.singleton) {
700
- var styleIndex = singletonCounter++;
701
-
702
- style = singleton || (singleton = createStyleElement(options));
703
-
704
- update = applyToSingletonTag.bind(null, style, styleIndex, false);
705
- remove = applyToSingletonTag.bind(null, style, styleIndex, true);
706
-
707
- } else if (
708
- obj.sourceMap &&
709
- typeof URL === "function" &&
710
- typeof URL.createObjectURL === "function" &&
711
- typeof URL.revokeObjectURL === "function" &&
712
- typeof Blob === "function" &&
713
- typeof btoa === "function"
714
- ) {
715
- style = createLinkElement(options);
716
- update = updateLink.bind(null, style, options);
717
- remove = function () {
718
- removeStyleElement(style);
719
-
720
- if(style.href) URL.revokeObjectURL(style.href);
721
- };
722
- } else {
723
- style = createStyleElement(options);
724
- update = applyToTag.bind(null, style);
725
- remove = function () {
726
- removeStyleElement(style);
727
- };
728
- }
729
-
730
- update(obj);
731
-
732
- return function updateStyle (newObj) {
733
- if (newObj) {
734
- if (
735
- newObj.css === obj.css &&
736
- newObj.media === obj.media &&
737
- newObj.sourceMap === obj.sourceMap
738
- ) {
739
- return;
740
- }
741
-
742
- update(obj = newObj);
743
- } else {
744
- remove();
745
- }
746
- };
747
- }
748
-
749
- var replaceText = (function () {
750
- var textStore = [];
751
-
752
- return function (index, replacement) {
753
- textStore[index] = replacement;
754
-
755
- return textStore.filter(Boolean).join('\n');
756
- };
757
- })();
758
-
759
- function applyToSingletonTag (style, index, remove, obj) {
760
- var css = remove ? "" : obj.css;
761
-
762
- if (style.styleSheet) {
763
- style.styleSheet.cssText = replaceText(index, css);
764
- } else {
765
- var cssNode = document.createTextNode(css);
766
- var childNodes = style.childNodes;
767
-
768
- if (childNodes[index]) style.removeChild(childNodes[index]);
769
-
770
- if (childNodes.length) {
771
- style.insertBefore(cssNode, childNodes[index]);
772
- } else {
773
- style.appendChild(cssNode);
774
- }
775
- }
776
- }
777
-
778
- function applyToTag (style, obj) {
779
- var css = obj.css;
780
- var media = obj.media;
781
-
782
- if(media) {
783
- style.setAttribute("media", media)
784
- }
785
-
786
- if(style.styleSheet) {
787
- style.styleSheet.cssText = css;
788
- } else {
789
- while(style.firstChild) {
790
- style.removeChild(style.firstChild);
791
- }
792
-
793
- style.appendChild(document.createTextNode(css));
794
- }
795
- }
796
-
797
- function updateLink (link, options, obj) {
798
- var css = obj.css;
799
- var sourceMap = obj.sourceMap;
800
-
801
- /*
802
- If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
803
- and there is no publicPath defined then lets turn convertToAbsoluteUrls
804
- on by default. Otherwise default to the convertToAbsoluteUrls option
805
- directly
806
- */
807
- var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;
808
-
809
- if (options.convertToAbsoluteUrls || autoFixUrls) {
810
- css = fixUrls(css);
811
- }
812
-
813
- if (sourceMap) {
814
- // http://stackoverflow.com/a/26603875
815
- css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
816
- }
817
-
818
- var blob = new Blob([css], { type: "text/css" });
819
-
820
- var oldSrc = link.href;
821
-
822
- link.href = URL.createObjectURL(blob);
823
-
824
- if(oldSrc) URL.revokeObjectURL(oldSrc);
825
- }
826
-
827
-
828
- /***/ }),
829
- /* 17 */
830
- /***/ (function(module, exports, __webpack_require__) {
831
-
832
- "use strict";
833
- /* WEBPACK VAR INJECTION */(function(process) {
834
-
835
- function checkDCE() {
836
- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
837
- if (
838
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
839
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
840
- ) {
841
- return;
842
- }
843
- if (process.env.NODE_ENV !== 'production') {
844
- // This branch is unreachable because this function is only called
845
- // in production, but the condition is true only in development.
846
- // Therefore if the branch is still here, dead code elimination wasn't
847
- // properly applied.
848
- // Don't change the message. React DevTools relies on it. Also make sure
849
- // this message doesn't occur elsewhere in this function, or it will cause
850
- // a false positive.
851
- throw new Error('^_^');
852
- }
853
- try {
854
- // Verify that the code above has been dead code eliminated (DCE'd).
855
- __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
856
- } catch (err) {
857
- // DevTools shouldn't crash React, no matter what.
858
- // We should still report in case we break this code.
859
- console.error(err);
860
- }
861
- }
862
-
863
- if (process.env.NODE_ENV === 'production') {
864
- // DCE check should happen before ReactDOM bundle executes so that
865
- // DevTools can report bad minification during injection.
866
- checkDCE();
867
- module.exports = __webpack_require__(237);
868
- } else {
869
- module.exports = __webpack_require__(240);
870
- }
871
-
872
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
873
-
874
- /***/ }),
875
- /* 18 */,
876
- /* 19 */,
877
- /* 20 */,
878
- /* 21 */
879
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
880
-
881
- "use strict";
882
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
883
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Grid__ = __webpack_require__(172);
884
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return __WEBPACK_IMPORTED_MODULE_0__Grid__["a"]; });
885
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Grid", function() { return __WEBPACK_IMPORTED_MODULE_0__Grid__["a"]; });
886
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__accessibilityOverscanIndicesGetter__ = __webpack_require__(268);
887
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "accessibilityOverscanIndicesGetter", function() { return __WEBPACK_IMPORTED_MODULE_1__accessibilityOverscanIndicesGetter__["a"]; });
888
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__defaultCellRangeRenderer__ = __webpack_require__(174);
889
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultCellRangeRenderer", function() { return __WEBPACK_IMPORTED_MODULE_2__defaultCellRangeRenderer__["a"]; });
890
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__defaultOverscanIndicesGetter__ = __webpack_require__(173);
891
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultOverscanIndicesGetter", function() { return __WEBPACK_IMPORTED_MODULE_3__defaultOverscanIndicesGetter__["c"]; });
892
-
893
-
894
-
895
-
896
-
897
-
898
-
899
-
900
-
901
- /***/ }),
902
- /* 22 */
903
- /***/ (function(module, exports) {
904
-
905
- var g;
906
-
907
- // This works in non-strict mode
908
- g = (function() {
909
- return this;
910
- })();
911
-
912
- try {
913
- // This works if eval is allowed (see CSP)
914
- g = g || Function("return this")() || (1,eval)("this");
915
- } catch(e) {
916
- // This works if the window reference is available
917
- if(typeof window === "object")
918
- g = window;
919
- }
920
-
921
- // g can still be undefined, but nothing to do about it...
922
- // We return undefined, instead of nothing here, so it's
923
- // easier to handle this case. if(!global) { ...}
924
-
925
- module.exports = g;
926
-
927
-
928
- /***/ }),
929
- /* 23 */,
930
- /* 24 */,
931
- /* 25 */
932
- /***/ (function(module, exports, __webpack_require__) {
933
-
934
- "use strict";
935
- /* WEBPACK VAR INJECTION */(function(process) {/**
936
- * Copyright 2013-2015, Facebook, Inc.
937
- * All rights reserved.
938
- *
939
- * This source code is licensed under the BSD-style license found in the
940
- * LICENSE file in the root directory of this source tree. An additional grant
941
- * of patent rights can be found in the PATENTS file in the same directory.
942
- */
943
-
944
-
945
-
946
- /**
947
- * Use invariant() to assert state which your program assumes to be true.
948
- *
949
- * Provide sprintf-style format (only %s is supported) and arguments
950
- * to provide information about what broke and what you were
951
- * expecting.
952
- *
953
- * The invariant message will be stripped in production, but the invariant
954
- * will remain to ensure logic does not differ in production.
955
- */
956
-
957
- var invariant = function(condition, format, a, b, c, d, e, f) {
958
- if (process.env.NODE_ENV !== 'production') {
959
- if (format === undefined) {
960
- throw new Error('invariant requires an error message argument');
961
- }
962
- }
963
-
964
- if (!condition) {
965
- var error;
966
- if (format === undefined) {
967
- error = new Error(
968
- 'Minified exception occurred; use the non-minified dev environment ' +
969
- 'for the full error message and additional helpful warnings.'
970
- );
971
- } else {
972
- var args = [a, b, c, d, e, f];
973
- var argIndex = 0;
974
- error = new Error(
975
- format.replace(/%s/g, function() { return args[argIndex++]; })
976
- );
977
- error.name = 'Invariant Violation';
978
- }
979
-
980
- error.framesToPop = 1; // we don't care about invariant's own frame
981
- throw error;
982
- }
983
- };
984
-
985
- module.exports = invariant;
986
-
987
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
988
-
989
- /***/ }),
990
- /* 26 */,
991
- /* 27 */,
992
- /* 28 */,
993
- /* 29 */
994
- /***/ (function(module, exports, __webpack_require__) {
995
-
996
- "use strict";
997
-
998
-
999
- exports.__esModule = true;
1000
-
1001
- var _iterator = __webpack_require__(72);
1002
-
1003
- var _iterator2 = _interopRequireDefault(_iterator);
1004
-
1005
- var _symbol = __webpack_require__(74);
1006
-
1007
- var _symbol2 = _interopRequireDefault(_symbol);
1008
-
1009
- var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; };
1010
-
1011
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1012
-
1013
- exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
1014
- return typeof obj === "undefined" ? "undefined" : _typeof(obj);
1015
- } : function (obj) {
1016
- return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
1017
- };
1018
-
1019
- /***/ }),
1020
- /* 30 */
1021
- /***/ (function(module, exports, __webpack_require__) {
1022
-
1023
- exports.f = __webpack_require__(11);
1024
-
1025
-
1026
- /***/ }),
1027
- /* 31 */
1028
- /***/ (function(module, exports, __webpack_require__) {
1029
-
1030
- var global = __webpack_require__(13);
1031
- var core = __webpack_require__(3);
1032
- var LIBRARY = __webpack_require__(43);
1033
- var wksExt = __webpack_require__(30);
1034
- var defineProperty = __webpack_require__(14).f;
1035
- module.exports = function (name) {
1036
- var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
1037
- if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
1038
- };
1039
-
1040
-
1041
- /***/ }),
1042
- /* 32 */,
1043
- /* 33 */
1044
- /***/ (function(module, exports, __webpack_require__) {
1045
-
1046
- module.exports = { "default": __webpack_require__(84), __esModule: true };
1047
-
1048
- /***/ }),
1049
- /* 34 */,
1050
- /* 35 */,
1051
- /* 36 */,
1052
- /* 37 */,
1053
- /* 38 */,
1054
- /* 39 */
1055
- /***/ (function(module, exports, __webpack_require__) {
1056
-
1057
- var pIE = __webpack_require__(28);
1058
- var createDesc = __webpack_require__(36);
1059
- var toIObject = __webpack_require__(24);
1060
- var toPrimitive = __webpack_require__(50);
1061
- var has = __webpack_require__(23);
1062
- var IE8_DOM_DEFINE = __webpack_require__(109);
1063
- var gOPD = Object.getOwnPropertyDescriptor;
1064
-
1065
- exports.f = __webpack_require__(20) ? gOPD : function getOwnPropertyDescriptor(O, P) {
1066
- O = toIObject(O);
1067
- P = toPrimitive(P, true);
1068
- if (IE8_DOM_DEFINE) try {
1069
- return gOPD(O, P);
1070
- } catch (e) { /* empty */ }
1071
- if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
1072
- };
1073
-
1074
-
1075
- /***/ }),
1076
- /* 40 */
1077
- /***/ (function(module, exports, __webpack_require__) {
1078
-
1079
- var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
1080
- Copyright (c) 2016 Jed Watson.
1081
- Licensed under the MIT License (MIT), see
1082
- http://jedwatson.github.io/classnames
1083
- */
1084
- /* global define */
1085
-
1086
- (function () {
1087
- 'use strict';
1088
-
1089
- var hasOwn = {}.hasOwnProperty;
1090
-
1091
- function classNames () {
1092
- var classes = [];
1093
-
1094
- for (var i = 0; i < arguments.length; i++) {
1095
- var arg = arguments[i];
1096
- if (!arg) continue;
1097
-
1098
- var argType = typeof arg;
1099
-
1100
- if (argType === 'string' || argType === 'number') {
1101
- classes.push(arg);
1102
- } else if (Array.isArray(arg)) {
1103
- classes.push(classNames.apply(null, arg));
1104
- } else if (argType === 'object') {
1105
- for (var key in arg) {
1106
- if (hasOwn.call(arg, key) && arg[key]) {
1107
- classes.push(key);
1108
- }
1109
- }
1110
- }
1111
- }
1112
-
1113
- return classes.join(' ');
1114
- }
1115
-
1116
- if (typeof module !== 'undefined' && module.exports) {
1117
- module.exports = classNames;
1118
- } else if (true) {
1119
- // register as 'classnames', consistent with npm package name
1120
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () {
1121
- return classNames;
1122
- }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
1123
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
1124
- } else {
1125
- window.classNames = classNames;
1126
- }
1127
- }());
1128
-
1129
-
1130
- /***/ }),
1131
- /* 41 */
1132
- /***/ (function(module, exports) {
1133
-
1134
- module.exports = function(module) {
1135
- if(!module.webpackPolyfill) {
1136
- module.deprecate = function() {};
1137
- module.paths = [];
1138
- // module.parent = undefined by default
1139
- if(!module.children) module.children = [];
1140
- Object.defineProperty(module, "loaded", {
1141
- enumerable: true,
1142
- get: function() {
1143
- return module.l;
1144
- }
1145
- });
1146
- Object.defineProperty(module, "id", {
1147
- enumerable: true,
1148
- get: function() {
1149
- return module.i;
1150
- }
1151
- });
1152
- module.webpackPolyfill = 1;
1153
- }
1154
- return module;
1155
- };
1156
-
1157
-
1158
- /***/ }),
1159
- /* 42 */,
1160
- /* 43 */,
1161
- /* 44 */,
1162
- /* 45 */,
1163
- /* 46 */,
1164
- /* 47 */,
1165
- /* 48 */
1166
- /***/ (function(module, exports, __webpack_require__) {
1167
-
1168
- // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
1169
- var $keys = __webpack_require__(111);
1170
- var hiddenKeys = __webpack_require__(67).concat('length', 'prototype');
1171
-
1172
- exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
1173
- return $keys(O, hiddenKeys);
1174
- };
1175
-
1176
-
1177
- /***/ }),
1178
- /* 49 */
1179
- /***/ (function(module, exports, __webpack_require__) {
1180
-
1181
- "use strict";
1182
- /**
1183
- * Copyright (c) 2013-present, Facebook, Inc.
1184
- *
1185
- * This source code is licensed under the MIT license found in the
1186
- * LICENSE file in the root directory of this source tree.
1187
- *
1188
- */
1189
-
1190
-
1191
-
1192
- var React = __webpack_require__(1);
1193
- var factory = __webpack_require__(452);
1194
-
1195
- if (typeof React === 'undefined') {
1196
- throw Error(
1197
- 'create-react-class could not find the React object. If you are using script tags, ' +
1198
- 'make sure that React is being loaded before create-react-class.'
1199
- );
1200
- }
1201
-
1202
- // Hack to grab NoopUpdateQueue from isomorphic React
1203
- var ReactNoopUpdateQueue = new React.Component().updater;
1204
-
1205
- module.exports = factory(
1206
- React.Component,
1207
- React.isValidElement,
1208
- ReactNoopUpdateQueue
1209
- );
1210
-
1211
-
1212
- /***/ }),
1213
- /* 50 */,
1214
- /* 51 */,
1215
- /* 52 */
1216
- /***/ (function(module, exports, __webpack_require__) {
1217
-
1218
- var classof = __webpack_require__(53);
1219
- var ITERATOR = __webpack_require__(11)('iterator');
1220
- var Iterators = __webpack_require__(45);
1221
- module.exports = __webpack_require__(3).getIteratorMethod = function (it) {
1222
- if (it != undefined) return it[ITERATOR]
1223
- || it['@@iterator']
1224
- || Iterators[classof(it)];
1225
- };
1226
-
1227
-
1228
- /***/ }),
1229
- /* 53 */
1230
- /***/ (function(module, exports, __webpack_require__) {
1231
-
1232
- // getting tag from 19.1.3.6 Object.prototype.toString()
1233
- var cof = __webpack_require__(37);
1234
- var TAG = __webpack_require__(11)('toStringTag');
1235
- // ES3 wrong here
1236
- var ARG = cof(function () { return arguments; }()) == 'Arguments';
1237
-
1238
- // fallback for IE11 Script Access Denied error
1239
- var tryGet = function (it, key) {
1240
- try {
1241
- return it[key];
1242
- } catch (e) { /* empty */ }
1243
- };
1244
-
1245
- module.exports = function (it) {
1246
- var O, T, B;
1247
- return it === undefined ? 'Undefined' : it === null ? 'Null'
1248
- // @@toStringTag case
1249
- : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
1250
- // builtinTag case
1251
- : ARG ? cof(O)
1252
- // ES3 arguments fallback
1253
- : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
1254
- };
1255
-
1256
-
1257
- /***/ }),
1258
- /* 54 */
1259
- /***/ (function(module, exports, __webpack_require__) {
1260
-
1261
- var baseGetTag = __webpack_require__(115),
1262
- getPrototype = __webpack_require__(320),
1263
- isObjectLike = __webpack_require__(101);
1264
-
1265
- /** `Object#toString` result references. */
1266
- var objectTag = '[object Object]';
1267
-
1268
- /** Used for built-in method references. */
1269
- var funcProto = Function.prototype,
1270
- objectProto = Object.prototype;
1271
-
1272
- /** Used to resolve the decompiled source of functions. */
1273
- var funcToString = funcProto.toString;
1274
-
1275
- /** Used to check objects for own properties. */
1276
- var hasOwnProperty = objectProto.hasOwnProperty;
1277
-
1278
- /** Used to infer the `Object` constructor. */
1279
- var objectCtorString = funcToString.call(Object);
1280
-
1281
- /**
1282
- * Checks if `value` is a plain object, that is, an object created by the
1283
- * `Object` constructor or one with a `[[Prototype]]` of `null`.
1284
- *
1285
- * @static
1286
- * @memberOf _
1287
- * @since 0.8.0
1288
- * @category Lang
1289
- * @param {*} value The value to check.
1290
- * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
1291
- * @example
1292
- *
1293
- * function Foo() {
1294
- * this.a = 1;
1295
- * }
1296
- *
1297
- * _.isPlainObject(new Foo);
1298
- * // => false
1299
- *
1300
- * _.isPlainObject([1, 2, 3]);
1301
- * // => false
1302
- *
1303
- * _.isPlainObject({ 'x': 0, 'y': 0 });
1304
- * // => true
1305
- *
1306
- * _.isPlainObject(Object.create(null));
1307
- * // => true
1308
- */
1309
- function isPlainObject(value) {
1310
- if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
1311
- return false;
1312
- }
1313
- var proto = getPrototype(value);
1314
- if (proto === null) {
1315
- return true;
1316
- }
1317
- var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
1318
- return typeof Ctor == 'function' && Ctor instanceof Ctor &&
1319
- funcToString.call(Ctor) == objectCtorString;
1320
- }
1321
-
1322
- module.exports = isPlainObject;
1323
-
1324
-
1325
- /***/ }),
1326
- /* 55 */
1327
- /***/ (function(module, exports) {
1328
-
1329
- /**
1330
- * Checks if `value` is classified as an `Array` object.
1331
- *
1332
- * @static
1333
- * @memberOf _
1334
- * @since 0.1.0
1335
- * @category Lang
1336
- * @param {*} value The value to check.
1337
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
1338
- * @example
1339
- *
1340
- * _.isArray([1, 2, 3]);
1341
- * // => true
1342
- *
1343
- * _.isArray(document.body.children);
1344
- * // => false
1345
- *
1346
- * _.isArray('abc');
1347
- * // => false
1348
- *
1349
- * _.isArray(_.noop);
1350
- * // => false
1351
- */
1352
- var isArray = Array.isArray;
1353
-
1354
- module.exports = isArray;
1355
-
1356
-
1357
- /***/ }),
1358
- /* 56 */
1359
- /***/ (function(module, exports, __webpack_require__) {
1360
-
1361
- "use strict";
1362
- /* WEBPACK VAR INJECTION */(function(process) {/**
1363
- * Copyright (c) 2013-present, Facebook, Inc.
1364
- *
1365
- * This source code is licensed under the MIT license found in the
1366
- * LICENSE file in the root directory of this source tree.
1367
- *
1368
- */
1369
-
1370
-
1371
-
1372
- /**
1373
- * Use invariant() to assert state which your program assumes to be true.
1374
- *
1375
- * Provide sprintf-style format (only %s is supported) and arguments
1376
- * to provide information about what broke and what you were
1377
- * expecting.
1378
- *
1379
- * The invariant message will be stripped in production, but the invariant
1380
- * will remain to ensure logic does not differ in production.
1381
- */
1382
-
1383
- var validateFormat = function validateFormat(format) {};
1384
-
1385
- if (process.env.NODE_ENV !== 'production') {
1386
- validateFormat = function validateFormat(format) {
1387
- if (format === undefined) {
1388
- throw new Error('invariant requires an error message argument');
1389
- }
1390
- };
1391
- }
1392
-
1393
- function invariant(condition, format, a, b, c, d, e, f) {
1394
- validateFormat(format);
1395
-
1396
- if (!condition) {
1397
- var error;
1398
- if (format === undefined) {
1399
- error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
1400
- } else {
1401
- var args = [a, b, c, d, e, f];
1402
- var argIndex = 0;
1403
- error = new Error(format.replace(/%s/g, function () {
1404
- return args[argIndex++];
1405
- }));
1406
- error.name = 'Invariant Violation';
1407
- }
1408
-
1409
- error.framesToPop = 1; // we don't care about invariant's own frame
1410
- throw error;
1411
- }
1412
- }
1413
-
1414
- module.exports = invariant;
1415
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
1416
-
1417
- /***/ }),
1418
- /* 57 */,
1419
- /* 58 */
1420
- /***/ (function(module, exports) {
1421
-
1422
-
1423
-
1424
- /***/ }),
1425
- /* 59 */
1426
- /***/ (function(module, exports, __webpack_require__) {
1427
-
1428
- module.exports = { "default": __webpack_require__(134), __esModule: true };
1429
-
1430
- /***/ }),
1431
- /* 60 */,
1432
- /* 61 */
1433
- /***/ (function(module, exports, __webpack_require__) {
1434
-
1435
- module.exports = { "default": __webpack_require__(88), __esModule: true };
1436
-
1437
- /***/ }),
1438
- /* 62 */
1439
- /***/ (function(module, exports, __webpack_require__) {
1440
-
1441
- var babelPluginFlowReactPropTypes_proptype_Index = {
1442
- index: __webpack_require__(0).number.isRequired
1443
- };
1444
- if (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype_Index", {
1445
- value: babelPluginFlowReactPropTypes_proptype_Index,
1446
- configurable: true
1447
- });
1448
- var babelPluginFlowReactPropTypes_proptype_PositionInfo = {
1449
- x: __webpack_require__(0).number.isRequired,
1450
- y: __webpack_require__(0).number.isRequired
1451
- };
1452
- if (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype_PositionInfo", {
1453
- value: babelPluginFlowReactPropTypes_proptype_PositionInfo,
1454
- configurable: true
1455
- });
1456
- var babelPluginFlowReactPropTypes_proptype_ScrollPosition = {
1457
- scrollLeft: __webpack_require__(0).number.isRequired,
1458
- scrollTop: __webpack_require__(0).number.isRequired
1459
- };
1460
- if (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype_ScrollPosition", {
1461
- value: babelPluginFlowReactPropTypes_proptype_ScrollPosition,
1462
- configurable: true
1463
- });
1464
- var babelPluginFlowReactPropTypes_proptype_SizeAndPositionInfo = {
1465
- height: __webpack_require__(0).number.isRequired,
1466
- width: __webpack_require__(0).number.isRequired,
1467
- x: __webpack_require__(0).number.isRequired,
1468
- y: __webpack_require__(0).number.isRequired
1469
- };
1470
- if (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype_SizeAndPositionInfo", {
1471
- value: babelPluginFlowReactPropTypes_proptype_SizeAndPositionInfo,
1472
- configurable: true
1473
- });
1474
- var babelPluginFlowReactPropTypes_proptype_SizeInfo = {
1475
- height: __webpack_require__(0).number.isRequired,
1476
- width: __webpack_require__(0).number.isRequired
1477
- };
1478
- if (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype_SizeInfo", {
1479
- value: babelPluginFlowReactPropTypes_proptype_SizeInfo,
1480
- configurable: true
1481
- });
1482
-
1483
- /***/ }),
1484
- /* 63 */
1485
- /***/ (function(module, exports, __webpack_require__) {
1486
-
1487
- /* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/**
1488
- * @license
1489
- * Lodash <https://lodash.com/>
1490
- * Copyright JS Foundation and other contributors <https://js.foundation/>
1491
- * Released under MIT license <https://lodash.com/license>
1492
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1493
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1494
- */
1495
- ;(function() {
1496
-
1497
- /** Used as a safe reference for `undefined` in pre-ES5 environments. */
1498
- var undefined;
1499
-
1500
- /** Used as the semantic version number. */
1501
- var VERSION = '4.17.10';
1502
-
1503
- /** Used as the size to enable large array optimizations. */
1504
- var LARGE_ARRAY_SIZE = 200;
1505
-
1506
- /** Error message constants. */
1507
- var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
1508
- FUNC_ERROR_TEXT = 'Expected a function';
1509
-
1510
- /** Used to stand-in for `undefined` hash values. */
1511
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
1512
-
1513
- /** Used as the maximum memoize cache size. */
1514
- var MAX_MEMOIZE_SIZE = 500;
1515
-
1516
- /** Used as the internal argument placeholder. */
1517
- var PLACEHOLDER = '__lodash_placeholder__';
1518
-
1519
- /** Used to compose bitmasks for cloning. */
1520
- var CLONE_DEEP_FLAG = 1,
1521
- CLONE_FLAT_FLAG = 2,
1522
- CLONE_SYMBOLS_FLAG = 4;
1523
-
1524
- /** Used to compose bitmasks for value comparisons. */
1525
- var COMPARE_PARTIAL_FLAG = 1,
1526
- COMPARE_UNORDERED_FLAG = 2;
1527
-
1528
- /** Used to compose bitmasks for function metadata. */
1529
- var WRAP_BIND_FLAG = 1,
1530
- WRAP_BIND_KEY_FLAG = 2,
1531
- WRAP_CURRY_BOUND_FLAG = 4,
1532
- WRAP_CURRY_FLAG = 8,
1533
- WRAP_CURRY_RIGHT_FLAG = 16,
1534
- WRAP_PARTIAL_FLAG = 32,
1535
- WRAP_PARTIAL_RIGHT_FLAG = 64,
1536
- WRAP_ARY_FLAG = 128,
1537
- WRAP_REARG_FLAG = 256,
1538
- WRAP_FLIP_FLAG = 512;
1539
-
1540
- /** Used as default options for `_.truncate`. */
1541
- var DEFAULT_TRUNC_LENGTH = 30,
1542
- DEFAULT_TRUNC_OMISSION = '...';
1543
-
1544
- /** Used to detect hot functions by number of calls within a span of milliseconds. */
1545
- var HOT_COUNT = 800,
1546
- HOT_SPAN = 16;
1547
-
1548
- /** Used to indicate the type of lazy iteratees. */
1549
- var LAZY_FILTER_FLAG = 1,
1550
- LAZY_MAP_FLAG = 2,
1551
- LAZY_WHILE_FLAG = 3;
1552
-
1553
- /** Used as references for various `Number` constants. */
1554
- var INFINITY = 1 / 0,
1555
- MAX_SAFE_INTEGER = 9007199254740991,
1556
- MAX_INTEGER = 1.7976931348623157e+308,
1557
- NAN = 0 / 0;
1558
-
1559
- /** Used as references for the maximum length and index of an array. */
1560
- var MAX_ARRAY_LENGTH = 4294967295,
1561
- MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
1562
- HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
1563
-
1564
- /** Used to associate wrap methods with their bit flags. */
1565
- var wrapFlags = [
1566
- ['ary', WRAP_ARY_FLAG],
1567
- ['bind', WRAP_BIND_FLAG],
1568
- ['bindKey', WRAP_BIND_KEY_FLAG],
1569
- ['curry', WRAP_CURRY_FLAG],
1570
- ['curryRight', WRAP_CURRY_RIGHT_FLAG],
1571
- ['flip', WRAP_FLIP_FLAG],
1572
- ['partial', WRAP_PARTIAL_FLAG],
1573
- ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
1574
- ['rearg', WRAP_REARG_FLAG]
1575
- ];
1576
-
1577
- /** `Object#toString` result references. */
1578
- var argsTag = '[object Arguments]',
1579
- arrayTag = '[object Array]',
1580
- asyncTag = '[object AsyncFunction]',
1581
- boolTag = '[object Boolean]',
1582
- dateTag = '[object Date]',
1583
- domExcTag = '[object DOMException]',
1584
- errorTag = '[object Error]',
1585
- funcTag = '[object Function]',
1586
- genTag = '[object GeneratorFunction]',
1587
- mapTag = '[object Map]',
1588
- numberTag = '[object Number]',
1589
- nullTag = '[object Null]',
1590
- objectTag = '[object Object]',
1591
- promiseTag = '[object Promise]',
1592
- proxyTag = '[object Proxy]',
1593
- regexpTag = '[object RegExp]',
1594
- setTag = '[object Set]',
1595
- stringTag = '[object String]',
1596
- symbolTag = '[object Symbol]',
1597
- undefinedTag = '[object Undefined]',
1598
- weakMapTag = '[object WeakMap]',
1599
- weakSetTag = '[object WeakSet]';
1600
-
1601
- var arrayBufferTag = '[object ArrayBuffer]',
1602
- dataViewTag = '[object DataView]',
1603
- float32Tag = '[object Float32Array]',
1604
- float64Tag = '[object Float64Array]',
1605
- int8Tag = '[object Int8Array]',
1606
- int16Tag = '[object Int16Array]',
1607
- int32Tag = '[object Int32Array]',
1608
- uint8Tag = '[object Uint8Array]',
1609
- uint8ClampedTag = '[object Uint8ClampedArray]',
1610
- uint16Tag = '[object Uint16Array]',
1611
- uint32Tag = '[object Uint32Array]';
1612
-
1613
- /** Used to match empty string literals in compiled template source. */
1614
- var reEmptyStringLeading = /\b__p \+= '';/g,
1615
- reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
1616
- reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
1617
-
1618
- /** Used to match HTML entities and HTML characters. */
1619
- var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
1620
- reUnescapedHtml = /[&<>"']/g,
1621
- reHasEscapedHtml = RegExp(reEscapedHtml.source),
1622
- reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
1623
-
1624
- /** Used to match template delimiters. */
1625
- var reEscape = /<%-([\s\S]+?)%>/g,
1626
- reEvaluate = /<%([\s\S]+?)%>/g,
1627
- reInterpolate = /<%=([\s\S]+?)%>/g;
1628
-
1629
- /** Used to match property names within property paths. */
1630
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
1631
- reIsPlainProp = /^\w*$/,
1632
- rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
1633
-
1634
- /**
1635
- * Used to match `RegExp`
1636
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
1637
- */
1638
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
1639
- reHasRegExpChar = RegExp(reRegExpChar.source);
1640
-
1641
- /** Used to match leading and trailing whitespace. */
1642
- var reTrim = /^\s+|\s+$/g,
1643
- reTrimStart = /^\s+/,
1644
- reTrimEnd = /\s+$/;
1645
-
1646
- /** Used to match wrap detail comments. */
1647
- var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
1648
- reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
1649
- reSplitDetails = /,? & /;
1650
-
1651
- /** Used to match words composed of alphanumeric characters. */
1652
- var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
1653
-
1654
- /** Used to match backslashes in property paths. */
1655
- var reEscapeChar = /\\(\\)?/g;
1656
-
1657
- /**
1658
- * Used to match
1659
- * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
1660
- */
1661
- var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
1662
-
1663
- /** Used to match `RegExp` flags from their coerced string values. */
1664
- var reFlags = /\w*$/;
1665
-
1666
- /** Used to detect bad signed hexadecimal string values. */
1667
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
1668
-
1669
- /** Used to detect binary string values. */
1670
- var reIsBinary = /^0b[01]+$/i;
1671
-
1672
- /** Used to detect host constructors (Safari). */
1673
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
1674
-
1675
- /** Used to detect octal string values. */
1676
- var reIsOctal = /^0o[0-7]+$/i;
1677
-
1678
- /** Used to detect unsigned integer values. */
1679
- var reIsUint = /^(?:0|[1-9]\d*)$/;
1680
-
1681
- /** Used to match Latin Unicode letters (excluding mathematical operators). */
1682
- var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
1683
-
1684
- /** Used to ensure capturing order of template delimiters. */
1685
- var reNoMatch = /($^)/;
1686
-
1687
- /** Used to match unescaped characters in compiled string literals. */
1688
- var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
1689
-
1690
- /** Used to compose unicode character classes. */
1691
- var rsAstralRange = '\\ud800-\\udfff',
1692
- rsComboMarksRange = '\\u0300-\\u036f',
1693
- reComboHalfMarksRange = '\\ufe20-\\ufe2f',
1694
- rsComboSymbolsRange = '\\u20d0-\\u20ff',
1695
- rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
1696
- rsDingbatRange = '\\u2700-\\u27bf',
1697
- rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
1698
- rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
1699
- rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
1700
- rsPunctuationRange = '\\u2000-\\u206f',
1701
- rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
1702
- rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
1703
- rsVarRange = '\\ufe0e\\ufe0f',
1704
- rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
1705
-
1706
- /** Used to compose unicode capture groups. */
1707
- var rsApos = "['\u2019]",
1708
- rsAstral = '[' + rsAstralRange + ']',
1709
- rsBreak = '[' + rsBreakRange + ']',
1710
- rsCombo = '[' + rsComboRange + ']',
1711
- rsDigits = '\\d+',
1712
- rsDingbat = '[' + rsDingbatRange + ']',
1713
- rsLower = '[' + rsLowerRange + ']',
1714
- rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
1715
- rsFitz = '\\ud83c[\\udffb-\\udfff]',
1716
- rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
1717
- rsNonAstral = '[^' + rsAstralRange + ']',
1718
- rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
1719
- rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
1720
- rsUpper = '[' + rsUpperRange + ']',
1721
- rsZWJ = '\\u200d';
1722
-
1723
- /** Used to compose unicode regexes. */
1724
- var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
1725
- rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
1726
- rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
1727
- rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
1728
- reOptMod = rsModifier + '?',
1729
- rsOptVar = '[' + rsVarRange + ']?',
1730
- rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
1731
- rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
1732
- rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
1733
- rsSeq = rsOptVar + reOptMod + rsOptJoin,
1734
- rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
1735
- rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
1736
-
1737
- /** Used to match apostrophes. */
1738
- var reApos = RegExp(rsApos, 'g');
1739
-
1740
- /**
1741
- * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
1742
- * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
1743
- */
1744
- var reComboMark = RegExp(rsCombo, 'g');
1745
-
1746
- /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
1747
- var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
1748
-
1749
- /** Used to match complex or compound words. */
1750
- var reUnicodeWord = RegExp([
1751
- rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
1752
- rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
1753
- rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
1754
- rsUpper + '+' + rsOptContrUpper,
1755
- rsOrdUpper,
1756
- rsOrdLower,
1757
- rsDigits,
1758
- rsEmoji
1759
- ].join('|'), 'g');
1760
-
1761
- /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
1762
- var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
1763
-
1764
- /** Used to detect strings that need a more robust regexp to match words. */
1765
- var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
1766
-
1767
- /** Used to assign default `context` object properties. */
1768
- var contextProps = [
1769
- 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
1770
- 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
1771
- 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
1772
- 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
1773
- '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
1774
- ];
1775
-
1776
- /** Used to make template sourceURLs easier to identify. */
1777
- var templateCounter = -1;
1778
-
1779
- /** Used to identify `toStringTag` values of typed arrays. */
1780
- var typedArrayTags = {};
1781
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
1782
- typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
1783
- typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
1784
- typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
1785
- typedArrayTags[uint32Tag] = true;
1786
- typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
1787
- typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
1788
- typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
1789
- typedArrayTags[errorTag] = typedArrayTags[funcTag] =
1790
- typedArrayTags[mapTag] = typedArrayTags[numberTag] =
1791
- typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
1792
- typedArrayTags[setTag] = typedArrayTags[stringTag] =
1793
- typedArrayTags[weakMapTag] = false;
1794
-
1795
- /** Used to identify `toStringTag` values supported by `_.clone`. */
1796
- var cloneableTags = {};
1797
- cloneableTags[argsTag] = cloneableTags[arrayTag] =
1798
- cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
1799
- cloneableTags[boolTag] = cloneableTags[dateTag] =
1800
- cloneableTags[float32Tag] = cloneableTags[float64Tag] =
1801
- cloneableTags[int8Tag] = cloneableTags[int16Tag] =
1802
- cloneableTags[int32Tag] = cloneableTags[mapTag] =
1803
- cloneableTags[numberTag] = cloneableTags[objectTag] =
1804
- cloneableTags[regexpTag] = cloneableTags[setTag] =
1805
- cloneableTags[stringTag] = cloneableTags[symbolTag] =
1806
- cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
1807
- cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
1808
- cloneableTags[errorTag] = cloneableTags[funcTag] =
1809
- cloneableTags[weakMapTag] = false;
1810
-
1811
- /** Used to map Latin Unicode letters to basic Latin letters. */
1812
- var deburredLetters = {
1813
- // Latin-1 Supplement block.
1814
- '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
1815
- '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
1816
- '\xc7': 'C', '\xe7': 'c',
1817
- '\xd0': 'D', '\xf0': 'd',
1818
- '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
1819
- '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
1820
- '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
1821
- '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
1822
- '\xd1': 'N', '\xf1': 'n',
1823
- '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
1824
- '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
1825
- '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
1826
- '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
1827
- '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
1828
- '\xc6': 'Ae', '\xe6': 'ae',
1829
- '\xde': 'Th', '\xfe': 'th',
1830
- '\xdf': 'ss',
1831
- // Latin Extended-A block.
1832
- '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
1833
- '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
1834
- '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
1835
- '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
1836
- '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
1837
- '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
1838
- '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
1839
- '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
1840
- '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
1841
- '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
1842
- '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
1843
- '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
1844
- '\u0134': 'J', '\u0135': 'j',
1845
- '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
1846
- '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
1847
- '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
1848
- '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
1849
- '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
1850
- '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
1851
- '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
1852
- '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
1853
- '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
1854
- '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
1855
- '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
1856
- '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
1857
- '\u0163': 't', '\u0165': 't', '\u0167': 't',
1858
- '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
1859
- '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
1860
- '\u0174': 'W', '\u0175': 'w',
1861
- '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
1862
- '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
1863
- '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
1864
- '\u0132': 'IJ', '\u0133': 'ij',
1865
- '\u0152': 'Oe', '\u0153': 'oe',
1866
- '\u0149': "'n", '\u017f': 's'
1867
- };
1868
-
1869
- /** Used to map characters to HTML entities. */
1870
- var htmlEscapes = {
1871
- '&': '&amp;',
1872
- '<': '&lt;',
1873
- '>': '&gt;',
1874
- '"': '&quot;',
1875
- "'": '&#39;'
1876
- };
1877
-
1878
- /** Used to map HTML entities to characters. */
1879
- var htmlUnescapes = {
1880
- '&amp;': '&',
1881
- '&lt;': '<',
1882
- '&gt;': '>',
1883
- '&quot;': '"',
1884
- '&#39;': "'"
1885
- };
1886
-
1887
- /** Used to escape characters for inclusion in compiled string literals. */
1888
- var stringEscapes = {
1889
- '\\': '\\',
1890
- "'": "'",
1891
- '\n': 'n',
1892
- '\r': 'r',
1893
- '\u2028': 'u2028',
1894
- '\u2029': 'u2029'
1895
- };
1896
-
1897
- /** Built-in method references without a dependency on `root`. */
1898
- var freeParseFloat = parseFloat,
1899
- freeParseInt = parseInt;
1900
-
1901
- /** Detect free variable `global` from Node.js. */
1902
- var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
1903
-
1904
- /** Detect free variable `self`. */
1905
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
1906
-
1907
- /** Used as a reference to the global object. */
1908
- var root = freeGlobal || freeSelf || Function('return this')();
1909
-
1910
- /** Detect free variable `exports`. */
1911
- var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
1912
-
1913
- /** Detect free variable `module`. */
1914
- var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
1915
-
1916
- /** Detect the popular CommonJS extension `module.exports`. */
1917
- var moduleExports = freeModule && freeModule.exports === freeExports;
1918
-
1919
- /** Detect free variable `process` from Node.js. */
1920
- var freeProcess = moduleExports && freeGlobal.process;
1921
-
1922
- /** Used to access faster Node.js helpers. */
1923
- var nodeUtil = (function() {
1924
- try {
1925
- // Use `util.types` for Node.js 10+.
1926
- var types = freeModule && freeModule.require && freeModule.require('util').types;
1927
-
1928
- if (types) {
1929
- return types;
1930
- }
1931
-
1932
- // Legacy `process.binding('util')` for Node.js < 10.
1933
- return freeProcess && freeProcess.binding && freeProcess.binding('util');
1934
- } catch (e) {}
1935
- }());
1936
-
1937
- /* Node.js helper references. */
1938
- var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
1939
- nodeIsDate = nodeUtil && nodeUtil.isDate,
1940
- nodeIsMap = nodeUtil && nodeUtil.isMap,
1941
- nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
1942
- nodeIsSet = nodeUtil && nodeUtil.isSet,
1943
- nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
1944
-
1945
- /*--------------------------------------------------------------------------*/
1946
-
1947
- /**
1948
- * A faster alternative to `Function#apply`, this function invokes `func`
1949
- * with the `this` binding of `thisArg` and the arguments of `args`.
1950
- *
1951
- * @private
1952
- * @param {Function} func The function to invoke.
1953
- * @param {*} thisArg The `this` binding of `func`.
1954
- * @param {Array} args The arguments to invoke `func` with.
1955
- * @returns {*} Returns the result of `func`.
1956
- */
1957
- function apply(func, thisArg, args) {
1958
- switch (args.length) {
1959
- case 0: return func.call(thisArg);
1960
- case 1: return func.call(thisArg, args[0]);
1961
- case 2: return func.call(thisArg, args[0], args[1]);
1962
- case 3: return func.call(thisArg, args[0], args[1], args[2]);
1963
- }
1964
- return func.apply(thisArg, args);
1965
- }
1966
-
1967
- /**
1968
- * A specialized version of `baseAggregator` for arrays.
1969
- *
1970
- * @private
1971
- * @param {Array} [array] The array to iterate over.
1972
- * @param {Function} setter The function to set `accumulator` values.
1973
- * @param {Function} iteratee The iteratee to transform keys.
1974
- * @param {Object} accumulator The initial aggregated object.
1975
- * @returns {Function} Returns `accumulator`.
1976
- */
1977
- function arrayAggregator(array, setter, iteratee, accumulator) {
1978
- var index = -1,
1979
- length = array == null ? 0 : array.length;
1980
-
1981
- while (++index < length) {
1982
- var value = array[index];
1983
- setter(accumulator, value, iteratee(value), array);
1984
- }
1985
- return accumulator;
1986
- }
1987
-
1988
- /**
1989
- * A specialized version of `_.forEach` for arrays without support for
1990
- * iteratee shorthands.
1991
- *
1992
- * @private
1993
- * @param {Array} [array] The array to iterate over.
1994
- * @param {Function} iteratee The function invoked per iteration.
1995
- * @returns {Array} Returns `array`.
1996
- */
1997
- function arrayEach(array, iteratee) {
1998
- var index = -1,
1999
- length = array == null ? 0 : array.length;
2000
-
2001
- while (++index < length) {
2002
- if (iteratee(array[index], index, array) === false) {
2003
- break;
2004
- }
2005
- }
2006
- return array;
2007
- }
2008
-
2009
- /**
2010
- * A specialized version of `_.forEachRight` for arrays without support for
2011
- * iteratee shorthands.
2012
- *
2013
- * @private
2014
- * @param {Array} [array] The array to iterate over.
2015
- * @param {Function} iteratee The function invoked per iteration.
2016
- * @returns {Array} Returns `array`.
2017
- */
2018
- function arrayEachRight(array, iteratee) {
2019
- var length = array == null ? 0 : array.length;
2020
-
2021
- while (length--) {
2022
- if (iteratee(array[length], length, array) === false) {
2023
- break;
2024
- }
2025
- }
2026
- return array;
2027
- }
2028
-
2029
- /**
2030
- * A specialized version of `_.every` for arrays without support for
2031
- * iteratee shorthands.
2032
- *
2033
- * @private
2034
- * @param {Array} [array] The array to iterate over.
2035
- * @param {Function} predicate The function invoked per iteration.
2036
- * @returns {boolean} Returns `true` if all elements pass the predicate check,
2037
- * else `false`.
2038
- */
2039
- function arrayEvery(array, predicate) {
2040
- var index = -1,
2041
- length = array == null ? 0 : array.length;
2042
-
2043
- while (++index < length) {
2044
- if (!predicate(array[index], index, array)) {
2045
- return false;
2046
- }
2047
- }
2048
- return true;
2049
- }
2050
-
2051
- /**
2052
- * A specialized version of `_.filter` for arrays without support for
2053
- * iteratee shorthands.
2054
- *
2055
- * @private
2056
- * @param {Array} [array] The array to iterate over.
2057
- * @param {Function} predicate The function invoked per iteration.
2058
- * @returns {Array} Returns the new filtered array.
2059
- */
2060
- function arrayFilter(array, predicate) {
2061
- var index = -1,
2062
- length = array == null ? 0 : array.length,
2063
- resIndex = 0,
2064
- result = [];
2065
-
2066
- while (++index < length) {
2067
- var value = array[index];
2068
- if (predicate(value, index, array)) {
2069
- result[resIndex++] = value;
2070
- }
2071
- }
2072
- return result;
2073
- }
2074
-
2075
- /**
2076
- * A specialized version of `_.includes` for arrays without support for
2077
- * specifying an index to search from.
2078
- *
2079
- * @private
2080
- * @param {Array} [array] The array to inspect.
2081
- * @param {*} target The value to search for.
2082
- * @returns {boolean} Returns `true` if `target` is found, else `false`.
2083
- */
2084
- function arrayIncludes(array, value) {
2085
- var length = array == null ? 0 : array.length;
2086
- return !!length && baseIndexOf(array, value, 0) > -1;
2087
- }
2088
-
2089
- /**
2090
- * This function is like `arrayIncludes` except that it accepts a comparator.
2091
- *
2092
- * @private
2093
- * @param {Array} [array] The array to inspect.
2094
- * @param {*} target The value to search for.
2095
- * @param {Function} comparator The comparator invoked per element.
2096
- * @returns {boolean} Returns `true` if `target` is found, else `false`.
2097
- */
2098
- function arrayIncludesWith(array, value, comparator) {
2099
- var index = -1,
2100
- length = array == null ? 0 : array.length;
2101
-
2102
- while (++index < length) {
2103
- if (comparator(value, array[index])) {
2104
- return true;
2105
- }
2106
- }
2107
- return false;
2108
- }
2109
-
2110
- /**
2111
- * A specialized version of `_.map` for arrays without support for iteratee
2112
- * shorthands.
2113
- *
2114
- * @private
2115
- * @param {Array} [array] The array to iterate over.
2116
- * @param {Function} iteratee The function invoked per iteration.
2117
- * @returns {Array} Returns the new mapped array.
2118
- */
2119
- function arrayMap(array, iteratee) {
2120
- var index = -1,
2121
- length = array == null ? 0 : array.length,
2122
- result = Array(length);
2123
-
2124
- while (++index < length) {
2125
- result[index] = iteratee(array[index], index, array);
2126
- }
2127
- return result;
2128
- }
2129
-
2130
- /**
2131
- * Appends the elements of `values` to `array`.
2132
- *
2133
- * @private
2134
- * @param {Array} array The array to modify.
2135
- * @param {Array} values The values to append.
2136
- * @returns {Array} Returns `array`.
2137
- */
2138
- function arrayPush(array, values) {
2139
- var index = -1,
2140
- length = values.length,
2141
- offset = array.length;
2142
-
2143
- while (++index < length) {
2144
- array[offset + index] = values[index];
2145
- }
2146
- return array;
2147
- }
2148
-
2149
- /**
2150
- * A specialized version of `_.reduce` for arrays without support for
2151
- * iteratee shorthands.
2152
- *
2153
- * @private
2154
- * @param {Array} [array] The array to iterate over.
2155
- * @param {Function} iteratee The function invoked per iteration.
2156
- * @param {*} [accumulator] The initial value.
2157
- * @param {boolean} [initAccum] Specify using the first element of `array` as
2158
- * the initial value.
2159
- * @returns {*} Returns the accumulated value.
2160
- */
2161
- function arrayReduce(array, iteratee, accumulator, initAccum) {
2162
- var index = -1,
2163
- length = array == null ? 0 : array.length;
2164
-
2165
- if (initAccum && length) {
2166
- accumulator = array[++index];
2167
- }
2168
- while (++index < length) {
2169
- accumulator = iteratee(accumulator, array[index], index, array);
2170
- }
2171
- return accumulator;
2172
- }
2173
-
2174
- /**
2175
- * A specialized version of `_.reduceRight` for arrays without support for
2176
- * iteratee shorthands.
2177
- *
2178
- * @private
2179
- * @param {Array} [array] The array to iterate over.
2180
- * @param {Function} iteratee The function invoked per iteration.
2181
- * @param {*} [accumulator] The initial value.
2182
- * @param {boolean} [initAccum] Specify using the last element of `array` as
2183
- * the initial value.
2184
- * @returns {*} Returns the accumulated value.
2185
- */
2186
- function arrayReduceRight(array, iteratee, accumulator, initAccum) {
2187
- var length = array == null ? 0 : array.length;
2188
- if (initAccum && length) {
2189
- accumulator = array[--length];
2190
- }
2191
- while (length--) {
2192
- accumulator = iteratee(accumulator, array[length], length, array);
2193
- }
2194
- return accumulator;
2195
- }
2196
-
2197
- /**
2198
- * A specialized version of `_.some` for arrays without support for iteratee
2199
- * shorthands.
2200
- *
2201
- * @private
2202
- * @param {Array} [array] The array to iterate over.
2203
- * @param {Function} predicate The function invoked per iteration.
2204
- * @returns {boolean} Returns `true` if any element passes the predicate check,
2205
- * else `false`.
2206
- */
2207
- function arraySome(array, predicate) {
2208
- var index = -1,
2209
- length = array == null ? 0 : array.length;
2210
-
2211
- while (++index < length) {
2212
- if (predicate(array[index], index, array)) {
2213
- return true;
2214
- }
2215
- }
2216
- return false;
2217
- }
2218
-
2219
- /**
2220
- * Gets the size of an ASCII `string`.
2221
- *
2222
- * @private
2223
- * @param {string} string The string inspect.
2224
- * @returns {number} Returns the string size.
2225
- */
2226
- var asciiSize = baseProperty('length');
2227
-
2228
- /**
2229
- * Converts an ASCII `string` to an array.
2230
- *
2231
- * @private
2232
- * @param {string} string The string to convert.
2233
- * @returns {Array} Returns the converted array.
2234
- */
2235
- function asciiToArray(string) {
2236
- return string.split('');
2237
- }
2238
-
2239
- /**
2240
- * Splits an ASCII `string` into an array of its words.
2241
- *
2242
- * @private
2243
- * @param {string} The string to inspect.
2244
- * @returns {Array} Returns the words of `string`.
2245
- */
2246
- function asciiWords(string) {
2247
- return string.match(reAsciiWord) || [];
2248
- }
2249
-
2250
- /**
2251
- * The base implementation of methods like `_.findKey` and `_.findLastKey`,
2252
- * without support for iteratee shorthands, which iterates over `collection`
2253
- * using `eachFunc`.
2254
- *
2255
- * @private
2256
- * @param {Array|Object} collection The collection to inspect.
2257
- * @param {Function} predicate The function invoked per iteration.
2258
- * @param {Function} eachFunc The function to iterate over `collection`.
2259
- * @returns {*} Returns the found element or its key, else `undefined`.
2260
- */
2261
- function baseFindKey(collection, predicate, eachFunc) {
2262
- var result;
2263
- eachFunc(collection, function(value, key, collection) {
2264
- if (predicate(value, key, collection)) {
2265
- result = key;
2266
- return false;
2267
- }
2268
- });
2269
- return result;
2270
- }
2271
-
2272
- /**
2273
- * The base implementation of `_.findIndex` and `_.findLastIndex` without
2274
- * support for iteratee shorthands.
2275
- *
2276
- * @private
2277
- * @param {Array} array The array to inspect.
2278
- * @param {Function} predicate The function invoked per iteration.
2279
- * @param {number} fromIndex The index to search from.
2280
- * @param {boolean} [fromRight] Specify iterating from right to left.
2281
- * @returns {number} Returns the index of the matched value, else `-1`.
2282
- */
2283
- function baseFindIndex(array, predicate, fromIndex, fromRight) {
2284
- var length = array.length,
2285
- index = fromIndex + (fromRight ? 1 : -1);
2286
-
2287
- while ((fromRight ? index-- : ++index < length)) {
2288
- if (predicate(array[index], index, array)) {
2289
- return index;
2290
- }
2291
- }
2292
- return -1;
2293
- }
2294
-
2295
- /**
2296
- * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
2297
- *
2298
- * @private
2299
- * @param {Array} array The array to inspect.
2300
- * @param {*} value The value to search for.
2301
- * @param {number} fromIndex The index to search from.
2302
- * @returns {number} Returns the index of the matched value, else `-1`.
2303
- */
2304
- function baseIndexOf(array, value, fromIndex) {
2305
- return value === value
2306
- ? strictIndexOf(array, value, fromIndex)
2307
- : baseFindIndex(array, baseIsNaN, fromIndex);
2308
- }
2309
-
2310
- /**
2311
- * This function is like `baseIndexOf` except that it accepts a comparator.
2312
- *
2313
- * @private
2314
- * @param {Array} array The array to inspect.
2315
- * @param {*} value The value to search for.
2316
- * @param {number} fromIndex The index to search from.
2317
- * @param {Function} comparator The comparator invoked per element.
2318
- * @returns {number} Returns the index of the matched value, else `-1`.
2319
- */
2320
- function baseIndexOfWith(array, value, fromIndex, comparator) {
2321
- var index = fromIndex - 1,
2322
- length = array.length;
2323
-
2324
- while (++index < length) {
2325
- if (comparator(array[index], value)) {
2326
- return index;
2327
- }
2328
- }
2329
- return -1;
2330
- }
2331
-
2332
- /**
2333
- * The base implementation of `_.isNaN` without support for number objects.
2334
- *
2335
- * @private
2336
- * @param {*} value The value to check.
2337
- * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
2338
- */
2339
- function baseIsNaN(value) {
2340
- return value !== value;
2341
- }
2342
-
2343
- /**
2344
- * The base implementation of `_.mean` and `_.meanBy` without support for
2345
- * iteratee shorthands.
2346
- *
2347
- * @private
2348
- * @param {Array} array The array to iterate over.
2349
- * @param {Function} iteratee The function invoked per iteration.
2350
- * @returns {number} Returns the mean.
2351
- */
2352
- function baseMean(array, iteratee) {
2353
- var length = array == null ? 0 : array.length;
2354
- return length ? (baseSum(array, iteratee) / length) : NAN;
2355
- }
2356
-
2357
- /**
2358
- * The base implementation of `_.property` without support for deep paths.
2359
- *
2360
- * @private
2361
- * @param {string} key The key of the property to get.
2362
- * @returns {Function} Returns the new accessor function.
2363
- */
2364
- function baseProperty(key) {
2365
- return function(object) {
2366
- return object == null ? undefined : object[key];
2367
- };
2368
- }
2369
-
2370
- /**
2371
- * The base implementation of `_.propertyOf` without support for deep paths.
2372
- *
2373
- * @private
2374
- * @param {Object} object The object to query.
2375
- * @returns {Function} Returns the new accessor function.
2376
- */
2377
- function basePropertyOf(object) {
2378
- return function(key) {
2379
- return object == null ? undefined : object[key];
2380
- };
2381
- }
2382
-
2383
- /**
2384
- * The base implementation of `_.reduce` and `_.reduceRight`, without support
2385
- * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
2386
- *
2387
- * @private
2388
- * @param {Array|Object} collection The collection to iterate over.
2389
- * @param {Function} iteratee The function invoked per iteration.
2390
- * @param {*} accumulator The initial value.
2391
- * @param {boolean} initAccum Specify using the first or last element of
2392
- * `collection` as the initial value.
2393
- * @param {Function} eachFunc The function to iterate over `collection`.
2394
- * @returns {*} Returns the accumulated value.
2395
- */
2396
- function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
2397
- eachFunc(collection, function(value, index, collection) {
2398
- accumulator = initAccum
2399
- ? (initAccum = false, value)
2400
- : iteratee(accumulator, value, index, collection);
2401
- });
2402
- return accumulator;
2403
- }
2404
-
2405
- /**
2406
- * The base implementation of `_.sortBy` which uses `comparer` to define the
2407
- * sort order of `array` and replaces criteria objects with their corresponding
2408
- * values.
2409
- *
2410
- * @private
2411
- * @param {Array} array The array to sort.
2412
- * @param {Function} comparer The function to define sort order.
2413
- * @returns {Array} Returns `array`.
2414
- */
2415
- function baseSortBy(array, comparer) {
2416
- var length = array.length;
2417
-
2418
- array.sort(comparer);
2419
- while (length--) {
2420
- array[length] = array[length].value;
2421
- }
2422
- return array;
2423
- }
2424
-
2425
- /**
2426
- * The base implementation of `_.sum` and `_.sumBy` without support for
2427
- * iteratee shorthands.
2428
- *
2429
- * @private
2430
- * @param {Array} array The array to iterate over.
2431
- * @param {Function} iteratee The function invoked per iteration.
2432
- * @returns {number} Returns the sum.
2433
- */
2434
- function baseSum(array, iteratee) {
2435
- var result,
2436
- index = -1,
2437
- length = array.length;
2438
-
2439
- while (++index < length) {
2440
- var current = iteratee(array[index]);
2441
- if (current !== undefined) {
2442
- result = result === undefined ? current : (result + current);
2443
- }
2444
- }
2445
- return result;
2446
- }
2447
-
2448
- /**
2449
- * The base implementation of `_.times` without support for iteratee shorthands
2450
- * or max array length checks.
2451
- *
2452
- * @private
2453
- * @param {number} n The number of times to invoke `iteratee`.
2454
- * @param {Function} iteratee The function invoked per iteration.
2455
- * @returns {Array} Returns the array of results.
2456
- */
2457
- function baseTimes(n, iteratee) {
2458
- var index = -1,
2459
- result = Array(n);
2460
-
2461
- while (++index < n) {
2462
- result[index] = iteratee(index);
2463
- }
2464
- return result;
2465
- }
2466
-
2467
- /**
2468
- * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
2469
- * of key-value pairs for `object` corresponding to the property names of `props`.
2470
- *
2471
- * @private
2472
- * @param {Object} object The object to query.
2473
- * @param {Array} props The property names to get values for.
2474
- * @returns {Object} Returns the key-value pairs.
2475
- */
2476
- function baseToPairs(object, props) {
2477
- return arrayMap(props, function(key) {
2478
- return [key, object[key]];
2479
- });
2480
- }
2481
-
2482
- /**
2483
- * The base implementation of `_.unary` without support for storing metadata.
2484
- *
2485
- * @private
2486
- * @param {Function} func The function to cap arguments for.
2487
- * @returns {Function} Returns the new capped function.
2488
- */
2489
- function baseUnary(func) {
2490
- return function(value) {
2491
- return func(value);
2492
- };
2493
- }
2494
-
2495
- /**
2496
- * The base implementation of `_.values` and `_.valuesIn` which creates an
2497
- * array of `object` property values corresponding to the property names
2498
- * of `props`.
2499
- *
2500
- * @private
2501
- * @param {Object} object The object to query.
2502
- * @param {Array} props The property names to get values for.
2503
- * @returns {Object} Returns the array of property values.
2504
- */
2505
- function baseValues(object, props) {
2506
- return arrayMap(props, function(key) {
2507
- return object[key];
2508
- });
2509
- }
2510
-
2511
- /**
2512
- * Checks if a `cache` value for `key` exists.
2513
- *
2514
- * @private
2515
- * @param {Object} cache The cache to query.
2516
- * @param {string} key The key of the entry to check.
2517
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2518
- */
2519
- function cacheHas(cache, key) {
2520
- return cache.has(key);
2521
- }
2522
-
2523
- /**
2524
- * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
2525
- * that is not found in the character symbols.
2526
- *
2527
- * @private
2528
- * @param {Array} strSymbols The string symbols to inspect.
2529
- * @param {Array} chrSymbols The character symbols to find.
2530
- * @returns {number} Returns the index of the first unmatched string symbol.
2531
- */
2532
- function charsStartIndex(strSymbols, chrSymbols) {
2533
- var index = -1,
2534
- length = strSymbols.length;
2535
-
2536
- while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
2537
- return index;
2538
- }
2539
-
2540
- /**
2541
- * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
2542
- * that is not found in the character symbols.
2543
- *
2544
- * @private
2545
- * @param {Array} strSymbols The string symbols to inspect.
2546
- * @param {Array} chrSymbols The character symbols to find.
2547
- * @returns {number} Returns the index of the last unmatched string symbol.
2548
- */
2549
- function charsEndIndex(strSymbols, chrSymbols) {
2550
- var index = strSymbols.length;
2551
-
2552
- while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
2553
- return index;
2554
- }
2555
-
2556
- /**
2557
- * Gets the number of `placeholder` occurrences in `array`.
2558
- *
2559
- * @private
2560
- * @param {Array} array The array to inspect.
2561
- * @param {*} placeholder The placeholder to search for.
2562
- * @returns {number} Returns the placeholder count.
2563
- */
2564
- function countHolders(array, placeholder) {
2565
- var length = array.length,
2566
- result = 0;
2567
-
2568
- while (length--) {
2569
- if (array[length] === placeholder) {
2570
- ++result;
2571
- }
2572
- }
2573
- return result;
2574
- }
2575
-
2576
- /**
2577
- * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
2578
- * letters to basic Latin letters.
2579
- *
2580
- * @private
2581
- * @param {string} letter The matched letter to deburr.
2582
- * @returns {string} Returns the deburred letter.
2583
- */
2584
- var deburrLetter = basePropertyOf(deburredLetters);
2585
-
2586
- /**
2587
- * Used by `_.escape` to convert characters to HTML entities.
2588
- *
2589
- * @private
2590
- * @param {string} chr The matched character to escape.
2591
- * @returns {string} Returns the escaped character.
2592
- */
2593
- var escapeHtmlChar = basePropertyOf(htmlEscapes);
2594
-
2595
- /**
2596
- * Used by `_.template` to escape characters for inclusion in compiled string literals.
2597
- *
2598
- * @private
2599
- * @param {string} chr The matched character to escape.
2600
- * @returns {string} Returns the escaped character.
2601
- */
2602
- function escapeStringChar(chr) {
2603
- return '\\' + stringEscapes[chr];
2604
- }
2605
-
2606
- /**
2607
- * Gets the value at `key` of `object`.
2608
- *
2609
- * @private
2610
- * @param {Object} [object] The object to query.
2611
- * @param {string} key The key of the property to get.
2612
- * @returns {*} Returns the property value.
2613
- */
2614
- function getValue(object, key) {
2615
- return object == null ? undefined : object[key];
2616
- }
2617
-
2618
- /**
2619
- * Checks if `string` contains Unicode symbols.
2620
- *
2621
- * @private
2622
- * @param {string} string The string to inspect.
2623
- * @returns {boolean} Returns `true` if a symbol is found, else `false`.
2624
- */
2625
- function hasUnicode(string) {
2626
- return reHasUnicode.test(string);
2627
- }
2628
-
2629
- /**
2630
- * Checks if `string` contains a word composed of Unicode symbols.
2631
- *
2632
- * @private
2633
- * @param {string} string The string to inspect.
2634
- * @returns {boolean} Returns `true` if a word is found, else `false`.
2635
- */
2636
- function hasUnicodeWord(string) {
2637
- return reHasUnicodeWord.test(string);
2638
- }
2639
-
2640
- /**
2641
- * Converts `iterator` to an array.
2642
- *
2643
- * @private
2644
- * @param {Object} iterator The iterator to convert.
2645
- * @returns {Array} Returns the converted array.
2646
- */
2647
- function iteratorToArray(iterator) {
2648
- var data,
2649
- result = [];
2650
-
2651
- while (!(data = iterator.next()).done) {
2652
- result.push(data.value);
2653
- }
2654
- return result;
2655
- }
2656
-
2657
- /**
2658
- * Converts `map` to its key-value pairs.
2659
- *
2660
- * @private
2661
- * @param {Object} map The map to convert.
2662
- * @returns {Array} Returns the key-value pairs.
2663
- */
2664
- function mapToArray(map) {
2665
- var index = -1,
2666
- result = Array(map.size);
2667
-
2668
- map.forEach(function(value, key) {
2669
- result[++index] = [key, value];
2670
- });
2671
- return result;
2672
- }
2673
-
2674
- /**
2675
- * Creates a unary function that invokes `func` with its argument transformed.
2676
- *
2677
- * @private
2678
- * @param {Function} func The function to wrap.
2679
- * @param {Function} transform The argument transform.
2680
- * @returns {Function} Returns the new function.
2681
- */
2682
- function overArg(func, transform) {
2683
- return function(arg) {
2684
- return func(transform(arg));
2685
- };
2686
- }
2687
-
2688
- /**
2689
- * Replaces all `placeholder` elements in `array` with an internal placeholder
2690
- * and returns an array of their indexes.
2691
- *
2692
- * @private
2693
- * @param {Array} array The array to modify.
2694
- * @param {*} placeholder The placeholder to replace.
2695
- * @returns {Array} Returns the new array of placeholder indexes.
2696
- */
2697
- function replaceHolders(array, placeholder) {
2698
- var index = -1,
2699
- length = array.length,
2700
- resIndex = 0,
2701
- result = [];
2702
-
2703
- while (++index < length) {
2704
- var value = array[index];
2705
- if (value === placeholder || value === PLACEHOLDER) {
2706
- array[index] = PLACEHOLDER;
2707
- result[resIndex++] = index;
2708
- }
2709
- }
2710
- return result;
2711
- }
2712
-
2713
- /**
2714
- * Gets the value at `key`, unless `key` is "__proto__".
2715
- *
2716
- * @private
2717
- * @param {Object} object The object to query.
2718
- * @param {string} key The key of the property to get.
2719
- * @returns {*} Returns the property value.
2720
- */
2721
- function safeGet(object, key) {
2722
- return key == '__proto__'
2723
- ? undefined
2724
- : object[key];
2725
- }
2726
-
2727
- /**
2728
- * Converts `set` to an array of its values.
2729
- *
2730
- * @private
2731
- * @param {Object} set The set to convert.
2732
- * @returns {Array} Returns the values.
2733
- */
2734
- function setToArray(set) {
2735
- var index = -1,
2736
- result = Array(set.size);
2737
-
2738
- set.forEach(function(value) {
2739
- result[++index] = value;
2740
- });
2741
- return result;
2742
- }
2743
-
2744
- /**
2745
- * Converts `set` to its value-value pairs.
2746
- *
2747
- * @private
2748
- * @param {Object} set The set to convert.
2749
- * @returns {Array} Returns the value-value pairs.
2750
- */
2751
- function setToPairs(set) {
2752
- var index = -1,
2753
- result = Array(set.size);
2754
-
2755
- set.forEach(function(value) {
2756
- result[++index] = [value, value];
2757
- });
2758
- return result;
2759
- }
2760
-
2761
- /**
2762
- * A specialized version of `_.indexOf` which performs strict equality
2763
- * comparisons of values, i.e. `===`.
2764
- *
2765
- * @private
2766
- * @param {Array} array The array to inspect.
2767
- * @param {*} value The value to search for.
2768
- * @param {number} fromIndex The index to search from.
2769
- * @returns {number} Returns the index of the matched value, else `-1`.
2770
- */
2771
- function strictIndexOf(array, value, fromIndex) {
2772
- var index = fromIndex - 1,
2773
- length = array.length;
2774
-
2775
- while (++index < length) {
2776
- if (array[index] === value) {
2777
- return index;
2778
- }
2779
- }
2780
- return -1;
2781
- }
2782
-
2783
- /**
2784
- * A specialized version of `_.lastIndexOf` which performs strict equality
2785
- * comparisons of values, i.e. `===`.
2786
- *
2787
- * @private
2788
- * @param {Array} array The array to inspect.
2789
- * @param {*} value The value to search for.
2790
- * @param {number} fromIndex The index to search from.
2791
- * @returns {number} Returns the index of the matched value, else `-1`.
2792
- */
2793
- function strictLastIndexOf(array, value, fromIndex) {
2794
- var index = fromIndex + 1;
2795
- while (index--) {
2796
- if (array[index] === value) {
2797
- return index;
2798
- }
2799
- }
2800
- return index;
2801
- }
2802
-
2803
- /**
2804
- * Gets the number of symbols in `string`.
2805
- *
2806
- * @private
2807
- * @param {string} string The string to inspect.
2808
- * @returns {number} Returns the string size.
2809
- */
2810
- function stringSize(string) {
2811
- return hasUnicode(string)
2812
- ? unicodeSize(string)
2813
- : asciiSize(string);
2814
- }
2815
-
2816
- /**
2817
- * Converts `string` to an array.
2818
- *
2819
- * @private
2820
- * @param {string} string The string to convert.
2821
- * @returns {Array} Returns the converted array.
2822
- */
2823
- function stringToArray(string) {
2824
- return hasUnicode(string)
2825
- ? unicodeToArray(string)
2826
- : asciiToArray(string);
2827
- }
2828
-
2829
- /**
2830
- * Used by `_.unescape` to convert HTML entities to characters.
2831
- *
2832
- * @private
2833
- * @param {string} chr The matched character to unescape.
2834
- * @returns {string} Returns the unescaped character.
2835
- */
2836
- var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
2837
-
2838
- /**
2839
- * Gets the size of a Unicode `string`.
2840
- *
2841
- * @private
2842
- * @param {string} string The string inspect.
2843
- * @returns {number} Returns the string size.
2844
- */
2845
- function unicodeSize(string) {
2846
- var result = reUnicode.lastIndex = 0;
2847
- while (reUnicode.test(string)) {
2848
- ++result;
2849
- }
2850
- return result;
2851
- }
2852
-
2853
- /**
2854
- * Converts a Unicode `string` to an array.
2855
- *
2856
- * @private
2857
- * @param {string} string The string to convert.
2858
- * @returns {Array} Returns the converted array.
2859
- */
2860
- function unicodeToArray(string) {
2861
- return string.match(reUnicode) || [];
2862
- }
2863
-
2864
- /**
2865
- * Splits a Unicode `string` into an array of its words.
2866
- *
2867
- * @private
2868
- * @param {string} The string to inspect.
2869
- * @returns {Array} Returns the words of `string`.
2870
- */
2871
- function unicodeWords(string) {
2872
- return string.match(reUnicodeWord) || [];
2873
- }
2874
-
2875
- /*--------------------------------------------------------------------------*/
2876
-
2877
- /**
2878
- * Create a new pristine `lodash` function using the `context` object.
2879
- *
2880
- * @static
2881
- * @memberOf _
2882
- * @since 1.1.0
2883
- * @category Util
2884
- * @param {Object} [context=root] The context object.
2885
- * @returns {Function} Returns a new `lodash` function.
2886
- * @example
2887
- *
2888
- * _.mixin({ 'foo': _.constant('foo') });
2889
- *
2890
- * var lodash = _.runInContext();
2891
- * lodash.mixin({ 'bar': lodash.constant('bar') });
2892
- *
2893
- * _.isFunction(_.foo);
2894
- * // => true
2895
- * _.isFunction(_.bar);
2896
- * // => false
2897
- *
2898
- * lodash.isFunction(lodash.foo);
2899
- * // => false
2900
- * lodash.isFunction(lodash.bar);
2901
- * // => true
2902
- *
2903
- * // Create a suped-up `defer` in Node.js.
2904
- * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
2905
- */
2906
- var runInContext = (function runInContext(context) {
2907
- context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
2908
-
2909
- /** Built-in constructor references. */
2910
- var Array = context.Array,
2911
- Date = context.Date,
2912
- Error = context.Error,
2913
- Function = context.Function,
2914
- Math = context.Math,
2915
- Object = context.Object,
2916
- RegExp = context.RegExp,
2917
- String = context.String,
2918
- TypeError = context.TypeError;
2919
-
2920
- /** Used for built-in method references. */
2921
- var arrayProto = Array.prototype,
2922
- funcProto = Function.prototype,
2923
- objectProto = Object.prototype;
2924
-
2925
- /** Used to detect overreaching core-js shims. */
2926
- var coreJsData = context['__core-js_shared__'];
2927
-
2928
- /** Used to resolve the decompiled source of functions. */
2929
- var funcToString = funcProto.toString;
2930
-
2931
- /** Used to check objects for own properties. */
2932
- var hasOwnProperty = objectProto.hasOwnProperty;
2933
-
2934
- /** Used to generate unique IDs. */
2935
- var idCounter = 0;
2936
-
2937
- /** Used to detect methods masquerading as native. */
2938
- var maskSrcKey = (function() {
2939
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
2940
- return uid ? ('Symbol(src)_1.' + uid) : '';
2941
- }());
2942
-
2943
- /**
2944
- * Used to resolve the
2945
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
2946
- * of values.
2947
- */
2948
- var nativeObjectToString = objectProto.toString;
2949
-
2950
- /** Used to infer the `Object` constructor. */
2951
- var objectCtorString = funcToString.call(Object);
2952
-
2953
- /** Used to restore the original `_` reference in `_.noConflict`. */
2954
- var oldDash = root._;
2955
-
2956
- /** Used to detect if a method is native. */
2957
- var reIsNative = RegExp('^' +
2958
- funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
2959
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
2960
- );
2961
-
2962
- /** Built-in value references. */
2963
- var Buffer = moduleExports ? context.Buffer : undefined,
2964
- Symbol = context.Symbol,
2965
- Uint8Array = context.Uint8Array,
2966
- allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
2967
- getPrototype = overArg(Object.getPrototypeOf, Object),
2968
- objectCreate = Object.create,
2969
- propertyIsEnumerable = objectProto.propertyIsEnumerable,
2970
- splice = arrayProto.splice,
2971
- spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
2972
- symIterator = Symbol ? Symbol.iterator : undefined,
2973
- symToStringTag = Symbol ? Symbol.toStringTag : undefined;
2974
-
2975
- var defineProperty = (function() {
2976
- try {
2977
- var func = getNative(Object, 'defineProperty');
2978
- func({}, '', {});
2979
- return func;
2980
- } catch (e) {}
2981
- }());
2982
-
2983
- /** Mocked built-ins. */
2984
- var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
2985
- ctxNow = Date && Date.now !== root.Date.now && Date.now,
2986
- ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
2987
-
2988
- /* Built-in method references for those with the same name as other `lodash` methods. */
2989
- var nativeCeil = Math.ceil,
2990
- nativeFloor = Math.floor,
2991
- nativeGetSymbols = Object.getOwnPropertySymbols,
2992
- nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
2993
- nativeIsFinite = context.isFinite,
2994
- nativeJoin = arrayProto.join,
2995
- nativeKeys = overArg(Object.keys, Object),
2996
- nativeMax = Math.max,
2997
- nativeMin = Math.min,
2998
- nativeNow = Date.now,
2999
- nativeParseInt = context.parseInt,
3000
- nativeRandom = Math.random,
3001
- nativeReverse = arrayProto.reverse;
3002
-
3003
- /* Built-in method references that are verified to be native. */
3004
- var DataView = getNative(context, 'DataView'),
3005
- Map = getNative(context, 'Map'),
3006
- Promise = getNative(context, 'Promise'),
3007
- Set = getNative(context, 'Set'),
3008
- WeakMap = getNative(context, 'WeakMap'),
3009
- nativeCreate = getNative(Object, 'create');
3010
-
3011
- /** Used to store function metadata. */
3012
- var metaMap = WeakMap && new WeakMap;
3013
-
3014
- /** Used to lookup unminified function names. */
3015
- var realNames = {};
3016
-
3017
- /** Used to detect maps, sets, and weakmaps. */
3018
- var dataViewCtorString = toSource(DataView),
3019
- mapCtorString = toSource(Map),
3020
- promiseCtorString = toSource(Promise),
3021
- setCtorString = toSource(Set),
3022
- weakMapCtorString = toSource(WeakMap);
3023
-
3024
- /** Used to convert symbols to primitives and strings. */
3025
- var symbolProto = Symbol ? Symbol.prototype : undefined,
3026
- symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
3027
- symbolToString = symbolProto ? symbolProto.toString : undefined;
3028
-
3029
- /*------------------------------------------------------------------------*/
3030
-
3031
- /**
3032
- * Creates a `lodash` object which wraps `value` to enable implicit method
3033
- * chain sequences. Methods that operate on and return arrays, collections,
3034
- * and functions can be chained together. Methods that retrieve a single value
3035
- * or may return a primitive value will automatically end the chain sequence
3036
- * and return the unwrapped value. Otherwise, the value must be unwrapped
3037
- * with `_#value`.
3038
- *
3039
- * Explicit chain sequences, which must be unwrapped with `_#value`, may be
3040
- * enabled using `_.chain`.
3041
- *
3042
- * The execution of chained methods is lazy, that is, it's deferred until
3043
- * `_#value` is implicitly or explicitly called.
3044
- *
3045
- * Lazy evaluation allows several methods to support shortcut fusion.
3046
- * Shortcut fusion is an optimization to merge iteratee calls; this avoids
3047
- * the creation of intermediate arrays and can greatly reduce the number of
3048
- * iteratee executions. Sections of a chain sequence qualify for shortcut
3049
- * fusion if the section is applied to an array and iteratees accept only
3050
- * one argument. The heuristic for whether a section qualifies for shortcut
3051
- * fusion is subject to change.
3052
- *
3053
- * Chaining is supported in custom builds as long as the `_#value` method is
3054
- * directly or indirectly included in the build.
3055
- *
3056
- * In addition to lodash methods, wrappers have `Array` and `String` methods.
3057
- *
3058
- * The wrapper `Array` methods are:
3059
- * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
3060
- *
3061
- * The wrapper `String` methods are:
3062
- * `replace` and `split`
3063
- *
3064
- * The wrapper methods that support shortcut fusion are:
3065
- * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
3066
- * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
3067
- * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
3068
- *
3069
- * The chainable wrapper methods are:
3070
- * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
3071
- * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
3072
- * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
3073
- * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
3074
- * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
3075
- * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
3076
- * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
3077
- * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
3078
- * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
3079
- * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
3080
- * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
3081
- * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
3082
- * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
3083
- * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
3084
- * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
3085
- * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
3086
- * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
3087
- * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
3088
- * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
3089
- * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
3090
- * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
3091
- * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
3092
- * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
3093
- * `zipObject`, `zipObjectDeep`, and `zipWith`
3094
- *
3095
- * The wrapper methods that are **not** chainable by default are:
3096
- * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
3097
- * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
3098
- * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
3099
- * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
3100
- * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
3101
- * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
3102
- * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
3103
- * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
3104
- * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
3105
- * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
3106
- * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
3107
- * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
3108
- * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
3109
- * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
3110
- * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
3111
- * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
3112
- * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
3113
- * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
3114
- * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
3115
- * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
3116
- * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
3117
- * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
3118
- * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
3119
- * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
3120
- * `upperFirst`, `value`, and `words`
3121
- *
3122
- * @name _
3123
- * @constructor
3124
- * @category Seq
3125
- * @param {*} value The value to wrap in a `lodash` instance.
3126
- * @returns {Object} Returns the new `lodash` wrapper instance.
3127
- * @example
3128
- *
3129
- * function square(n) {
3130
- * return n * n;
3131
- * }
3132
- *
3133
- * var wrapped = _([1, 2, 3]);
3134
- *
3135
- * // Returns an unwrapped value.
3136
- * wrapped.reduce(_.add);
3137
- * // => 6
3138
- *
3139
- * // Returns a wrapped value.
3140
- * var squares = wrapped.map(square);
3141
- *
3142
- * _.isArray(squares);
3143
- * // => false
3144
- *
3145
- * _.isArray(squares.value());
3146
- * // => true
3147
- */
3148
- function lodash(value) {
3149
- if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
3150
- if (value instanceof LodashWrapper) {
3151
- return value;
3152
- }
3153
- if (hasOwnProperty.call(value, '__wrapped__')) {
3154
- return wrapperClone(value);
3155
- }
3156
- }
3157
- return new LodashWrapper(value);
3158
- }
3159
-
3160
- /**
3161
- * The base implementation of `_.create` without support for assigning
3162
- * properties to the created object.
3163
- *
3164
- * @private
3165
- * @param {Object} proto The object to inherit from.
3166
- * @returns {Object} Returns the new object.
3167
- */
3168
- var baseCreate = (function() {
3169
- function object() {}
3170
- return function(proto) {
3171
- if (!isObject(proto)) {
3172
- return {};
3173
- }
3174
- if (objectCreate) {
3175
- return objectCreate(proto);
3176
- }
3177
- object.prototype = proto;
3178
- var result = new object;
3179
- object.prototype = undefined;
3180
- return result;
3181
- };
3182
- }());
3183
-
3184
- /**
3185
- * The function whose prototype chain sequence wrappers inherit from.
3186
- *
3187
- * @private
3188
- */
3189
- function baseLodash() {
3190
- // No operation performed.
3191
- }
3192
-
3193
- /**
3194
- * The base constructor for creating `lodash` wrapper objects.
3195
- *
3196
- * @private
3197
- * @param {*} value The value to wrap.
3198
- * @param {boolean} [chainAll] Enable explicit method chain sequences.
3199
- */
3200
- function LodashWrapper(value, chainAll) {
3201
- this.__wrapped__ = value;
3202
- this.__actions__ = [];
3203
- this.__chain__ = !!chainAll;
3204
- this.__index__ = 0;
3205
- this.__values__ = undefined;
3206
- }
3207
-
3208
- /**
3209
- * By default, the template delimiters used by lodash are like those in
3210
- * embedded Ruby (ERB) as well as ES2015 template strings. Change the
3211
- * following template settings to use alternative delimiters.
3212
- *
3213
- * @static
3214
- * @memberOf _
3215
- * @type {Object}
3216
- */
3217
- lodash.templateSettings = {
3218
-
3219
- /**
3220
- * Used to detect `data` property values to be HTML-escaped.
3221
- *
3222
- * @memberOf _.templateSettings
3223
- * @type {RegExp}
3224
- */
3225
- 'escape': reEscape,
3226
-
3227
- /**
3228
- * Used to detect code to be evaluated.
3229
- *
3230
- * @memberOf _.templateSettings
3231
- * @type {RegExp}
3232
- */
3233
- 'evaluate': reEvaluate,
3234
-
3235
- /**
3236
- * Used to detect `data` property values to inject.
3237
- *
3238
- * @memberOf _.templateSettings
3239
- * @type {RegExp}
3240
- */
3241
- 'interpolate': reInterpolate,
3242
-
3243
- /**
3244
- * Used to reference the data object in the template text.
3245
- *
3246
- * @memberOf _.templateSettings
3247
- * @type {string}
3248
- */
3249
- 'variable': '',
3250
-
3251
- /**
3252
- * Used to import variables into the compiled template.
3253
- *
3254
- * @memberOf _.templateSettings
3255
- * @type {Object}
3256
- */
3257
- 'imports': {
3258
-
3259
- /**
3260
- * A reference to the `lodash` function.
3261
- *
3262
- * @memberOf _.templateSettings.imports
3263
- * @type {Function}
3264
- */
3265
- '_': lodash
3266
- }
3267
- };
3268
-
3269
- // Ensure wrappers are instances of `baseLodash`.
3270
- lodash.prototype = baseLodash.prototype;
3271
- lodash.prototype.constructor = lodash;
3272
-
3273
- LodashWrapper.prototype = baseCreate(baseLodash.prototype);
3274
- LodashWrapper.prototype.constructor = LodashWrapper;
3275
-
3276
- /*------------------------------------------------------------------------*/
3277
-
3278
- /**
3279
- * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
3280
- *
3281
- * @private
3282
- * @constructor
3283
- * @param {*} value The value to wrap.
3284
- */
3285
- function LazyWrapper(value) {
3286
- this.__wrapped__ = value;
3287
- this.__actions__ = [];
3288
- this.__dir__ = 1;
3289
- this.__filtered__ = false;
3290
- this.__iteratees__ = [];
3291
- this.__takeCount__ = MAX_ARRAY_LENGTH;
3292
- this.__views__ = [];
3293
- }
3294
-
3295
- /**
3296
- * Creates a clone of the lazy wrapper object.
3297
- *
3298
- * @private
3299
- * @name clone
3300
- * @memberOf LazyWrapper
3301
- * @returns {Object} Returns the cloned `LazyWrapper` object.
3302
- */
3303
- function lazyClone() {
3304
- var result = new LazyWrapper(this.__wrapped__);
3305
- result.__actions__ = copyArray(this.__actions__);
3306
- result.__dir__ = this.__dir__;
3307
- result.__filtered__ = this.__filtered__;
3308
- result.__iteratees__ = copyArray(this.__iteratees__);
3309
- result.__takeCount__ = this.__takeCount__;
3310
- result.__views__ = copyArray(this.__views__);
3311
- return result;
3312
- }
3313
-
3314
- /**
3315
- * Reverses the direction of lazy iteration.
3316
- *
3317
- * @private
3318
- * @name reverse
3319
- * @memberOf LazyWrapper
3320
- * @returns {Object} Returns the new reversed `LazyWrapper` object.
3321
- */
3322
- function lazyReverse() {
3323
- if (this.__filtered__) {
3324
- var result = new LazyWrapper(this);
3325
- result.__dir__ = -1;
3326
- result.__filtered__ = true;
3327
- } else {
3328
- result = this.clone();
3329
- result.__dir__ *= -1;
3330
- }
3331
- return result;
3332
- }
3333
-
3334
- /**
3335
- * Extracts the unwrapped value from its lazy wrapper.
3336
- *
3337
- * @private
3338
- * @name value
3339
- * @memberOf LazyWrapper
3340
- * @returns {*} Returns the unwrapped value.
3341
- */
3342
- function lazyValue() {
3343
- var array = this.__wrapped__.value(),
3344
- dir = this.__dir__,
3345
- isArr = isArray(array),
3346
- isRight = dir < 0,
3347
- arrLength = isArr ? array.length : 0,
3348
- view = getView(0, arrLength, this.__views__),
3349
- start = view.start,
3350
- end = view.end,
3351
- length = end - start,
3352
- index = isRight ? end : (start - 1),
3353
- iteratees = this.__iteratees__,
3354
- iterLength = iteratees.length,
3355
- resIndex = 0,
3356
- takeCount = nativeMin(length, this.__takeCount__);
3357
-
3358
- if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
3359
- return baseWrapperValue(array, this.__actions__);
3360
- }
3361
- var result = [];
3362
-
3363
- outer:
3364
- while (length-- && resIndex < takeCount) {
3365
- index += dir;
3366
-
3367
- var iterIndex = -1,
3368
- value = array[index];
3369
-
3370
- while (++iterIndex < iterLength) {
3371
- var data = iteratees[iterIndex],
3372
- iteratee = data.iteratee,
3373
- type = data.type,
3374
- computed = iteratee(value);
3375
-
3376
- if (type == LAZY_MAP_FLAG) {
3377
- value = computed;
3378
- } else if (!computed) {
3379
- if (type == LAZY_FILTER_FLAG) {
3380
- continue outer;
3381
- } else {
3382
- break outer;
3383
- }
3384
- }
3385
- }
3386
- result[resIndex++] = value;
3387
- }
3388
- return result;
3389
- }
3390
-
3391
- // Ensure `LazyWrapper` is an instance of `baseLodash`.
3392
- LazyWrapper.prototype = baseCreate(baseLodash.prototype);
3393
- LazyWrapper.prototype.constructor = LazyWrapper;
3394
-
3395
- /*------------------------------------------------------------------------*/
3396
-
3397
- /**
3398
- * Creates a hash object.
3399
- *
3400
- * @private
3401
- * @constructor
3402
- * @param {Array} [entries] The key-value pairs to cache.
3403
- */
3404
- function Hash(entries) {
3405
- var index = -1,
3406
- length = entries == null ? 0 : entries.length;
3407
-
3408
- this.clear();
3409
- while (++index < length) {
3410
- var entry = entries[index];
3411
- this.set(entry[0], entry[1]);
3412
- }
3413
- }
3414
-
3415
- /**
3416
- * Removes all key-value entries from the hash.
3417
- *
3418
- * @private
3419
- * @name clear
3420
- * @memberOf Hash
3421
- */
3422
- function hashClear() {
3423
- this.__data__ = nativeCreate ? nativeCreate(null) : {};
3424
- this.size = 0;
3425
- }
3426
-
3427
- /**
3428
- * Removes `key` and its value from the hash.
3429
- *
3430
- * @private
3431
- * @name delete
3432
- * @memberOf Hash
3433
- * @param {Object} hash The hash to modify.
3434
- * @param {string} key The key of the value to remove.
3435
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3436
- */
3437
- function hashDelete(key) {
3438
- var result = this.has(key) && delete this.__data__[key];
3439
- this.size -= result ? 1 : 0;
3440
- return result;
3441
- }
3442
-
3443
- /**
3444
- * Gets the hash value for `key`.
3445
- *
3446
- * @private
3447
- * @name get
3448
- * @memberOf Hash
3449
- * @param {string} key The key of the value to get.
3450
- * @returns {*} Returns the entry value.
3451
- */
3452
- function hashGet(key) {
3453
- var data = this.__data__;
3454
- if (nativeCreate) {
3455
- var result = data[key];
3456
- return result === HASH_UNDEFINED ? undefined : result;
3457
- }
3458
- return hasOwnProperty.call(data, key) ? data[key] : undefined;
3459
- }
3460
-
3461
- /**
3462
- * Checks if a hash value for `key` exists.
3463
- *
3464
- * @private
3465
- * @name has
3466
- * @memberOf Hash
3467
- * @param {string} key The key of the entry to check.
3468
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3469
- */
3470
- function hashHas(key) {
3471
- var data = this.__data__;
3472
- return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
3473
- }
3474
-
3475
- /**
3476
- * Sets the hash `key` to `value`.
3477
- *
3478
- * @private
3479
- * @name set
3480
- * @memberOf Hash
3481
- * @param {string} key The key of the value to set.
3482
- * @param {*} value The value to set.
3483
- * @returns {Object} Returns the hash instance.
3484
- */
3485
- function hashSet(key, value) {
3486
- var data = this.__data__;
3487
- this.size += this.has(key) ? 0 : 1;
3488
- data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
3489
- return this;
3490
- }
3491
-
3492
- // Add methods to `Hash`.
3493
- Hash.prototype.clear = hashClear;
3494
- Hash.prototype['delete'] = hashDelete;
3495
- Hash.prototype.get = hashGet;
3496
- Hash.prototype.has = hashHas;
3497
- Hash.prototype.set = hashSet;
3498
-
3499
- /*------------------------------------------------------------------------*/
3500
-
3501
- /**
3502
- * Creates an list cache object.
3503
- *
3504
- * @private
3505
- * @constructor
3506
- * @param {Array} [entries] The key-value pairs to cache.
3507
- */
3508
- function ListCache(entries) {
3509
- var index = -1,
3510
- length = entries == null ? 0 : entries.length;
3511
-
3512
- this.clear();
3513
- while (++index < length) {
3514
- var entry = entries[index];
3515
- this.set(entry[0], entry[1]);
3516
- }
3517
- }
3518
-
3519
- /**
3520
- * Removes all key-value entries from the list cache.
3521
- *
3522
- * @private
3523
- * @name clear
3524
- * @memberOf ListCache
3525
- */
3526
- function listCacheClear() {
3527
- this.__data__ = [];
3528
- this.size = 0;
3529
- }
3530
-
3531
- /**
3532
- * Removes `key` and its value from the list cache.
3533
- *
3534
- * @private
3535
- * @name delete
3536
- * @memberOf ListCache
3537
- * @param {string} key The key of the value to remove.
3538
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3539
- */
3540
- function listCacheDelete(key) {
3541
- var data = this.__data__,
3542
- index = assocIndexOf(data, key);
3543
-
3544
- if (index < 0) {
3545
- return false;
3546
- }
3547
- var lastIndex = data.length - 1;
3548
- if (index == lastIndex) {
3549
- data.pop();
3550
- } else {
3551
- splice.call(data, index, 1);
3552
- }
3553
- --this.size;
3554
- return true;
3555
- }
3556
-
3557
- /**
3558
- * Gets the list cache value for `key`.
3559
- *
3560
- * @private
3561
- * @name get
3562
- * @memberOf ListCache
3563
- * @param {string} key The key of the value to get.
3564
- * @returns {*} Returns the entry value.
3565
- */
3566
- function listCacheGet(key) {
3567
- var data = this.__data__,
3568
- index = assocIndexOf(data, key);
3569
-
3570
- return index < 0 ? undefined : data[index][1];
3571
- }
3572
-
3573
- /**
3574
- * Checks if a list cache value for `key` exists.
3575
- *
3576
- * @private
3577
- * @name has
3578
- * @memberOf ListCache
3579
- * @param {string} key The key of the entry to check.
3580
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3581
- */
3582
- function listCacheHas(key) {
3583
- return assocIndexOf(this.__data__, key) > -1;
3584
- }
3585
-
3586
- /**
3587
- * Sets the list cache `key` to `value`.
3588
- *
3589
- * @private
3590
- * @name set
3591
- * @memberOf ListCache
3592
- * @param {string} key The key of the value to set.
3593
- * @param {*} value The value to set.
3594
- * @returns {Object} Returns the list cache instance.
3595
- */
3596
- function listCacheSet(key, value) {
3597
- var data = this.__data__,
3598
- index = assocIndexOf(data, key);
3599
-
3600
- if (index < 0) {
3601
- ++this.size;
3602
- data.push([key, value]);
3603
- } else {
3604
- data[index][1] = value;
3605
- }
3606
- return this;
3607
- }
3608
-
3609
- // Add methods to `ListCache`.
3610
- ListCache.prototype.clear = listCacheClear;
3611
- ListCache.prototype['delete'] = listCacheDelete;
3612
- ListCache.prototype.get = listCacheGet;
3613
- ListCache.prototype.has = listCacheHas;
3614
- ListCache.prototype.set = listCacheSet;
3615
-
3616
- /*------------------------------------------------------------------------*/
3617
-
3618
- /**
3619
- * Creates a map cache object to store key-value pairs.
3620
- *
3621
- * @private
3622
- * @constructor
3623
- * @param {Array} [entries] The key-value pairs to cache.
3624
- */
3625
- function MapCache(entries) {
3626
- var index = -1,
3627
- length = entries == null ? 0 : entries.length;
3628
-
3629
- this.clear();
3630
- while (++index < length) {
3631
- var entry = entries[index];
3632
- this.set(entry[0], entry[1]);
3633
- }
3634
- }
3635
-
3636
- /**
3637
- * Removes all key-value entries from the map.
3638
- *
3639
- * @private
3640
- * @name clear
3641
- * @memberOf MapCache
3642
- */
3643
- function mapCacheClear() {
3644
- this.size = 0;
3645
- this.__data__ = {
3646
- 'hash': new Hash,
3647
- 'map': new (Map || ListCache),
3648
- 'string': new Hash
3649
- };
3650
- }
3651
-
3652
- /**
3653
- * Removes `key` and its value from the map.
3654
- *
3655
- * @private
3656
- * @name delete
3657
- * @memberOf MapCache
3658
- * @param {string} key The key of the value to remove.
3659
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3660
- */
3661
- function mapCacheDelete(key) {
3662
- var result = getMapData(this, key)['delete'](key);
3663
- this.size -= result ? 1 : 0;
3664
- return result;
3665
- }
3666
-
3667
- /**
3668
- * Gets the map value for `key`.
3669
- *
3670
- * @private
3671
- * @name get
3672
- * @memberOf MapCache
3673
- * @param {string} key The key of the value to get.
3674
- * @returns {*} Returns the entry value.
3675
- */
3676
- function mapCacheGet(key) {
3677
- return getMapData(this, key).get(key);
3678
- }
3679
-
3680
- /**
3681
- * Checks if a map value for `key` exists.
3682
- *
3683
- * @private
3684
- * @name has
3685
- * @memberOf MapCache
3686
- * @param {string} key The key of the entry to check.
3687
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3688
- */
3689
- function mapCacheHas(key) {
3690
- return getMapData(this, key).has(key);
3691
- }
3692
-
3693
- /**
3694
- * Sets the map `key` to `value`.
3695
- *
3696
- * @private
3697
- * @name set
3698
- * @memberOf MapCache
3699
- * @param {string} key The key of the value to set.
3700
- * @param {*} value The value to set.
3701
- * @returns {Object} Returns the map cache instance.
3702
- */
3703
- function mapCacheSet(key, value) {
3704
- var data = getMapData(this, key),
3705
- size = data.size;
3706
-
3707
- data.set(key, value);
3708
- this.size += data.size == size ? 0 : 1;
3709
- return this;
3710
- }
3711
-
3712
- // Add methods to `MapCache`.
3713
- MapCache.prototype.clear = mapCacheClear;
3714
- MapCache.prototype['delete'] = mapCacheDelete;
3715
- MapCache.prototype.get = mapCacheGet;
3716
- MapCache.prototype.has = mapCacheHas;
3717
- MapCache.prototype.set = mapCacheSet;
3718
-
3719
- /*------------------------------------------------------------------------*/
3720
-
3721
- /**
3722
- *
3723
- * Creates an array cache object to store unique values.
3724
- *
3725
- * @private
3726
- * @constructor
3727
- * @param {Array} [values] The values to cache.
3728
- */
3729
- function SetCache(values) {
3730
- var index = -1,
3731
- length = values == null ? 0 : values.length;
3732
-
3733
- this.__data__ = new MapCache;
3734
- while (++index < length) {
3735
- this.add(values[index]);
3736
- }
3737
- }
3738
-
3739
- /**
3740
- * Adds `value` to the array cache.
3741
- *
3742
- * @private
3743
- * @name add
3744
- * @memberOf SetCache
3745
- * @alias push
3746
- * @param {*} value The value to cache.
3747
- * @returns {Object} Returns the cache instance.
3748
- */
3749
- function setCacheAdd(value) {
3750
- this.__data__.set(value, HASH_UNDEFINED);
3751
- return this;
3752
- }
3753
-
3754
- /**
3755
- * Checks if `value` is in the array cache.
3756
- *
3757
- * @private
3758
- * @name has
3759
- * @memberOf SetCache
3760
- * @param {*} value The value to search for.
3761
- * @returns {number} Returns `true` if `value` is found, else `false`.
3762
- */
3763
- function setCacheHas(value) {
3764
- return this.__data__.has(value);
3765
- }
3766
-
3767
- // Add methods to `SetCache`.
3768
- SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
3769
- SetCache.prototype.has = setCacheHas;
3770
-
3771
- /*------------------------------------------------------------------------*/
3772
-
3773
- /**
3774
- * Creates a stack cache object to store key-value pairs.
3775
- *
3776
- * @private
3777
- * @constructor
3778
- * @param {Array} [entries] The key-value pairs to cache.
3779
- */
3780
- function Stack(entries) {
3781
- var data = this.__data__ = new ListCache(entries);
3782
- this.size = data.size;
3783
- }
3784
-
3785
- /**
3786
- * Removes all key-value entries from the stack.
3787
- *
3788
- * @private
3789
- * @name clear
3790
- * @memberOf Stack
3791
- */
3792
- function stackClear() {
3793
- this.__data__ = new ListCache;
3794
- this.size = 0;
3795
- }
3796
-
3797
- /**
3798
- * Removes `key` and its value from the stack.
3799
- *
3800
- * @private
3801
- * @name delete
3802
- * @memberOf Stack
3803
- * @param {string} key The key of the value to remove.
3804
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3805
- */
3806
- function stackDelete(key) {
3807
- var data = this.__data__,
3808
- result = data['delete'](key);
3809
-
3810
- this.size = data.size;
3811
- return result;
3812
- }
3813
-
3814
- /**
3815
- * Gets the stack value for `key`.
3816
- *
3817
- * @private
3818
- * @name get
3819
- * @memberOf Stack
3820
- * @param {string} key The key of the value to get.
3821
- * @returns {*} Returns the entry value.
3822
- */
3823
- function stackGet(key) {
3824
- return this.__data__.get(key);
3825
- }
3826
-
3827
- /**
3828
- * Checks if a stack value for `key` exists.
3829
- *
3830
- * @private
3831
- * @name has
3832
- * @memberOf Stack
3833
- * @param {string} key The key of the entry to check.
3834
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3835
- */
3836
- function stackHas(key) {
3837
- return this.__data__.has(key);
3838
- }
3839
-
3840
- /**
3841
- * Sets the stack `key` to `value`.
3842
- *
3843
- * @private
3844
- * @name set
3845
- * @memberOf Stack
3846
- * @param {string} key The key of the value to set.
3847
- * @param {*} value The value to set.
3848
- * @returns {Object} Returns the stack cache instance.
3849
- */
3850
- function stackSet(key, value) {
3851
- var data = this.__data__;
3852
- if (data instanceof ListCache) {
3853
- var pairs = data.__data__;
3854
- if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
3855
- pairs.push([key, value]);
3856
- this.size = ++data.size;
3857
- return this;
3858
- }
3859
- data = this.__data__ = new MapCache(pairs);
3860
- }
3861
- data.set(key, value);
3862
- this.size = data.size;
3863
- return this;
3864
- }
3865
-
3866
- // Add methods to `Stack`.
3867
- Stack.prototype.clear = stackClear;
3868
- Stack.prototype['delete'] = stackDelete;
3869
- Stack.prototype.get = stackGet;
3870
- Stack.prototype.has = stackHas;
3871
- Stack.prototype.set = stackSet;
3872
-
3873
- /*------------------------------------------------------------------------*/
3874
-
3875
- /**
3876
- * Creates an array of the enumerable property names of the array-like `value`.
3877
- *
3878
- * @private
3879
- * @param {*} value The value to query.
3880
- * @param {boolean} inherited Specify returning inherited property names.
3881
- * @returns {Array} Returns the array of property names.
3882
- */
3883
- function arrayLikeKeys(value, inherited) {
3884
- var isArr = isArray(value),
3885
- isArg = !isArr && isArguments(value),
3886
- isBuff = !isArr && !isArg && isBuffer(value),
3887
- isType = !isArr && !isArg && !isBuff && isTypedArray(value),
3888
- skipIndexes = isArr || isArg || isBuff || isType,
3889
- result = skipIndexes ? baseTimes(value.length, String) : [],
3890
- length = result.length;
3891
-
3892
- for (var key in value) {
3893
- if ((inherited || hasOwnProperty.call(value, key)) &&
3894
- !(skipIndexes && (
3895
- // Safari 9 has enumerable `arguments.length` in strict mode.
3896
- key == 'length' ||
3897
- // Node.js 0.10 has enumerable non-index properties on buffers.
3898
- (isBuff && (key == 'offset' || key == 'parent')) ||
3899
- // PhantomJS 2 has enumerable non-index properties on typed arrays.
3900
- (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
3901
- // Skip index properties.
3902
- isIndex(key, length)
3903
- ))) {
3904
- result.push(key);
3905
- }
3906
- }
3907
- return result;
3908
- }
3909
-
3910
- /**
3911
- * A specialized version of `_.sample` for arrays.
3912
- *
3913
- * @private
3914
- * @param {Array} array The array to sample.
3915
- * @returns {*} Returns the random element.
3916
- */
3917
- function arraySample(array) {
3918
- var length = array.length;
3919
- return length ? array[baseRandom(0, length - 1)] : undefined;
3920
- }
3921
-
3922
- /**
3923
- * A specialized version of `_.sampleSize` for arrays.
3924
- *
3925
- * @private
3926
- * @param {Array} array The array to sample.
3927
- * @param {number} n The number of elements to sample.
3928
- * @returns {Array} Returns the random elements.
3929
- */
3930
- function arraySampleSize(array, n) {
3931
- return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
3932
- }
3933
-
3934
- /**
3935
- * A specialized version of `_.shuffle` for arrays.
3936
- *
3937
- * @private
3938
- * @param {Array} array The array to shuffle.
3939
- * @returns {Array} Returns the new shuffled array.
3940
- */
3941
- function arrayShuffle(array) {
3942
- return shuffleSelf(copyArray(array));
3943
- }
3944
-
3945
- /**
3946
- * This function is like `assignValue` except that it doesn't assign
3947
- * `undefined` values.
3948
- *
3949
- * @private
3950
- * @param {Object} object The object to modify.
3951
- * @param {string} key The key of the property to assign.
3952
- * @param {*} value The value to assign.
3953
- */
3954
- function assignMergeValue(object, key, value) {
3955
- if ((value !== undefined && !eq(object[key], value)) ||
3956
- (value === undefined && !(key in object))) {
3957
- baseAssignValue(object, key, value);
3958
- }
3959
- }
3960
-
3961
- /**
3962
- * Assigns `value` to `key` of `object` if the existing value is not equivalent
3963
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
3964
- * for equality comparisons.
3965
- *
3966
- * @private
3967
- * @param {Object} object The object to modify.
3968
- * @param {string} key The key of the property to assign.
3969
- * @param {*} value The value to assign.
3970
- */
3971
- function assignValue(object, key, value) {
3972
- var objValue = object[key];
3973
- if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
3974
- (value === undefined && !(key in object))) {
3975
- baseAssignValue(object, key, value);
3976
- }
3977
- }
3978
-
3979
- /**
3980
- * Gets the index at which the `key` is found in `array` of key-value pairs.
3981
- *
3982
- * @private
3983
- * @param {Array} array The array to inspect.
3984
- * @param {*} key The key to search for.
3985
- * @returns {number} Returns the index of the matched value, else `-1`.
3986
- */
3987
- function assocIndexOf(array, key) {
3988
- var length = array.length;
3989
- while (length--) {
3990
- if (eq(array[length][0], key)) {
3991
- return length;
3992
- }
3993
- }
3994
- return -1;
3995
- }
3996
-
3997
- /**
3998
- * Aggregates elements of `collection` on `accumulator` with keys transformed
3999
- * by `iteratee` and values set by `setter`.
4000
- *
4001
- * @private
4002
- * @param {Array|Object} collection The collection to iterate over.
4003
- * @param {Function} setter The function to set `accumulator` values.
4004
- * @param {Function} iteratee The iteratee to transform keys.
4005
- * @param {Object} accumulator The initial aggregated object.
4006
- * @returns {Function} Returns `accumulator`.
4007
- */
4008
- function baseAggregator(collection, setter, iteratee, accumulator) {
4009
- baseEach(collection, function(value, key, collection) {
4010
- setter(accumulator, value, iteratee(value), collection);
4011
- });
4012
- return accumulator;
4013
- }
4014
-
4015
- /**
4016
- * The base implementation of `_.assign` without support for multiple sources
4017
- * or `customizer` functions.
4018
- *
4019
- * @private
4020
- * @param {Object} object The destination object.
4021
- * @param {Object} source The source object.
4022
- * @returns {Object} Returns `object`.
4023
- */
4024
- function baseAssign(object, source) {
4025
- return object && copyObject(source, keys(source), object);
4026
- }
4027
-
4028
- /**
4029
- * The base implementation of `_.assignIn` without support for multiple sources
4030
- * or `customizer` functions.
4031
- *
4032
- * @private
4033
- * @param {Object} object The destination object.
4034
- * @param {Object} source The source object.
4035
- * @returns {Object} Returns `object`.
4036
- */
4037
- function baseAssignIn(object, source) {
4038
- return object && copyObject(source, keysIn(source), object);
4039
- }
4040
-
4041
- /**
4042
- * The base implementation of `assignValue` and `assignMergeValue` without
4043
- * value checks.
4044
- *
4045
- * @private
4046
- * @param {Object} object The object to modify.
4047
- * @param {string} key The key of the property to assign.
4048
- * @param {*} value The value to assign.
4049
- */
4050
- function baseAssignValue(object, key, value) {
4051
- if (key == '__proto__' && defineProperty) {
4052
- defineProperty(object, key, {
4053
- 'configurable': true,
4054
- 'enumerable': true,
4055
- 'value': value,
4056
- 'writable': true
4057
- });
4058
- } else {
4059
- object[key] = value;
4060
- }
4061
- }
4062
-
4063
- /**
4064
- * The base implementation of `_.at` without support for individual paths.
4065
- *
4066
- * @private
4067
- * @param {Object} object The object to iterate over.
4068
- * @param {string[]} paths The property paths to pick.
4069
- * @returns {Array} Returns the picked elements.
4070
- */
4071
- function baseAt(object, paths) {
4072
- var index = -1,
4073
- length = paths.length,
4074
- result = Array(length),
4075
- skip = object == null;
4076
-
4077
- while (++index < length) {
4078
- result[index] = skip ? undefined : get(object, paths[index]);
4079
- }
4080
- return result;
4081
- }
4082
-
4083
- /**
4084
- * The base implementation of `_.clamp` which doesn't coerce arguments.
4085
- *
4086
- * @private
4087
- * @param {number} number The number to clamp.
4088
- * @param {number} [lower] The lower bound.
4089
- * @param {number} upper The upper bound.
4090
- * @returns {number} Returns the clamped number.
4091
- */
4092
- function baseClamp(number, lower, upper) {
4093
- if (number === number) {
4094
- if (upper !== undefined) {
4095
- number = number <= upper ? number : upper;
4096
- }
4097
- if (lower !== undefined) {
4098
- number = number >= lower ? number : lower;
4099
- }
4100
- }
4101
- return number;
4102
- }
4103
-
4104
- /**
4105
- * The base implementation of `_.clone` and `_.cloneDeep` which tracks
4106
- * traversed objects.
4107
- *
4108
- * @private
4109
- * @param {*} value The value to clone.
4110
- * @param {boolean} bitmask The bitmask flags.
4111
- * 1 - Deep clone
4112
- * 2 - Flatten inherited properties
4113
- * 4 - Clone symbols
4114
- * @param {Function} [customizer] The function to customize cloning.
4115
- * @param {string} [key] The key of `value`.
4116
- * @param {Object} [object] The parent object of `value`.
4117
- * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
4118
- * @returns {*} Returns the cloned value.
4119
- */
4120
- function baseClone(value, bitmask, customizer, key, object, stack) {
4121
- var result,
4122
- isDeep = bitmask & CLONE_DEEP_FLAG,
4123
- isFlat = bitmask & CLONE_FLAT_FLAG,
4124
- isFull = bitmask & CLONE_SYMBOLS_FLAG;
4125
-
4126
- if (customizer) {
4127
- result = object ? customizer(value, key, object, stack) : customizer(value);
4128
- }
4129
- if (result !== undefined) {
4130
- return result;
4131
- }
4132
- if (!isObject(value)) {
4133
- return value;
4134
- }
4135
- var isArr = isArray(value);
4136
- if (isArr) {
4137
- result = initCloneArray(value);
4138
- if (!isDeep) {
4139
- return copyArray(value, result);
4140
- }
4141
- } else {
4142
- var tag = getTag(value),
4143
- isFunc = tag == funcTag || tag == genTag;
4144
-
4145
- if (isBuffer(value)) {
4146
- return cloneBuffer(value, isDeep);
4147
- }
4148
- if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
4149
- result = (isFlat || isFunc) ? {} : initCloneObject(value);
4150
- if (!isDeep) {
4151
- return isFlat
4152
- ? copySymbolsIn(value, baseAssignIn(result, value))
4153
- : copySymbols(value, baseAssign(result, value));
4154
- }
4155
- } else {
4156
- if (!cloneableTags[tag]) {
4157
- return object ? value : {};
4158
- }
4159
- result = initCloneByTag(value, tag, isDeep);
4160
- }
4161
- }
4162
- // Check for circular references and return its corresponding clone.
4163
- stack || (stack = new Stack);
4164
- var stacked = stack.get(value);
4165
- if (stacked) {
4166
- return stacked;
4167
- }
4168
- stack.set(value, result);
4169
-
4170
- if (isSet(value)) {
4171
- value.forEach(function(subValue) {
4172
- result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
4173
- });
4174
-
4175
- return result;
4176
- }
4177
-
4178
- if (isMap(value)) {
4179
- value.forEach(function(subValue, key) {
4180
- result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
4181
- });
4182
-
4183
- return result;
4184
- }
4185
-
4186
- var keysFunc = isFull
4187
- ? (isFlat ? getAllKeysIn : getAllKeys)
4188
- : (isFlat ? keysIn : keys);
4189
-
4190
- var props = isArr ? undefined : keysFunc(value);
4191
- arrayEach(props || value, function(subValue, key) {
4192
- if (props) {
4193
- key = subValue;
4194
- subValue = value[key];
4195
- }
4196
- // Recursively populate clone (susceptible to call stack limits).
4197
- assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
4198
- });
4199
- return result;
4200
- }
4201
-
4202
- /**
4203
- * The base implementation of `_.conforms` which doesn't clone `source`.
4204
- *
4205
- * @private
4206
- * @param {Object} source The object of property predicates to conform to.
4207
- * @returns {Function} Returns the new spec function.
4208
- */
4209
- function baseConforms(source) {
4210
- var props = keys(source);
4211
- return function(object) {
4212
- return baseConformsTo(object, source, props);
4213
- };
4214
- }
4215
-
4216
- /**
4217
- * The base implementation of `_.conformsTo` which accepts `props` to check.
4218
- *
4219
- * @private
4220
- * @param {Object} object The object to inspect.
4221
- * @param {Object} source The object of property predicates to conform to.
4222
- * @returns {boolean} Returns `true` if `object` conforms, else `false`.
4223
- */
4224
- function baseConformsTo(object, source, props) {
4225
- var length = props.length;
4226
- if (object == null) {
4227
- return !length;
4228
- }
4229
- object = Object(object);
4230
- while (length--) {
4231
- var key = props[length],
4232
- predicate = source[key],
4233
- value = object[key];
4234
-
4235
- if ((value === undefined && !(key in object)) || !predicate(value)) {
4236
- return false;
4237
- }
4238
- }
4239
- return true;
4240
- }
4241
-
4242
- /**
4243
- * The base implementation of `_.delay` and `_.defer` which accepts `args`
4244
- * to provide to `func`.
4245
- *
4246
- * @private
4247
- * @param {Function} func The function to delay.
4248
- * @param {number} wait The number of milliseconds to delay invocation.
4249
- * @param {Array} args The arguments to provide to `func`.
4250
- * @returns {number|Object} Returns the timer id or timeout object.
4251
- */
4252
- function baseDelay(func, wait, args) {
4253
- if (typeof func != 'function') {
4254
- throw new TypeError(FUNC_ERROR_TEXT);
4255
- }
4256
- return setTimeout(function() { func.apply(undefined, args); }, wait);
4257
- }
4258
-
4259
- /**
4260
- * The base implementation of methods like `_.difference` without support
4261
- * for excluding multiple arrays or iteratee shorthands.
4262
- *
4263
- * @private
4264
- * @param {Array} array The array to inspect.
4265
- * @param {Array} values The values to exclude.
4266
- * @param {Function} [iteratee] The iteratee invoked per element.
4267
- * @param {Function} [comparator] The comparator invoked per element.
4268
- * @returns {Array} Returns the new array of filtered values.
4269
- */
4270
- function baseDifference(array, values, iteratee, comparator) {
4271
- var index = -1,
4272
- includes = arrayIncludes,
4273
- isCommon = true,
4274
- length = array.length,
4275
- result = [],
4276
- valuesLength = values.length;
4277
-
4278
- if (!length) {
4279
- return result;
4280
- }
4281
- if (iteratee) {
4282
- values = arrayMap(values, baseUnary(iteratee));
4283
- }
4284
- if (comparator) {
4285
- includes = arrayIncludesWith;
4286
- isCommon = false;
4287
- }
4288
- else if (values.length >= LARGE_ARRAY_SIZE) {
4289
- includes = cacheHas;
4290
- isCommon = false;
4291
- values = new SetCache(values);
4292
- }
4293
- outer:
4294
- while (++index < length) {
4295
- var value = array[index],
4296
- computed = iteratee == null ? value : iteratee(value);
4297
-
4298
- value = (comparator || value !== 0) ? value : 0;
4299
- if (isCommon && computed === computed) {
4300
- var valuesIndex = valuesLength;
4301
- while (valuesIndex--) {
4302
- if (values[valuesIndex] === computed) {
4303
- continue outer;
4304
- }
4305
- }
4306
- result.push(value);
4307
- }
4308
- else if (!includes(values, computed, comparator)) {
4309
- result.push(value);
4310
- }
4311
- }
4312
- return result;
4313
- }
4314
-
4315
- /**
4316
- * The base implementation of `_.forEach` without support for iteratee shorthands.
4317
- *
4318
- * @private
4319
- * @param {Array|Object} collection The collection to iterate over.
4320
- * @param {Function} iteratee The function invoked per iteration.
4321
- * @returns {Array|Object} Returns `collection`.
4322
- */
4323
- var baseEach = createBaseEach(baseForOwn);
4324
-
4325
- /**
4326
- * The base implementation of `_.forEachRight` without support for iteratee shorthands.
4327
- *
4328
- * @private
4329
- * @param {Array|Object} collection The collection to iterate over.
4330
- * @param {Function} iteratee The function invoked per iteration.
4331
- * @returns {Array|Object} Returns `collection`.
4332
- */
4333
- var baseEachRight = createBaseEach(baseForOwnRight, true);
4334
-
4335
- /**
4336
- * The base implementation of `_.every` without support for iteratee shorthands.
4337
- *
4338
- * @private
4339
- * @param {Array|Object} collection The collection to iterate over.
4340
- * @param {Function} predicate The function invoked per iteration.
4341
- * @returns {boolean} Returns `true` if all elements pass the predicate check,
4342
- * else `false`
4343
- */
4344
- function baseEvery(collection, predicate) {
4345
- var result = true;
4346
- baseEach(collection, function(value, index, collection) {
4347
- result = !!predicate(value, index, collection);
4348
- return result;
4349
- });
4350
- return result;
4351
- }
4352
-
4353
- /**
4354
- * The base implementation of methods like `_.max` and `_.min` which accepts a
4355
- * `comparator` to determine the extremum value.
4356
- *
4357
- * @private
4358
- * @param {Array} array The array to iterate over.
4359
- * @param {Function} iteratee The iteratee invoked per iteration.
4360
- * @param {Function} comparator The comparator used to compare values.
4361
- * @returns {*} Returns the extremum value.
4362
- */
4363
- function baseExtremum(array, iteratee, comparator) {
4364
- var index = -1,
4365
- length = array.length;
4366
-
4367
- while (++index < length) {
4368
- var value = array[index],
4369
- current = iteratee(value);
4370
-
4371
- if (current != null && (computed === undefined
4372
- ? (current === current && !isSymbol(current))
4373
- : comparator(current, computed)
4374
- )) {
4375
- var computed = current,
4376
- result = value;
4377
- }
4378
- }
4379
- return result;
4380
- }
4381
-
4382
- /**
4383
- * The base implementation of `_.fill` without an iteratee call guard.
4384
- *
4385
- * @private
4386
- * @param {Array} array The array to fill.
4387
- * @param {*} value The value to fill `array` with.
4388
- * @param {number} [start=0] The start position.
4389
- * @param {number} [end=array.length] The end position.
4390
- * @returns {Array} Returns `array`.
4391
- */
4392
- function baseFill(array, value, start, end) {
4393
- var length = array.length;
4394
-
4395
- start = toInteger(start);
4396
- if (start < 0) {
4397
- start = -start > length ? 0 : (length + start);
4398
- }
4399
- end = (end === undefined || end > length) ? length : toInteger(end);
4400
- if (end < 0) {
4401
- end += length;
4402
- }
4403
- end = start > end ? 0 : toLength(end);
4404
- while (start < end) {
4405
- array[start++] = value;
4406
- }
4407
- return array;
4408
- }
4409
-
4410
- /**
4411
- * The base implementation of `_.filter` without support for iteratee shorthands.
4412
- *
4413
- * @private
4414
- * @param {Array|Object} collection The collection to iterate over.
4415
- * @param {Function} predicate The function invoked per iteration.
4416
- * @returns {Array} Returns the new filtered array.
4417
- */
4418
- function baseFilter(collection, predicate) {
4419
- var result = [];
4420
- baseEach(collection, function(value, index, collection) {
4421
- if (predicate(value, index, collection)) {
4422
- result.push(value);
4423
- }
4424
- });
4425
- return result;
4426
- }
4427
-
4428
- /**
4429
- * The base implementation of `_.flatten` with support for restricting flattening.
4430
- *
4431
- * @private
4432
- * @param {Array} array The array to flatten.
4433
- * @param {number} depth The maximum recursion depth.
4434
- * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
4435
- * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
4436
- * @param {Array} [result=[]] The initial result value.
4437
- * @returns {Array} Returns the new flattened array.
4438
- */
4439
- function baseFlatten(array, depth, predicate, isStrict, result) {
4440
- var index = -1,
4441
- length = array.length;
4442
-
4443
- predicate || (predicate = isFlattenable);
4444
- result || (result = []);
4445
-
4446
- while (++index < length) {
4447
- var value = array[index];
4448
- if (depth > 0 && predicate(value)) {
4449
- if (depth > 1) {
4450
- // Recursively flatten arrays (susceptible to call stack limits).
4451
- baseFlatten(value, depth - 1, predicate, isStrict, result);
4452
- } else {
4453
- arrayPush(result, value);
4454
- }
4455
- } else if (!isStrict) {
4456
- result[result.length] = value;
4457
- }
4458
- }
4459
- return result;
4460
- }
4461
-
4462
- /**
4463
- * The base implementation of `baseForOwn` which iterates over `object`
4464
- * properties returned by `keysFunc` and invokes `iteratee` for each property.
4465
- * Iteratee functions may exit iteration early by explicitly returning `false`.
4466
- *
4467
- * @private
4468
- * @param {Object} object The object to iterate over.
4469
- * @param {Function} iteratee The function invoked per iteration.
4470
- * @param {Function} keysFunc The function to get the keys of `object`.
4471
- * @returns {Object} Returns `object`.
4472
- */
4473
- var baseFor = createBaseFor();
4474
-
4475
- /**
4476
- * This function is like `baseFor` except that it iterates over properties
4477
- * in the opposite order.
4478
- *
4479
- * @private
4480
- * @param {Object} object The object to iterate over.
4481
- * @param {Function} iteratee The function invoked per iteration.
4482
- * @param {Function} keysFunc The function to get the keys of `object`.
4483
- * @returns {Object} Returns `object`.
4484
- */
4485
- var baseForRight = createBaseFor(true);
4486
-
4487
- /**
4488
- * The base implementation of `_.forOwn` without support for iteratee shorthands.
4489
- *
4490
- * @private
4491
- * @param {Object} object The object to iterate over.
4492
- * @param {Function} iteratee The function invoked per iteration.
4493
- * @returns {Object} Returns `object`.
4494
- */
4495
- function baseForOwn(object, iteratee) {
4496
- return object && baseFor(object, iteratee, keys);
4497
- }
4498
-
4499
- /**
4500
- * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
4501
- *
4502
- * @private
4503
- * @param {Object} object The object to iterate over.
4504
- * @param {Function} iteratee The function invoked per iteration.
4505
- * @returns {Object} Returns `object`.
4506
- */
4507
- function baseForOwnRight(object, iteratee) {
4508
- return object && baseForRight(object, iteratee, keys);
4509
- }
4510
-
4511
- /**
4512
- * The base implementation of `_.functions` which creates an array of
4513
- * `object` function property names filtered from `props`.
4514
- *
4515
- * @private
4516
- * @param {Object} object The object to inspect.
4517
- * @param {Array} props The property names to filter.
4518
- * @returns {Array} Returns the function names.
4519
- */
4520
- function baseFunctions(object, props) {
4521
- return arrayFilter(props, function(key) {
4522
- return isFunction(object[key]);
4523
- });
4524
- }
4525
-
4526
- /**
4527
- * The base implementation of `_.get` without support for default values.
4528
- *
4529
- * @private
4530
- * @param {Object} object The object to query.
4531
- * @param {Array|string} path The path of the property to get.
4532
- * @returns {*} Returns the resolved value.
4533
- */
4534
- function baseGet(object, path) {
4535
- path = castPath(path, object);
4536
-
4537
- var index = 0,
4538
- length = path.length;
4539
-
4540
- while (object != null && index < length) {
4541
- object = object[toKey(path[index++])];
4542
- }
4543
- return (index && index == length) ? object : undefined;
4544
- }
4545
-
4546
- /**
4547
- * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
4548
- * `keysFunc` and `symbolsFunc` to get the enumerable property names and
4549
- * symbols of `object`.
4550
- *
4551
- * @private
4552
- * @param {Object} object The object to query.
4553
- * @param {Function} keysFunc The function to get the keys of `object`.
4554
- * @param {Function} symbolsFunc The function to get the symbols of `object`.
4555
- * @returns {Array} Returns the array of property names and symbols.
4556
- */
4557
- function baseGetAllKeys(object, keysFunc, symbolsFunc) {
4558
- var result = keysFunc(object);
4559
- return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
4560
- }
4561
-
4562
- /**
4563
- * The base implementation of `getTag` without fallbacks for buggy environments.
4564
- *
4565
- * @private
4566
- * @param {*} value The value to query.
4567
- * @returns {string} Returns the `toStringTag`.
4568
- */
4569
- function baseGetTag(value) {
4570
- if (value == null) {
4571
- return value === undefined ? undefinedTag : nullTag;
4572
- }
4573
- return (symToStringTag && symToStringTag in Object(value))
4574
- ? getRawTag(value)
4575
- : objectToString(value);
4576
- }
4577
-
4578
- /**
4579
- * The base implementation of `_.gt` which doesn't coerce arguments.
4580
- *
4581
- * @private
4582
- * @param {*} value The value to compare.
4583
- * @param {*} other The other value to compare.
4584
- * @returns {boolean} Returns `true` if `value` is greater than `other`,
4585
- * else `false`.
4586
- */
4587
- function baseGt(value, other) {
4588
- return value > other;
4589
- }
4590
-
4591
- /**
4592
- * The base implementation of `_.has` without support for deep paths.
4593
- *
4594
- * @private
4595
- * @param {Object} [object] The object to query.
4596
- * @param {Array|string} key The key to check.
4597
- * @returns {boolean} Returns `true` if `key` exists, else `false`.
4598
- */
4599
- function baseHas(object, key) {
4600
- return object != null && hasOwnProperty.call(object, key);
4601
- }
4602
-
4603
- /**
4604
- * The base implementation of `_.hasIn` without support for deep paths.
4605
- *
4606
- * @private
4607
- * @param {Object} [object] The object to query.
4608
- * @param {Array|string} key The key to check.
4609
- * @returns {boolean} Returns `true` if `key` exists, else `false`.
4610
- */
4611
- function baseHasIn(object, key) {
4612
- return object != null && key in Object(object);
4613
- }
4614
-
4615
- /**
4616
- * The base implementation of `_.inRange` which doesn't coerce arguments.
4617
- *
4618
- * @private
4619
- * @param {number} number The number to check.
4620
- * @param {number} start The start of the range.
4621
- * @param {number} end The end of the range.
4622
- * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
4623
- */
4624
- function baseInRange(number, start, end) {
4625
- return number >= nativeMin(start, end) && number < nativeMax(start, end);
4626
- }
4627
-
4628
- /**
4629
- * The base implementation of methods like `_.intersection`, without support
4630
- * for iteratee shorthands, that accepts an array of arrays to inspect.
4631
- *
4632
- * @private
4633
- * @param {Array} arrays The arrays to inspect.
4634
- * @param {Function} [iteratee] The iteratee invoked per element.
4635
- * @param {Function} [comparator] The comparator invoked per element.
4636
- * @returns {Array} Returns the new array of shared values.
4637
- */
4638
- function baseIntersection(arrays, iteratee, comparator) {
4639
- var includes = comparator ? arrayIncludesWith : arrayIncludes,
4640
- length = arrays[0].length,
4641
- othLength = arrays.length,
4642
- othIndex = othLength,
4643
- caches = Array(othLength),
4644
- maxLength = Infinity,
4645
- result = [];
4646
-
4647
- while (othIndex--) {
4648
- var array = arrays[othIndex];
4649
- if (othIndex && iteratee) {
4650
- array = arrayMap(array, baseUnary(iteratee));
4651
- }
4652
- maxLength = nativeMin(array.length, maxLength);
4653
- caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
4654
- ? new SetCache(othIndex && array)
4655
- : undefined;
4656
- }
4657
- array = arrays[0];
4658
-
4659
- var index = -1,
4660
- seen = caches[0];
4661
-
4662
- outer:
4663
- while (++index < length && result.length < maxLength) {
4664
- var value = array[index],
4665
- computed = iteratee ? iteratee(value) : value;
4666
-
4667
- value = (comparator || value !== 0) ? value : 0;
4668
- if (!(seen
4669
- ? cacheHas(seen, computed)
4670
- : includes(result, computed, comparator)
4671
- )) {
4672
- othIndex = othLength;
4673
- while (--othIndex) {
4674
- var cache = caches[othIndex];
4675
- if (!(cache
4676
- ? cacheHas(cache, computed)
4677
- : includes(arrays[othIndex], computed, comparator))
4678
- ) {
4679
- continue outer;
4680
- }
4681
- }
4682
- if (seen) {
4683
- seen.push(computed);
4684
- }
4685
- result.push(value);
4686
- }
4687
- }
4688
- return result;
4689
- }
4690
-
4691
- /**
4692
- * The base implementation of `_.invert` and `_.invertBy` which inverts
4693
- * `object` with values transformed by `iteratee` and set by `setter`.
4694
- *
4695
- * @private
4696
- * @param {Object} object The object to iterate over.
4697
- * @param {Function} setter The function to set `accumulator` values.
4698
- * @param {Function} iteratee The iteratee to transform values.
4699
- * @param {Object} accumulator The initial inverted object.
4700
- * @returns {Function} Returns `accumulator`.
4701
- */
4702
- function baseInverter(object, setter, iteratee, accumulator) {
4703
- baseForOwn(object, function(value, key, object) {
4704
- setter(accumulator, iteratee(value), key, object);
4705
- });
4706
- return accumulator;
4707
- }
4708
-
4709
- /**
4710
- * The base implementation of `_.invoke` without support for individual
4711
- * method arguments.
4712
- *
4713
- * @private
4714
- * @param {Object} object The object to query.
4715
- * @param {Array|string} path The path of the method to invoke.
4716
- * @param {Array} args The arguments to invoke the method with.
4717
- * @returns {*} Returns the result of the invoked method.
4718
- */
4719
- function baseInvoke(object, path, args) {
4720
- path = castPath(path, object);
4721
- object = parent(object, path);
4722
- var func = object == null ? object : object[toKey(last(path))];
4723
- return func == null ? undefined : apply(func, object, args);
4724
- }
4725
-
4726
- /**
4727
- * The base implementation of `_.isArguments`.
4728
- *
4729
- * @private
4730
- * @param {*} value The value to check.
4731
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
4732
- */
4733
- function baseIsArguments(value) {
4734
- return isObjectLike(value) && baseGetTag(value) == argsTag;
4735
- }
4736
-
4737
- /**
4738
- * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
4739
- *
4740
- * @private
4741
- * @param {*} value The value to check.
4742
- * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
4743
- */
4744
- function baseIsArrayBuffer(value) {
4745
- return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
4746
- }
4747
-
4748
- /**
4749
- * The base implementation of `_.isDate` without Node.js optimizations.
4750
- *
4751
- * @private
4752
- * @param {*} value The value to check.
4753
- * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
4754
- */
4755
- function baseIsDate(value) {
4756
- return isObjectLike(value) && baseGetTag(value) == dateTag;
4757
- }
4758
-
4759
- /**
4760
- * The base implementation of `_.isEqual` which supports partial comparisons
4761
- * and tracks traversed objects.
4762
- *
4763
- * @private
4764
- * @param {*} value The value to compare.
4765
- * @param {*} other The other value to compare.
4766
- * @param {boolean} bitmask The bitmask flags.
4767
- * 1 - Unordered comparison
4768
- * 2 - Partial comparison
4769
- * @param {Function} [customizer] The function to customize comparisons.
4770
- * @param {Object} [stack] Tracks traversed `value` and `other` objects.
4771
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
4772
- */
4773
- function baseIsEqual(value, other, bitmask, customizer, stack) {
4774
- if (value === other) {
4775
- return true;
4776
- }
4777
- if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
4778
- return value !== value && other !== other;
4779
- }
4780
- return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
4781
- }
4782
-
4783
- /**
4784
- * A specialized version of `baseIsEqual` for arrays and objects which performs
4785
- * deep comparisons and tracks traversed objects enabling objects with circular
4786
- * references to be compared.
4787
- *
4788
- * @private
4789
- * @param {Object} object The object to compare.
4790
- * @param {Object} other The other object to compare.
4791
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
4792
- * @param {Function} customizer The function to customize comparisons.
4793
- * @param {Function} equalFunc The function to determine equivalents of values.
4794
- * @param {Object} [stack] Tracks traversed `object` and `other` objects.
4795
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
4796
- */
4797
- function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
4798
- var objIsArr = isArray(object),
4799
- othIsArr = isArray(other),
4800
- objTag = objIsArr ? arrayTag : getTag(object),
4801
- othTag = othIsArr ? arrayTag : getTag(other);
4802
-
4803
- objTag = objTag == argsTag ? objectTag : objTag;
4804
- othTag = othTag == argsTag ? objectTag : othTag;
4805
-
4806
- var objIsObj = objTag == objectTag,
4807
- othIsObj = othTag == objectTag,
4808
- isSameTag = objTag == othTag;
4809
-
4810
- if (isSameTag && isBuffer(object)) {
4811
- if (!isBuffer(other)) {
4812
- return false;
4813
- }
4814
- objIsArr = true;
4815
- objIsObj = false;
4816
- }
4817
- if (isSameTag && !objIsObj) {
4818
- stack || (stack = new Stack);
4819
- return (objIsArr || isTypedArray(object))
4820
- ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
4821
- : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
4822
- }
4823
- if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
4824
- var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
4825
- othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
4826
-
4827
- if (objIsWrapped || othIsWrapped) {
4828
- var objUnwrapped = objIsWrapped ? object.value() : object,
4829
- othUnwrapped = othIsWrapped ? other.value() : other;
4830
-
4831
- stack || (stack = new Stack);
4832
- return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
4833
- }
4834
- }
4835
- if (!isSameTag) {
4836
- return false;
4837
- }
4838
- stack || (stack = new Stack);
4839
- return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
4840
- }
4841
-
4842
- /**
4843
- * The base implementation of `_.isMap` without Node.js optimizations.
4844
- *
4845
- * @private
4846
- * @param {*} value The value to check.
4847
- * @returns {boolean} Returns `true` if `value` is a map, else `false`.
4848
- */
4849
- function baseIsMap(value) {
4850
- return isObjectLike(value) && getTag(value) == mapTag;
4851
- }
4852
-
4853
- /**
4854
- * The base implementation of `_.isMatch` without support for iteratee shorthands.
4855
- *
4856
- * @private
4857
- * @param {Object} object The object to inspect.
4858
- * @param {Object} source The object of property values to match.
4859
- * @param {Array} matchData The property names, values, and compare flags to match.
4860
- * @param {Function} [customizer] The function to customize comparisons.
4861
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
4862
- */
4863
- function baseIsMatch(object, source, matchData, customizer) {
4864
- var index = matchData.length,
4865
- length = index,
4866
- noCustomizer = !customizer;
4867
-
4868
- if (object == null) {
4869
- return !length;
4870
- }
4871
- object = Object(object);
4872
- while (index--) {
4873
- var data = matchData[index];
4874
- if ((noCustomizer && data[2])
4875
- ? data[1] !== object[data[0]]
4876
- : !(data[0] in object)
4877
- ) {
4878
- return false;
4879
- }
4880
- }
4881
- while (++index < length) {
4882
- data = matchData[index];
4883
- var key = data[0],
4884
- objValue = object[key],
4885
- srcValue = data[1];
4886
-
4887
- if (noCustomizer && data[2]) {
4888
- if (objValue === undefined && !(key in object)) {
4889
- return false;
4890
- }
4891
- } else {
4892
- var stack = new Stack;
4893
- if (customizer) {
4894
- var result = customizer(objValue, srcValue, key, object, source, stack);
4895
- }
4896
- if (!(result === undefined
4897
- ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
4898
- : result
4899
- )) {
4900
- return false;
4901
- }
4902
- }
4903
- }
4904
- return true;
4905
- }
4906
-
4907
- /**
4908
- * The base implementation of `_.isNative` without bad shim checks.
4909
- *
4910
- * @private
4911
- * @param {*} value The value to check.
4912
- * @returns {boolean} Returns `true` if `value` is a native function,
4913
- * else `false`.
4914
- */
4915
- function baseIsNative(value) {
4916
- if (!isObject(value) || isMasked(value)) {
4917
- return false;
4918
- }
4919
- var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
4920
- return pattern.test(toSource(value));
4921
- }
4922
-
4923
- /**
4924
- * The base implementation of `_.isRegExp` without Node.js optimizations.
4925
- *
4926
- * @private
4927
- * @param {*} value The value to check.
4928
- * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
4929
- */
4930
- function baseIsRegExp(value) {
4931
- return isObjectLike(value) && baseGetTag(value) == regexpTag;
4932
- }
4933
-
4934
- /**
4935
- * The base implementation of `_.isSet` without Node.js optimizations.
4936
- *
4937
- * @private
4938
- * @param {*} value The value to check.
4939
- * @returns {boolean} Returns `true` if `value` is a set, else `false`.
4940
- */
4941
- function baseIsSet(value) {
4942
- return isObjectLike(value) && getTag(value) == setTag;
4943
- }
4944
-
4945
- /**
4946
- * The base implementation of `_.isTypedArray` without Node.js optimizations.
4947
- *
4948
- * @private
4949
- * @param {*} value The value to check.
4950
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
4951
- */
4952
- function baseIsTypedArray(value) {
4953
- return isObjectLike(value) &&
4954
- isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
4955
- }
4956
-
4957
- /**
4958
- * The base implementation of `_.iteratee`.
4959
- *
4960
- * @private
4961
- * @param {*} [value=_.identity] The value to convert to an iteratee.
4962
- * @returns {Function} Returns the iteratee.
4963
- */
4964
- function baseIteratee(value) {
4965
- // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
4966
- // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
4967
- if (typeof value == 'function') {
4968
- return value;
4969
- }
4970
- if (value == null) {
4971
- return identity;
4972
- }
4973
- if (typeof value == 'object') {
4974
- return isArray(value)
4975
- ? baseMatchesProperty(value[0], value[1])
4976
- : baseMatches(value);
4977
- }
4978
- return property(value);
4979
- }
4980
-
4981
- /**
4982
- * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
4983
- *
4984
- * @private
4985
- * @param {Object} object The object to query.
4986
- * @returns {Array} Returns the array of property names.
4987
- */
4988
- function baseKeys(object) {
4989
- if (!isPrototype(object)) {
4990
- return nativeKeys(object);
4991
- }
4992
- var result = [];
4993
- for (var key in Object(object)) {
4994
- if (hasOwnProperty.call(object, key) && key != 'constructor') {
4995
- result.push(key);
4996
- }
4997
- }
4998
- return result;
4999
- }
5000
-
5001
- /**
5002
- * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
5003
- *
5004
- * @private
5005
- * @param {Object} object The object to query.
5006
- * @returns {Array} Returns the array of property names.
5007
- */
5008
- function baseKeysIn(object) {
5009
- if (!isObject(object)) {
5010
- return nativeKeysIn(object);
5011
- }
5012
- var isProto = isPrototype(object),
5013
- result = [];
5014
-
5015
- for (var key in object) {
5016
- if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
5017
- result.push(key);
5018
- }
5019
- }
5020
- return result;
5021
- }
5022
-
5023
- /**
5024
- * The base implementation of `_.lt` which doesn't coerce arguments.
5025
- *
5026
- * @private
5027
- * @param {*} value The value to compare.
5028
- * @param {*} other The other value to compare.
5029
- * @returns {boolean} Returns `true` if `value` is less than `other`,
5030
- * else `false`.
5031
- */
5032
- function baseLt(value, other) {
5033
- return value < other;
5034
- }
5035
-
5036
- /**
5037
- * The base implementation of `_.map` without support for iteratee shorthands.
5038
- *
5039
- * @private
5040
- * @param {Array|Object} collection The collection to iterate over.
5041
- * @param {Function} iteratee The function invoked per iteration.
5042
- * @returns {Array} Returns the new mapped array.
5043
- */
5044
- function baseMap(collection, iteratee) {
5045
- var index = -1,
5046
- result = isArrayLike(collection) ? Array(collection.length) : [];
5047
-
5048
- baseEach(collection, function(value, key, collection) {
5049
- result[++index] = iteratee(value, key, collection);
5050
- });
5051
- return result;
5052
- }
5053
-
5054
- /**
5055
- * The base implementation of `_.matches` which doesn't clone `source`.
5056
- *
5057
- * @private
5058
- * @param {Object} source The object of property values to match.
5059
- * @returns {Function} Returns the new spec function.
5060
- */
5061
- function baseMatches(source) {
5062
- var matchData = getMatchData(source);
5063
- if (matchData.length == 1 && matchData[0][2]) {
5064
- return matchesStrictComparable(matchData[0][0], matchData[0][1]);
5065
- }
5066
- return function(object) {
5067
- return object === source || baseIsMatch(object, source, matchData);
5068
- };
5069
- }
5070
-
5071
- /**
5072
- * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
5073
- *
5074
- * @private
5075
- * @param {string} path The path of the property to get.
5076
- * @param {*} srcValue The value to match.
5077
- * @returns {Function} Returns the new spec function.
5078
- */
5079
- function baseMatchesProperty(path, srcValue) {
5080
- if (isKey(path) && isStrictComparable(srcValue)) {
5081
- return matchesStrictComparable(toKey(path), srcValue);
5082
- }
5083
- return function(object) {
5084
- var objValue = get(object, path);
5085
- return (objValue === undefined && objValue === srcValue)
5086
- ? hasIn(object, path)
5087
- : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
5088
- };
5089
- }
5090
-
5091
- /**
5092
- * The base implementation of `_.merge` without support for multiple sources.
5093
- *
5094
- * @private
5095
- * @param {Object} object The destination object.
5096
- * @param {Object} source The source object.
5097
- * @param {number} srcIndex The index of `source`.
5098
- * @param {Function} [customizer] The function to customize merged values.
5099
- * @param {Object} [stack] Tracks traversed source values and their merged
5100
- * counterparts.
5101
- */
5102
- function baseMerge(object, source, srcIndex, customizer, stack) {
5103
- if (object === source) {
5104
- return;
5105
- }
5106
- baseFor(source, function(srcValue, key) {
5107
- if (isObject(srcValue)) {
5108
- stack || (stack = new Stack);
5109
- baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
5110
- }
5111
- else {
5112
- var newValue = customizer
5113
- ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
5114
- : undefined;
5115
-
5116
- if (newValue === undefined) {
5117
- newValue = srcValue;
5118
- }
5119
- assignMergeValue(object, key, newValue);
5120
- }
5121
- }, keysIn);
5122
- }
5123
-
5124
- /**
5125
- * A specialized version of `baseMerge` for arrays and objects which performs
5126
- * deep merges and tracks traversed objects enabling objects with circular
5127
- * references to be merged.
5128
- *
5129
- * @private
5130
- * @param {Object} object The destination object.
5131
- * @param {Object} source The source object.
5132
- * @param {string} key The key of the value to merge.
5133
- * @param {number} srcIndex The index of `source`.
5134
- * @param {Function} mergeFunc The function to merge values.
5135
- * @param {Function} [customizer] The function to customize assigned values.
5136
- * @param {Object} [stack] Tracks traversed source values and their merged
5137
- * counterparts.
5138
- */
5139
- function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
5140
- var objValue = safeGet(object, key),
5141
- srcValue = safeGet(source, key),
5142
- stacked = stack.get(srcValue);
5143
-
5144
- if (stacked) {
5145
- assignMergeValue(object, key, stacked);
5146
- return;
5147
- }
5148
- var newValue = customizer
5149
- ? customizer(objValue, srcValue, (key + ''), object, source, stack)
5150
- : undefined;
5151
-
5152
- var isCommon = newValue === undefined;
5153
-
5154
- if (isCommon) {
5155
- var isArr = isArray(srcValue),
5156
- isBuff = !isArr && isBuffer(srcValue),
5157
- isTyped = !isArr && !isBuff && isTypedArray(srcValue);
5158
-
5159
- newValue = srcValue;
5160
- if (isArr || isBuff || isTyped) {
5161
- if (isArray(objValue)) {
5162
- newValue = objValue;
5163
- }
5164
- else if (isArrayLikeObject(objValue)) {
5165
- newValue = copyArray(objValue);
5166
- }
5167
- else if (isBuff) {
5168
- isCommon = false;
5169
- newValue = cloneBuffer(srcValue, true);
5170
- }
5171
- else if (isTyped) {
5172
- isCommon = false;
5173
- newValue = cloneTypedArray(srcValue, true);
5174
- }
5175
- else {
5176
- newValue = [];
5177
- }
5178
- }
5179
- else if (isPlainObject(srcValue) || isArguments(srcValue)) {
5180
- newValue = objValue;
5181
- if (isArguments(objValue)) {
5182
- newValue = toPlainObject(objValue);
5183
- }
5184
- else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
5185
- newValue = initCloneObject(srcValue);
5186
- }
5187
- }
5188
- else {
5189
- isCommon = false;
5190
- }
5191
- }
5192
- if (isCommon) {
5193
- // Recursively merge objects and arrays (susceptible to call stack limits).
5194
- stack.set(srcValue, newValue);
5195
- mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
5196
- stack['delete'](srcValue);
5197
- }
5198
- assignMergeValue(object, key, newValue);
5199
- }
5200
-
5201
- /**
5202
- * The base implementation of `_.nth` which doesn't coerce arguments.
5203
- *
5204
- * @private
5205
- * @param {Array} array The array to query.
5206
- * @param {number} n The index of the element to return.
5207
- * @returns {*} Returns the nth element of `array`.
5208
- */
5209
- function baseNth(array, n) {
5210
- var length = array.length;
5211
- if (!length) {
5212
- return;
5213
- }
5214
- n += n < 0 ? length : 0;
5215
- return isIndex(n, length) ? array[n] : undefined;
5216
- }
5217
-
5218
- /**
5219
- * The base implementation of `_.orderBy` without param guards.
5220
- *
5221
- * @private
5222
- * @param {Array|Object} collection The collection to iterate over.
5223
- * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
5224
- * @param {string[]} orders The sort orders of `iteratees`.
5225
- * @returns {Array} Returns the new sorted array.
5226
- */
5227
- function baseOrderBy(collection, iteratees, orders) {
5228
- var index = -1;
5229
- iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));
5230
-
5231
- var result = baseMap(collection, function(value, key, collection) {
5232
- var criteria = arrayMap(iteratees, function(iteratee) {
5233
- return iteratee(value);
5234
- });
5235
- return { 'criteria': criteria, 'index': ++index, 'value': value };
5236
- });
5237
-
5238
- return baseSortBy(result, function(object, other) {
5239
- return compareMultiple(object, other, orders);
5240
- });
5241
- }
5242
-
5243
- /**
5244
- * The base implementation of `_.pick` without support for individual
5245
- * property identifiers.
5246
- *
5247
- * @private
5248
- * @param {Object} object The source object.
5249
- * @param {string[]} paths The property paths to pick.
5250
- * @returns {Object} Returns the new object.
5251
- */
5252
- function basePick(object, paths) {
5253
- return basePickBy(object, paths, function(value, path) {
5254
- return hasIn(object, path);
5255
- });
5256
- }
5257
-
5258
- /**
5259
- * The base implementation of `_.pickBy` without support for iteratee shorthands.
5260
- *
5261
- * @private
5262
- * @param {Object} object The source object.
5263
- * @param {string[]} paths The property paths to pick.
5264
- * @param {Function} predicate The function invoked per property.
5265
- * @returns {Object} Returns the new object.
5266
- */
5267
- function basePickBy(object, paths, predicate) {
5268
- var index = -1,
5269
- length = paths.length,
5270
- result = {};
5271
-
5272
- while (++index < length) {
5273
- var path = paths[index],
5274
- value = baseGet(object, path);
5275
-
5276
- if (predicate(value, path)) {
5277
- baseSet(result, castPath(path, object), value);
5278
- }
5279
- }
5280
- return result;
5281
- }
5282
-
5283
- /**
5284
- * A specialized version of `baseProperty` which supports deep paths.
5285
- *
5286
- * @private
5287
- * @param {Array|string} path The path of the property to get.
5288
- * @returns {Function} Returns the new accessor function.
5289
- */
5290
- function basePropertyDeep(path) {
5291
- return function(object) {
5292
- return baseGet(object, path);
5293
- };
5294
- }
5295
-
5296
- /**
5297
- * The base implementation of `_.pullAllBy` without support for iteratee
5298
- * shorthands.
5299
- *
5300
- * @private
5301
- * @param {Array} array The array to modify.
5302
- * @param {Array} values The values to remove.
5303
- * @param {Function} [iteratee] The iteratee invoked per element.
5304
- * @param {Function} [comparator] The comparator invoked per element.
5305
- * @returns {Array} Returns `array`.
5306
- */
5307
- function basePullAll(array, values, iteratee, comparator) {
5308
- var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
5309
- index = -1,
5310
- length = values.length,
5311
- seen = array;
5312
-
5313
- if (array === values) {
5314
- values = copyArray(values);
5315
- }
5316
- if (iteratee) {
5317
- seen = arrayMap(array, baseUnary(iteratee));
5318
- }
5319
- while (++index < length) {
5320
- var fromIndex = 0,
5321
- value = values[index],
5322
- computed = iteratee ? iteratee(value) : value;
5323
-
5324
- while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
5325
- if (seen !== array) {
5326
- splice.call(seen, fromIndex, 1);
5327
- }
5328
- splice.call(array, fromIndex, 1);
5329
- }
5330
- }
5331
- return array;
5332
- }
5333
-
5334
- /**
5335
- * The base implementation of `_.pullAt` without support for individual
5336
- * indexes or capturing the removed elements.
5337
- *
5338
- * @private
5339
- * @param {Array} array The array to modify.
5340
- * @param {number[]} indexes The indexes of elements to remove.
5341
- * @returns {Array} Returns `array`.
5342
- */
5343
- function basePullAt(array, indexes) {
5344
- var length = array ? indexes.length : 0,
5345
- lastIndex = length - 1;
5346
-
5347
- while (length--) {
5348
- var index = indexes[length];
5349
- if (length == lastIndex || index !== previous) {
5350
- var previous = index;
5351
- if (isIndex(index)) {
5352
- splice.call(array, index, 1);
5353
- } else {
5354
- baseUnset(array, index);
5355
- }
5356
- }
5357
- }
5358
- return array;
5359
- }
5360
-
5361
- /**
5362
- * The base implementation of `_.random` without support for returning
5363
- * floating-point numbers.
5364
- *
5365
- * @private
5366
- * @param {number} lower The lower bound.
5367
- * @param {number} upper The upper bound.
5368
- * @returns {number} Returns the random number.
5369
- */
5370
- function baseRandom(lower, upper) {
5371
- return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
5372
- }
5373
-
5374
- /**
5375
- * The base implementation of `_.range` and `_.rangeRight` which doesn't
5376
- * coerce arguments.
5377
- *
5378
- * @private
5379
- * @param {number} start The start of the range.
5380
- * @param {number} end The end of the range.
5381
- * @param {number} step The value to increment or decrement by.
5382
- * @param {boolean} [fromRight] Specify iterating from right to left.
5383
- * @returns {Array} Returns the range of numbers.
5384
- */
5385
- function baseRange(start, end, step, fromRight) {
5386
- var index = -1,
5387
- length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
5388
- result = Array(length);
5389
-
5390
- while (length--) {
5391
- result[fromRight ? length : ++index] = start;
5392
- start += step;
5393
- }
5394
- return result;
5395
- }
5396
-
5397
- /**
5398
- * The base implementation of `_.repeat` which doesn't coerce arguments.
5399
- *
5400
- * @private
5401
- * @param {string} string The string to repeat.
5402
- * @param {number} n The number of times to repeat the string.
5403
- * @returns {string} Returns the repeated string.
5404
- */
5405
- function baseRepeat(string, n) {
5406
- var result = '';
5407
- if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
5408
- return result;
5409
- }
5410
- // Leverage the exponentiation by squaring algorithm for a faster repeat.
5411
- // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
5412
- do {
5413
- if (n % 2) {
5414
- result += string;
5415
- }
5416
- n = nativeFloor(n / 2);
5417
- if (n) {
5418
- string += string;
5419
- }
5420
- } while (n);
5421
-
5422
- return result;
5423
- }
5424
-
5425
- /**
5426
- * The base implementation of `_.rest` which doesn't validate or coerce arguments.
5427
- *
5428
- * @private
5429
- * @param {Function} func The function to apply a rest parameter to.
5430
- * @param {number} [start=func.length-1] The start position of the rest parameter.
5431
- * @returns {Function} Returns the new function.
5432
- */
5433
- function baseRest(func, start) {
5434
- return setToString(overRest(func, start, identity), func + '');
5435
- }
5436
-
5437
- /**
5438
- * The base implementation of `_.sample`.
5439
- *
5440
- * @private
5441
- * @param {Array|Object} collection The collection to sample.
5442
- * @returns {*} Returns the random element.
5443
- */
5444
- function baseSample(collection) {
5445
- return arraySample(values(collection));
5446
- }
5447
-
5448
- /**
5449
- * The base implementation of `_.sampleSize` without param guards.
5450
- *
5451
- * @private
5452
- * @param {Array|Object} collection The collection to sample.
5453
- * @param {number} n The number of elements to sample.
5454
- * @returns {Array} Returns the random elements.
5455
- */
5456
- function baseSampleSize(collection, n) {
5457
- var array = values(collection);
5458
- return shuffleSelf(array, baseClamp(n, 0, array.length));
5459
- }
5460
-
5461
- /**
5462
- * The base implementation of `_.set`.
5463
- *
5464
- * @private
5465
- * @param {Object} object The object to modify.
5466
- * @param {Array|string} path The path of the property to set.
5467
- * @param {*} value The value to set.
5468
- * @param {Function} [customizer] The function to customize path creation.
5469
- * @returns {Object} Returns `object`.
5470
- */
5471
- function baseSet(object, path, value, customizer) {
5472
- if (!isObject(object)) {
5473
- return object;
5474
- }
5475
- path = castPath(path, object);
5476
-
5477
- var index = -1,
5478
- length = path.length,
5479
- lastIndex = length - 1,
5480
- nested = object;
5481
-
5482
- while (nested != null && ++index < length) {
5483
- var key = toKey(path[index]),
5484
- newValue = value;
5485
-
5486
- if (index != lastIndex) {
5487
- var objValue = nested[key];
5488
- newValue = customizer ? customizer(objValue, key, nested) : undefined;
5489
- if (newValue === undefined) {
5490
- newValue = isObject(objValue)
5491
- ? objValue
5492
- : (isIndex(path[index + 1]) ? [] : {});
5493
- }
5494
- }
5495
- assignValue(nested, key, newValue);
5496
- nested = nested[key];
5497
- }
5498
- return object;
5499
- }
5500
-
5501
- /**
5502
- * The base implementation of `setData` without support for hot loop shorting.
5503
- *
5504
- * @private
5505
- * @param {Function} func The function to associate metadata with.
5506
- * @param {*} data The metadata.
5507
- * @returns {Function} Returns `func`.
5508
- */
5509
- var baseSetData = !metaMap ? identity : function(func, data) {
5510
- metaMap.set(func, data);
5511
- return func;
5512
- };
5513
-
5514
- /**
5515
- * The base implementation of `setToString` without support for hot loop shorting.
5516
- *
5517
- * @private
5518
- * @param {Function} func The function to modify.
5519
- * @param {Function} string The `toString` result.
5520
- * @returns {Function} Returns `func`.
5521
- */
5522
- var baseSetToString = !defineProperty ? identity : function(func, string) {
5523
- return defineProperty(func, 'toString', {
5524
- 'configurable': true,
5525
- 'enumerable': false,
5526
- 'value': constant(string),
5527
- 'writable': true
5528
- });
5529
- };
5530
-
5531
- /**
5532
- * The base implementation of `_.shuffle`.
5533
- *
5534
- * @private
5535
- * @param {Array|Object} collection The collection to shuffle.
5536
- * @returns {Array} Returns the new shuffled array.
5537
- */
5538
- function baseShuffle(collection) {
5539
- return shuffleSelf(values(collection));
5540
- }
5541
-
5542
- /**
5543
- * The base implementation of `_.slice` without an iteratee call guard.
5544
- *
5545
- * @private
5546
- * @param {Array} array The array to slice.
5547
- * @param {number} [start=0] The start position.
5548
- * @param {number} [end=array.length] The end position.
5549
- * @returns {Array} Returns the slice of `array`.
5550
- */
5551
- function baseSlice(array, start, end) {
5552
- var index = -1,
5553
- length = array.length;
5554
-
5555
- if (start < 0) {
5556
- start = -start > length ? 0 : (length + start);
5557
- }
5558
- end = end > length ? length : end;
5559
- if (end < 0) {
5560
- end += length;
5561
- }
5562
- length = start > end ? 0 : ((end - start) >>> 0);
5563
- start >>>= 0;
5564
-
5565
- var result = Array(length);
5566
- while (++index < length) {
5567
- result[index] = array[index + start];
5568
- }
5569
- return result;
5570
- }
5571
-
5572
- /**
5573
- * The base implementation of `_.some` without support for iteratee shorthands.
5574
- *
5575
- * @private
5576
- * @param {Array|Object} collection The collection to iterate over.
5577
- * @param {Function} predicate The function invoked per iteration.
5578
- * @returns {boolean} Returns `true` if any element passes the predicate check,
5579
- * else `false`.
5580
- */
5581
- function baseSome(collection, predicate) {
5582
- var result;
5583
-
5584
- baseEach(collection, function(value, index, collection) {
5585
- result = predicate(value, index, collection);
5586
- return !result;
5587
- });
5588
- return !!result;
5589
- }
5590
-
5591
- /**
5592
- * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
5593
- * performs a binary search of `array` to determine the index at which `value`
5594
- * should be inserted into `array` in order to maintain its sort order.
5595
- *
5596
- * @private
5597
- * @param {Array} array The sorted array to inspect.
5598
- * @param {*} value The value to evaluate.
5599
- * @param {boolean} [retHighest] Specify returning the highest qualified index.
5600
- * @returns {number} Returns the index at which `value` should be inserted
5601
- * into `array`.
5602
- */
5603
- function baseSortedIndex(array, value, retHighest) {
5604
- var low = 0,
5605
- high = array == null ? low : array.length;
5606
-
5607
- if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
5608
- while (low < high) {
5609
- var mid = (low + high) >>> 1,
5610
- computed = array[mid];
5611
-
5612
- if (computed !== null && !isSymbol(computed) &&
5613
- (retHighest ? (computed <= value) : (computed < value))) {
5614
- low = mid + 1;
5615
- } else {
5616
- high = mid;
5617
- }
5618
- }
5619
- return high;
5620
- }
5621
- return baseSortedIndexBy(array, value, identity, retHighest);
5622
- }
5623
-
5624
- /**
5625
- * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
5626
- * which invokes `iteratee` for `value` and each element of `array` to compute
5627
- * their sort ranking. The iteratee is invoked with one argument; (value).
5628
- *
5629
- * @private
5630
- * @param {Array} array The sorted array to inspect.
5631
- * @param {*} value The value to evaluate.
5632
- * @param {Function} iteratee The iteratee invoked per element.
5633
- * @param {boolean} [retHighest] Specify returning the highest qualified index.
5634
- * @returns {number} Returns the index at which `value` should be inserted
5635
- * into `array`.
5636
- */
5637
- function baseSortedIndexBy(array, value, iteratee, retHighest) {
5638
- value = iteratee(value);
5639
-
5640
- var low = 0,
5641
- high = array == null ? 0 : array.length,
5642
- valIsNaN = value !== value,
5643
- valIsNull = value === null,
5644
- valIsSymbol = isSymbol(value),
5645
- valIsUndefined = value === undefined;
5646
-
5647
- while (low < high) {
5648
- var mid = nativeFloor((low + high) / 2),
5649
- computed = iteratee(array[mid]),
5650
- othIsDefined = computed !== undefined,
5651
- othIsNull = computed === null,
5652
- othIsReflexive = computed === computed,
5653
- othIsSymbol = isSymbol(computed);
5654
-
5655
- if (valIsNaN) {
5656
- var setLow = retHighest || othIsReflexive;
5657
- } else if (valIsUndefined) {
5658
- setLow = othIsReflexive && (retHighest || othIsDefined);
5659
- } else if (valIsNull) {
5660
- setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
5661
- } else if (valIsSymbol) {
5662
- setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
5663
- } else if (othIsNull || othIsSymbol) {
5664
- setLow = false;
5665
- } else {
5666
- setLow = retHighest ? (computed <= value) : (computed < value);
5667
- }
5668
- if (setLow) {
5669
- low = mid + 1;
5670
- } else {
5671
- high = mid;
5672
- }
5673
- }
5674
- return nativeMin(high, MAX_ARRAY_INDEX);
5675
- }
5676
-
5677
- /**
5678
- * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
5679
- * support for iteratee shorthands.
5680
- *
5681
- * @private
5682
- * @param {Array} array The array to inspect.
5683
- * @param {Function} [iteratee] The iteratee invoked per element.
5684
- * @returns {Array} Returns the new duplicate free array.
5685
- */
5686
- function baseSortedUniq(array, iteratee) {
5687
- var index = -1,
5688
- length = array.length,
5689
- resIndex = 0,
5690
- result = [];
5691
-
5692
- while (++index < length) {
5693
- var value = array[index],
5694
- computed = iteratee ? iteratee(value) : value;
5695
-
5696
- if (!index || !eq(computed, seen)) {
5697
- var seen = computed;
5698
- result[resIndex++] = value === 0 ? 0 : value;
5699
- }
5700
- }
5701
- return result;
5702
- }
5703
-
5704
- /**
5705
- * The base implementation of `_.toNumber` which doesn't ensure correct
5706
- * conversions of binary, hexadecimal, or octal string values.
5707
- *
5708
- * @private
5709
- * @param {*} value The value to process.
5710
- * @returns {number} Returns the number.
5711
- */
5712
- function baseToNumber(value) {
5713
- if (typeof value == 'number') {
5714
- return value;
5715
- }
5716
- if (isSymbol(value)) {
5717
- return NAN;
5718
- }
5719
- return +value;
5720
- }
5721
-
5722
- /**
5723
- * The base implementation of `_.toString` which doesn't convert nullish
5724
- * values to empty strings.
5725
- *
5726
- * @private
5727
- * @param {*} value The value to process.
5728
- * @returns {string} Returns the string.
5729
- */
5730
- function baseToString(value) {
5731
- // Exit early for strings to avoid a performance hit in some environments.
5732
- if (typeof value == 'string') {
5733
- return value;
5734
- }
5735
- if (isArray(value)) {
5736
- // Recursively convert values (susceptible to call stack limits).
5737
- return arrayMap(value, baseToString) + '';
5738
- }
5739
- if (isSymbol(value)) {
5740
- return symbolToString ? symbolToString.call(value) : '';
5741
- }
5742
- var result = (value + '');
5743
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
5744
- }
5745
-
5746
- /**
5747
- * The base implementation of `_.uniqBy` without support for iteratee shorthands.
5748
- *
5749
- * @private
5750
- * @param {Array} array The array to inspect.
5751
- * @param {Function} [iteratee] The iteratee invoked per element.
5752
- * @param {Function} [comparator] The comparator invoked per element.
5753
- * @returns {Array} Returns the new duplicate free array.
5754
- */
5755
- function baseUniq(array, iteratee, comparator) {
5756
- var index = -1,
5757
- includes = arrayIncludes,
5758
- length = array.length,
5759
- isCommon = true,
5760
- result = [],
5761
- seen = result;
5762
-
5763
- if (comparator) {
5764
- isCommon = false;
5765
- includes = arrayIncludesWith;
5766
- }
5767
- else if (length >= LARGE_ARRAY_SIZE) {
5768
- var set = iteratee ? null : createSet(array);
5769
- if (set) {
5770
- return setToArray(set);
5771
- }
5772
- isCommon = false;
5773
- includes = cacheHas;
5774
- seen = new SetCache;
5775
- }
5776
- else {
5777
- seen = iteratee ? [] : result;
5778
- }
5779
- outer:
5780
- while (++index < length) {
5781
- var value = array[index],
5782
- computed = iteratee ? iteratee(value) : value;
5783
-
5784
- value = (comparator || value !== 0) ? value : 0;
5785
- if (isCommon && computed === computed) {
5786
- var seenIndex = seen.length;
5787
- while (seenIndex--) {
5788
- if (seen[seenIndex] === computed) {
5789
- continue outer;
5790
- }
5791
- }
5792
- if (iteratee) {
5793
- seen.push(computed);
5794
- }
5795
- result.push(value);
5796
- }
5797
- else if (!includes(seen, computed, comparator)) {
5798
- if (seen !== result) {
5799
- seen.push(computed);
5800
- }
5801
- result.push(value);
5802
- }
5803
- }
5804
- return result;
5805
- }
5806
-
5807
- /**
5808
- * The base implementation of `_.unset`.
5809
- *
5810
- * @private
5811
- * @param {Object} object The object to modify.
5812
- * @param {Array|string} path The property path to unset.
5813
- * @returns {boolean} Returns `true` if the property is deleted, else `false`.
5814
- */
5815
- function baseUnset(object, path) {
5816
- path = castPath(path, object);
5817
- object = parent(object, path);
5818
- return object == null || delete object[toKey(last(path))];
5819
- }
5820
-
5821
- /**
5822
- * The base implementation of `_.update`.
5823
- *
5824
- * @private
5825
- * @param {Object} object The object to modify.
5826
- * @param {Array|string} path The path of the property to update.
5827
- * @param {Function} updater The function to produce the updated value.
5828
- * @param {Function} [customizer] The function to customize path creation.
5829
- * @returns {Object} Returns `object`.
5830
- */
5831
- function baseUpdate(object, path, updater, customizer) {
5832
- return baseSet(object, path, updater(baseGet(object, path)), customizer);
5833
- }
5834
-
5835
- /**
5836
- * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
5837
- * without support for iteratee shorthands.
5838
- *
5839
- * @private
5840
- * @param {Array} array The array to query.
5841
- * @param {Function} predicate The function invoked per iteration.
5842
- * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
5843
- * @param {boolean} [fromRight] Specify iterating from right to left.
5844
- * @returns {Array} Returns the slice of `array`.
5845
- */
5846
- function baseWhile(array, predicate, isDrop, fromRight) {
5847
- var length = array.length,
5848
- index = fromRight ? length : -1;
5849
-
5850
- while ((fromRight ? index-- : ++index < length) &&
5851
- predicate(array[index], index, array)) {}
5852
-
5853
- return isDrop
5854
- ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
5855
- : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
5856
- }
5857
-
5858
- /**
5859
- * The base implementation of `wrapperValue` which returns the result of
5860
- * performing a sequence of actions on the unwrapped `value`, where each
5861
- * successive action is supplied the return value of the previous.
5862
- *
5863
- * @private
5864
- * @param {*} value The unwrapped value.
5865
- * @param {Array} actions Actions to perform to resolve the unwrapped value.
5866
- * @returns {*} Returns the resolved value.
5867
- */
5868
- function baseWrapperValue(value, actions) {
5869
- var result = value;
5870
- if (result instanceof LazyWrapper) {
5871
- result = result.value();
5872
- }
5873
- return arrayReduce(actions, function(result, action) {
5874
- return action.func.apply(action.thisArg, arrayPush([result], action.args));
5875
- }, result);
5876
- }
5877
-
5878
- /**
5879
- * The base implementation of methods like `_.xor`, without support for
5880
- * iteratee shorthands, that accepts an array of arrays to inspect.
5881
- *
5882
- * @private
5883
- * @param {Array} arrays The arrays to inspect.
5884
- * @param {Function} [iteratee] The iteratee invoked per element.
5885
- * @param {Function} [comparator] The comparator invoked per element.
5886
- * @returns {Array} Returns the new array of values.
5887
- */
5888
- function baseXor(arrays, iteratee, comparator) {
5889
- var length = arrays.length;
5890
- if (length < 2) {
5891
- return length ? baseUniq(arrays[0]) : [];
5892
- }
5893
- var index = -1,
5894
- result = Array(length);
5895
-
5896
- while (++index < length) {
5897
- var array = arrays[index],
5898
- othIndex = -1;
5899
-
5900
- while (++othIndex < length) {
5901
- if (othIndex != index) {
5902
- result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
5903
- }
5904
- }
5905
- }
5906
- return baseUniq(baseFlatten(result, 1), iteratee, comparator);
5907
- }
5908
-
5909
- /**
5910
- * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
5911
- *
5912
- * @private
5913
- * @param {Array} props The property identifiers.
5914
- * @param {Array} values The property values.
5915
- * @param {Function} assignFunc The function to assign values.
5916
- * @returns {Object} Returns the new object.
5917
- */
5918
- function baseZipObject(props, values, assignFunc) {
5919
- var index = -1,
5920
- length = props.length,
5921
- valsLength = values.length,
5922
- result = {};
5923
-
5924
- while (++index < length) {
5925
- var value = index < valsLength ? values[index] : undefined;
5926
- assignFunc(result, props[index], value);
5927
- }
5928
- return result;
5929
- }
5930
-
5931
- /**
5932
- * Casts `value` to an empty array if it's not an array like object.
5933
- *
5934
- * @private
5935
- * @param {*} value The value to inspect.
5936
- * @returns {Array|Object} Returns the cast array-like object.
5937
- */
5938
- function castArrayLikeObject(value) {
5939
- return isArrayLikeObject(value) ? value : [];
5940
- }
5941
-
5942
- /**
5943
- * Casts `value` to `identity` if it's not a function.
5944
- *
5945
- * @private
5946
- * @param {*} value The value to inspect.
5947
- * @returns {Function} Returns cast function.
5948
- */
5949
- function castFunction(value) {
5950
- return typeof value == 'function' ? value : identity;
5951
- }
5952
-
5953
- /**
5954
- * Casts `value` to a path array if it's not one.
5955
- *
5956
- * @private
5957
- * @param {*} value The value to inspect.
5958
- * @param {Object} [object] The object to query keys on.
5959
- * @returns {Array} Returns the cast property path array.
5960
- */
5961
- function castPath(value, object) {
5962
- if (isArray(value)) {
5963
- return value;
5964
- }
5965
- return isKey(value, object) ? [value] : stringToPath(toString(value));
5966
- }
5967
-
5968
- /**
5969
- * A `baseRest` alias which can be replaced with `identity` by module
5970
- * replacement plugins.
5971
- *
5972
- * @private
5973
- * @type {Function}
5974
- * @param {Function} func The function to apply a rest parameter to.
5975
- * @returns {Function} Returns the new function.
5976
- */
5977
- var castRest = baseRest;
5978
-
5979
- /**
5980
- * Casts `array` to a slice if it's needed.
5981
- *
5982
- * @private
5983
- * @param {Array} array The array to inspect.
5984
- * @param {number} start The start position.
5985
- * @param {number} [end=array.length] The end position.
5986
- * @returns {Array} Returns the cast slice.
5987
- */
5988
- function castSlice(array, start, end) {
5989
- var length = array.length;
5990
- end = end === undefined ? length : end;
5991
- return (!start && end >= length) ? array : baseSlice(array, start, end);
5992
- }
5993
-
5994
- /**
5995
- * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
5996
- *
5997
- * @private
5998
- * @param {number|Object} id The timer id or timeout object of the timer to clear.
5999
- */
6000
- var clearTimeout = ctxClearTimeout || function(id) {
6001
- return root.clearTimeout(id);
6002
- };
6003
-
6004
- /**
6005
- * Creates a clone of `buffer`.
6006
- *
6007
- * @private
6008
- * @param {Buffer} buffer The buffer to clone.
6009
- * @param {boolean} [isDeep] Specify a deep clone.
6010
- * @returns {Buffer} Returns the cloned buffer.
6011
- */
6012
- function cloneBuffer(buffer, isDeep) {
6013
- if (isDeep) {
6014
- return buffer.slice();
6015
- }
6016
- var length = buffer.length,
6017
- result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
6018
-
6019
- buffer.copy(result);
6020
- return result;
6021
- }
6022
-
6023
- /**
6024
- * Creates a clone of `arrayBuffer`.
6025
- *
6026
- * @private
6027
- * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
6028
- * @returns {ArrayBuffer} Returns the cloned array buffer.
6029
- */
6030
- function cloneArrayBuffer(arrayBuffer) {
6031
- var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
6032
- new Uint8Array(result).set(new Uint8Array(arrayBuffer));
6033
- return result;
6034
- }
6035
-
6036
- /**
6037
- * Creates a clone of `dataView`.
6038
- *
6039
- * @private
6040
- * @param {Object} dataView The data view to clone.
6041
- * @param {boolean} [isDeep] Specify a deep clone.
6042
- * @returns {Object} Returns the cloned data view.
6043
- */
6044
- function cloneDataView(dataView, isDeep) {
6045
- var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
6046
- return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
6047
- }
6048
-
6049
- /**
6050
- * Creates a clone of `regexp`.
6051
- *
6052
- * @private
6053
- * @param {Object} regexp The regexp to clone.
6054
- * @returns {Object} Returns the cloned regexp.
6055
- */
6056
- function cloneRegExp(regexp) {
6057
- var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
6058
- result.lastIndex = regexp.lastIndex;
6059
- return result;
6060
- }
6061
-
6062
- /**
6063
- * Creates a clone of the `symbol` object.
6064
- *
6065
- * @private
6066
- * @param {Object} symbol The symbol object to clone.
6067
- * @returns {Object} Returns the cloned symbol object.
6068
- */
6069
- function cloneSymbol(symbol) {
6070
- return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
6071
- }
6072
-
6073
- /**
6074
- * Creates a clone of `typedArray`.
6075
- *
6076
- * @private
6077
- * @param {Object} typedArray The typed array to clone.
6078
- * @param {boolean} [isDeep] Specify a deep clone.
6079
- * @returns {Object} Returns the cloned typed array.
6080
- */
6081
- function cloneTypedArray(typedArray, isDeep) {
6082
- var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
6083
- return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
6084
- }
6085
-
6086
- /**
6087
- * Compares values to sort them in ascending order.
6088
- *
6089
- * @private
6090
- * @param {*} value The value to compare.
6091
- * @param {*} other The other value to compare.
6092
- * @returns {number} Returns the sort order indicator for `value`.
6093
- */
6094
- function compareAscending(value, other) {
6095
- if (value !== other) {
6096
- var valIsDefined = value !== undefined,
6097
- valIsNull = value === null,
6098
- valIsReflexive = value === value,
6099
- valIsSymbol = isSymbol(value);
6100
-
6101
- var othIsDefined = other !== undefined,
6102
- othIsNull = other === null,
6103
- othIsReflexive = other === other,
6104
- othIsSymbol = isSymbol(other);
6105
-
6106
- if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
6107
- (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
6108
- (valIsNull && othIsDefined && othIsReflexive) ||
6109
- (!valIsDefined && othIsReflexive) ||
6110
- !valIsReflexive) {
6111
- return 1;
6112
- }
6113
- if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
6114
- (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
6115
- (othIsNull && valIsDefined && valIsReflexive) ||
6116
- (!othIsDefined && valIsReflexive) ||
6117
- !othIsReflexive) {
6118
- return -1;
6119
- }
6120
- }
6121
- return 0;
6122
- }
6123
-
6124
- /**
6125
- * Used by `_.orderBy` to compare multiple properties of a value to another
6126
- * and stable sort them.
6127
- *
6128
- * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
6129
- * specify an order of "desc" for descending or "asc" for ascending sort order
6130
- * of corresponding values.
6131
- *
6132
- * @private
6133
- * @param {Object} object The object to compare.
6134
- * @param {Object} other The other object to compare.
6135
- * @param {boolean[]|string[]} orders The order to sort by for each property.
6136
- * @returns {number} Returns the sort order indicator for `object`.
6137
- */
6138
- function compareMultiple(object, other, orders) {
6139
- var index = -1,
6140
- objCriteria = object.criteria,
6141
- othCriteria = other.criteria,
6142
- length = objCriteria.length,
6143
- ordersLength = orders.length;
6144
-
6145
- while (++index < length) {
6146
- var result = compareAscending(objCriteria[index], othCriteria[index]);
6147
- if (result) {
6148
- if (index >= ordersLength) {
6149
- return result;
6150
- }
6151
- var order = orders[index];
6152
- return result * (order == 'desc' ? -1 : 1);
6153
- }
6154
- }
6155
- // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
6156
- // that causes it, under certain circumstances, to provide the same value for
6157
- // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
6158
- // for more details.
6159
- //
6160
- // This also ensures a stable sort in V8 and other engines.
6161
- // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
6162
- return object.index - other.index;
6163
- }
6164
-
6165
- /**
6166
- * Creates an array that is the composition of partially applied arguments,
6167
- * placeholders, and provided arguments into a single array of arguments.
6168
- *
6169
- * @private
6170
- * @param {Array} args The provided arguments.
6171
- * @param {Array} partials The arguments to prepend to those provided.
6172
- * @param {Array} holders The `partials` placeholder indexes.
6173
- * @params {boolean} [isCurried] Specify composing for a curried function.
6174
- * @returns {Array} Returns the new array of composed arguments.
6175
- */
6176
- function composeArgs(args, partials, holders, isCurried) {
6177
- var argsIndex = -1,
6178
- argsLength = args.length,
6179
- holdersLength = holders.length,
6180
- leftIndex = -1,
6181
- leftLength = partials.length,
6182
- rangeLength = nativeMax(argsLength - holdersLength, 0),
6183
- result = Array(leftLength + rangeLength),
6184
- isUncurried = !isCurried;
6185
-
6186
- while (++leftIndex < leftLength) {
6187
- result[leftIndex] = partials[leftIndex];
6188
- }
6189
- while (++argsIndex < holdersLength) {
6190
- if (isUncurried || argsIndex < argsLength) {
6191
- result[holders[argsIndex]] = args[argsIndex];
6192
- }
6193
- }
6194
- while (rangeLength--) {
6195
- result[leftIndex++] = args[argsIndex++];
6196
- }
6197
- return result;
6198
- }
6199
-
6200
- /**
6201
- * This function is like `composeArgs` except that the arguments composition
6202
- * is tailored for `_.partialRight`.
6203
- *
6204
- * @private
6205
- * @param {Array} args The provided arguments.
6206
- * @param {Array} partials The arguments to append to those provided.
6207
- * @param {Array} holders The `partials` placeholder indexes.
6208
- * @params {boolean} [isCurried] Specify composing for a curried function.
6209
- * @returns {Array} Returns the new array of composed arguments.
6210
- */
6211
- function composeArgsRight(args, partials, holders, isCurried) {
6212
- var argsIndex = -1,
6213
- argsLength = args.length,
6214
- holdersIndex = -1,
6215
- holdersLength = holders.length,
6216
- rightIndex = -1,
6217
- rightLength = partials.length,
6218
- rangeLength = nativeMax(argsLength - holdersLength, 0),
6219
- result = Array(rangeLength + rightLength),
6220
- isUncurried = !isCurried;
6221
-
6222
- while (++argsIndex < rangeLength) {
6223
- result[argsIndex] = args[argsIndex];
6224
- }
6225
- var offset = argsIndex;
6226
- while (++rightIndex < rightLength) {
6227
- result[offset + rightIndex] = partials[rightIndex];
6228
- }
6229
- while (++holdersIndex < holdersLength) {
6230
- if (isUncurried || argsIndex < argsLength) {
6231
- result[offset + holders[holdersIndex]] = args[argsIndex++];
6232
- }
6233
- }
6234
- return result;
6235
- }
6236
-
6237
- /**
6238
- * Copies the values of `source` to `array`.
6239
- *
6240
- * @private
6241
- * @param {Array} source The array to copy values from.
6242
- * @param {Array} [array=[]] The array to copy values to.
6243
- * @returns {Array} Returns `array`.
6244
- */
6245
- function copyArray(source, array) {
6246
- var index = -1,
6247
- length = source.length;
6248
-
6249
- array || (array = Array(length));
6250
- while (++index < length) {
6251
- array[index] = source[index];
6252
- }
6253
- return array;
6254
- }
6255
-
6256
- /**
6257
- * Copies properties of `source` to `object`.
6258
- *
6259
- * @private
6260
- * @param {Object} source The object to copy properties from.
6261
- * @param {Array} props The property identifiers to copy.
6262
- * @param {Object} [object={}] The object to copy properties to.
6263
- * @param {Function} [customizer] The function to customize copied values.
6264
- * @returns {Object} Returns `object`.
6265
- */
6266
- function copyObject(source, props, object, customizer) {
6267
- var isNew = !object;
6268
- object || (object = {});
6269
-
6270
- var index = -1,
6271
- length = props.length;
6272
-
6273
- while (++index < length) {
6274
- var key = props[index];
6275
-
6276
- var newValue = customizer
6277
- ? customizer(object[key], source[key], key, object, source)
6278
- : undefined;
6279
-
6280
- if (newValue === undefined) {
6281
- newValue = source[key];
6282
- }
6283
- if (isNew) {
6284
- baseAssignValue(object, key, newValue);
6285
- } else {
6286
- assignValue(object, key, newValue);
6287
- }
6288
- }
6289
- return object;
6290
- }
6291
-
6292
- /**
6293
- * Copies own symbols of `source` to `object`.
6294
- *
6295
- * @private
6296
- * @param {Object} source The object to copy symbols from.
6297
- * @param {Object} [object={}] The object to copy symbols to.
6298
- * @returns {Object} Returns `object`.
6299
- */
6300
- function copySymbols(source, object) {
6301
- return copyObject(source, getSymbols(source), object);
6302
- }
6303
-
6304
- /**
6305
- * Copies own and inherited symbols of `source` to `object`.
6306
- *
6307
- * @private
6308
- * @param {Object} source The object to copy symbols from.
6309
- * @param {Object} [object={}] The object to copy symbols to.
6310
- * @returns {Object} Returns `object`.
6311
- */
6312
- function copySymbolsIn(source, object) {
6313
- return copyObject(source, getSymbolsIn(source), object);
6314
- }
6315
-
6316
- /**
6317
- * Creates a function like `_.groupBy`.
6318
- *
6319
- * @private
6320
- * @param {Function} setter The function to set accumulator values.
6321
- * @param {Function} [initializer] The accumulator object initializer.
6322
- * @returns {Function} Returns the new aggregator function.
6323
- */
6324
- function createAggregator(setter, initializer) {
6325
- return function(collection, iteratee) {
6326
- var func = isArray(collection) ? arrayAggregator : baseAggregator,
6327
- accumulator = initializer ? initializer() : {};
6328
-
6329
- return func(collection, setter, getIteratee(iteratee, 2), accumulator);
6330
- };
6331
- }
6332
-
6333
- /**
6334
- * Creates a function like `_.assign`.
6335
- *
6336
- * @private
6337
- * @param {Function} assigner The function to assign values.
6338
- * @returns {Function} Returns the new assigner function.
6339
- */
6340
- function createAssigner(assigner) {
6341
- return baseRest(function(object, sources) {
6342
- var index = -1,
6343
- length = sources.length,
6344
- customizer = length > 1 ? sources[length - 1] : undefined,
6345
- guard = length > 2 ? sources[2] : undefined;
6346
-
6347
- customizer = (assigner.length > 3 && typeof customizer == 'function')
6348
- ? (length--, customizer)
6349
- : undefined;
6350
-
6351
- if (guard && isIterateeCall(sources[0], sources[1], guard)) {
6352
- customizer = length < 3 ? undefined : customizer;
6353
- length = 1;
6354
- }
6355
- object = Object(object);
6356
- while (++index < length) {
6357
- var source = sources[index];
6358
- if (source) {
6359
- assigner(object, source, index, customizer);
6360
- }
6361
- }
6362
- return object;
6363
- });
6364
- }
6365
-
6366
- /**
6367
- * Creates a `baseEach` or `baseEachRight` function.
6368
- *
6369
- * @private
6370
- * @param {Function} eachFunc The function to iterate over a collection.
6371
- * @param {boolean} [fromRight] Specify iterating from right to left.
6372
- * @returns {Function} Returns the new base function.
6373
- */
6374
- function createBaseEach(eachFunc, fromRight) {
6375
- return function(collection, iteratee) {
6376
- if (collection == null) {
6377
- return collection;
6378
- }
6379
- if (!isArrayLike(collection)) {
6380
- return eachFunc(collection, iteratee);
6381
- }
6382
- var length = collection.length,
6383
- index = fromRight ? length : -1,
6384
- iterable = Object(collection);
6385
-
6386
- while ((fromRight ? index-- : ++index < length)) {
6387
- if (iteratee(iterable[index], index, iterable) === false) {
6388
- break;
6389
- }
6390
- }
6391
- return collection;
6392
- };
6393
- }
6394
-
6395
- /**
6396
- * Creates a base function for methods like `_.forIn` and `_.forOwn`.
6397
- *
6398
- * @private
6399
- * @param {boolean} [fromRight] Specify iterating from right to left.
6400
- * @returns {Function} Returns the new base function.
6401
- */
6402
- function createBaseFor(fromRight) {
6403
- return function(object, iteratee, keysFunc) {
6404
- var index = -1,
6405
- iterable = Object(object),
6406
- props = keysFunc(object),
6407
- length = props.length;
6408
-
6409
- while (length--) {
6410
- var key = props[fromRight ? length : ++index];
6411
- if (iteratee(iterable[key], key, iterable) === false) {
6412
- break;
6413
- }
6414
- }
6415
- return object;
6416
- };
6417
- }
6418
-
6419
- /**
6420
- * Creates a function that wraps `func` to invoke it with the optional `this`
6421
- * binding of `thisArg`.
6422
- *
6423
- * @private
6424
- * @param {Function} func The function to wrap.
6425
- * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
6426
- * @param {*} [thisArg] The `this` binding of `func`.
6427
- * @returns {Function} Returns the new wrapped function.
6428
- */
6429
- function createBind(func, bitmask, thisArg) {
6430
- var isBind = bitmask & WRAP_BIND_FLAG,
6431
- Ctor = createCtor(func);
6432
-
6433
- function wrapper() {
6434
- var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
6435
- return fn.apply(isBind ? thisArg : this, arguments);
6436
- }
6437
- return wrapper;
6438
- }
6439
-
6440
- /**
6441
- * Creates a function like `_.lowerFirst`.
6442
- *
6443
- * @private
6444
- * @param {string} methodName The name of the `String` case method to use.
6445
- * @returns {Function} Returns the new case function.
6446
- */
6447
- function createCaseFirst(methodName) {
6448
- return function(string) {
6449
- string = toString(string);
6450
-
6451
- var strSymbols = hasUnicode(string)
6452
- ? stringToArray(string)
6453
- : undefined;
6454
-
6455
- var chr = strSymbols
6456
- ? strSymbols[0]
6457
- : string.charAt(0);
6458
-
6459
- var trailing = strSymbols
6460
- ? castSlice(strSymbols, 1).join('')
6461
- : string.slice(1);
6462
-
6463
- return chr[methodName]() + trailing;
6464
- };
6465
- }
6466
-
6467
- /**
6468
- * Creates a function like `_.camelCase`.
6469
- *
6470
- * @private
6471
- * @param {Function} callback The function to combine each word.
6472
- * @returns {Function} Returns the new compounder function.
6473
- */
6474
- function createCompounder(callback) {
6475
- return function(string) {
6476
- return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
6477
- };
6478
- }
6479
-
6480
- /**
6481
- * Creates a function that produces an instance of `Ctor` regardless of
6482
- * whether it was invoked as part of a `new` expression or by `call` or `apply`.
6483
- *
6484
- * @private
6485
- * @param {Function} Ctor The constructor to wrap.
6486
- * @returns {Function} Returns the new wrapped function.
6487
- */
6488
- function createCtor(Ctor) {
6489
- return function() {
6490
- // Use a `switch` statement to work with class constructors. See
6491
- // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
6492
- // for more details.
6493
- var args = arguments;
6494
- switch (args.length) {
6495
- case 0: return new Ctor;
6496
- case 1: return new Ctor(args[0]);
6497
- case 2: return new Ctor(args[0], args[1]);
6498
- case 3: return new Ctor(args[0], args[1], args[2]);
6499
- case 4: return new Ctor(args[0], args[1], args[2], args[3]);
6500
- case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
6501
- case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
6502
- case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
6503
- }
6504
- var thisBinding = baseCreate(Ctor.prototype),
6505
- result = Ctor.apply(thisBinding, args);
6506
-
6507
- // Mimic the constructor's `return` behavior.
6508
- // See https://es5.github.io/#x13.2.2 for more details.
6509
- return isObject(result) ? result : thisBinding;
6510
- };
6511
- }
6512
-
6513
- /**
6514
- * Creates a function that wraps `func` to enable currying.
6515
- *
6516
- * @private
6517
- * @param {Function} func The function to wrap.
6518
- * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
6519
- * @param {number} arity The arity of `func`.
6520
- * @returns {Function} Returns the new wrapped function.
6521
- */
6522
- function createCurry(func, bitmask, arity) {
6523
- var Ctor = createCtor(func);
6524
-
6525
- function wrapper() {
6526
- var length = arguments.length,
6527
- args = Array(length),
6528
- index = length,
6529
- placeholder = getHolder(wrapper);
6530
-
6531
- while (index--) {
6532
- args[index] = arguments[index];
6533
- }
6534
- var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
6535
- ? []
6536
- : replaceHolders(args, placeholder);
6537
-
6538
- length -= holders.length;
6539
- if (length < arity) {
6540
- return createRecurry(
6541
- func, bitmask, createHybrid, wrapper.placeholder, undefined,
6542
- args, holders, undefined, undefined, arity - length);
6543
- }
6544
- var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
6545
- return apply(fn, this, args);
6546
- }
6547
- return wrapper;
6548
- }
6549
-
6550
- /**
6551
- * Creates a `_.find` or `_.findLast` function.
6552
- *
6553
- * @private
6554
- * @param {Function} findIndexFunc The function to find the collection index.
6555
- * @returns {Function} Returns the new find function.
6556
- */
6557
- function createFind(findIndexFunc) {
6558
- return function(collection, predicate, fromIndex) {
6559
- var iterable = Object(collection);
6560
- if (!isArrayLike(collection)) {
6561
- var iteratee = getIteratee(predicate, 3);
6562
- collection = keys(collection);
6563
- predicate = function(key) { return iteratee(iterable[key], key, iterable); };
6564
- }
6565
- var index = findIndexFunc(collection, predicate, fromIndex);
6566
- return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
6567
- };
6568
- }
6569
-
6570
- /**
6571
- * Creates a `_.flow` or `_.flowRight` function.
6572
- *
6573
- * @private
6574
- * @param {boolean} [fromRight] Specify iterating from right to left.
6575
- * @returns {Function} Returns the new flow function.
6576
- */
6577
- function createFlow(fromRight) {
6578
- return flatRest(function(funcs) {
6579
- var length = funcs.length,
6580
- index = length,
6581
- prereq = LodashWrapper.prototype.thru;
6582
-
6583
- if (fromRight) {
6584
- funcs.reverse();
6585
- }
6586
- while (index--) {
6587
- var func = funcs[index];
6588
- if (typeof func != 'function') {
6589
- throw new TypeError(FUNC_ERROR_TEXT);
6590
- }
6591
- if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
6592
- var wrapper = new LodashWrapper([], true);
6593
- }
6594
- }
6595
- index = wrapper ? index : length;
6596
- while (++index < length) {
6597
- func = funcs[index];
6598
-
6599
- var funcName = getFuncName(func),
6600
- data = funcName == 'wrapper' ? getData(func) : undefined;
6601
-
6602
- if (data && isLaziable(data[0]) &&
6603
- data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
6604
- !data[4].length && data[9] == 1
6605
- ) {
6606
- wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
6607
- } else {
6608
- wrapper = (func.length == 1 && isLaziable(func))
6609
- ? wrapper[funcName]()
6610
- : wrapper.thru(func);
6611
- }
6612
- }
6613
- return function() {
6614
- var args = arguments,
6615
- value = args[0];
6616
-
6617
- if (wrapper && args.length == 1 && isArray(value)) {
6618
- return wrapper.plant(value).value();
6619
- }
6620
- var index = 0,
6621
- result = length ? funcs[index].apply(this, args) : value;
6622
-
6623
- while (++index < length) {
6624
- result = funcs[index].call(this, result);
6625
- }
6626
- return result;
6627
- };
6628
- });
6629
- }
6630
-
6631
- /**
6632
- * Creates a function that wraps `func` to invoke it with optional `this`
6633
- * binding of `thisArg`, partial application, and currying.
6634
- *
6635
- * @private
6636
- * @param {Function|string} func The function or method name to wrap.
6637
- * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
6638
- * @param {*} [thisArg] The `this` binding of `func`.
6639
- * @param {Array} [partials] The arguments to prepend to those provided to
6640
- * the new function.
6641
- * @param {Array} [holders] The `partials` placeholder indexes.
6642
- * @param {Array} [partialsRight] The arguments to append to those provided
6643
- * to the new function.
6644
- * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
6645
- * @param {Array} [argPos] The argument positions of the new function.
6646
- * @param {number} [ary] The arity cap of `func`.
6647
- * @param {number} [arity] The arity of `func`.
6648
- * @returns {Function} Returns the new wrapped function.
6649
- */
6650
- function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
6651
- var isAry = bitmask & WRAP_ARY_FLAG,
6652
- isBind = bitmask & WRAP_BIND_FLAG,
6653
- isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
6654
- isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
6655
- isFlip = bitmask & WRAP_FLIP_FLAG,
6656
- Ctor = isBindKey ? undefined : createCtor(func);
6657
-
6658
- function wrapper() {
6659
- var length = arguments.length,
6660
- args = Array(length),
6661
- index = length;
6662
-
6663
- while (index--) {
6664
- args[index] = arguments[index];
6665
- }
6666
- if (isCurried) {
6667
- var placeholder = getHolder(wrapper),
6668
- holdersCount = countHolders(args, placeholder);
6669
- }
6670
- if (partials) {
6671
- args = composeArgs(args, partials, holders, isCurried);
6672
- }
6673
- if (partialsRight) {
6674
- args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
6675
- }
6676
- length -= holdersCount;
6677
- if (isCurried && length < arity) {
6678
- var newHolders = replaceHolders(args, placeholder);
6679
- return createRecurry(
6680
- func, bitmask, createHybrid, wrapper.placeholder, thisArg,
6681
- args, newHolders, argPos, ary, arity - length
6682
- );
6683
- }
6684
- var thisBinding = isBind ? thisArg : this,
6685
- fn = isBindKey ? thisBinding[func] : func;
6686
-
6687
- length = args.length;
6688
- if (argPos) {
6689
- args = reorder(args, argPos);
6690
- } else if (isFlip && length > 1) {
6691
- args.reverse();
6692
- }
6693
- if (isAry && ary < length) {
6694
- args.length = ary;
6695
- }
6696
- if (this && this !== root && this instanceof wrapper) {
6697
- fn = Ctor || createCtor(fn);
6698
- }
6699
- return fn.apply(thisBinding, args);
6700
- }
6701
- return wrapper;
6702
- }
6703
-
6704
- /**
6705
- * Creates a function like `_.invertBy`.
6706
- *
6707
- * @private
6708
- * @param {Function} setter The function to set accumulator values.
6709
- * @param {Function} toIteratee The function to resolve iteratees.
6710
- * @returns {Function} Returns the new inverter function.
6711
- */
6712
- function createInverter(setter, toIteratee) {
6713
- return function(object, iteratee) {
6714
- return baseInverter(object, setter, toIteratee(iteratee), {});
6715
- };
6716
- }
6717
-
6718
- /**
6719
- * Creates a function that performs a mathematical operation on two values.
6720
- *
6721
- * @private
6722
- * @param {Function} operator The function to perform the operation.
6723
- * @param {number} [defaultValue] The value used for `undefined` arguments.
6724
- * @returns {Function} Returns the new mathematical operation function.
6725
- */
6726
- function createMathOperation(operator, defaultValue) {
6727
- return function(value, other) {
6728
- var result;
6729
- if (value === undefined && other === undefined) {
6730
- return defaultValue;
6731
- }
6732
- if (value !== undefined) {
6733
- result = value;
6734
- }
6735
- if (other !== undefined) {
6736
- if (result === undefined) {
6737
- return other;
6738
- }
6739
- if (typeof value == 'string' || typeof other == 'string') {
6740
- value = baseToString(value);
6741
- other = baseToString(other);
6742
- } else {
6743
- value = baseToNumber(value);
6744
- other = baseToNumber(other);
6745
- }
6746
- result = operator(value, other);
6747
- }
6748
- return result;
6749
- };
6750
- }
6751
-
6752
- /**
6753
- * Creates a function like `_.over`.
6754
- *
6755
- * @private
6756
- * @param {Function} arrayFunc The function to iterate over iteratees.
6757
- * @returns {Function} Returns the new over function.
6758
- */
6759
- function createOver(arrayFunc) {
6760
- return flatRest(function(iteratees) {
6761
- iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
6762
- return baseRest(function(args) {
6763
- var thisArg = this;
6764
- return arrayFunc(iteratees, function(iteratee) {
6765
- return apply(iteratee, thisArg, args);
6766
- });
6767
- });
6768
- });
6769
- }
6770
-
6771
- /**
6772
- * Creates the padding for `string` based on `length`. The `chars` string
6773
- * is truncated if the number of characters exceeds `length`.
6774
- *
6775
- * @private
6776
- * @param {number} length The padding length.
6777
- * @param {string} [chars=' '] The string used as padding.
6778
- * @returns {string} Returns the padding for `string`.
6779
- */
6780
- function createPadding(length, chars) {
6781
- chars = chars === undefined ? ' ' : baseToString(chars);
6782
-
6783
- var charsLength = chars.length;
6784
- if (charsLength < 2) {
6785
- return charsLength ? baseRepeat(chars, length) : chars;
6786
- }
6787
- var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
6788
- return hasUnicode(chars)
6789
- ? castSlice(stringToArray(result), 0, length).join('')
6790
- : result.slice(0, length);
6791
- }
6792
-
6793
- /**
6794
- * Creates a function that wraps `func` to invoke it with the `this` binding
6795
- * of `thisArg` and `partials` prepended to the arguments it receives.
6796
- *
6797
- * @private
6798
- * @param {Function} func The function to wrap.
6799
- * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
6800
- * @param {*} thisArg The `this` binding of `func`.
6801
- * @param {Array} partials The arguments to prepend to those provided to
6802
- * the new function.
6803
- * @returns {Function} Returns the new wrapped function.
6804
- */
6805
- function createPartial(func, bitmask, thisArg, partials) {
6806
- var isBind = bitmask & WRAP_BIND_FLAG,
6807
- Ctor = createCtor(func);
6808
-
6809
- function wrapper() {
6810
- var argsIndex = -1,
6811
- argsLength = arguments.length,
6812
- leftIndex = -1,
6813
- leftLength = partials.length,
6814
- args = Array(leftLength + argsLength),
6815
- fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
6816
-
6817
- while (++leftIndex < leftLength) {
6818
- args[leftIndex] = partials[leftIndex];
6819
- }
6820
- while (argsLength--) {
6821
- args[leftIndex++] = arguments[++argsIndex];
6822
- }
6823
- return apply(fn, isBind ? thisArg : this, args);
6824
- }
6825
- return wrapper;
6826
- }
6827
-
6828
- /**
6829
- * Creates a `_.range` or `_.rangeRight` function.
6830
- *
6831
- * @private
6832
- * @param {boolean} [fromRight] Specify iterating from right to left.
6833
- * @returns {Function} Returns the new range function.
6834
- */
6835
- function createRange(fromRight) {
6836
- return function(start, end, step) {
6837
- if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
6838
- end = step = undefined;
6839
- }
6840
- // Ensure the sign of `-0` is preserved.
6841
- start = toFinite(start);
6842
- if (end === undefined) {
6843
- end = start;
6844
- start = 0;
6845
- } else {
6846
- end = toFinite(end);
6847
- }
6848
- step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
6849
- return baseRange(start, end, step, fromRight);
6850
- };
6851
- }
6852
-
6853
- /**
6854
- * Creates a function that performs a relational operation on two values.
6855
- *
6856
- * @private
6857
- * @param {Function} operator The function to perform the operation.
6858
- * @returns {Function} Returns the new relational operation function.
6859
- */
6860
- function createRelationalOperation(operator) {
6861
- return function(value, other) {
6862
- if (!(typeof value == 'string' && typeof other == 'string')) {
6863
- value = toNumber(value);
6864
- other = toNumber(other);
6865
- }
6866
- return operator(value, other);
6867
- };
6868
- }
6869
-
6870
- /**
6871
- * Creates a function that wraps `func` to continue currying.
6872
- *
6873
- * @private
6874
- * @param {Function} func The function to wrap.
6875
- * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
6876
- * @param {Function} wrapFunc The function to create the `func` wrapper.
6877
- * @param {*} placeholder The placeholder value.
6878
- * @param {*} [thisArg] The `this` binding of `func`.
6879
- * @param {Array} [partials] The arguments to prepend to those provided to
6880
- * the new function.
6881
- * @param {Array} [holders] The `partials` placeholder indexes.
6882
- * @param {Array} [argPos] The argument positions of the new function.
6883
- * @param {number} [ary] The arity cap of `func`.
6884
- * @param {number} [arity] The arity of `func`.
6885
- * @returns {Function} Returns the new wrapped function.
6886
- */
6887
- function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
6888
- var isCurry = bitmask & WRAP_CURRY_FLAG,
6889
- newHolders = isCurry ? holders : undefined,
6890
- newHoldersRight = isCurry ? undefined : holders,
6891
- newPartials = isCurry ? partials : undefined,
6892
- newPartialsRight = isCurry ? undefined : partials;
6893
-
6894
- bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
6895
- bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
6896
-
6897
- if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
6898
- bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
6899
- }
6900
- var newData = [
6901
- func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
6902
- newHoldersRight, argPos, ary, arity
6903
- ];
6904
-
6905
- var result = wrapFunc.apply(undefined, newData);
6906
- if (isLaziable(func)) {
6907
- setData(result, newData);
6908
- }
6909
- result.placeholder = placeholder;
6910
- return setWrapToString(result, func, bitmask);
6911
- }
6912
-
6913
- /**
6914
- * Creates a function like `_.round`.
6915
- *
6916
- * @private
6917
- * @param {string} methodName The name of the `Math` method to use when rounding.
6918
- * @returns {Function} Returns the new round function.
6919
- */
6920
- function createRound(methodName) {
6921
- var func = Math[methodName];
6922
- return function(number, precision) {
6923
- number = toNumber(number);
6924
- precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
6925
- if (precision) {
6926
- // Shift with exponential notation to avoid floating-point issues.
6927
- // See [MDN](https://mdn.io/round#Examples) for more details.
6928
- var pair = (toString(number) + 'e').split('e'),
6929
- value = func(pair[0] + 'e' + (+pair[1] + precision));
6930
-
6931
- pair = (toString(value) + 'e').split('e');
6932
- return +(pair[0] + 'e' + (+pair[1] - precision));
6933
- }
6934
- return func(number);
6935
- };
6936
- }
6937
-
6938
- /**
6939
- * Creates a set object of `values`.
6940
- *
6941
- * @private
6942
- * @param {Array} values The values to add to the set.
6943
- * @returns {Object} Returns the new set.
6944
- */
6945
- var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
6946
- return new Set(values);
6947
- };
6948
-
6949
- /**
6950
- * Creates a `_.toPairs` or `_.toPairsIn` function.
6951
- *
6952
- * @private
6953
- * @param {Function} keysFunc The function to get the keys of a given object.
6954
- * @returns {Function} Returns the new pairs function.
6955
- */
6956
- function createToPairs(keysFunc) {
6957
- return function(object) {
6958
- var tag = getTag(object);
6959
- if (tag == mapTag) {
6960
- return mapToArray(object);
6961
- }
6962
- if (tag == setTag) {
6963
- return setToPairs(object);
6964
- }
6965
- return baseToPairs(object, keysFunc(object));
6966
- };
6967
- }
6968
-
6969
- /**
6970
- * Creates a function that either curries or invokes `func` with optional
6971
- * `this` binding and partially applied arguments.
6972
- *
6973
- * @private
6974
- * @param {Function|string} func The function or method name to wrap.
6975
- * @param {number} bitmask The bitmask flags.
6976
- * 1 - `_.bind`
6977
- * 2 - `_.bindKey`
6978
- * 4 - `_.curry` or `_.curryRight` of a bound function
6979
- * 8 - `_.curry`
6980
- * 16 - `_.curryRight`
6981
- * 32 - `_.partial`
6982
- * 64 - `_.partialRight`
6983
- * 128 - `_.rearg`
6984
- * 256 - `_.ary`
6985
- * 512 - `_.flip`
6986
- * @param {*} [thisArg] The `this` binding of `func`.
6987
- * @param {Array} [partials] The arguments to be partially applied.
6988
- * @param {Array} [holders] The `partials` placeholder indexes.
6989
- * @param {Array} [argPos] The argument positions of the new function.
6990
- * @param {number} [ary] The arity cap of `func`.
6991
- * @param {number} [arity] The arity of `func`.
6992
- * @returns {Function} Returns the new wrapped function.
6993
- */
6994
- function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
6995
- var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
6996
- if (!isBindKey && typeof func != 'function') {
6997
- throw new TypeError(FUNC_ERROR_TEXT);
6998
- }
6999
- var length = partials ? partials.length : 0;
7000
- if (!length) {
7001
- bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
7002
- partials = holders = undefined;
7003
- }
7004
- ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
7005
- arity = arity === undefined ? arity : toInteger(arity);
7006
- length -= holders ? holders.length : 0;
7007
-
7008
- if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
7009
- var partialsRight = partials,
7010
- holdersRight = holders;
7011
-
7012
- partials = holders = undefined;
7013
- }
7014
- var data = isBindKey ? undefined : getData(func);
7015
-
7016
- var newData = [
7017
- func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
7018
- argPos, ary, arity
7019
- ];
7020
-
7021
- if (data) {
7022
- mergeData(newData, data);
7023
- }
7024
- func = newData[0];
7025
- bitmask = newData[1];
7026
- thisArg = newData[2];
7027
- partials = newData[3];
7028
- holders = newData[4];
7029
- arity = newData[9] = newData[9] === undefined
7030
- ? (isBindKey ? 0 : func.length)
7031
- : nativeMax(newData[9] - length, 0);
7032
-
7033
- if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
7034
- bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
7035
- }
7036
- if (!bitmask || bitmask == WRAP_BIND_FLAG) {
7037
- var result = createBind(func, bitmask, thisArg);
7038
- } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
7039
- result = createCurry(func, bitmask, arity);
7040
- } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
7041
- result = createPartial(func, bitmask, thisArg, partials);
7042
- } else {
7043
- result = createHybrid.apply(undefined, newData);
7044
- }
7045
- var setter = data ? baseSetData : setData;
7046
- return setWrapToString(setter(result, newData), func, bitmask);
7047
- }
7048
-
7049
- /**
7050
- * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
7051
- * of source objects to the destination object for all destination properties
7052
- * that resolve to `undefined`.
7053
- *
7054
- * @private
7055
- * @param {*} objValue The destination value.
7056
- * @param {*} srcValue The source value.
7057
- * @param {string} key The key of the property to assign.
7058
- * @param {Object} object The parent object of `objValue`.
7059
- * @returns {*} Returns the value to assign.
7060
- */
7061
- function customDefaultsAssignIn(objValue, srcValue, key, object) {
7062
- if (objValue === undefined ||
7063
- (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
7064
- return srcValue;
7065
- }
7066
- return objValue;
7067
- }
7068
-
7069
- /**
7070
- * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
7071
- * objects into destination objects that are passed thru.
7072
- *
7073
- * @private
7074
- * @param {*} objValue The destination value.
7075
- * @param {*} srcValue The source value.
7076
- * @param {string} key The key of the property to merge.
7077
- * @param {Object} object The parent object of `objValue`.
7078
- * @param {Object} source The parent object of `srcValue`.
7079
- * @param {Object} [stack] Tracks traversed source values and their merged
7080
- * counterparts.
7081
- * @returns {*} Returns the value to assign.
7082
- */
7083
- function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
7084
- if (isObject(objValue) && isObject(srcValue)) {
7085
- // Recursively merge objects and arrays (susceptible to call stack limits).
7086
- stack.set(srcValue, objValue);
7087
- baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
7088
- stack['delete'](srcValue);
7089
- }
7090
- return objValue;
7091
- }
7092
-
7093
- /**
7094
- * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
7095
- * objects.
7096
- *
7097
- * @private
7098
- * @param {*} value The value to inspect.
7099
- * @param {string} key The key of the property to inspect.
7100
- * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
7101
- */
7102
- function customOmitClone(value) {
7103
- return isPlainObject(value) ? undefined : value;
7104
- }
7105
-
7106
- /**
7107
- * A specialized version of `baseIsEqualDeep` for arrays with support for
7108
- * partial deep comparisons.
7109
- *
7110
- * @private
7111
- * @param {Array} array The array to compare.
7112
- * @param {Array} other The other array to compare.
7113
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
7114
- * @param {Function} customizer The function to customize comparisons.
7115
- * @param {Function} equalFunc The function to determine equivalents of values.
7116
- * @param {Object} stack Tracks traversed `array` and `other` objects.
7117
- * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
7118
- */
7119
- function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
7120
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
7121
- arrLength = array.length,
7122
- othLength = other.length;
7123
-
7124
- if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
7125
- return false;
7126
- }
7127
- // Assume cyclic values are equal.
7128
- var stacked = stack.get(array);
7129
- if (stacked && stack.get(other)) {
7130
- return stacked == other;
7131
- }
7132
- var index = -1,
7133
- result = true,
7134
- seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
7135
-
7136
- stack.set(array, other);
7137
- stack.set(other, array);
7138
-
7139
- // Ignore non-index properties.
7140
- while (++index < arrLength) {
7141
- var arrValue = array[index],
7142
- othValue = other[index];
7143
-
7144
- if (customizer) {
7145
- var compared = isPartial
7146
- ? customizer(othValue, arrValue, index, other, array, stack)
7147
- : customizer(arrValue, othValue, index, array, other, stack);
7148
- }
7149
- if (compared !== undefined) {
7150
- if (compared) {
7151
- continue;
7152
- }
7153
- result = false;
7154
- break;
7155
- }
7156
- // Recursively compare arrays (susceptible to call stack limits).
7157
- if (seen) {
7158
- if (!arraySome(other, function(othValue, othIndex) {
7159
- if (!cacheHas(seen, othIndex) &&
7160
- (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
7161
- return seen.push(othIndex);
7162
- }
7163
- })) {
7164
- result = false;
7165
- break;
7166
- }
7167
- } else if (!(
7168
- arrValue === othValue ||
7169
- equalFunc(arrValue, othValue, bitmask, customizer, stack)
7170
- )) {
7171
- result = false;
7172
- break;
7173
- }
7174
- }
7175
- stack['delete'](array);
7176
- stack['delete'](other);
7177
- return result;
7178
- }
7179
-
7180
- /**
7181
- * A specialized version of `baseIsEqualDeep` for comparing objects of
7182
- * the same `toStringTag`.
7183
- *
7184
- * **Note:** This function only supports comparing values with tags of
7185
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
7186
- *
7187
- * @private
7188
- * @param {Object} object The object to compare.
7189
- * @param {Object} other The other object to compare.
7190
- * @param {string} tag The `toStringTag` of the objects to compare.
7191
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
7192
- * @param {Function} customizer The function to customize comparisons.
7193
- * @param {Function} equalFunc The function to determine equivalents of values.
7194
- * @param {Object} stack Tracks traversed `object` and `other` objects.
7195
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
7196
- */
7197
- function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
7198
- switch (tag) {
7199
- case dataViewTag:
7200
- if ((object.byteLength != other.byteLength) ||
7201
- (object.byteOffset != other.byteOffset)) {
7202
- return false;
7203
- }
7204
- object = object.buffer;
7205
- other = other.buffer;
7206
-
7207
- case arrayBufferTag:
7208
- if ((object.byteLength != other.byteLength) ||
7209
- !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
7210
- return false;
7211
- }
7212
- return true;
7213
-
7214
- case boolTag:
7215
- case dateTag:
7216
- case numberTag:
7217
- // Coerce booleans to `1` or `0` and dates to milliseconds.
7218
- // Invalid dates are coerced to `NaN`.
7219
- return eq(+object, +other);
7220
-
7221
- case errorTag:
7222
- return object.name == other.name && object.message == other.message;
7223
-
7224
- case regexpTag:
7225
- case stringTag:
7226
- // Coerce regexes to strings and treat strings, primitives and objects,
7227
- // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
7228
- // for more details.
7229
- return object == (other + '');
7230
-
7231
- case mapTag:
7232
- var convert = mapToArray;
7233
-
7234
- case setTag:
7235
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
7236
- convert || (convert = setToArray);
7237
-
7238
- if (object.size != other.size && !isPartial) {
7239
- return false;
7240
- }
7241
- // Assume cyclic values are equal.
7242
- var stacked = stack.get(object);
7243
- if (stacked) {
7244
- return stacked == other;
7245
- }
7246
- bitmask |= COMPARE_UNORDERED_FLAG;
7247
-
7248
- // Recursively compare objects (susceptible to call stack limits).
7249
- stack.set(object, other);
7250
- var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
7251
- stack['delete'](object);
7252
- return result;
7253
-
7254
- case symbolTag:
7255
- if (symbolValueOf) {
7256
- return symbolValueOf.call(object) == symbolValueOf.call(other);
7257
- }
7258
- }
7259
- return false;
7260
- }
7261
-
7262
- /**
7263
- * A specialized version of `baseIsEqualDeep` for objects with support for
7264
- * partial deep comparisons.
7265
- *
7266
- * @private
7267
- * @param {Object} object The object to compare.
7268
- * @param {Object} other The other object to compare.
7269
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
7270
- * @param {Function} customizer The function to customize comparisons.
7271
- * @param {Function} equalFunc The function to determine equivalents of values.
7272
- * @param {Object} stack Tracks traversed `object` and `other` objects.
7273
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
7274
- */
7275
- function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
7276
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
7277
- objProps = getAllKeys(object),
7278
- objLength = objProps.length,
7279
- othProps = getAllKeys(other),
7280
- othLength = othProps.length;
7281
-
7282
- if (objLength != othLength && !isPartial) {
7283
- return false;
7284
- }
7285
- var index = objLength;
7286
- while (index--) {
7287
- var key = objProps[index];
7288
- if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
7289
- return false;
7290
- }
7291
- }
7292
- // Assume cyclic values are equal.
7293
- var stacked = stack.get(object);
7294
- if (stacked && stack.get(other)) {
7295
- return stacked == other;
7296
- }
7297
- var result = true;
7298
- stack.set(object, other);
7299
- stack.set(other, object);
7300
-
7301
- var skipCtor = isPartial;
7302
- while (++index < objLength) {
7303
- key = objProps[index];
7304
- var objValue = object[key],
7305
- othValue = other[key];
7306
-
7307
- if (customizer) {
7308
- var compared = isPartial
7309
- ? customizer(othValue, objValue, key, other, object, stack)
7310
- : customizer(objValue, othValue, key, object, other, stack);
7311
- }
7312
- // Recursively compare objects (susceptible to call stack limits).
7313
- if (!(compared === undefined
7314
- ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
7315
- : compared
7316
- )) {
7317
- result = false;
7318
- break;
7319
- }
7320
- skipCtor || (skipCtor = key == 'constructor');
7321
- }
7322
- if (result && !skipCtor) {
7323
- var objCtor = object.constructor,
7324
- othCtor = other.constructor;
7325
-
7326
- // Non `Object` object instances with different constructors are not equal.
7327
- if (objCtor != othCtor &&
7328
- ('constructor' in object && 'constructor' in other) &&
7329
- !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
7330
- typeof othCtor == 'function' && othCtor instanceof othCtor)) {
7331
- result = false;
7332
- }
7333
- }
7334
- stack['delete'](object);
7335
- stack['delete'](other);
7336
- return result;
7337
- }
7338
-
7339
- /**
7340
- * A specialized version of `baseRest` which flattens the rest array.
7341
- *
7342
- * @private
7343
- * @param {Function} func The function to apply a rest parameter to.
7344
- * @returns {Function} Returns the new function.
7345
- */
7346
- function flatRest(func) {
7347
- return setToString(overRest(func, undefined, flatten), func + '');
7348
- }
7349
-
7350
- /**
7351
- * Creates an array of own enumerable property names and symbols of `object`.
7352
- *
7353
- * @private
7354
- * @param {Object} object The object to query.
7355
- * @returns {Array} Returns the array of property names and symbols.
7356
- */
7357
- function getAllKeys(object) {
7358
- return baseGetAllKeys(object, keys, getSymbols);
7359
- }
7360
-
7361
- /**
7362
- * Creates an array of own and inherited enumerable property names and
7363
- * symbols of `object`.
7364
- *
7365
- * @private
7366
- * @param {Object} object The object to query.
7367
- * @returns {Array} Returns the array of property names and symbols.
7368
- */
7369
- function getAllKeysIn(object) {
7370
- return baseGetAllKeys(object, keysIn, getSymbolsIn);
7371
- }
7372
-
7373
- /**
7374
- * Gets metadata for `func`.
7375
- *
7376
- * @private
7377
- * @param {Function} func The function to query.
7378
- * @returns {*} Returns the metadata for `func`.
7379
- */
7380
- var getData = !metaMap ? noop : function(func) {
7381
- return metaMap.get(func);
7382
- };
7383
-
7384
- /**
7385
- * Gets the name of `func`.
7386
- *
7387
- * @private
7388
- * @param {Function} func The function to query.
7389
- * @returns {string} Returns the function name.
7390
- */
7391
- function getFuncName(func) {
7392
- var result = (func.name + ''),
7393
- array = realNames[result],
7394
- length = hasOwnProperty.call(realNames, result) ? array.length : 0;
7395
-
7396
- while (length--) {
7397
- var data = array[length],
7398
- otherFunc = data.func;
7399
- if (otherFunc == null || otherFunc == func) {
7400
- return data.name;
7401
- }
7402
- }
7403
- return result;
7404
- }
7405
-
7406
- /**
7407
- * Gets the argument placeholder value for `func`.
7408
- *
7409
- * @private
7410
- * @param {Function} func The function to inspect.
7411
- * @returns {*} Returns the placeholder value.
7412
- */
7413
- function getHolder(func) {
7414
- var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
7415
- return object.placeholder;
7416
- }
7417
-
7418
- /**
7419
- * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
7420
- * this function returns the custom method, otherwise it returns `baseIteratee`.
7421
- * If arguments are provided, the chosen function is invoked with them and
7422
- * its result is returned.
7423
- *
7424
- * @private
7425
- * @param {*} [value] The value to convert to an iteratee.
7426
- * @param {number} [arity] The arity of the created iteratee.
7427
- * @returns {Function} Returns the chosen function or its result.
7428
- */
7429
- function getIteratee() {
7430
- var result = lodash.iteratee || iteratee;
7431
- result = result === iteratee ? baseIteratee : result;
7432
- return arguments.length ? result(arguments[0], arguments[1]) : result;
7433
- }
7434
-
7435
- /**
7436
- * Gets the data for `map`.
7437
- *
7438
- * @private
7439
- * @param {Object} map The map to query.
7440
- * @param {string} key The reference key.
7441
- * @returns {*} Returns the map data.
7442
- */
7443
- function getMapData(map, key) {
7444
- var data = map.__data__;
7445
- return isKeyable(key)
7446
- ? data[typeof key == 'string' ? 'string' : 'hash']
7447
- : data.map;
7448
- }
7449
-
7450
- /**
7451
- * Gets the property names, values, and compare flags of `object`.
7452
- *
7453
- * @private
7454
- * @param {Object} object The object to query.
7455
- * @returns {Array} Returns the match data of `object`.
7456
- */
7457
- function getMatchData(object) {
7458
- var result = keys(object),
7459
- length = result.length;
7460
-
7461
- while (length--) {
7462
- var key = result[length],
7463
- value = object[key];
7464
-
7465
- result[length] = [key, value, isStrictComparable(value)];
7466
- }
7467
- return result;
7468
- }
7469
-
7470
- /**
7471
- * Gets the native function at `key` of `object`.
7472
- *
7473
- * @private
7474
- * @param {Object} object The object to query.
7475
- * @param {string} key The key of the method to get.
7476
- * @returns {*} Returns the function if it's native, else `undefined`.
7477
- */
7478
- function getNative(object, key) {
7479
- var value = getValue(object, key);
7480
- return baseIsNative(value) ? value : undefined;
7481
- }
7482
-
7483
- /**
7484
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
7485
- *
7486
- * @private
7487
- * @param {*} value The value to query.
7488
- * @returns {string} Returns the raw `toStringTag`.
7489
- */
7490
- function getRawTag(value) {
7491
- var isOwn = hasOwnProperty.call(value, symToStringTag),
7492
- tag = value[symToStringTag];
7493
-
7494
- try {
7495
- value[symToStringTag] = undefined;
7496
- var unmasked = true;
7497
- } catch (e) {}
7498
-
7499
- var result = nativeObjectToString.call(value);
7500
- if (unmasked) {
7501
- if (isOwn) {
7502
- value[symToStringTag] = tag;
7503
- } else {
7504
- delete value[symToStringTag];
7505
- }
7506
- }
7507
- return result;
7508
- }
7509
-
7510
- /**
7511
- * Creates an array of the own enumerable symbols of `object`.
7512
- *
7513
- * @private
7514
- * @param {Object} object The object to query.
7515
- * @returns {Array} Returns the array of symbols.
7516
- */
7517
- var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
7518
- if (object == null) {
7519
- return [];
7520
- }
7521
- object = Object(object);
7522
- return arrayFilter(nativeGetSymbols(object), function(symbol) {
7523
- return propertyIsEnumerable.call(object, symbol);
7524
- });
7525
- };
7526
-
7527
- /**
7528
- * Creates an array of the own and inherited enumerable symbols of `object`.
7529
- *
7530
- * @private
7531
- * @param {Object} object The object to query.
7532
- * @returns {Array} Returns the array of symbols.
7533
- */
7534
- var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
7535
- var result = [];
7536
- while (object) {
7537
- arrayPush(result, getSymbols(object));
7538
- object = getPrototype(object);
7539
- }
7540
- return result;
7541
- };
7542
-
7543
- /**
7544
- * Gets the `toStringTag` of `value`.
7545
- *
7546
- * @private
7547
- * @param {*} value The value to query.
7548
- * @returns {string} Returns the `toStringTag`.
7549
- */
7550
- var getTag = baseGetTag;
7551
-
7552
- // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
7553
- if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
7554
- (Map && getTag(new Map) != mapTag) ||
7555
- (Promise && getTag(Promise.resolve()) != promiseTag) ||
7556
- (Set && getTag(new Set) != setTag) ||
7557
- (WeakMap && getTag(new WeakMap) != weakMapTag)) {
7558
- getTag = function(value) {
7559
- var result = baseGetTag(value),
7560
- Ctor = result == objectTag ? value.constructor : undefined,
7561
- ctorString = Ctor ? toSource(Ctor) : '';
7562
-
7563
- if (ctorString) {
7564
- switch (ctorString) {
7565
- case dataViewCtorString: return dataViewTag;
7566
- case mapCtorString: return mapTag;
7567
- case promiseCtorString: return promiseTag;
7568
- case setCtorString: return setTag;
7569
- case weakMapCtorString: return weakMapTag;
7570
- }
7571
- }
7572
- return result;
7573
- };
7574
- }
7575
-
7576
- /**
7577
- * Gets the view, applying any `transforms` to the `start` and `end` positions.
7578
- *
7579
- * @private
7580
- * @param {number} start The start of the view.
7581
- * @param {number} end The end of the view.
7582
- * @param {Array} transforms The transformations to apply to the view.
7583
- * @returns {Object} Returns an object containing the `start` and `end`
7584
- * positions of the view.
7585
- */
7586
- function getView(start, end, transforms) {
7587
- var index = -1,
7588
- length = transforms.length;
7589
-
7590
- while (++index < length) {
7591
- var data = transforms[index],
7592
- size = data.size;
7593
-
7594
- switch (data.type) {
7595
- case 'drop': start += size; break;
7596
- case 'dropRight': end -= size; break;
7597
- case 'take': end = nativeMin(end, start + size); break;
7598
- case 'takeRight': start = nativeMax(start, end - size); break;
7599
- }
7600
- }
7601
- return { 'start': start, 'end': end };
7602
- }
7603
-
7604
- /**
7605
- * Extracts wrapper details from the `source` body comment.
7606
- *
7607
- * @private
7608
- * @param {string} source The source to inspect.
7609
- * @returns {Array} Returns the wrapper details.
7610
- */
7611
- function getWrapDetails(source) {
7612
- var match = source.match(reWrapDetails);
7613
- return match ? match[1].split(reSplitDetails) : [];
7614
- }
7615
-
7616
- /**
7617
- * Checks if `path` exists on `object`.
7618
- *
7619
- * @private
7620
- * @param {Object} object The object to query.
7621
- * @param {Array|string} path The path to check.
7622
- * @param {Function} hasFunc The function to check properties.
7623
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
7624
- */
7625
- function hasPath(object, path, hasFunc) {
7626
- path = castPath(path, object);
7627
-
7628
- var index = -1,
7629
- length = path.length,
7630
- result = false;
7631
-
7632
- while (++index < length) {
7633
- var key = toKey(path[index]);
7634
- if (!(result = object != null && hasFunc(object, key))) {
7635
- break;
7636
- }
7637
- object = object[key];
7638
- }
7639
- if (result || ++index != length) {
7640
- return result;
7641
- }
7642
- length = object == null ? 0 : object.length;
7643
- return !!length && isLength(length) && isIndex(key, length) &&
7644
- (isArray(object) || isArguments(object));
7645
- }
7646
-
7647
- /**
7648
- * Initializes an array clone.
7649
- *
7650
- * @private
7651
- * @param {Array} array The array to clone.
7652
- * @returns {Array} Returns the initialized clone.
7653
- */
7654
- function initCloneArray(array) {
7655
- var length = array.length,
7656
- result = new array.constructor(length);
7657
-
7658
- // Add properties assigned by `RegExp#exec`.
7659
- if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
7660
- result.index = array.index;
7661
- result.input = array.input;
7662
- }
7663
- return result;
7664
- }
7665
-
7666
- /**
7667
- * Initializes an object clone.
7668
- *
7669
- * @private
7670
- * @param {Object} object The object to clone.
7671
- * @returns {Object} Returns the initialized clone.
7672
- */
7673
- function initCloneObject(object) {
7674
- return (typeof object.constructor == 'function' && !isPrototype(object))
7675
- ? baseCreate(getPrototype(object))
7676
- : {};
7677
- }
7678
-
7679
- /**
7680
- * Initializes an object clone based on its `toStringTag`.
7681
- *
7682
- * **Note:** This function only supports cloning values with tags of
7683
- * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
7684
- *
7685
- * @private
7686
- * @param {Object} object The object to clone.
7687
- * @param {string} tag The `toStringTag` of the object to clone.
7688
- * @param {boolean} [isDeep] Specify a deep clone.
7689
- * @returns {Object} Returns the initialized clone.
7690
- */
7691
- function initCloneByTag(object, tag, isDeep) {
7692
- var Ctor = object.constructor;
7693
- switch (tag) {
7694
- case arrayBufferTag:
7695
- return cloneArrayBuffer(object);
7696
-
7697
- case boolTag:
7698
- case dateTag:
7699
- return new Ctor(+object);
7700
-
7701
- case dataViewTag:
7702
- return cloneDataView(object, isDeep);
7703
-
7704
- case float32Tag: case float64Tag:
7705
- case int8Tag: case int16Tag: case int32Tag:
7706
- case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
7707
- return cloneTypedArray(object, isDeep);
7708
-
7709
- case mapTag:
7710
- return new Ctor;
7711
-
7712
- case numberTag:
7713
- case stringTag:
7714
- return new Ctor(object);
7715
-
7716
- case regexpTag:
7717
- return cloneRegExp(object);
7718
-
7719
- case setTag:
7720
- return new Ctor;
7721
-
7722
- case symbolTag:
7723
- return cloneSymbol(object);
7724
- }
7725
- }
7726
-
7727
- /**
7728
- * Inserts wrapper `details` in a comment at the top of the `source` body.
7729
- *
7730
- * @private
7731
- * @param {string} source The source to modify.
7732
- * @returns {Array} details The details to insert.
7733
- * @returns {string} Returns the modified source.
7734
- */
7735
- function insertWrapDetails(source, details) {
7736
- var length = details.length;
7737
- if (!length) {
7738
- return source;
7739
- }
7740
- var lastIndex = length - 1;
7741
- details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
7742
- details = details.join(length > 2 ? ', ' : ' ');
7743
- return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
7744
- }
7745
-
7746
- /**
7747
- * Checks if `value` is a flattenable `arguments` object or array.
7748
- *
7749
- * @private
7750
- * @param {*} value The value to check.
7751
- * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
7752
- */
7753
- function isFlattenable(value) {
7754
- return isArray(value) || isArguments(value) ||
7755
- !!(spreadableSymbol && value && value[spreadableSymbol]);
7756
- }
7757
-
7758
- /**
7759
- * Checks if `value` is a valid array-like index.
7760
- *
7761
- * @private
7762
- * @param {*} value The value to check.
7763
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
7764
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
7765
- */
7766
- function isIndex(value, length) {
7767
- var type = typeof value;
7768
- length = length == null ? MAX_SAFE_INTEGER : length;
7769
-
7770
- return !!length &&
7771
- (type == 'number' ||
7772
- (type != 'symbol' && reIsUint.test(value))) &&
7773
- (value > -1 && value % 1 == 0 && value < length);
7774
- }
7775
-
7776
- /**
7777
- * Checks if the given arguments are from an iteratee call.
7778
- *
7779
- * @private
7780
- * @param {*} value The potential iteratee value argument.
7781
- * @param {*} index The potential iteratee index or key argument.
7782
- * @param {*} object The potential iteratee object argument.
7783
- * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
7784
- * else `false`.
7785
- */
7786
- function isIterateeCall(value, index, object) {
7787
- if (!isObject(object)) {
7788
- return false;
7789
- }
7790
- var type = typeof index;
7791
- if (type == 'number'
7792
- ? (isArrayLike(object) && isIndex(index, object.length))
7793
- : (type == 'string' && index in object)
7794
- ) {
7795
- return eq(object[index], value);
7796
- }
7797
- return false;
7798
- }
7799
-
7800
- /**
7801
- * Checks if `value` is a property name and not a property path.
7802
- *
7803
- * @private
7804
- * @param {*} value The value to check.
7805
- * @param {Object} [object] The object to query keys on.
7806
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
7807
- */
7808
- function isKey(value, object) {
7809
- if (isArray(value)) {
7810
- return false;
7811
- }
7812
- var type = typeof value;
7813
- if (type == 'number' || type == 'symbol' || type == 'boolean' ||
7814
- value == null || isSymbol(value)) {
7815
- return true;
7816
- }
7817
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
7818
- (object != null && value in Object(object));
7819
- }
7820
-
7821
- /**
7822
- * Checks if `value` is suitable for use as unique object key.
7823
- *
7824
- * @private
7825
- * @param {*} value The value to check.
7826
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
7827
- */
7828
- function isKeyable(value) {
7829
- var type = typeof value;
7830
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
7831
- ? (value !== '__proto__')
7832
- : (value === null);
7833
- }
7834
-
7835
- /**
7836
- * Checks if `func` has a lazy counterpart.
7837
- *
7838
- * @private
7839
- * @param {Function} func The function to check.
7840
- * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
7841
- * else `false`.
7842
- */
7843
- function isLaziable(func) {
7844
- var funcName = getFuncName(func),
7845
- other = lodash[funcName];
7846
-
7847
- if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
7848
- return false;
7849
- }
7850
- if (func === other) {
7851
- return true;
7852
- }
7853
- var data = getData(other);
7854
- return !!data && func === data[0];
7855
- }
7856
-
7857
- /**
7858
- * Checks if `func` has its source masked.
7859
- *
7860
- * @private
7861
- * @param {Function} func The function to check.
7862
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
7863
- */
7864
- function isMasked(func) {
7865
- return !!maskSrcKey && (maskSrcKey in func);
7866
- }
7867
-
7868
- /**
7869
- * Checks if `func` is capable of being masked.
7870
- *
7871
- * @private
7872
- * @param {*} value The value to check.
7873
- * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
7874
- */
7875
- var isMaskable = coreJsData ? isFunction : stubFalse;
7876
-
7877
- /**
7878
- * Checks if `value` is likely a prototype object.
7879
- *
7880
- * @private
7881
- * @param {*} value The value to check.
7882
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
7883
- */
7884
- function isPrototype(value) {
7885
- var Ctor = value && value.constructor,
7886
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
7887
-
7888
- return value === proto;
7889
- }
7890
-
7891
- /**
7892
- * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
7893
- *
7894
- * @private
7895
- * @param {*} value The value to check.
7896
- * @returns {boolean} Returns `true` if `value` if suitable for strict
7897
- * equality comparisons, else `false`.
7898
- */
7899
- function isStrictComparable(value) {
7900
- return value === value && !isObject(value);
7901
- }
7902
-
7903
- /**
7904
- * A specialized version of `matchesProperty` for source values suitable
7905
- * for strict equality comparisons, i.e. `===`.
7906
- *
7907
- * @private
7908
- * @param {string} key The key of the property to get.
7909
- * @param {*} srcValue The value to match.
7910
- * @returns {Function} Returns the new spec function.
7911
- */
7912
- function matchesStrictComparable(key, srcValue) {
7913
- return function(object) {
7914
- if (object == null) {
7915
- return false;
7916
- }
7917
- return object[key] === srcValue &&
7918
- (srcValue !== undefined || (key in Object(object)));
7919
- };
7920
- }
7921
-
7922
- /**
7923
- * A specialized version of `_.memoize` which clears the memoized function's
7924
- * cache when it exceeds `MAX_MEMOIZE_SIZE`.
7925
- *
7926
- * @private
7927
- * @param {Function} func The function to have its output memoized.
7928
- * @returns {Function} Returns the new memoized function.
7929
- */
7930
- function memoizeCapped(func) {
7931
- var result = memoize(func, function(key) {
7932
- if (cache.size === MAX_MEMOIZE_SIZE) {
7933
- cache.clear();
7934
- }
7935
- return key;
7936
- });
7937
-
7938
- var cache = result.cache;
7939
- return result;
7940
- }
7941
-
7942
- /**
7943
- * Merges the function metadata of `source` into `data`.
7944
- *
7945
- * Merging metadata reduces the number of wrappers used to invoke a function.
7946
- * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
7947
- * may be applied regardless of execution order. Methods like `_.ary` and
7948
- * `_.rearg` modify function arguments, making the order in which they are
7949
- * executed important, preventing the merging of metadata. However, we make
7950
- * an exception for a safe combined case where curried functions have `_.ary`
7951
- * and or `_.rearg` applied.
7952
- *
7953
- * @private
7954
- * @param {Array} data The destination metadata.
7955
- * @param {Array} source The source metadata.
7956
- * @returns {Array} Returns `data`.
7957
- */
7958
- function mergeData(data, source) {
7959
- var bitmask = data[1],
7960
- srcBitmask = source[1],
7961
- newBitmask = bitmask | srcBitmask,
7962
- isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
7963
-
7964
- var isCombo =
7965
- ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
7966
- ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
7967
- ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
7968
-
7969
- // Exit early if metadata can't be merged.
7970
- if (!(isCommon || isCombo)) {
7971
- return data;
7972
- }
7973
- // Use source `thisArg` if available.
7974
- if (srcBitmask & WRAP_BIND_FLAG) {
7975
- data[2] = source[2];
7976
- // Set when currying a bound function.
7977
- newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
7978
- }
7979
- // Compose partial arguments.
7980
- var value = source[3];
7981
- if (value) {
7982
- var partials = data[3];
7983
- data[3] = partials ? composeArgs(partials, value, source[4]) : value;
7984
- data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
7985
- }
7986
- // Compose partial right arguments.
7987
- value = source[5];
7988
- if (value) {
7989
- partials = data[5];
7990
- data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
7991
- data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
7992
- }
7993
- // Use source `argPos` if available.
7994
- value = source[7];
7995
- if (value) {
7996
- data[7] = value;
7997
- }
7998
- // Use source `ary` if it's smaller.
7999
- if (srcBitmask & WRAP_ARY_FLAG) {
8000
- data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
8001
- }
8002
- // Use source `arity` if one is not provided.
8003
- if (data[9] == null) {
8004
- data[9] = source[9];
8005
- }
8006
- // Use source `func` and merge bitmasks.
8007
- data[0] = source[0];
8008
- data[1] = newBitmask;
8009
-
8010
- return data;
8011
- }
8012
-
8013
- /**
8014
- * This function is like
8015
- * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
8016
- * except that it includes inherited enumerable properties.
8017
- *
8018
- * @private
8019
- * @param {Object} object The object to query.
8020
- * @returns {Array} Returns the array of property names.
8021
- */
8022
- function nativeKeysIn(object) {
8023
- var result = [];
8024
- if (object != null) {
8025
- for (var key in Object(object)) {
8026
- result.push(key);
8027
- }
8028
- }
8029
- return result;
8030
- }
8031
-
8032
- /**
8033
- * Converts `value` to a string using `Object.prototype.toString`.
8034
- *
8035
- * @private
8036
- * @param {*} value The value to convert.
8037
- * @returns {string} Returns the converted string.
8038
- */
8039
- function objectToString(value) {
8040
- return nativeObjectToString.call(value);
8041
- }
8042
-
8043
- /**
8044
- * A specialized version of `baseRest` which transforms the rest array.
8045
- *
8046
- * @private
8047
- * @param {Function} func The function to apply a rest parameter to.
8048
- * @param {number} [start=func.length-1] The start position of the rest parameter.
8049
- * @param {Function} transform The rest array transform.
8050
- * @returns {Function} Returns the new function.
8051
- */
8052
- function overRest(func, start, transform) {
8053
- start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
8054
- return function() {
8055
- var args = arguments,
8056
- index = -1,
8057
- length = nativeMax(args.length - start, 0),
8058
- array = Array(length);
8059
-
8060
- while (++index < length) {
8061
- array[index] = args[start + index];
8062
- }
8063
- index = -1;
8064
- var otherArgs = Array(start + 1);
8065
- while (++index < start) {
8066
- otherArgs[index] = args[index];
8067
- }
8068
- otherArgs[start] = transform(array);
8069
- return apply(func, this, otherArgs);
8070
- };
8071
- }
8072
-
8073
- /**
8074
- * Gets the parent value at `path` of `object`.
8075
- *
8076
- * @private
8077
- * @param {Object} object The object to query.
8078
- * @param {Array} path The path to get the parent value of.
8079
- * @returns {*} Returns the parent value.
8080
- */
8081
- function parent(object, path) {
8082
- return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
8083
- }
8084
-
8085
- /**
8086
- * Reorder `array` according to the specified indexes where the element at
8087
- * the first index is assigned as the first element, the element at
8088
- * the second index is assigned as the second element, and so on.
8089
- *
8090
- * @private
8091
- * @param {Array} array The array to reorder.
8092
- * @param {Array} indexes The arranged array indexes.
8093
- * @returns {Array} Returns `array`.
8094
- */
8095
- function reorder(array, indexes) {
8096
- var arrLength = array.length,
8097
- length = nativeMin(indexes.length, arrLength),
8098
- oldArray = copyArray(array);
8099
-
8100
- while (length--) {
8101
- var index = indexes[length];
8102
- array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
8103
- }
8104
- return array;
8105
- }
8106
-
8107
- /**
8108
- * Sets metadata for `func`.
8109
- *
8110
- * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
8111
- * period of time, it will trip its breaker and transition to an identity
8112
- * function to avoid garbage collection pauses in V8. See
8113
- * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
8114
- * for more details.
8115
- *
8116
- * @private
8117
- * @param {Function} func The function to associate metadata with.
8118
- * @param {*} data The metadata.
8119
- * @returns {Function} Returns `func`.
8120
- */
8121
- var setData = shortOut(baseSetData);
8122
-
8123
- /**
8124
- * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
8125
- *
8126
- * @private
8127
- * @param {Function} func The function to delay.
8128
- * @param {number} wait The number of milliseconds to delay invocation.
8129
- * @returns {number|Object} Returns the timer id or timeout object.
8130
- */
8131
- var setTimeout = ctxSetTimeout || function(func, wait) {
8132
- return root.setTimeout(func, wait);
8133
- };
8134
-
8135
- /**
8136
- * Sets the `toString` method of `func` to return `string`.
8137
- *
8138
- * @private
8139
- * @param {Function} func The function to modify.
8140
- * @param {Function} string The `toString` result.
8141
- * @returns {Function} Returns `func`.
8142
- */
8143
- var setToString = shortOut(baseSetToString);
8144
-
8145
- /**
8146
- * Sets the `toString` method of `wrapper` to mimic the source of `reference`
8147
- * with wrapper details in a comment at the top of the source body.
8148
- *
8149
- * @private
8150
- * @param {Function} wrapper The function to modify.
8151
- * @param {Function} reference The reference function.
8152
- * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
8153
- * @returns {Function} Returns `wrapper`.
8154
- */
8155
- function setWrapToString(wrapper, reference, bitmask) {
8156
- var source = (reference + '');
8157
- return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
8158
- }
8159
-
8160
- /**
8161
- * Creates a function that'll short out and invoke `identity` instead
8162
- * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
8163
- * milliseconds.
8164
- *
8165
- * @private
8166
- * @param {Function} func The function to restrict.
8167
- * @returns {Function} Returns the new shortable function.
8168
- */
8169
- function shortOut(func) {
8170
- var count = 0,
8171
- lastCalled = 0;
8172
-
8173
- return function() {
8174
- var stamp = nativeNow(),
8175
- remaining = HOT_SPAN - (stamp - lastCalled);
8176
-
8177
- lastCalled = stamp;
8178
- if (remaining > 0) {
8179
- if (++count >= HOT_COUNT) {
8180
- return arguments[0];
8181
- }
8182
- } else {
8183
- count = 0;
8184
- }
8185
- return func.apply(undefined, arguments);
8186
- };
8187
- }
8188
-
8189
- /**
8190
- * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
8191
- *
8192
- * @private
8193
- * @param {Array} array The array to shuffle.
8194
- * @param {number} [size=array.length] The size of `array`.
8195
- * @returns {Array} Returns `array`.
8196
- */
8197
- function shuffleSelf(array, size) {
8198
- var index = -1,
8199
- length = array.length,
8200
- lastIndex = length - 1;
8201
-
8202
- size = size === undefined ? length : size;
8203
- while (++index < size) {
8204
- var rand = baseRandom(index, lastIndex),
8205
- value = array[rand];
8206
-
8207
- array[rand] = array[index];
8208
- array[index] = value;
8209
- }
8210
- array.length = size;
8211
- return array;
8212
- }
8213
-
8214
- /**
8215
- * Converts `string` to a property path array.
8216
- *
8217
- * @private
8218
- * @param {string} string The string to convert.
8219
- * @returns {Array} Returns the property path array.
8220
- */
8221
- var stringToPath = memoizeCapped(function(string) {
8222
- var result = [];
8223
- if (string.charCodeAt(0) === 46 /* . */) {
8224
- result.push('');
8225
- }
8226
- string.replace(rePropName, function(match, number, quote, subString) {
8227
- result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
8228
- });
8229
- return result;
8230
- });
8231
-
8232
- /**
8233
- * Converts `value` to a string key if it's not a string or symbol.
8234
- *
8235
- * @private
8236
- * @param {*} value The value to inspect.
8237
- * @returns {string|symbol} Returns the key.
8238
- */
8239
- function toKey(value) {
8240
- if (typeof value == 'string' || isSymbol(value)) {
8241
- return value;
8242
- }
8243
- var result = (value + '');
8244
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
8245
- }
8246
-
8247
- /**
8248
- * Converts `func` to its source code.
8249
- *
8250
- * @private
8251
- * @param {Function} func The function to convert.
8252
- * @returns {string} Returns the source code.
8253
- */
8254
- function toSource(func) {
8255
- if (func != null) {
8256
- try {
8257
- return funcToString.call(func);
8258
- } catch (e) {}
8259
- try {
8260
- return (func + '');
8261
- } catch (e) {}
8262
- }
8263
- return '';
8264
- }
8265
-
8266
- /**
8267
- * Updates wrapper `details` based on `bitmask` flags.
8268
- *
8269
- * @private
8270
- * @returns {Array} details The details to modify.
8271
- * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
8272
- * @returns {Array} Returns `details`.
8273
- */
8274
- function updateWrapDetails(details, bitmask) {
8275
- arrayEach(wrapFlags, function(pair) {
8276
- var value = '_.' + pair[0];
8277
- if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
8278
- details.push(value);
8279
- }
8280
- });
8281
- return details.sort();
8282
- }
8283
-
8284
- /**
8285
- * Creates a clone of `wrapper`.
8286
- *
8287
- * @private
8288
- * @param {Object} wrapper The wrapper to clone.
8289
- * @returns {Object} Returns the cloned wrapper.
8290
- */
8291
- function wrapperClone(wrapper) {
8292
- if (wrapper instanceof LazyWrapper) {
8293
- return wrapper.clone();
8294
- }
8295
- var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
8296
- result.__actions__ = copyArray(wrapper.__actions__);
8297
- result.__index__ = wrapper.__index__;
8298
- result.__values__ = wrapper.__values__;
8299
- return result;
8300
- }
8301
-
8302
- /*------------------------------------------------------------------------*/
8303
-
8304
- /**
8305
- * Creates an array of elements split into groups the length of `size`.
8306
- * If `array` can't be split evenly, the final chunk will be the remaining
8307
- * elements.
8308
- *
8309
- * @static
8310
- * @memberOf _
8311
- * @since 3.0.0
8312
- * @category Array
8313
- * @param {Array} array The array to process.
8314
- * @param {number} [size=1] The length of each chunk
8315
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
8316
- * @returns {Array} Returns the new array of chunks.
8317
- * @example
8318
- *
8319
- * _.chunk(['a', 'b', 'c', 'd'], 2);
8320
- * // => [['a', 'b'], ['c', 'd']]
8321
- *
8322
- * _.chunk(['a', 'b', 'c', 'd'], 3);
8323
- * // => [['a', 'b', 'c'], ['d']]
8324
- */
8325
- function chunk(array, size, guard) {
8326
- if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
8327
- size = 1;
8328
- } else {
8329
- size = nativeMax(toInteger(size), 0);
8330
- }
8331
- var length = array == null ? 0 : array.length;
8332
- if (!length || size < 1) {
8333
- return [];
8334
- }
8335
- var index = 0,
8336
- resIndex = 0,
8337
- result = Array(nativeCeil(length / size));
8338
-
8339
- while (index < length) {
8340
- result[resIndex++] = baseSlice(array, index, (index += size));
8341
- }
8342
- return result;
8343
- }
8344
-
8345
- /**
8346
- * Creates an array with all falsey values removed. The values `false`, `null`,
8347
- * `0`, `""`, `undefined`, and `NaN` are falsey.
8348
- *
8349
- * @static
8350
- * @memberOf _
8351
- * @since 0.1.0
8352
- * @category Array
8353
- * @param {Array} array The array to compact.
8354
- * @returns {Array} Returns the new array of filtered values.
8355
- * @example
8356
- *
8357
- * _.compact([0, 1, false, 2, '', 3]);
8358
- * // => [1, 2, 3]
8359
- */
8360
- function compact(array) {
8361
- var index = -1,
8362
- length = array == null ? 0 : array.length,
8363
- resIndex = 0,
8364
- result = [];
8365
-
8366
- while (++index < length) {
8367
- var value = array[index];
8368
- if (value) {
8369
- result[resIndex++] = value;
8370
- }
8371
- }
8372
- return result;
8373
- }
8374
-
8375
- /**
8376
- * Creates a new array concatenating `array` with any additional arrays
8377
- * and/or values.
8378
- *
8379
- * @static
8380
- * @memberOf _
8381
- * @since 4.0.0
8382
- * @category Array
8383
- * @param {Array} array The array to concatenate.
8384
- * @param {...*} [values] The values to concatenate.
8385
- * @returns {Array} Returns the new concatenated array.
8386
- * @example
8387
- *
8388
- * var array = [1];
8389
- * var other = _.concat(array, 2, [3], [[4]]);
8390
- *
8391
- * console.log(other);
8392
- * // => [1, 2, 3, [4]]
8393
- *
8394
- * console.log(array);
8395
- * // => [1]
8396
- */
8397
- function concat() {
8398
- var length = arguments.length;
8399
- if (!length) {
8400
- return [];
8401
- }
8402
- var args = Array(length - 1),
8403
- array = arguments[0],
8404
- index = length;
8405
-
8406
- while (index--) {
8407
- args[index - 1] = arguments[index];
8408
- }
8409
- return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
8410
- }
8411
-
8412
- /**
8413
- * Creates an array of `array` values not included in the other given arrays
8414
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
8415
- * for equality comparisons. The order and references of result values are
8416
- * determined by the first array.
8417
- *
8418
- * **Note:** Unlike `_.pullAll`, this method returns a new array.
8419
- *
8420
- * @static
8421
- * @memberOf _
8422
- * @since 0.1.0
8423
- * @category Array
8424
- * @param {Array} array The array to inspect.
8425
- * @param {...Array} [values] The values to exclude.
8426
- * @returns {Array} Returns the new array of filtered values.
8427
- * @see _.without, _.xor
8428
- * @example
8429
- *
8430
- * _.difference([2, 1], [2, 3]);
8431
- * // => [1]
8432
- */
8433
- var difference = baseRest(function(array, values) {
8434
- return isArrayLikeObject(array)
8435
- ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
8436
- : [];
8437
- });
8438
-
8439
- /**
8440
- * This method is like `_.difference` except that it accepts `iteratee` which
8441
- * is invoked for each element of `array` and `values` to generate the criterion
8442
- * by which they're compared. The order and references of result values are
8443
- * determined by the first array. The iteratee is invoked with one argument:
8444
- * (value).
8445
- *
8446
- * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
8447
- *
8448
- * @static
8449
- * @memberOf _
8450
- * @since 4.0.0
8451
- * @category Array
8452
- * @param {Array} array The array to inspect.
8453
- * @param {...Array} [values] The values to exclude.
8454
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
8455
- * @returns {Array} Returns the new array of filtered values.
8456
- * @example
8457
- *
8458
- * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
8459
- * // => [1.2]
8460
- *
8461
- * // The `_.property` iteratee shorthand.
8462
- * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
8463
- * // => [{ 'x': 2 }]
8464
- */
8465
- var differenceBy = baseRest(function(array, values) {
8466
- var iteratee = last(values);
8467
- if (isArrayLikeObject(iteratee)) {
8468
- iteratee = undefined;
8469
- }
8470
- return isArrayLikeObject(array)
8471
- ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
8472
- : [];
8473
- });
8474
-
8475
- /**
8476
- * This method is like `_.difference` except that it accepts `comparator`
8477
- * which is invoked to compare elements of `array` to `values`. The order and
8478
- * references of result values are determined by the first array. The comparator
8479
- * is invoked with two arguments: (arrVal, othVal).
8480
- *
8481
- * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
8482
- *
8483
- * @static
8484
- * @memberOf _
8485
- * @since 4.0.0
8486
- * @category Array
8487
- * @param {Array} array The array to inspect.
8488
- * @param {...Array} [values] The values to exclude.
8489
- * @param {Function} [comparator] The comparator invoked per element.
8490
- * @returns {Array} Returns the new array of filtered values.
8491
- * @example
8492
- *
8493
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
8494
- *
8495
- * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
8496
- * // => [{ 'x': 2, 'y': 1 }]
8497
- */
8498
- var differenceWith = baseRest(function(array, values) {
8499
- var comparator = last(values);
8500
- if (isArrayLikeObject(comparator)) {
8501
- comparator = undefined;
8502
- }
8503
- return isArrayLikeObject(array)
8504
- ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
8505
- : [];
8506
- });
8507
-
8508
- /**
8509
- * Creates a slice of `array` with `n` elements dropped from the beginning.
8510
- *
8511
- * @static
8512
- * @memberOf _
8513
- * @since 0.5.0
8514
- * @category Array
8515
- * @param {Array} array The array to query.
8516
- * @param {number} [n=1] The number of elements to drop.
8517
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
8518
- * @returns {Array} Returns the slice of `array`.
8519
- * @example
8520
- *
8521
- * _.drop([1, 2, 3]);
8522
- * // => [2, 3]
8523
- *
8524
- * _.drop([1, 2, 3], 2);
8525
- * // => [3]
8526
- *
8527
- * _.drop([1, 2, 3], 5);
8528
- * // => []
8529
- *
8530
- * _.drop([1, 2, 3], 0);
8531
- * // => [1, 2, 3]
8532
- */
8533
- function drop(array, n, guard) {
8534
- var length = array == null ? 0 : array.length;
8535
- if (!length) {
8536
- return [];
8537
- }
8538
- n = (guard || n === undefined) ? 1 : toInteger(n);
8539
- return baseSlice(array, n < 0 ? 0 : n, length);
8540
- }
8541
-
8542
- /**
8543
- * Creates a slice of `array` with `n` elements dropped from the end.
8544
- *
8545
- * @static
8546
- * @memberOf _
8547
- * @since 3.0.0
8548
- * @category Array
8549
- * @param {Array} array The array to query.
8550
- * @param {number} [n=1] The number of elements to drop.
8551
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
8552
- * @returns {Array} Returns the slice of `array`.
8553
- * @example
8554
- *
8555
- * _.dropRight([1, 2, 3]);
8556
- * // => [1, 2]
8557
- *
8558
- * _.dropRight([1, 2, 3], 2);
8559
- * // => [1]
8560
- *
8561
- * _.dropRight([1, 2, 3], 5);
8562
- * // => []
8563
- *
8564
- * _.dropRight([1, 2, 3], 0);
8565
- * // => [1, 2, 3]
8566
- */
8567
- function dropRight(array, n, guard) {
8568
- var length = array == null ? 0 : array.length;
8569
- if (!length) {
8570
- return [];
8571
- }
8572
- n = (guard || n === undefined) ? 1 : toInteger(n);
8573
- n = length - n;
8574
- return baseSlice(array, 0, n < 0 ? 0 : n);
8575
- }
8576
-
8577
- /**
8578
- * Creates a slice of `array` excluding elements dropped from the end.
8579
- * Elements are dropped until `predicate` returns falsey. The predicate is
8580
- * invoked with three arguments: (value, index, array).
8581
- *
8582
- * @static
8583
- * @memberOf _
8584
- * @since 3.0.0
8585
- * @category Array
8586
- * @param {Array} array The array to query.
8587
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
8588
- * @returns {Array} Returns the slice of `array`.
8589
- * @example
8590
- *
8591
- * var users = [
8592
- * { 'user': 'barney', 'active': true },
8593
- * { 'user': 'fred', 'active': false },
8594
- * { 'user': 'pebbles', 'active': false }
8595
- * ];
8596
- *
8597
- * _.dropRightWhile(users, function(o) { return !o.active; });
8598
- * // => objects for ['barney']
8599
- *
8600
- * // The `_.matches` iteratee shorthand.
8601
- * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
8602
- * // => objects for ['barney', 'fred']
8603
- *
8604
- * // The `_.matchesProperty` iteratee shorthand.
8605
- * _.dropRightWhile(users, ['active', false]);
8606
- * // => objects for ['barney']
8607
- *
8608
- * // The `_.property` iteratee shorthand.
8609
- * _.dropRightWhile(users, 'active');
8610
- * // => objects for ['barney', 'fred', 'pebbles']
8611
- */
8612
- function dropRightWhile(array, predicate) {
8613
- return (array && array.length)
8614
- ? baseWhile(array, getIteratee(predicate, 3), true, true)
8615
- : [];
8616
- }
8617
-
8618
- /**
8619
- * Creates a slice of `array` excluding elements dropped from the beginning.
8620
- * Elements are dropped until `predicate` returns falsey. The predicate is
8621
- * invoked with three arguments: (value, index, array).
8622
- *
8623
- * @static
8624
- * @memberOf _
8625
- * @since 3.0.0
8626
- * @category Array
8627
- * @param {Array} array The array to query.
8628
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
8629
- * @returns {Array} Returns the slice of `array`.
8630
- * @example
8631
- *
8632
- * var users = [
8633
- * { 'user': 'barney', 'active': false },
8634
- * { 'user': 'fred', 'active': false },
8635
- * { 'user': 'pebbles', 'active': true }
8636
- * ];
8637
- *
8638
- * _.dropWhile(users, function(o) { return !o.active; });
8639
- * // => objects for ['pebbles']
8640
- *
8641
- * // The `_.matches` iteratee shorthand.
8642
- * _.dropWhile(users, { 'user': 'barney', 'active': false });
8643
- * // => objects for ['fred', 'pebbles']
8644
- *
8645
- * // The `_.matchesProperty` iteratee shorthand.
8646
- * _.dropWhile(users, ['active', false]);
8647
- * // => objects for ['pebbles']
8648
- *
8649
- * // The `_.property` iteratee shorthand.
8650
- * _.dropWhile(users, 'active');
8651
- * // => objects for ['barney', 'fred', 'pebbles']
8652
- */
8653
- function dropWhile(array, predicate) {
8654
- return (array && array.length)
8655
- ? baseWhile(array, getIteratee(predicate, 3), true)
8656
- : [];
8657
- }
8658
-
8659
- /**
8660
- * Fills elements of `array` with `value` from `start` up to, but not
8661
- * including, `end`.
8662
- *
8663
- * **Note:** This method mutates `array`.
8664
- *
8665
- * @static
8666
- * @memberOf _
8667
- * @since 3.2.0
8668
- * @category Array
8669
- * @param {Array} array The array to fill.
8670
- * @param {*} value The value to fill `array` with.
8671
- * @param {number} [start=0] The start position.
8672
- * @param {number} [end=array.length] The end position.
8673
- * @returns {Array} Returns `array`.
8674
- * @example
8675
- *
8676
- * var array = [1, 2, 3];
8677
- *
8678
- * _.fill(array, 'a');
8679
- * console.log(array);
8680
- * // => ['a', 'a', 'a']
8681
- *
8682
- * _.fill(Array(3), 2);
8683
- * // => [2, 2, 2]
8684
- *
8685
- * _.fill([4, 6, 8, 10], '*', 1, 3);
8686
- * // => [4, '*', '*', 10]
8687
- */
8688
- function fill(array, value, start, end) {
8689
- var length = array == null ? 0 : array.length;
8690
- if (!length) {
8691
- return [];
8692
- }
8693
- if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
8694
- start = 0;
8695
- end = length;
8696
- }
8697
- return baseFill(array, value, start, end);
8698
- }
8699
-
8700
- /**
8701
- * This method is like `_.find` except that it returns the index of the first
8702
- * element `predicate` returns truthy for instead of the element itself.
8703
- *
8704
- * @static
8705
- * @memberOf _
8706
- * @since 1.1.0
8707
- * @category Array
8708
- * @param {Array} array The array to inspect.
8709
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
8710
- * @param {number} [fromIndex=0] The index to search from.
8711
- * @returns {number} Returns the index of the found element, else `-1`.
8712
- * @example
8713
- *
8714
- * var users = [
8715
- * { 'user': 'barney', 'active': false },
8716
- * { 'user': 'fred', 'active': false },
8717
- * { 'user': 'pebbles', 'active': true }
8718
- * ];
8719
- *
8720
- * _.findIndex(users, function(o) { return o.user == 'barney'; });
8721
- * // => 0
8722
- *
8723
- * // The `_.matches` iteratee shorthand.
8724
- * _.findIndex(users, { 'user': 'fred', 'active': false });
8725
- * // => 1
8726
- *
8727
- * // The `_.matchesProperty` iteratee shorthand.
8728
- * _.findIndex(users, ['active', false]);
8729
- * // => 0
8730
- *
8731
- * // The `_.property` iteratee shorthand.
8732
- * _.findIndex(users, 'active');
8733
- * // => 2
8734
- */
8735
- function findIndex(array, predicate, fromIndex) {
8736
- var length = array == null ? 0 : array.length;
8737
- if (!length) {
8738
- return -1;
8739
- }
8740
- var index = fromIndex == null ? 0 : toInteger(fromIndex);
8741
- if (index < 0) {
8742
- index = nativeMax(length + index, 0);
8743
- }
8744
- return baseFindIndex(array, getIteratee(predicate, 3), index);
8745
- }
8746
-
8747
- /**
8748
- * This method is like `_.findIndex` except that it iterates over elements
8749
- * of `collection` from right to left.
8750
- *
8751
- * @static
8752
- * @memberOf _
8753
- * @since 2.0.0
8754
- * @category Array
8755
- * @param {Array} array The array to inspect.
8756
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
8757
- * @param {number} [fromIndex=array.length-1] The index to search from.
8758
- * @returns {number} Returns the index of the found element, else `-1`.
8759
- * @example
8760
- *
8761
- * var users = [
8762
- * { 'user': 'barney', 'active': true },
8763
- * { 'user': 'fred', 'active': false },
8764
- * { 'user': 'pebbles', 'active': false }
8765
- * ];
8766
- *
8767
- * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
8768
- * // => 2
8769
- *
8770
- * // The `_.matches` iteratee shorthand.
8771
- * _.findLastIndex(users, { 'user': 'barney', 'active': true });
8772
- * // => 0
8773
- *
8774
- * // The `_.matchesProperty` iteratee shorthand.
8775
- * _.findLastIndex(users, ['active', false]);
8776
- * // => 2
8777
- *
8778
- * // The `_.property` iteratee shorthand.
8779
- * _.findLastIndex(users, 'active');
8780
- * // => 0
8781
- */
8782
- function findLastIndex(array, predicate, fromIndex) {
8783
- var length = array == null ? 0 : array.length;
8784
- if (!length) {
8785
- return -1;
8786
- }
8787
- var index = length - 1;
8788
- if (fromIndex !== undefined) {
8789
- index = toInteger(fromIndex);
8790
- index = fromIndex < 0
8791
- ? nativeMax(length + index, 0)
8792
- : nativeMin(index, length - 1);
8793
- }
8794
- return baseFindIndex(array, getIteratee(predicate, 3), index, true);
8795
- }
8796
-
8797
- /**
8798
- * Flattens `array` a single level deep.
8799
- *
8800
- * @static
8801
- * @memberOf _
8802
- * @since 0.1.0
8803
- * @category Array
8804
- * @param {Array} array The array to flatten.
8805
- * @returns {Array} Returns the new flattened array.
8806
- * @example
8807
- *
8808
- * _.flatten([1, [2, [3, [4]], 5]]);
8809
- * // => [1, 2, [3, [4]], 5]
8810
- */
8811
- function flatten(array) {
8812
- var length = array == null ? 0 : array.length;
8813
- return length ? baseFlatten(array, 1) : [];
8814
- }
8815
-
8816
- /**
8817
- * Recursively flattens `array`.
8818
- *
8819
- * @static
8820
- * @memberOf _
8821
- * @since 3.0.0
8822
- * @category Array
8823
- * @param {Array} array The array to flatten.
8824
- * @returns {Array} Returns the new flattened array.
8825
- * @example
8826
- *
8827
- * _.flattenDeep([1, [2, [3, [4]], 5]]);
8828
- * // => [1, 2, 3, 4, 5]
8829
- */
8830
- function flattenDeep(array) {
8831
- var length = array == null ? 0 : array.length;
8832
- return length ? baseFlatten(array, INFINITY) : [];
8833
- }
8834
-
8835
- /**
8836
- * Recursively flatten `array` up to `depth` times.
8837
- *
8838
- * @static
8839
- * @memberOf _
8840
- * @since 4.4.0
8841
- * @category Array
8842
- * @param {Array} array The array to flatten.
8843
- * @param {number} [depth=1] The maximum recursion depth.
8844
- * @returns {Array} Returns the new flattened array.
8845
- * @example
8846
- *
8847
- * var array = [1, [2, [3, [4]], 5]];
8848
- *
8849
- * _.flattenDepth(array, 1);
8850
- * // => [1, 2, [3, [4]], 5]
8851
- *
8852
- * _.flattenDepth(array, 2);
8853
- * // => [1, 2, 3, [4], 5]
8854
- */
8855
- function flattenDepth(array, depth) {
8856
- var length = array == null ? 0 : array.length;
8857
- if (!length) {
8858
- return [];
8859
- }
8860
- depth = depth === undefined ? 1 : toInteger(depth);
8861
- return baseFlatten(array, depth);
8862
- }
8863
-
8864
- /**
8865
- * The inverse of `_.toPairs`; this method returns an object composed
8866
- * from key-value `pairs`.
8867
- *
8868
- * @static
8869
- * @memberOf _
8870
- * @since 4.0.0
8871
- * @category Array
8872
- * @param {Array} pairs The key-value pairs.
8873
- * @returns {Object} Returns the new object.
8874
- * @example
8875
- *
8876
- * _.fromPairs([['a', 1], ['b', 2]]);
8877
- * // => { 'a': 1, 'b': 2 }
8878
- */
8879
- function fromPairs(pairs) {
8880
- var index = -1,
8881
- length = pairs == null ? 0 : pairs.length,
8882
- result = {};
8883
-
8884
- while (++index < length) {
8885
- var pair = pairs[index];
8886
- result[pair[0]] = pair[1];
8887
- }
8888
- return result;
8889
- }
8890
-
8891
- /**
8892
- * Gets the first element of `array`.
8893
- *
8894
- * @static
8895
- * @memberOf _
8896
- * @since 0.1.0
8897
- * @alias first
8898
- * @category Array
8899
- * @param {Array} array The array to query.
8900
- * @returns {*} Returns the first element of `array`.
8901
- * @example
8902
- *
8903
- * _.head([1, 2, 3]);
8904
- * // => 1
8905
- *
8906
- * _.head([]);
8907
- * // => undefined
8908
- */
8909
- function head(array) {
8910
- return (array && array.length) ? array[0] : undefined;
8911
- }
8912
-
8913
- /**
8914
- * Gets the index at which the first occurrence of `value` is found in `array`
8915
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
8916
- * for equality comparisons. If `fromIndex` is negative, it's used as the
8917
- * offset from the end of `array`.
8918
- *
8919
- * @static
8920
- * @memberOf _
8921
- * @since 0.1.0
8922
- * @category Array
8923
- * @param {Array} array The array to inspect.
8924
- * @param {*} value The value to search for.
8925
- * @param {number} [fromIndex=0] The index to search from.
8926
- * @returns {number} Returns the index of the matched value, else `-1`.
8927
- * @example
8928
- *
8929
- * _.indexOf([1, 2, 1, 2], 2);
8930
- * // => 1
8931
- *
8932
- * // Search from the `fromIndex`.
8933
- * _.indexOf([1, 2, 1, 2], 2, 2);
8934
- * // => 3
8935
- */
8936
- function indexOf(array, value, fromIndex) {
8937
- var length = array == null ? 0 : array.length;
8938
- if (!length) {
8939
- return -1;
8940
- }
8941
- var index = fromIndex == null ? 0 : toInteger(fromIndex);
8942
- if (index < 0) {
8943
- index = nativeMax(length + index, 0);
8944
- }
8945
- return baseIndexOf(array, value, index);
8946
- }
8947
-
8948
- /**
8949
- * Gets all but the last element of `array`.
8950
- *
8951
- * @static
8952
- * @memberOf _
8953
- * @since 0.1.0
8954
- * @category Array
8955
- * @param {Array} array The array to query.
8956
- * @returns {Array} Returns the slice of `array`.
8957
- * @example
8958
- *
8959
- * _.initial([1, 2, 3]);
8960
- * // => [1, 2]
8961
- */
8962
- function initial(array) {
8963
- var length = array == null ? 0 : array.length;
8964
- return length ? baseSlice(array, 0, -1) : [];
8965
- }
8966
-
8967
- /**
8968
- * Creates an array of unique values that are included in all given arrays
8969
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
8970
- * for equality comparisons. The order and references of result values are
8971
- * determined by the first array.
8972
- *
8973
- * @static
8974
- * @memberOf _
8975
- * @since 0.1.0
8976
- * @category Array
8977
- * @param {...Array} [arrays] The arrays to inspect.
8978
- * @returns {Array} Returns the new array of intersecting values.
8979
- * @example
8980
- *
8981
- * _.intersection([2, 1], [2, 3]);
8982
- * // => [2]
8983
- */
8984
- var intersection = baseRest(function(arrays) {
8985
- var mapped = arrayMap(arrays, castArrayLikeObject);
8986
- return (mapped.length && mapped[0] === arrays[0])
8987
- ? baseIntersection(mapped)
8988
- : [];
8989
- });
8990
-
8991
- /**
8992
- * This method is like `_.intersection` except that it accepts `iteratee`
8993
- * which is invoked for each element of each `arrays` to generate the criterion
8994
- * by which they're compared. The order and references of result values are
8995
- * determined by the first array. The iteratee is invoked with one argument:
8996
- * (value).
8997
- *
8998
- * @static
8999
- * @memberOf _
9000
- * @since 4.0.0
9001
- * @category Array
9002
- * @param {...Array} [arrays] The arrays to inspect.
9003
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
9004
- * @returns {Array} Returns the new array of intersecting values.
9005
- * @example
9006
- *
9007
- * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
9008
- * // => [2.1]
9009
- *
9010
- * // The `_.property` iteratee shorthand.
9011
- * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
9012
- * // => [{ 'x': 1 }]
9013
- */
9014
- var intersectionBy = baseRest(function(arrays) {
9015
- var iteratee = last(arrays),
9016
- mapped = arrayMap(arrays, castArrayLikeObject);
9017
-
9018
- if (iteratee === last(mapped)) {
9019
- iteratee = undefined;
9020
- } else {
9021
- mapped.pop();
9022
- }
9023
- return (mapped.length && mapped[0] === arrays[0])
9024
- ? baseIntersection(mapped, getIteratee(iteratee, 2))
9025
- : [];
9026
- });
9027
-
9028
- /**
9029
- * This method is like `_.intersection` except that it accepts `comparator`
9030
- * which is invoked to compare elements of `arrays`. The order and references
9031
- * of result values are determined by the first array. The comparator is
9032
- * invoked with two arguments: (arrVal, othVal).
9033
- *
9034
- * @static
9035
- * @memberOf _
9036
- * @since 4.0.0
9037
- * @category Array
9038
- * @param {...Array} [arrays] The arrays to inspect.
9039
- * @param {Function} [comparator] The comparator invoked per element.
9040
- * @returns {Array} Returns the new array of intersecting values.
9041
- * @example
9042
- *
9043
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
9044
- * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
9045
- *
9046
- * _.intersectionWith(objects, others, _.isEqual);
9047
- * // => [{ 'x': 1, 'y': 2 }]
9048
- */
9049
- var intersectionWith = baseRest(function(arrays) {
9050
- var comparator = last(arrays),
9051
- mapped = arrayMap(arrays, castArrayLikeObject);
9052
-
9053
- comparator = typeof comparator == 'function' ? comparator : undefined;
9054
- if (comparator) {
9055
- mapped.pop();
9056
- }
9057
- return (mapped.length && mapped[0] === arrays[0])
9058
- ? baseIntersection(mapped, undefined, comparator)
9059
- : [];
9060
- });
9061
-
9062
- /**
9063
- * Converts all elements in `array` into a string separated by `separator`.
9064
- *
9065
- * @static
9066
- * @memberOf _
9067
- * @since 4.0.0
9068
- * @category Array
9069
- * @param {Array} array The array to convert.
9070
- * @param {string} [separator=','] The element separator.
9071
- * @returns {string} Returns the joined string.
9072
- * @example
9073
- *
9074
- * _.join(['a', 'b', 'c'], '~');
9075
- * // => 'a~b~c'
9076
- */
9077
- function join(array, separator) {
9078
- return array == null ? '' : nativeJoin.call(array, separator);
9079
- }
9080
-
9081
- /**
9082
- * Gets the last element of `array`.
9083
- *
9084
- * @static
9085
- * @memberOf _
9086
- * @since 0.1.0
9087
- * @category Array
9088
- * @param {Array} array The array to query.
9089
- * @returns {*} Returns the last element of `array`.
9090
- * @example
9091
- *
9092
- * _.last([1, 2, 3]);
9093
- * // => 3
9094
- */
9095
- function last(array) {
9096
- var length = array == null ? 0 : array.length;
9097
- return length ? array[length - 1] : undefined;
9098
- }
9099
-
9100
- /**
9101
- * This method is like `_.indexOf` except that it iterates over elements of
9102
- * `array` from right to left.
9103
- *
9104
- * @static
9105
- * @memberOf _
9106
- * @since 0.1.0
9107
- * @category Array
9108
- * @param {Array} array The array to inspect.
9109
- * @param {*} value The value to search for.
9110
- * @param {number} [fromIndex=array.length-1] The index to search from.
9111
- * @returns {number} Returns the index of the matched value, else `-1`.
9112
- * @example
9113
- *
9114
- * _.lastIndexOf([1, 2, 1, 2], 2);
9115
- * // => 3
9116
- *
9117
- * // Search from the `fromIndex`.
9118
- * _.lastIndexOf([1, 2, 1, 2], 2, 2);
9119
- * // => 1
9120
- */
9121
- function lastIndexOf(array, value, fromIndex) {
9122
- var length = array == null ? 0 : array.length;
9123
- if (!length) {
9124
- return -1;
9125
- }
9126
- var index = length;
9127
- if (fromIndex !== undefined) {
9128
- index = toInteger(fromIndex);
9129
- index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
9130
- }
9131
- return value === value
9132
- ? strictLastIndexOf(array, value, index)
9133
- : baseFindIndex(array, baseIsNaN, index, true);
9134
- }
9135
-
9136
- /**
9137
- * Gets the element at index `n` of `array`. If `n` is negative, the nth
9138
- * element from the end is returned.
9139
- *
9140
- * @static
9141
- * @memberOf _
9142
- * @since 4.11.0
9143
- * @category Array
9144
- * @param {Array} array The array to query.
9145
- * @param {number} [n=0] The index of the element to return.
9146
- * @returns {*} Returns the nth element of `array`.
9147
- * @example
9148
- *
9149
- * var array = ['a', 'b', 'c', 'd'];
9150
- *
9151
- * _.nth(array, 1);
9152
- * // => 'b'
9153
- *
9154
- * _.nth(array, -2);
9155
- * // => 'c';
9156
- */
9157
- function nth(array, n) {
9158
- return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
9159
- }
9160
-
9161
- /**
9162
- * Removes all given values from `array` using
9163
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
9164
- * for equality comparisons.
9165
- *
9166
- * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
9167
- * to remove elements from an array by predicate.
9168
- *
9169
- * @static
9170
- * @memberOf _
9171
- * @since 2.0.0
9172
- * @category Array
9173
- * @param {Array} array The array to modify.
9174
- * @param {...*} [values] The values to remove.
9175
- * @returns {Array} Returns `array`.
9176
- * @example
9177
- *
9178
- * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
9179
- *
9180
- * _.pull(array, 'a', 'c');
9181
- * console.log(array);
9182
- * // => ['b', 'b']
9183
- */
9184
- var pull = baseRest(pullAll);
9185
-
9186
- /**
9187
- * This method is like `_.pull` except that it accepts an array of values to remove.
9188
- *
9189
- * **Note:** Unlike `_.difference`, this method mutates `array`.
9190
- *
9191
- * @static
9192
- * @memberOf _
9193
- * @since 4.0.0
9194
- * @category Array
9195
- * @param {Array} array The array to modify.
9196
- * @param {Array} values The values to remove.
9197
- * @returns {Array} Returns `array`.
9198
- * @example
9199
- *
9200
- * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
9201
- *
9202
- * _.pullAll(array, ['a', 'c']);
9203
- * console.log(array);
9204
- * // => ['b', 'b']
9205
- */
9206
- function pullAll(array, values) {
9207
- return (array && array.length && values && values.length)
9208
- ? basePullAll(array, values)
9209
- : array;
9210
- }
9211
-
9212
- /**
9213
- * This method is like `_.pullAll` except that it accepts `iteratee` which is
9214
- * invoked for each element of `array` and `values` to generate the criterion
9215
- * by which they're compared. The iteratee is invoked with one argument: (value).
9216
- *
9217
- * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
9218
- *
9219
- * @static
9220
- * @memberOf _
9221
- * @since 4.0.0
9222
- * @category Array
9223
- * @param {Array} array The array to modify.
9224
- * @param {Array} values The values to remove.
9225
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
9226
- * @returns {Array} Returns `array`.
9227
- * @example
9228
- *
9229
- * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
9230
- *
9231
- * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
9232
- * console.log(array);
9233
- * // => [{ 'x': 2 }]
9234
- */
9235
- function pullAllBy(array, values, iteratee) {
9236
- return (array && array.length && values && values.length)
9237
- ? basePullAll(array, values, getIteratee(iteratee, 2))
9238
- : array;
9239
- }
9240
-
9241
- /**
9242
- * This method is like `_.pullAll` except that it accepts `comparator` which
9243
- * is invoked to compare elements of `array` to `values`. The comparator is
9244
- * invoked with two arguments: (arrVal, othVal).
9245
- *
9246
- * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
9247
- *
9248
- * @static
9249
- * @memberOf _
9250
- * @since 4.6.0
9251
- * @category Array
9252
- * @param {Array} array The array to modify.
9253
- * @param {Array} values The values to remove.
9254
- * @param {Function} [comparator] The comparator invoked per element.
9255
- * @returns {Array} Returns `array`.
9256
- * @example
9257
- *
9258
- * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
9259
- *
9260
- * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
9261
- * console.log(array);
9262
- * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
9263
- */
9264
- function pullAllWith(array, values, comparator) {
9265
- return (array && array.length && values && values.length)
9266
- ? basePullAll(array, values, undefined, comparator)
9267
- : array;
9268
- }
9269
-
9270
- /**
9271
- * Removes elements from `array` corresponding to `indexes` and returns an
9272
- * array of removed elements.
9273
- *
9274
- * **Note:** Unlike `_.at`, this method mutates `array`.
9275
- *
9276
- * @static
9277
- * @memberOf _
9278
- * @since 3.0.0
9279
- * @category Array
9280
- * @param {Array} array The array to modify.
9281
- * @param {...(number|number[])} [indexes] The indexes of elements to remove.
9282
- * @returns {Array} Returns the new array of removed elements.
9283
- * @example
9284
- *
9285
- * var array = ['a', 'b', 'c', 'd'];
9286
- * var pulled = _.pullAt(array, [1, 3]);
9287
- *
9288
- * console.log(array);
9289
- * // => ['a', 'c']
9290
- *
9291
- * console.log(pulled);
9292
- * // => ['b', 'd']
9293
- */
9294
- var pullAt = flatRest(function(array, indexes) {
9295
- var length = array == null ? 0 : array.length,
9296
- result = baseAt(array, indexes);
9297
-
9298
- basePullAt(array, arrayMap(indexes, function(index) {
9299
- return isIndex(index, length) ? +index : index;
9300
- }).sort(compareAscending));
9301
-
9302
- return result;
9303
- });
9304
-
9305
- /**
9306
- * Removes all elements from `array` that `predicate` returns truthy for
9307
- * and returns an array of the removed elements. The predicate is invoked
9308
- * with three arguments: (value, index, array).
9309
- *
9310
- * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
9311
- * to pull elements from an array by value.
9312
- *
9313
- * @static
9314
- * @memberOf _
9315
- * @since 2.0.0
9316
- * @category Array
9317
- * @param {Array} array The array to modify.
9318
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
9319
- * @returns {Array} Returns the new array of removed elements.
9320
- * @example
9321
- *
9322
- * var array = [1, 2, 3, 4];
9323
- * var evens = _.remove(array, function(n) {
9324
- * return n % 2 == 0;
9325
- * });
9326
- *
9327
- * console.log(array);
9328
- * // => [1, 3]
9329
- *
9330
- * console.log(evens);
9331
- * // => [2, 4]
9332
- */
9333
- function remove(array, predicate) {
9334
- var result = [];
9335
- if (!(array && array.length)) {
9336
- return result;
9337
- }
9338
- var index = -1,
9339
- indexes = [],
9340
- length = array.length;
9341
-
9342
- predicate = getIteratee(predicate, 3);
9343
- while (++index < length) {
9344
- var value = array[index];
9345
- if (predicate(value, index, array)) {
9346
- result.push(value);
9347
- indexes.push(index);
9348
- }
9349
- }
9350
- basePullAt(array, indexes);
9351
- return result;
9352
- }
9353
-
9354
- /**
9355
- * Reverses `array` so that the first element becomes the last, the second
9356
- * element becomes the second to last, and so on.
9357
- *
9358
- * **Note:** This method mutates `array` and is based on
9359
- * [`Array#reverse`](https://mdn.io/Array/reverse).
9360
- *
9361
- * @static
9362
- * @memberOf _
9363
- * @since 4.0.0
9364
- * @category Array
9365
- * @param {Array} array The array to modify.
9366
- * @returns {Array} Returns `array`.
9367
- * @example
9368
- *
9369
- * var array = [1, 2, 3];
9370
- *
9371
- * _.reverse(array);
9372
- * // => [3, 2, 1]
9373
- *
9374
- * console.log(array);
9375
- * // => [3, 2, 1]
9376
- */
9377
- function reverse(array) {
9378
- return array == null ? array : nativeReverse.call(array);
9379
- }
9380
-
9381
- /**
9382
- * Creates a slice of `array` from `start` up to, but not including, `end`.
9383
- *
9384
- * **Note:** This method is used instead of
9385
- * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
9386
- * returned.
9387
- *
9388
- * @static
9389
- * @memberOf _
9390
- * @since 3.0.0
9391
- * @category Array
9392
- * @param {Array} array The array to slice.
9393
- * @param {number} [start=0] The start position.
9394
- * @param {number} [end=array.length] The end position.
9395
- * @returns {Array} Returns the slice of `array`.
9396
- */
9397
- function slice(array, start, end) {
9398
- var length = array == null ? 0 : array.length;
9399
- if (!length) {
9400
- return [];
9401
- }
9402
- if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
9403
- start = 0;
9404
- end = length;
9405
- }
9406
- else {
9407
- start = start == null ? 0 : toInteger(start);
9408
- end = end === undefined ? length : toInteger(end);
9409
- }
9410
- return baseSlice(array, start, end);
9411
- }
9412
-
9413
- /**
9414
- * Uses a binary search to determine the lowest index at which `value`
9415
- * should be inserted into `array` in order to maintain its sort order.
9416
- *
9417
- * @static
9418
- * @memberOf _
9419
- * @since 0.1.0
9420
- * @category Array
9421
- * @param {Array} array The sorted array to inspect.
9422
- * @param {*} value The value to evaluate.
9423
- * @returns {number} Returns the index at which `value` should be inserted
9424
- * into `array`.
9425
- * @example
9426
- *
9427
- * _.sortedIndex([30, 50], 40);
9428
- * // => 1
9429
- */
9430
- function sortedIndex(array, value) {
9431
- return baseSortedIndex(array, value);
9432
- }
9433
-
9434
- /**
9435
- * This method is like `_.sortedIndex` except that it accepts `iteratee`
9436
- * which is invoked for `value` and each element of `array` to compute their
9437
- * sort ranking. The iteratee is invoked with one argument: (value).
9438
- *
9439
- * @static
9440
- * @memberOf _
9441
- * @since 4.0.0
9442
- * @category Array
9443
- * @param {Array} array The sorted array to inspect.
9444
- * @param {*} value The value to evaluate.
9445
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
9446
- * @returns {number} Returns the index at which `value` should be inserted
9447
- * into `array`.
9448
- * @example
9449
- *
9450
- * var objects = [{ 'x': 4 }, { 'x': 5 }];
9451
- *
9452
- * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
9453
- * // => 0
9454
- *
9455
- * // The `_.property` iteratee shorthand.
9456
- * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
9457
- * // => 0
9458
- */
9459
- function sortedIndexBy(array, value, iteratee) {
9460
- return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
9461
- }
9462
-
9463
- /**
9464
- * This method is like `_.indexOf` except that it performs a binary
9465
- * search on a sorted `array`.
9466
- *
9467
- * @static
9468
- * @memberOf _
9469
- * @since 4.0.0
9470
- * @category Array
9471
- * @param {Array} array The array to inspect.
9472
- * @param {*} value The value to search for.
9473
- * @returns {number} Returns the index of the matched value, else `-1`.
9474
- * @example
9475
- *
9476
- * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
9477
- * // => 1
9478
- */
9479
- function sortedIndexOf(array, value) {
9480
- var length = array == null ? 0 : array.length;
9481
- if (length) {
9482
- var index = baseSortedIndex(array, value);
9483
- if (index < length && eq(array[index], value)) {
9484
- return index;
9485
- }
9486
- }
9487
- return -1;
9488
- }
9489
-
9490
- /**
9491
- * This method is like `_.sortedIndex` except that it returns the highest
9492
- * index at which `value` should be inserted into `array` in order to
9493
- * maintain its sort order.
9494
- *
9495
- * @static
9496
- * @memberOf _
9497
- * @since 3.0.0
9498
- * @category Array
9499
- * @param {Array} array The sorted array to inspect.
9500
- * @param {*} value The value to evaluate.
9501
- * @returns {number} Returns the index at which `value` should be inserted
9502
- * into `array`.
9503
- * @example
9504
- *
9505
- * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
9506
- * // => 4
9507
- */
9508
- function sortedLastIndex(array, value) {
9509
- return baseSortedIndex(array, value, true);
9510
- }
9511
-
9512
- /**
9513
- * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
9514
- * which is invoked for `value` and each element of `array` to compute their
9515
- * sort ranking. The iteratee is invoked with one argument: (value).
9516
- *
9517
- * @static
9518
- * @memberOf _
9519
- * @since 4.0.0
9520
- * @category Array
9521
- * @param {Array} array The sorted array to inspect.
9522
- * @param {*} value The value to evaluate.
9523
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
9524
- * @returns {number} Returns the index at which `value` should be inserted
9525
- * into `array`.
9526
- * @example
9527
- *
9528
- * var objects = [{ 'x': 4 }, { 'x': 5 }];
9529
- *
9530
- * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
9531
- * // => 1
9532
- *
9533
- * // The `_.property` iteratee shorthand.
9534
- * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
9535
- * // => 1
9536
- */
9537
- function sortedLastIndexBy(array, value, iteratee) {
9538
- return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
9539
- }
9540
-
9541
- /**
9542
- * This method is like `_.lastIndexOf` except that it performs a binary
9543
- * search on a sorted `array`.
9544
- *
9545
- * @static
9546
- * @memberOf _
9547
- * @since 4.0.0
9548
- * @category Array
9549
- * @param {Array} array The array to inspect.
9550
- * @param {*} value The value to search for.
9551
- * @returns {number} Returns the index of the matched value, else `-1`.
9552
- * @example
9553
- *
9554
- * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
9555
- * // => 3
9556
- */
9557
- function sortedLastIndexOf(array, value) {
9558
- var length = array == null ? 0 : array.length;
9559
- if (length) {
9560
- var index = baseSortedIndex(array, value, true) - 1;
9561
- if (eq(array[index], value)) {
9562
- return index;
9563
- }
9564
- }
9565
- return -1;
9566
- }
9567
-
9568
- /**
9569
- * This method is like `_.uniq` except that it's designed and optimized
9570
- * for sorted arrays.
9571
- *
9572
- * @static
9573
- * @memberOf _
9574
- * @since 4.0.0
9575
- * @category Array
9576
- * @param {Array} array The array to inspect.
9577
- * @returns {Array} Returns the new duplicate free array.
9578
- * @example
9579
- *
9580
- * _.sortedUniq([1, 1, 2]);
9581
- * // => [1, 2]
9582
- */
9583
- function sortedUniq(array) {
9584
- return (array && array.length)
9585
- ? baseSortedUniq(array)
9586
- : [];
9587
- }
9588
-
9589
- /**
9590
- * This method is like `_.uniqBy` except that it's designed and optimized
9591
- * for sorted arrays.
9592
- *
9593
- * @static
9594
- * @memberOf _
9595
- * @since 4.0.0
9596
- * @category Array
9597
- * @param {Array} array The array to inspect.
9598
- * @param {Function} [iteratee] The iteratee invoked per element.
9599
- * @returns {Array} Returns the new duplicate free array.
9600
- * @example
9601
- *
9602
- * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
9603
- * // => [1.1, 2.3]
9604
- */
9605
- function sortedUniqBy(array, iteratee) {
9606
- return (array && array.length)
9607
- ? baseSortedUniq(array, getIteratee(iteratee, 2))
9608
- : [];
9609
- }
9610
-
9611
- /**
9612
- * Gets all but the first element of `array`.
9613
- *
9614
- * @static
9615
- * @memberOf _
9616
- * @since 4.0.0
9617
- * @category Array
9618
- * @param {Array} array The array to query.
9619
- * @returns {Array} Returns the slice of `array`.
9620
- * @example
9621
- *
9622
- * _.tail([1, 2, 3]);
9623
- * // => [2, 3]
9624
- */
9625
- function tail(array) {
9626
- var length = array == null ? 0 : array.length;
9627
- return length ? baseSlice(array, 1, length) : [];
9628
- }
9629
-
9630
- /**
9631
- * Creates a slice of `array` with `n` elements taken from the beginning.
9632
- *
9633
- * @static
9634
- * @memberOf _
9635
- * @since 0.1.0
9636
- * @category Array
9637
- * @param {Array} array The array to query.
9638
- * @param {number} [n=1] The number of elements to take.
9639
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
9640
- * @returns {Array} Returns the slice of `array`.
9641
- * @example
9642
- *
9643
- * _.take([1, 2, 3]);
9644
- * // => [1]
9645
- *
9646
- * _.take([1, 2, 3], 2);
9647
- * // => [1, 2]
9648
- *
9649
- * _.take([1, 2, 3], 5);
9650
- * // => [1, 2, 3]
9651
- *
9652
- * _.take([1, 2, 3], 0);
9653
- * // => []
9654
- */
9655
- function take(array, n, guard) {
9656
- if (!(array && array.length)) {
9657
- return [];
9658
- }
9659
- n = (guard || n === undefined) ? 1 : toInteger(n);
9660
- return baseSlice(array, 0, n < 0 ? 0 : n);
9661
- }
9662
-
9663
- /**
9664
- * Creates a slice of `array` with `n` elements taken from the end.
9665
- *
9666
- * @static
9667
- * @memberOf _
9668
- * @since 3.0.0
9669
- * @category Array
9670
- * @param {Array} array The array to query.
9671
- * @param {number} [n=1] The number of elements to take.
9672
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
9673
- * @returns {Array} Returns the slice of `array`.
9674
- * @example
9675
- *
9676
- * _.takeRight([1, 2, 3]);
9677
- * // => [3]
9678
- *
9679
- * _.takeRight([1, 2, 3], 2);
9680
- * // => [2, 3]
9681
- *
9682
- * _.takeRight([1, 2, 3], 5);
9683
- * // => [1, 2, 3]
9684
- *
9685
- * _.takeRight([1, 2, 3], 0);
9686
- * // => []
9687
- */
9688
- function takeRight(array, n, guard) {
9689
- var length = array == null ? 0 : array.length;
9690
- if (!length) {
9691
- return [];
9692
- }
9693
- n = (guard || n === undefined) ? 1 : toInteger(n);
9694
- n = length - n;
9695
- return baseSlice(array, n < 0 ? 0 : n, length);
9696
- }
9697
-
9698
- /**
9699
- * Creates a slice of `array` with elements taken from the end. Elements are
9700
- * taken until `predicate` returns falsey. The predicate is invoked with
9701
- * three arguments: (value, index, array).
9702
- *
9703
- * @static
9704
- * @memberOf _
9705
- * @since 3.0.0
9706
- * @category Array
9707
- * @param {Array} array The array to query.
9708
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
9709
- * @returns {Array} Returns the slice of `array`.
9710
- * @example
9711
- *
9712
- * var users = [
9713
- * { 'user': 'barney', 'active': true },
9714
- * { 'user': 'fred', 'active': false },
9715
- * { 'user': 'pebbles', 'active': false }
9716
- * ];
9717
- *
9718
- * _.takeRightWhile(users, function(o) { return !o.active; });
9719
- * // => objects for ['fred', 'pebbles']
9720
- *
9721
- * // The `_.matches` iteratee shorthand.
9722
- * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
9723
- * // => objects for ['pebbles']
9724
- *
9725
- * // The `_.matchesProperty` iteratee shorthand.
9726
- * _.takeRightWhile(users, ['active', false]);
9727
- * // => objects for ['fred', 'pebbles']
9728
- *
9729
- * // The `_.property` iteratee shorthand.
9730
- * _.takeRightWhile(users, 'active');
9731
- * // => []
9732
- */
9733
- function takeRightWhile(array, predicate) {
9734
- return (array && array.length)
9735
- ? baseWhile(array, getIteratee(predicate, 3), false, true)
9736
- : [];
9737
- }
9738
-
9739
- /**
9740
- * Creates a slice of `array` with elements taken from the beginning. Elements
9741
- * are taken until `predicate` returns falsey. The predicate is invoked with
9742
- * three arguments: (value, index, array).
9743
- *
9744
- * @static
9745
- * @memberOf _
9746
- * @since 3.0.0
9747
- * @category Array
9748
- * @param {Array} array The array to query.
9749
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
9750
- * @returns {Array} Returns the slice of `array`.
9751
- * @example
9752
- *
9753
- * var users = [
9754
- * { 'user': 'barney', 'active': false },
9755
- * { 'user': 'fred', 'active': false },
9756
- * { 'user': 'pebbles', 'active': true }
9757
- * ];
9758
- *
9759
- * _.takeWhile(users, function(o) { return !o.active; });
9760
- * // => objects for ['barney', 'fred']
9761
- *
9762
- * // The `_.matches` iteratee shorthand.
9763
- * _.takeWhile(users, { 'user': 'barney', 'active': false });
9764
- * // => objects for ['barney']
9765
- *
9766
- * // The `_.matchesProperty` iteratee shorthand.
9767
- * _.takeWhile(users, ['active', false]);
9768
- * // => objects for ['barney', 'fred']
9769
- *
9770
- * // The `_.property` iteratee shorthand.
9771
- * _.takeWhile(users, 'active');
9772
- * // => []
9773
- */
9774
- function takeWhile(array, predicate) {
9775
- return (array && array.length)
9776
- ? baseWhile(array, getIteratee(predicate, 3))
9777
- : [];
9778
- }
9779
-
9780
- /**
9781
- * Creates an array of unique values, in order, from all given arrays using
9782
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
9783
- * for equality comparisons.
9784
- *
9785
- * @static
9786
- * @memberOf _
9787
- * @since 0.1.0
9788
- * @category Array
9789
- * @param {...Array} [arrays] The arrays to inspect.
9790
- * @returns {Array} Returns the new array of combined values.
9791
- * @example
9792
- *
9793
- * _.union([2], [1, 2]);
9794
- * // => [2, 1]
9795
- */
9796
- var union = baseRest(function(arrays) {
9797
- return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
9798
- });
9799
-
9800
- /**
9801
- * This method is like `_.union` except that it accepts `iteratee` which is
9802
- * invoked for each element of each `arrays` to generate the criterion by
9803
- * which uniqueness is computed. Result values are chosen from the first
9804
- * array in which the value occurs. The iteratee is invoked with one argument:
9805
- * (value).
9806
- *
9807
- * @static
9808
- * @memberOf _
9809
- * @since 4.0.0
9810
- * @category Array
9811
- * @param {...Array} [arrays] The arrays to inspect.
9812
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
9813
- * @returns {Array} Returns the new array of combined values.
9814
- * @example
9815
- *
9816
- * _.unionBy([2.1], [1.2, 2.3], Math.floor);
9817
- * // => [2.1, 1.2]
9818
- *
9819
- * // The `_.property` iteratee shorthand.
9820
- * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
9821
- * // => [{ 'x': 1 }, { 'x': 2 }]
9822
- */
9823
- var unionBy = baseRest(function(arrays) {
9824
- var iteratee = last(arrays);
9825
- if (isArrayLikeObject(iteratee)) {
9826
- iteratee = undefined;
9827
- }
9828
- return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
9829
- });
9830
-
9831
- /**
9832
- * This method is like `_.union` except that it accepts `comparator` which
9833
- * is invoked to compare elements of `arrays`. Result values are chosen from
9834
- * the first array in which the value occurs. The comparator is invoked
9835
- * with two arguments: (arrVal, othVal).
9836
- *
9837
- * @static
9838
- * @memberOf _
9839
- * @since 4.0.0
9840
- * @category Array
9841
- * @param {...Array} [arrays] The arrays to inspect.
9842
- * @param {Function} [comparator] The comparator invoked per element.
9843
- * @returns {Array} Returns the new array of combined values.
9844
- * @example
9845
- *
9846
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
9847
- * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
9848
- *
9849
- * _.unionWith(objects, others, _.isEqual);
9850
- * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
9851
- */
9852
- var unionWith = baseRest(function(arrays) {
9853
- var comparator = last(arrays);
9854
- comparator = typeof comparator == 'function' ? comparator : undefined;
9855
- return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
9856
- });
9857
-
9858
- /**
9859
- * Creates a duplicate-free version of an array, using
9860
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
9861
- * for equality comparisons, in which only the first occurrence of each element
9862
- * is kept. The order of result values is determined by the order they occur
9863
- * in the array.
9864
- *
9865
- * @static
9866
- * @memberOf _
9867
- * @since 0.1.0
9868
- * @category Array
9869
- * @param {Array} array The array to inspect.
9870
- * @returns {Array} Returns the new duplicate free array.
9871
- * @example
9872
- *
9873
- * _.uniq([2, 1, 2]);
9874
- * // => [2, 1]
9875
- */
9876
- function uniq(array) {
9877
- return (array && array.length) ? baseUniq(array) : [];
9878
- }
9879
-
9880
- /**
9881
- * This method is like `_.uniq` except that it accepts `iteratee` which is
9882
- * invoked for each element in `array` to generate the criterion by which
9883
- * uniqueness is computed. The order of result values is determined by the
9884
- * order they occur in the array. The iteratee is invoked with one argument:
9885
- * (value).
9886
- *
9887
- * @static
9888
- * @memberOf _
9889
- * @since 4.0.0
9890
- * @category Array
9891
- * @param {Array} array The array to inspect.
9892
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
9893
- * @returns {Array} Returns the new duplicate free array.
9894
- * @example
9895
- *
9896
- * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
9897
- * // => [2.1, 1.2]
9898
- *
9899
- * // The `_.property` iteratee shorthand.
9900
- * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
9901
- * // => [{ 'x': 1 }, { 'x': 2 }]
9902
- */
9903
- function uniqBy(array, iteratee) {
9904
- return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
9905
- }
9906
-
9907
- /**
9908
- * This method is like `_.uniq` except that it accepts `comparator` which
9909
- * is invoked to compare elements of `array`. The order of result values is
9910
- * determined by the order they occur in the array.The comparator is invoked
9911
- * with two arguments: (arrVal, othVal).
9912
- *
9913
- * @static
9914
- * @memberOf _
9915
- * @since 4.0.0
9916
- * @category Array
9917
- * @param {Array} array The array to inspect.
9918
- * @param {Function} [comparator] The comparator invoked per element.
9919
- * @returns {Array} Returns the new duplicate free array.
9920
- * @example
9921
- *
9922
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
9923
- *
9924
- * _.uniqWith(objects, _.isEqual);
9925
- * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
9926
- */
9927
- function uniqWith(array, comparator) {
9928
- comparator = typeof comparator == 'function' ? comparator : undefined;
9929
- return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
9930
- }
9931
-
9932
- /**
9933
- * This method is like `_.zip` except that it accepts an array of grouped
9934
- * elements and creates an array regrouping the elements to their pre-zip
9935
- * configuration.
9936
- *
9937
- * @static
9938
- * @memberOf _
9939
- * @since 1.2.0
9940
- * @category Array
9941
- * @param {Array} array The array of grouped elements to process.
9942
- * @returns {Array} Returns the new array of regrouped elements.
9943
- * @example
9944
- *
9945
- * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
9946
- * // => [['a', 1, true], ['b', 2, false]]
9947
- *
9948
- * _.unzip(zipped);
9949
- * // => [['a', 'b'], [1, 2], [true, false]]
9950
- */
9951
- function unzip(array) {
9952
- if (!(array && array.length)) {
9953
- return [];
9954
- }
9955
- var length = 0;
9956
- array = arrayFilter(array, function(group) {
9957
- if (isArrayLikeObject(group)) {
9958
- length = nativeMax(group.length, length);
9959
- return true;
9960
- }
9961
- });
9962
- return baseTimes(length, function(index) {
9963
- return arrayMap(array, baseProperty(index));
9964
- });
9965
- }
9966
-
9967
- /**
9968
- * This method is like `_.unzip` except that it accepts `iteratee` to specify
9969
- * how regrouped values should be combined. The iteratee is invoked with the
9970
- * elements of each group: (...group).
9971
- *
9972
- * @static
9973
- * @memberOf _
9974
- * @since 3.8.0
9975
- * @category Array
9976
- * @param {Array} array The array of grouped elements to process.
9977
- * @param {Function} [iteratee=_.identity] The function to combine
9978
- * regrouped values.
9979
- * @returns {Array} Returns the new array of regrouped elements.
9980
- * @example
9981
- *
9982
- * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
9983
- * // => [[1, 10, 100], [2, 20, 200]]
9984
- *
9985
- * _.unzipWith(zipped, _.add);
9986
- * // => [3, 30, 300]
9987
- */
9988
- function unzipWith(array, iteratee) {
9989
- if (!(array && array.length)) {
9990
- return [];
9991
- }
9992
- var result = unzip(array);
9993
- if (iteratee == null) {
9994
- return result;
9995
- }
9996
- return arrayMap(result, function(group) {
9997
- return apply(iteratee, undefined, group);
9998
- });
9999
- }
10000
-
10001
- /**
10002
- * Creates an array excluding all given values using
10003
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
10004
- * for equality comparisons.
10005
- *
10006
- * **Note:** Unlike `_.pull`, this method returns a new array.
10007
- *
10008
- * @static
10009
- * @memberOf _
10010
- * @since 0.1.0
10011
- * @category Array
10012
- * @param {Array} array The array to inspect.
10013
- * @param {...*} [values] The values to exclude.
10014
- * @returns {Array} Returns the new array of filtered values.
10015
- * @see _.difference, _.xor
10016
- * @example
10017
- *
10018
- * _.without([2, 1, 2, 3], 1, 2);
10019
- * // => [3]
10020
- */
10021
- var without = baseRest(function(array, values) {
10022
- return isArrayLikeObject(array)
10023
- ? baseDifference(array, values)
10024
- : [];
10025
- });
10026
-
10027
- /**
10028
- * Creates an array of unique values that is the
10029
- * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
10030
- * of the given arrays. The order of result values is determined by the order
10031
- * they occur in the arrays.
10032
- *
10033
- * @static
10034
- * @memberOf _
10035
- * @since 2.4.0
10036
- * @category Array
10037
- * @param {...Array} [arrays] The arrays to inspect.
10038
- * @returns {Array} Returns the new array of filtered values.
10039
- * @see _.difference, _.without
10040
- * @example
10041
- *
10042
- * _.xor([2, 1], [2, 3]);
10043
- * // => [1, 3]
10044
- */
10045
- var xor = baseRest(function(arrays) {
10046
- return baseXor(arrayFilter(arrays, isArrayLikeObject));
10047
- });
10048
-
10049
- /**
10050
- * This method is like `_.xor` except that it accepts `iteratee` which is
10051
- * invoked for each element of each `arrays` to generate the criterion by
10052
- * which by which they're compared. The order of result values is determined
10053
- * by the order they occur in the arrays. The iteratee is invoked with one
10054
- * argument: (value).
10055
- *
10056
- * @static
10057
- * @memberOf _
10058
- * @since 4.0.0
10059
- * @category Array
10060
- * @param {...Array} [arrays] The arrays to inspect.
10061
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
10062
- * @returns {Array} Returns the new array of filtered values.
10063
- * @example
10064
- *
10065
- * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
10066
- * // => [1.2, 3.4]
10067
- *
10068
- * // The `_.property` iteratee shorthand.
10069
- * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
10070
- * // => [{ 'x': 2 }]
10071
- */
10072
- var xorBy = baseRest(function(arrays) {
10073
- var iteratee = last(arrays);
10074
- if (isArrayLikeObject(iteratee)) {
10075
- iteratee = undefined;
10076
- }
10077
- return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
10078
- });
10079
-
10080
- /**
10081
- * This method is like `_.xor` except that it accepts `comparator` which is
10082
- * invoked to compare elements of `arrays`. The order of result values is
10083
- * determined by the order they occur in the arrays. The comparator is invoked
10084
- * with two arguments: (arrVal, othVal).
10085
- *
10086
- * @static
10087
- * @memberOf _
10088
- * @since 4.0.0
10089
- * @category Array
10090
- * @param {...Array} [arrays] The arrays to inspect.
10091
- * @param {Function} [comparator] The comparator invoked per element.
10092
- * @returns {Array} Returns the new array of filtered values.
10093
- * @example
10094
- *
10095
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
10096
- * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
10097
- *
10098
- * _.xorWith(objects, others, _.isEqual);
10099
- * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
10100
- */
10101
- var xorWith = baseRest(function(arrays) {
10102
- var comparator = last(arrays);
10103
- comparator = typeof comparator == 'function' ? comparator : undefined;
10104
- return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
10105
- });
10106
-
10107
- /**
10108
- * Creates an array of grouped elements, the first of which contains the
10109
- * first elements of the given arrays, the second of which contains the
10110
- * second elements of the given arrays, and so on.
10111
- *
10112
- * @static
10113
- * @memberOf _
10114
- * @since 0.1.0
10115
- * @category Array
10116
- * @param {...Array} [arrays] The arrays to process.
10117
- * @returns {Array} Returns the new array of grouped elements.
10118
- * @example
10119
- *
10120
- * _.zip(['a', 'b'], [1, 2], [true, false]);
10121
- * // => [['a', 1, true], ['b', 2, false]]
10122
- */
10123
- var zip = baseRest(unzip);
10124
-
10125
- /**
10126
- * This method is like `_.fromPairs` except that it accepts two arrays,
10127
- * one of property identifiers and one of corresponding values.
10128
- *
10129
- * @static
10130
- * @memberOf _
10131
- * @since 0.4.0
10132
- * @category Array
10133
- * @param {Array} [props=[]] The property identifiers.
10134
- * @param {Array} [values=[]] The property values.
10135
- * @returns {Object} Returns the new object.
10136
- * @example
10137
- *
10138
- * _.zipObject(['a', 'b'], [1, 2]);
10139
- * // => { 'a': 1, 'b': 2 }
10140
- */
10141
- function zipObject(props, values) {
10142
- return baseZipObject(props || [], values || [], assignValue);
10143
- }
10144
-
10145
- /**
10146
- * This method is like `_.zipObject` except that it supports property paths.
10147
- *
10148
- * @static
10149
- * @memberOf _
10150
- * @since 4.1.0
10151
- * @category Array
10152
- * @param {Array} [props=[]] The property identifiers.
10153
- * @param {Array} [values=[]] The property values.
10154
- * @returns {Object} Returns the new object.
10155
- * @example
10156
- *
10157
- * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
10158
- * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
10159
- */
10160
- function zipObjectDeep(props, values) {
10161
- return baseZipObject(props || [], values || [], baseSet);
10162
- }
10163
-
10164
- /**
10165
- * This method is like `_.zip` except that it accepts `iteratee` to specify
10166
- * how grouped values should be combined. The iteratee is invoked with the
10167
- * elements of each group: (...group).
10168
- *
10169
- * @static
10170
- * @memberOf _
10171
- * @since 3.8.0
10172
- * @category Array
10173
- * @param {...Array} [arrays] The arrays to process.
10174
- * @param {Function} [iteratee=_.identity] The function to combine
10175
- * grouped values.
10176
- * @returns {Array} Returns the new array of grouped elements.
10177
- * @example
10178
- *
10179
- * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
10180
- * return a + b + c;
10181
- * });
10182
- * // => [111, 222]
10183
- */
10184
- var zipWith = baseRest(function(arrays) {
10185
- var length = arrays.length,
10186
- iteratee = length > 1 ? arrays[length - 1] : undefined;
10187
-
10188
- iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
10189
- return unzipWith(arrays, iteratee);
10190
- });
10191
-
10192
- /*------------------------------------------------------------------------*/
10193
-
10194
- /**
10195
- * Creates a `lodash` wrapper instance that wraps `value` with explicit method
10196
- * chain sequences enabled. The result of such sequences must be unwrapped
10197
- * with `_#value`.
10198
- *
10199
- * @static
10200
- * @memberOf _
10201
- * @since 1.3.0
10202
- * @category Seq
10203
- * @param {*} value The value to wrap.
10204
- * @returns {Object} Returns the new `lodash` wrapper instance.
10205
- * @example
10206
- *
10207
- * var users = [
10208
- * { 'user': 'barney', 'age': 36 },
10209
- * { 'user': 'fred', 'age': 40 },
10210
- * { 'user': 'pebbles', 'age': 1 }
10211
- * ];
10212
- *
10213
- * var youngest = _
10214
- * .chain(users)
10215
- * .sortBy('age')
10216
- * .map(function(o) {
10217
- * return o.user + ' is ' + o.age;
10218
- * })
10219
- * .head()
10220
- * .value();
10221
- * // => 'pebbles is 1'
10222
- */
10223
- function chain(value) {
10224
- var result = lodash(value);
10225
- result.__chain__ = true;
10226
- return result;
10227
- }
10228
-
10229
- /**
10230
- * This method invokes `interceptor` and returns `value`. The interceptor
10231
- * is invoked with one argument; (value). The purpose of this method is to
10232
- * "tap into" a method chain sequence in order to modify intermediate results.
10233
- *
10234
- * @static
10235
- * @memberOf _
10236
- * @since 0.1.0
10237
- * @category Seq
10238
- * @param {*} value The value to provide to `interceptor`.
10239
- * @param {Function} interceptor The function to invoke.
10240
- * @returns {*} Returns `value`.
10241
- * @example
10242
- *
10243
- * _([1, 2, 3])
10244
- * .tap(function(array) {
10245
- * // Mutate input array.
10246
- * array.pop();
10247
- * })
10248
- * .reverse()
10249
- * .value();
10250
- * // => [2, 1]
10251
- */
10252
- function tap(value, interceptor) {
10253
- interceptor(value);
10254
- return value;
10255
- }
10256
-
10257
- /**
10258
- * This method is like `_.tap` except that it returns the result of `interceptor`.
10259
- * The purpose of this method is to "pass thru" values replacing intermediate
10260
- * results in a method chain sequence.
10261
- *
10262
- * @static
10263
- * @memberOf _
10264
- * @since 3.0.0
10265
- * @category Seq
10266
- * @param {*} value The value to provide to `interceptor`.
10267
- * @param {Function} interceptor The function to invoke.
10268
- * @returns {*} Returns the result of `interceptor`.
10269
- * @example
10270
- *
10271
- * _(' abc ')
10272
- * .chain()
10273
- * .trim()
10274
- * .thru(function(value) {
10275
- * return [value];
10276
- * })
10277
- * .value();
10278
- * // => ['abc']
10279
- */
10280
- function thru(value, interceptor) {
10281
- return interceptor(value);
10282
- }
10283
-
10284
- /**
10285
- * This method is the wrapper version of `_.at`.
10286
- *
10287
- * @name at
10288
- * @memberOf _
10289
- * @since 1.0.0
10290
- * @category Seq
10291
- * @param {...(string|string[])} [paths] The property paths to pick.
10292
- * @returns {Object} Returns the new `lodash` wrapper instance.
10293
- * @example
10294
- *
10295
- * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
10296
- *
10297
- * _(object).at(['a[0].b.c', 'a[1]']).value();
10298
- * // => [3, 4]
10299
- */
10300
- var wrapperAt = flatRest(function(paths) {
10301
- var length = paths.length,
10302
- start = length ? paths[0] : 0,
10303
- value = this.__wrapped__,
10304
- interceptor = function(object) { return baseAt(object, paths); };
10305
-
10306
- if (length > 1 || this.__actions__.length ||
10307
- !(value instanceof LazyWrapper) || !isIndex(start)) {
10308
- return this.thru(interceptor);
10309
- }
10310
- value = value.slice(start, +start + (length ? 1 : 0));
10311
- value.__actions__.push({
10312
- 'func': thru,
10313
- 'args': [interceptor],
10314
- 'thisArg': undefined
10315
- });
10316
- return new LodashWrapper(value, this.__chain__).thru(function(array) {
10317
- if (length && !array.length) {
10318
- array.push(undefined);
10319
- }
10320
- return array;
10321
- });
10322
- });
10323
-
10324
- /**
10325
- * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
10326
- *
10327
- * @name chain
10328
- * @memberOf _
10329
- * @since 0.1.0
10330
- * @category Seq
10331
- * @returns {Object} Returns the new `lodash` wrapper instance.
10332
- * @example
10333
- *
10334
- * var users = [
10335
- * { 'user': 'barney', 'age': 36 },
10336
- * { 'user': 'fred', 'age': 40 }
10337
- * ];
10338
- *
10339
- * // A sequence without explicit chaining.
10340
- * _(users).head();
10341
- * // => { 'user': 'barney', 'age': 36 }
10342
- *
10343
- * // A sequence with explicit chaining.
10344
- * _(users)
10345
- * .chain()
10346
- * .head()
10347
- * .pick('user')
10348
- * .value();
10349
- * // => { 'user': 'barney' }
10350
- */
10351
- function wrapperChain() {
10352
- return chain(this);
10353
- }
10354
-
10355
- /**
10356
- * Executes the chain sequence and returns the wrapped result.
10357
- *
10358
- * @name commit
10359
- * @memberOf _
10360
- * @since 3.2.0
10361
- * @category Seq
10362
- * @returns {Object} Returns the new `lodash` wrapper instance.
10363
- * @example
10364
- *
10365
- * var array = [1, 2];
10366
- * var wrapped = _(array).push(3);
10367
- *
10368
- * console.log(array);
10369
- * // => [1, 2]
10370
- *
10371
- * wrapped = wrapped.commit();
10372
- * console.log(array);
10373
- * // => [1, 2, 3]
10374
- *
10375
- * wrapped.last();
10376
- * // => 3
10377
- *
10378
- * console.log(array);
10379
- * // => [1, 2, 3]
10380
- */
10381
- function wrapperCommit() {
10382
- return new LodashWrapper(this.value(), this.__chain__);
10383
- }
10384
-
10385
- /**
10386
- * Gets the next value on a wrapped object following the
10387
- * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
10388
- *
10389
- * @name next
10390
- * @memberOf _
10391
- * @since 4.0.0
10392
- * @category Seq
10393
- * @returns {Object} Returns the next iterator value.
10394
- * @example
10395
- *
10396
- * var wrapped = _([1, 2]);
10397
- *
10398
- * wrapped.next();
10399
- * // => { 'done': false, 'value': 1 }
10400
- *
10401
- * wrapped.next();
10402
- * // => { 'done': false, 'value': 2 }
10403
- *
10404
- * wrapped.next();
10405
- * // => { 'done': true, 'value': undefined }
10406
- */
10407
- function wrapperNext() {
10408
- if (this.__values__ === undefined) {
10409
- this.__values__ = toArray(this.value());
10410
- }
10411
- var done = this.__index__ >= this.__values__.length,
10412
- value = done ? undefined : this.__values__[this.__index__++];
10413
-
10414
- return { 'done': done, 'value': value };
10415
- }
10416
-
10417
- /**
10418
- * Enables the wrapper to be iterable.
10419
- *
10420
- * @name Symbol.iterator
10421
- * @memberOf _
10422
- * @since 4.0.0
10423
- * @category Seq
10424
- * @returns {Object} Returns the wrapper object.
10425
- * @example
10426
- *
10427
- * var wrapped = _([1, 2]);
10428
- *
10429
- * wrapped[Symbol.iterator]() === wrapped;
10430
- * // => true
10431
- *
10432
- * Array.from(wrapped);
10433
- * // => [1, 2]
10434
- */
10435
- function wrapperToIterator() {
10436
- return this;
10437
- }
10438
-
10439
- /**
10440
- * Creates a clone of the chain sequence planting `value` as the wrapped value.
10441
- *
10442
- * @name plant
10443
- * @memberOf _
10444
- * @since 3.2.0
10445
- * @category Seq
10446
- * @param {*} value The value to plant.
10447
- * @returns {Object} Returns the new `lodash` wrapper instance.
10448
- * @example
10449
- *
10450
- * function square(n) {
10451
- * return n * n;
10452
- * }
10453
- *
10454
- * var wrapped = _([1, 2]).map(square);
10455
- * var other = wrapped.plant([3, 4]);
10456
- *
10457
- * other.value();
10458
- * // => [9, 16]
10459
- *
10460
- * wrapped.value();
10461
- * // => [1, 4]
10462
- */
10463
- function wrapperPlant(value) {
10464
- var result,
10465
- parent = this;
10466
-
10467
- while (parent instanceof baseLodash) {
10468
- var clone = wrapperClone(parent);
10469
- clone.__index__ = 0;
10470
- clone.__values__ = undefined;
10471
- if (result) {
10472
- previous.__wrapped__ = clone;
10473
- } else {
10474
- result = clone;
10475
- }
10476
- var previous = clone;
10477
- parent = parent.__wrapped__;
10478
- }
10479
- previous.__wrapped__ = value;
10480
- return result;
10481
- }
10482
-
10483
- /**
10484
- * This method is the wrapper version of `_.reverse`.
10485
- *
10486
- * **Note:** This method mutates the wrapped array.
10487
- *
10488
- * @name reverse
10489
- * @memberOf _
10490
- * @since 0.1.0
10491
- * @category Seq
10492
- * @returns {Object} Returns the new `lodash` wrapper instance.
10493
- * @example
10494
- *
10495
- * var array = [1, 2, 3];
10496
- *
10497
- * _(array).reverse().value()
10498
- * // => [3, 2, 1]
10499
- *
10500
- * console.log(array);
10501
- * // => [3, 2, 1]
10502
- */
10503
- function wrapperReverse() {
10504
- var value = this.__wrapped__;
10505
- if (value instanceof LazyWrapper) {
10506
- var wrapped = value;
10507
- if (this.__actions__.length) {
10508
- wrapped = new LazyWrapper(this);
10509
- }
10510
- wrapped = wrapped.reverse();
10511
- wrapped.__actions__.push({
10512
- 'func': thru,
10513
- 'args': [reverse],
10514
- 'thisArg': undefined
10515
- });
10516
- return new LodashWrapper(wrapped, this.__chain__);
10517
- }
10518
- return this.thru(reverse);
10519
- }
10520
-
10521
- /**
10522
- * Executes the chain sequence to resolve the unwrapped value.
10523
- *
10524
- * @name value
10525
- * @memberOf _
10526
- * @since 0.1.0
10527
- * @alias toJSON, valueOf
10528
- * @category Seq
10529
- * @returns {*} Returns the resolved unwrapped value.
10530
- * @example
10531
- *
10532
- * _([1, 2, 3]).value();
10533
- * // => [1, 2, 3]
10534
- */
10535
- function wrapperValue() {
10536
- return baseWrapperValue(this.__wrapped__, this.__actions__);
10537
- }
10538
-
10539
- /*------------------------------------------------------------------------*/
10540
-
10541
- /**
10542
- * Creates an object composed of keys generated from the results of running
10543
- * each element of `collection` thru `iteratee`. The corresponding value of
10544
- * each key is the number of times the key was returned by `iteratee`. The
10545
- * iteratee is invoked with one argument: (value).
10546
- *
10547
- * @static
10548
- * @memberOf _
10549
- * @since 0.5.0
10550
- * @category Collection
10551
- * @param {Array|Object} collection The collection to iterate over.
10552
- * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
10553
- * @returns {Object} Returns the composed aggregate object.
10554
- * @example
10555
- *
10556
- * _.countBy([6.1, 4.2, 6.3], Math.floor);
10557
- * // => { '4': 1, '6': 2 }
10558
- *
10559
- * // The `_.property` iteratee shorthand.
10560
- * _.countBy(['one', 'two', 'three'], 'length');
10561
- * // => { '3': 2, '5': 1 }
10562
- */
10563
- var countBy = createAggregator(function(result, value, key) {
10564
- if (hasOwnProperty.call(result, key)) {
10565
- ++result[key];
10566
- } else {
10567
- baseAssignValue(result, key, 1);
10568
- }
10569
- });
10570
-
10571
- /**
10572
- * Checks if `predicate` returns truthy for **all** elements of `collection`.
10573
- * Iteration is stopped once `predicate` returns falsey. The predicate is
10574
- * invoked with three arguments: (value, index|key, collection).
10575
- *
10576
- * **Note:** This method returns `true` for
10577
- * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
10578
- * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
10579
- * elements of empty collections.
10580
- *
10581
- * @static
10582
- * @memberOf _
10583
- * @since 0.1.0
10584
- * @category Collection
10585
- * @param {Array|Object} collection The collection to iterate over.
10586
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
10587
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
10588
- * @returns {boolean} Returns `true` if all elements pass the predicate check,
10589
- * else `false`.
10590
- * @example
10591
- *
10592
- * _.every([true, 1, null, 'yes'], Boolean);
10593
- * // => false
10594
- *
10595
- * var users = [
10596
- * { 'user': 'barney', 'age': 36, 'active': false },
10597
- * { 'user': 'fred', 'age': 40, 'active': false }
10598
- * ];
10599
- *
10600
- * // The `_.matches` iteratee shorthand.
10601
- * _.every(users, { 'user': 'barney', 'active': false });
10602
- * // => false
10603
- *
10604
- * // The `_.matchesProperty` iteratee shorthand.
10605
- * _.every(users, ['active', false]);
10606
- * // => true
10607
- *
10608
- * // The `_.property` iteratee shorthand.
10609
- * _.every(users, 'active');
10610
- * // => false
10611
- */
10612
- function every(collection, predicate, guard) {
10613
- var func = isArray(collection) ? arrayEvery : baseEvery;
10614
- if (guard && isIterateeCall(collection, predicate, guard)) {
10615
- predicate = undefined;
10616
- }
10617
- return func(collection, getIteratee(predicate, 3));
10618
- }
10619
-
10620
- /**
10621
- * Iterates over elements of `collection`, returning an array of all elements
10622
- * `predicate` returns truthy for. The predicate is invoked with three
10623
- * arguments: (value, index|key, collection).
10624
- *
10625
- * **Note:** Unlike `_.remove`, this method returns a new array.
10626
- *
10627
- * @static
10628
- * @memberOf _
10629
- * @since 0.1.0
10630
- * @category Collection
10631
- * @param {Array|Object} collection The collection to iterate over.
10632
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
10633
- * @returns {Array} Returns the new filtered array.
10634
- * @see _.reject
10635
- * @example
10636
- *
10637
- * var users = [
10638
- * { 'user': 'barney', 'age': 36, 'active': true },
10639
- * { 'user': 'fred', 'age': 40, 'active': false }
10640
- * ];
10641
- *
10642
- * _.filter(users, function(o) { return !o.active; });
10643
- * // => objects for ['fred']
10644
- *
10645
- * // The `_.matches` iteratee shorthand.
10646
- * _.filter(users, { 'age': 36, 'active': true });
10647
- * // => objects for ['barney']
10648
- *
10649
- * // The `_.matchesProperty` iteratee shorthand.
10650
- * _.filter(users, ['active', false]);
10651
- * // => objects for ['fred']
10652
- *
10653
- * // The `_.property` iteratee shorthand.
10654
- * _.filter(users, 'active');
10655
- * // => objects for ['barney']
10656
- */
10657
- function filter(collection, predicate) {
10658
- var func = isArray(collection) ? arrayFilter : baseFilter;
10659
- return func(collection, getIteratee(predicate, 3));
10660
- }
10661
-
10662
- /**
10663
- * Iterates over elements of `collection`, returning the first element
10664
- * `predicate` returns truthy for. The predicate is invoked with three
10665
- * arguments: (value, index|key, collection).
10666
- *
10667
- * @static
10668
- * @memberOf _
10669
- * @since 0.1.0
10670
- * @category Collection
10671
- * @param {Array|Object} collection The collection to inspect.
10672
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
10673
- * @param {number} [fromIndex=0] The index to search from.
10674
- * @returns {*} Returns the matched element, else `undefined`.
10675
- * @example
10676
- *
10677
- * var users = [
10678
- * { 'user': 'barney', 'age': 36, 'active': true },
10679
- * { 'user': 'fred', 'age': 40, 'active': false },
10680
- * { 'user': 'pebbles', 'age': 1, 'active': true }
10681
- * ];
10682
- *
10683
- * _.find(users, function(o) { return o.age < 40; });
10684
- * // => object for 'barney'
10685
- *
10686
- * // The `_.matches` iteratee shorthand.
10687
- * _.find(users, { 'age': 1, 'active': true });
10688
- * // => object for 'pebbles'
10689
- *
10690
- * // The `_.matchesProperty` iteratee shorthand.
10691
- * _.find(users, ['active', false]);
10692
- * // => object for 'fred'
10693
- *
10694
- * // The `_.property` iteratee shorthand.
10695
- * _.find(users, 'active');
10696
- * // => object for 'barney'
10697
- */
10698
- var find = createFind(findIndex);
10699
-
10700
- /**
10701
- * This method is like `_.find` except that it iterates over elements of
10702
- * `collection` from right to left.
10703
- *
10704
- * @static
10705
- * @memberOf _
10706
- * @since 2.0.0
10707
- * @category Collection
10708
- * @param {Array|Object} collection The collection to inspect.
10709
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
10710
- * @param {number} [fromIndex=collection.length-1] The index to search from.
10711
- * @returns {*} Returns the matched element, else `undefined`.
10712
- * @example
10713
- *
10714
- * _.findLast([1, 2, 3, 4], function(n) {
10715
- * return n % 2 == 1;
10716
- * });
10717
- * // => 3
10718
- */
10719
- var findLast = createFind(findLastIndex);
10720
-
10721
- /**
10722
- * Creates a flattened array of values by running each element in `collection`
10723
- * thru `iteratee` and flattening the mapped results. The iteratee is invoked
10724
- * with three arguments: (value, index|key, collection).
10725
- *
10726
- * @static
10727
- * @memberOf _
10728
- * @since 4.0.0
10729
- * @category Collection
10730
- * @param {Array|Object} collection The collection to iterate over.
10731
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
10732
- * @returns {Array} Returns the new flattened array.
10733
- * @example
10734
- *
10735
- * function duplicate(n) {
10736
- * return [n, n];
10737
- * }
10738
- *
10739
- * _.flatMap([1, 2], duplicate);
10740
- * // => [1, 1, 2, 2]
10741
- */
10742
- function flatMap(collection, iteratee) {
10743
- return baseFlatten(map(collection, iteratee), 1);
10744
- }
10745
-
10746
- /**
10747
- * This method is like `_.flatMap` except that it recursively flattens the
10748
- * mapped results.
10749
- *
10750
- * @static
10751
- * @memberOf _
10752
- * @since 4.7.0
10753
- * @category Collection
10754
- * @param {Array|Object} collection The collection to iterate over.
10755
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
10756
- * @returns {Array} Returns the new flattened array.
10757
- * @example
10758
- *
10759
- * function duplicate(n) {
10760
- * return [[[n, n]]];
10761
- * }
10762
- *
10763
- * _.flatMapDeep([1, 2], duplicate);
10764
- * // => [1, 1, 2, 2]
10765
- */
10766
- function flatMapDeep(collection, iteratee) {
10767
- return baseFlatten(map(collection, iteratee), INFINITY);
10768
- }
10769
-
10770
- /**
10771
- * This method is like `_.flatMap` except that it recursively flattens the
10772
- * mapped results up to `depth` times.
10773
- *
10774
- * @static
10775
- * @memberOf _
10776
- * @since 4.7.0
10777
- * @category Collection
10778
- * @param {Array|Object} collection The collection to iterate over.
10779
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
10780
- * @param {number} [depth=1] The maximum recursion depth.
10781
- * @returns {Array} Returns the new flattened array.
10782
- * @example
10783
- *
10784
- * function duplicate(n) {
10785
- * return [[[n, n]]];
10786
- * }
10787
- *
10788
- * _.flatMapDepth([1, 2], duplicate, 2);
10789
- * // => [[1, 1], [2, 2]]
10790
- */
10791
- function flatMapDepth(collection, iteratee, depth) {
10792
- depth = depth === undefined ? 1 : toInteger(depth);
10793
- return baseFlatten(map(collection, iteratee), depth);
10794
- }
10795
-
10796
- /**
10797
- * Iterates over elements of `collection` and invokes `iteratee` for each element.
10798
- * The iteratee is invoked with three arguments: (value, index|key, collection).
10799
- * Iteratee functions may exit iteration early by explicitly returning `false`.
10800
- *
10801
- * **Note:** As with other "Collections" methods, objects with a "length"
10802
- * property are iterated like arrays. To avoid this behavior use `_.forIn`
10803
- * or `_.forOwn` for object iteration.
10804
- *
10805
- * @static
10806
- * @memberOf _
10807
- * @since 0.1.0
10808
- * @alias each
10809
- * @category Collection
10810
- * @param {Array|Object} collection The collection to iterate over.
10811
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
10812
- * @returns {Array|Object} Returns `collection`.
10813
- * @see _.forEachRight
10814
- * @example
10815
- *
10816
- * _.forEach([1, 2], function(value) {
10817
- * console.log(value);
10818
- * });
10819
- * // => Logs `1` then `2`.
10820
- *
10821
- * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
10822
- * console.log(key);
10823
- * });
10824
- * // => Logs 'a' then 'b' (iteration order is not guaranteed).
10825
- */
10826
- function forEach(collection, iteratee) {
10827
- var func = isArray(collection) ? arrayEach : baseEach;
10828
- return func(collection, getIteratee(iteratee, 3));
10829
- }
10830
-
10831
- /**
10832
- * This method is like `_.forEach` except that it iterates over elements of
10833
- * `collection` from right to left.
10834
- *
10835
- * @static
10836
- * @memberOf _
10837
- * @since 2.0.0
10838
- * @alias eachRight
10839
- * @category Collection
10840
- * @param {Array|Object} collection The collection to iterate over.
10841
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
10842
- * @returns {Array|Object} Returns `collection`.
10843
- * @see _.forEach
10844
- * @example
10845
- *
10846
- * _.forEachRight([1, 2], function(value) {
10847
- * console.log(value);
10848
- * });
10849
- * // => Logs `2` then `1`.
10850
- */
10851
- function forEachRight(collection, iteratee) {
10852
- var func = isArray(collection) ? arrayEachRight : baseEachRight;
10853
- return func(collection, getIteratee(iteratee, 3));
10854
- }
10855
-
10856
- /**
10857
- * Creates an object composed of keys generated from the results of running
10858
- * each element of `collection` thru `iteratee`. The order of grouped values
10859
- * is determined by the order they occur in `collection`. The corresponding
10860
- * value of each key is an array of elements responsible for generating the
10861
- * key. The iteratee is invoked with one argument: (value).
10862
- *
10863
- * @static
10864
- * @memberOf _
10865
- * @since 0.1.0
10866
- * @category Collection
10867
- * @param {Array|Object} collection The collection to iterate over.
10868
- * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
10869
- * @returns {Object} Returns the composed aggregate object.
10870
- * @example
10871
- *
10872
- * _.groupBy([6.1, 4.2, 6.3], Math.floor);
10873
- * // => { '4': [4.2], '6': [6.1, 6.3] }
10874
- *
10875
- * // The `_.property` iteratee shorthand.
10876
- * _.groupBy(['one', 'two', 'three'], 'length');
10877
- * // => { '3': ['one', 'two'], '5': ['three'] }
10878
- */
10879
- var groupBy = createAggregator(function(result, value, key) {
10880
- if (hasOwnProperty.call(result, key)) {
10881
- result[key].push(value);
10882
- } else {
10883
- baseAssignValue(result, key, [value]);
10884
- }
10885
- });
10886
-
10887
- /**
10888
- * Checks if `value` is in `collection`. If `collection` is a string, it's
10889
- * checked for a substring of `value`, otherwise
10890
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
10891
- * is used for equality comparisons. If `fromIndex` is negative, it's used as
10892
- * the offset from the end of `collection`.
10893
- *
10894
- * @static
10895
- * @memberOf _
10896
- * @since 0.1.0
10897
- * @category Collection
10898
- * @param {Array|Object|string} collection The collection to inspect.
10899
- * @param {*} value The value to search for.
10900
- * @param {number} [fromIndex=0] The index to search from.
10901
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
10902
- * @returns {boolean} Returns `true` if `value` is found, else `false`.
10903
- * @example
10904
- *
10905
- * _.includes([1, 2, 3], 1);
10906
- * // => true
10907
- *
10908
- * _.includes([1, 2, 3], 1, 2);
10909
- * // => false
10910
- *
10911
- * _.includes({ 'a': 1, 'b': 2 }, 1);
10912
- * // => true
10913
- *
10914
- * _.includes('abcd', 'bc');
10915
- * // => true
10916
- */
10917
- function includes(collection, value, fromIndex, guard) {
10918
- collection = isArrayLike(collection) ? collection : values(collection);
10919
- fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
10920
-
10921
- var length = collection.length;
10922
- if (fromIndex < 0) {
10923
- fromIndex = nativeMax(length + fromIndex, 0);
10924
- }
10925
- return isString(collection)
10926
- ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
10927
- : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
10928
- }
10929
-
10930
- /**
10931
- * Invokes the method at `path` of each element in `collection`, returning
10932
- * an array of the results of each invoked method. Any additional arguments
10933
- * are provided to each invoked method. If `path` is a function, it's invoked
10934
- * for, and `this` bound to, each element in `collection`.
10935
- *
10936
- * @static
10937
- * @memberOf _
10938
- * @since 4.0.0
10939
- * @category Collection
10940
- * @param {Array|Object} collection The collection to iterate over.
10941
- * @param {Array|Function|string} path The path of the method to invoke or
10942
- * the function invoked per iteration.
10943
- * @param {...*} [args] The arguments to invoke each method with.
10944
- * @returns {Array} Returns the array of results.
10945
- * @example
10946
- *
10947
- * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
10948
- * // => [[1, 5, 7], [1, 2, 3]]
10949
- *
10950
- * _.invokeMap([123, 456], String.prototype.split, '');
10951
- * // => [['1', '2', '3'], ['4', '5', '6']]
10952
- */
10953
- var invokeMap = baseRest(function(collection, path, args) {
10954
- var index = -1,
10955
- isFunc = typeof path == 'function',
10956
- result = isArrayLike(collection) ? Array(collection.length) : [];
10957
-
10958
- baseEach(collection, function(value) {
10959
- result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
10960
- });
10961
- return result;
10962
- });
10963
-
10964
- /**
10965
- * Creates an object composed of keys generated from the results of running
10966
- * each element of `collection` thru `iteratee`. The corresponding value of
10967
- * each key is the last element responsible for generating the key. The
10968
- * iteratee is invoked with one argument: (value).
10969
- *
10970
- * @static
10971
- * @memberOf _
10972
- * @since 4.0.0
10973
- * @category Collection
10974
- * @param {Array|Object} collection The collection to iterate over.
10975
- * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
10976
- * @returns {Object} Returns the composed aggregate object.
10977
- * @example
10978
- *
10979
- * var array = [
10980
- * { 'dir': 'left', 'code': 97 },
10981
- * { 'dir': 'right', 'code': 100 }
10982
- * ];
10983
- *
10984
- * _.keyBy(array, function(o) {
10985
- * return String.fromCharCode(o.code);
10986
- * });
10987
- * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
10988
- *
10989
- * _.keyBy(array, 'dir');
10990
- * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
10991
- */
10992
- var keyBy = createAggregator(function(result, value, key) {
10993
- baseAssignValue(result, key, value);
10994
- });
10995
-
10996
- /**
10997
- * Creates an array of values by running each element in `collection` thru
10998
- * `iteratee`. The iteratee is invoked with three arguments:
10999
- * (value, index|key, collection).
11000
- *
11001
- * Many lodash methods are guarded to work as iteratees for methods like
11002
- * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
11003
- *
11004
- * The guarded methods are:
11005
- * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
11006
- * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
11007
- * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
11008
- * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
11009
- *
11010
- * @static
11011
- * @memberOf _
11012
- * @since 0.1.0
11013
- * @category Collection
11014
- * @param {Array|Object} collection The collection to iterate over.
11015
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
11016
- * @returns {Array} Returns the new mapped array.
11017
- * @example
11018
- *
11019
- * function square(n) {
11020
- * return n * n;
11021
- * }
11022
- *
11023
- * _.map([4, 8], square);
11024
- * // => [16, 64]
11025
- *
11026
- * _.map({ 'a': 4, 'b': 8 }, square);
11027
- * // => [16, 64] (iteration order is not guaranteed)
11028
- *
11029
- * var users = [
11030
- * { 'user': 'barney' },
11031
- * { 'user': 'fred' }
11032
- * ];
11033
- *
11034
- * // The `_.property` iteratee shorthand.
11035
- * _.map(users, 'user');
11036
- * // => ['barney', 'fred']
11037
- */
11038
- function map(collection, iteratee) {
11039
- var func = isArray(collection) ? arrayMap : baseMap;
11040
- return func(collection, getIteratee(iteratee, 3));
11041
- }
11042
-
11043
- /**
11044
- * This method is like `_.sortBy` except that it allows specifying the sort
11045
- * orders of the iteratees to sort by. If `orders` is unspecified, all values
11046
- * are sorted in ascending order. Otherwise, specify an order of "desc" for
11047
- * descending or "asc" for ascending sort order of corresponding values.
11048
- *
11049
- * @static
11050
- * @memberOf _
11051
- * @since 4.0.0
11052
- * @category Collection
11053
- * @param {Array|Object} collection The collection to iterate over.
11054
- * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
11055
- * The iteratees to sort by.
11056
- * @param {string[]} [orders] The sort orders of `iteratees`.
11057
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
11058
- * @returns {Array} Returns the new sorted array.
11059
- * @example
11060
- *
11061
- * var users = [
11062
- * { 'user': 'fred', 'age': 48 },
11063
- * { 'user': 'barney', 'age': 34 },
11064
- * { 'user': 'fred', 'age': 40 },
11065
- * { 'user': 'barney', 'age': 36 }
11066
- * ];
11067
- *
11068
- * // Sort by `user` in ascending order and by `age` in descending order.
11069
- * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
11070
- * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
11071
- */
11072
- function orderBy(collection, iteratees, orders, guard) {
11073
- if (collection == null) {
11074
- return [];
11075
- }
11076
- if (!isArray(iteratees)) {
11077
- iteratees = iteratees == null ? [] : [iteratees];
11078
- }
11079
- orders = guard ? undefined : orders;
11080
- if (!isArray(orders)) {
11081
- orders = orders == null ? [] : [orders];
11082
- }
11083
- return baseOrderBy(collection, iteratees, orders);
11084
- }
11085
-
11086
- /**
11087
- * Creates an array of elements split into two groups, the first of which
11088
- * contains elements `predicate` returns truthy for, the second of which
11089
- * contains elements `predicate` returns falsey for. The predicate is
11090
- * invoked with one argument: (value).
11091
- *
11092
- * @static
11093
- * @memberOf _
11094
- * @since 3.0.0
11095
- * @category Collection
11096
- * @param {Array|Object} collection The collection to iterate over.
11097
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
11098
- * @returns {Array} Returns the array of grouped elements.
11099
- * @example
11100
- *
11101
- * var users = [
11102
- * { 'user': 'barney', 'age': 36, 'active': false },
11103
- * { 'user': 'fred', 'age': 40, 'active': true },
11104
- * { 'user': 'pebbles', 'age': 1, 'active': false }
11105
- * ];
11106
- *
11107
- * _.partition(users, function(o) { return o.active; });
11108
- * // => objects for [['fred'], ['barney', 'pebbles']]
11109
- *
11110
- * // The `_.matches` iteratee shorthand.
11111
- * _.partition(users, { 'age': 1, 'active': false });
11112
- * // => objects for [['pebbles'], ['barney', 'fred']]
11113
- *
11114
- * // The `_.matchesProperty` iteratee shorthand.
11115
- * _.partition(users, ['active', false]);
11116
- * // => objects for [['barney', 'pebbles'], ['fred']]
11117
- *
11118
- * // The `_.property` iteratee shorthand.
11119
- * _.partition(users, 'active');
11120
- * // => objects for [['fred'], ['barney', 'pebbles']]
11121
- */
11122
- var partition = createAggregator(function(result, value, key) {
11123
- result[key ? 0 : 1].push(value);
11124
- }, function() { return [[], []]; });
11125
-
11126
- /**
11127
- * Reduces `collection` to a value which is the accumulated result of running
11128
- * each element in `collection` thru `iteratee`, where each successive
11129
- * invocation is supplied the return value of the previous. If `accumulator`
11130
- * is not given, the first element of `collection` is used as the initial
11131
- * value. The iteratee is invoked with four arguments:
11132
- * (accumulator, value, index|key, collection).
11133
- *
11134
- * Many lodash methods are guarded to work as iteratees for methods like
11135
- * `_.reduce`, `_.reduceRight`, and `_.transform`.
11136
- *
11137
- * The guarded methods are:
11138
- * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
11139
- * and `sortBy`
11140
- *
11141
- * @static
11142
- * @memberOf _
11143
- * @since 0.1.0
11144
- * @category Collection
11145
- * @param {Array|Object} collection The collection to iterate over.
11146
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
11147
- * @param {*} [accumulator] The initial value.
11148
- * @returns {*} Returns the accumulated value.
11149
- * @see _.reduceRight
11150
- * @example
11151
- *
11152
- * _.reduce([1, 2], function(sum, n) {
11153
- * return sum + n;
11154
- * }, 0);
11155
- * // => 3
11156
- *
11157
- * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
11158
- * (result[value] || (result[value] = [])).push(key);
11159
- * return result;
11160
- * }, {});
11161
- * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
11162
- */
11163
- function reduce(collection, iteratee, accumulator) {
11164
- var func = isArray(collection) ? arrayReduce : baseReduce,
11165
- initAccum = arguments.length < 3;
11166
-
11167
- return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
11168
- }
11169
-
11170
- /**
11171
- * This method is like `_.reduce` except that it iterates over elements of
11172
- * `collection` from right to left.
11173
- *
11174
- * @static
11175
- * @memberOf _
11176
- * @since 0.1.0
11177
- * @category Collection
11178
- * @param {Array|Object} collection The collection to iterate over.
11179
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
11180
- * @param {*} [accumulator] The initial value.
11181
- * @returns {*} Returns the accumulated value.
11182
- * @see _.reduce
11183
- * @example
11184
- *
11185
- * var array = [[0, 1], [2, 3], [4, 5]];
11186
- *
11187
- * _.reduceRight(array, function(flattened, other) {
11188
- * return flattened.concat(other);
11189
- * }, []);
11190
- * // => [4, 5, 2, 3, 0, 1]
11191
- */
11192
- function reduceRight(collection, iteratee, accumulator) {
11193
- var func = isArray(collection) ? arrayReduceRight : baseReduce,
11194
- initAccum = arguments.length < 3;
11195
-
11196
- return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
11197
- }
11198
-
11199
- /**
11200
- * The opposite of `_.filter`; this method returns the elements of `collection`
11201
- * that `predicate` does **not** return truthy for.
11202
- *
11203
- * @static
11204
- * @memberOf _
11205
- * @since 0.1.0
11206
- * @category Collection
11207
- * @param {Array|Object} collection The collection to iterate over.
11208
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
11209
- * @returns {Array} Returns the new filtered array.
11210
- * @see _.filter
11211
- * @example
11212
- *
11213
- * var users = [
11214
- * { 'user': 'barney', 'age': 36, 'active': false },
11215
- * { 'user': 'fred', 'age': 40, 'active': true }
11216
- * ];
11217
- *
11218
- * _.reject(users, function(o) { return !o.active; });
11219
- * // => objects for ['fred']
11220
- *
11221
- * // The `_.matches` iteratee shorthand.
11222
- * _.reject(users, { 'age': 40, 'active': true });
11223
- * // => objects for ['barney']
11224
- *
11225
- * // The `_.matchesProperty` iteratee shorthand.
11226
- * _.reject(users, ['active', false]);
11227
- * // => objects for ['fred']
11228
- *
11229
- * // The `_.property` iteratee shorthand.
11230
- * _.reject(users, 'active');
11231
- * // => objects for ['barney']
11232
- */
11233
- function reject(collection, predicate) {
11234
- var func = isArray(collection) ? arrayFilter : baseFilter;
11235
- return func(collection, negate(getIteratee(predicate, 3)));
11236
- }
11237
-
11238
- /**
11239
- * Gets a random element from `collection`.
11240
- *
11241
- * @static
11242
- * @memberOf _
11243
- * @since 2.0.0
11244
- * @category Collection
11245
- * @param {Array|Object} collection The collection to sample.
11246
- * @returns {*} Returns the random element.
11247
- * @example
11248
- *
11249
- * _.sample([1, 2, 3, 4]);
11250
- * // => 2
11251
- */
11252
- function sample(collection) {
11253
- var func = isArray(collection) ? arraySample : baseSample;
11254
- return func(collection);
11255
- }
11256
-
11257
- /**
11258
- * Gets `n` random elements at unique keys from `collection` up to the
11259
- * size of `collection`.
11260
- *
11261
- * @static
11262
- * @memberOf _
11263
- * @since 4.0.0
11264
- * @category Collection
11265
- * @param {Array|Object} collection The collection to sample.
11266
- * @param {number} [n=1] The number of elements to sample.
11267
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11268
- * @returns {Array} Returns the random elements.
11269
- * @example
11270
- *
11271
- * _.sampleSize([1, 2, 3], 2);
11272
- * // => [3, 1]
11273
- *
11274
- * _.sampleSize([1, 2, 3], 4);
11275
- * // => [2, 3, 1]
11276
- */
11277
- function sampleSize(collection, n, guard) {
11278
- if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
11279
- n = 1;
11280
- } else {
11281
- n = toInteger(n);
11282
- }
11283
- var func = isArray(collection) ? arraySampleSize : baseSampleSize;
11284
- return func(collection, n);
11285
- }
11286
-
11287
- /**
11288
- * Creates an array of shuffled values, using a version of the
11289
- * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
11290
- *
11291
- * @static
11292
- * @memberOf _
11293
- * @since 0.1.0
11294
- * @category Collection
11295
- * @param {Array|Object} collection The collection to shuffle.
11296
- * @returns {Array} Returns the new shuffled array.
11297
- * @example
11298
- *
11299
- * _.shuffle([1, 2, 3, 4]);
11300
- * // => [4, 1, 3, 2]
11301
- */
11302
- function shuffle(collection) {
11303
- var func = isArray(collection) ? arrayShuffle : baseShuffle;
11304
- return func(collection);
11305
- }
11306
-
11307
- /**
11308
- * Gets the size of `collection` by returning its length for array-like
11309
- * values or the number of own enumerable string keyed properties for objects.
11310
- *
11311
- * @static
11312
- * @memberOf _
11313
- * @since 0.1.0
11314
- * @category Collection
11315
- * @param {Array|Object|string} collection The collection to inspect.
11316
- * @returns {number} Returns the collection size.
11317
- * @example
11318
- *
11319
- * _.size([1, 2, 3]);
11320
- * // => 3
11321
- *
11322
- * _.size({ 'a': 1, 'b': 2 });
11323
- * // => 2
11324
- *
11325
- * _.size('pebbles');
11326
- * // => 7
11327
- */
11328
- function size(collection) {
11329
- if (collection == null) {
11330
- return 0;
11331
- }
11332
- if (isArrayLike(collection)) {
11333
- return isString(collection) ? stringSize(collection) : collection.length;
11334
- }
11335
- var tag = getTag(collection);
11336
- if (tag == mapTag || tag == setTag) {
11337
- return collection.size;
11338
- }
11339
- return baseKeys(collection).length;
11340
- }
11341
-
11342
- /**
11343
- * Checks if `predicate` returns truthy for **any** element of `collection`.
11344
- * Iteration is stopped once `predicate` returns truthy. The predicate is
11345
- * invoked with three arguments: (value, index|key, collection).
11346
- *
11347
- * @static
11348
- * @memberOf _
11349
- * @since 0.1.0
11350
- * @category Collection
11351
- * @param {Array|Object} collection The collection to iterate over.
11352
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
11353
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11354
- * @returns {boolean} Returns `true` if any element passes the predicate check,
11355
- * else `false`.
11356
- * @example
11357
- *
11358
- * _.some([null, 0, 'yes', false], Boolean);
11359
- * // => true
11360
- *
11361
- * var users = [
11362
- * { 'user': 'barney', 'active': true },
11363
- * { 'user': 'fred', 'active': false }
11364
- * ];
11365
- *
11366
- * // The `_.matches` iteratee shorthand.
11367
- * _.some(users, { 'user': 'barney', 'active': false });
11368
- * // => false
11369
- *
11370
- * // The `_.matchesProperty` iteratee shorthand.
11371
- * _.some(users, ['active', false]);
11372
- * // => true
11373
- *
11374
- * // The `_.property` iteratee shorthand.
11375
- * _.some(users, 'active');
11376
- * // => true
11377
- */
11378
- function some(collection, predicate, guard) {
11379
- var func = isArray(collection) ? arraySome : baseSome;
11380
- if (guard && isIterateeCall(collection, predicate, guard)) {
11381
- predicate = undefined;
11382
- }
11383
- return func(collection, getIteratee(predicate, 3));
11384
- }
11385
-
11386
- /**
11387
- * Creates an array of elements, sorted in ascending order by the results of
11388
- * running each element in a collection thru each iteratee. This method
11389
- * performs a stable sort, that is, it preserves the original sort order of
11390
- * equal elements. The iteratees are invoked with one argument: (value).
11391
- *
11392
- * @static
11393
- * @memberOf _
11394
- * @since 0.1.0
11395
- * @category Collection
11396
- * @param {Array|Object} collection The collection to iterate over.
11397
- * @param {...(Function|Function[])} [iteratees=[_.identity]]
11398
- * The iteratees to sort by.
11399
- * @returns {Array} Returns the new sorted array.
11400
- * @example
11401
- *
11402
- * var users = [
11403
- * { 'user': 'fred', 'age': 48 },
11404
- * { 'user': 'barney', 'age': 36 },
11405
- * { 'user': 'fred', 'age': 40 },
11406
- * { 'user': 'barney', 'age': 34 }
11407
- * ];
11408
- *
11409
- * _.sortBy(users, [function(o) { return o.user; }]);
11410
- * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
11411
- *
11412
- * _.sortBy(users, ['user', 'age']);
11413
- * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
11414
- */
11415
- var sortBy = baseRest(function(collection, iteratees) {
11416
- if (collection == null) {
11417
- return [];
11418
- }
11419
- var length = iteratees.length;
11420
- if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
11421
- iteratees = [];
11422
- } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
11423
- iteratees = [iteratees[0]];
11424
- }
11425
- return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
11426
- });
11427
-
11428
- /*------------------------------------------------------------------------*/
11429
-
11430
- /**
11431
- * Gets the timestamp of the number of milliseconds that have elapsed since
11432
- * the Unix epoch (1 January 1970 00:00:00 UTC).
11433
- *
11434
- * @static
11435
- * @memberOf _
11436
- * @since 2.4.0
11437
- * @category Date
11438
- * @returns {number} Returns the timestamp.
11439
- * @example
11440
- *
11441
- * _.defer(function(stamp) {
11442
- * console.log(_.now() - stamp);
11443
- * }, _.now());
11444
- * // => Logs the number of milliseconds it took for the deferred invocation.
11445
- */
11446
- var now = ctxNow || function() {
11447
- return root.Date.now();
11448
- };
11449
-
11450
- /*------------------------------------------------------------------------*/
11451
-
11452
- /**
11453
- * The opposite of `_.before`; this method creates a function that invokes
11454
- * `func` once it's called `n` or more times.
11455
- *
11456
- * @static
11457
- * @memberOf _
11458
- * @since 0.1.0
11459
- * @category Function
11460
- * @param {number} n The number of calls before `func` is invoked.
11461
- * @param {Function} func The function to restrict.
11462
- * @returns {Function} Returns the new restricted function.
11463
- * @example
11464
- *
11465
- * var saves = ['profile', 'settings'];
11466
- *
11467
- * var done = _.after(saves.length, function() {
11468
- * console.log('done saving!');
11469
- * });
11470
- *
11471
- * _.forEach(saves, function(type) {
11472
- * asyncSave({ 'type': type, 'complete': done });
11473
- * });
11474
- * // => Logs 'done saving!' after the two async saves have completed.
11475
- */
11476
- function after(n, func) {
11477
- if (typeof func != 'function') {
11478
- throw new TypeError(FUNC_ERROR_TEXT);
11479
- }
11480
- n = toInteger(n);
11481
- return function() {
11482
- if (--n < 1) {
11483
- return func.apply(this, arguments);
11484
- }
11485
- };
11486
- }
11487
-
11488
- /**
11489
- * Creates a function that invokes `func`, with up to `n` arguments,
11490
- * ignoring any additional arguments.
11491
- *
11492
- * @static
11493
- * @memberOf _
11494
- * @since 3.0.0
11495
- * @category Function
11496
- * @param {Function} func The function to cap arguments for.
11497
- * @param {number} [n=func.length] The arity cap.
11498
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11499
- * @returns {Function} Returns the new capped function.
11500
- * @example
11501
- *
11502
- * _.map(['6', '8', '10'], _.ary(parseInt, 1));
11503
- * // => [6, 8, 10]
11504
- */
11505
- function ary(func, n, guard) {
11506
- n = guard ? undefined : n;
11507
- n = (func && n == null) ? func.length : n;
11508
- return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
11509
- }
11510
-
11511
- /**
11512
- * Creates a function that invokes `func`, with the `this` binding and arguments
11513
- * of the created function, while it's called less than `n` times. Subsequent
11514
- * calls to the created function return the result of the last `func` invocation.
11515
- *
11516
- * @static
11517
- * @memberOf _
11518
- * @since 3.0.0
11519
- * @category Function
11520
- * @param {number} n The number of calls at which `func` is no longer invoked.
11521
- * @param {Function} func The function to restrict.
11522
- * @returns {Function} Returns the new restricted function.
11523
- * @example
11524
- *
11525
- * jQuery(element).on('click', _.before(5, addContactToList));
11526
- * // => Allows adding up to 4 contacts to the list.
11527
- */
11528
- function before(n, func) {
11529
- var result;
11530
- if (typeof func != 'function') {
11531
- throw new TypeError(FUNC_ERROR_TEXT);
11532
- }
11533
- n = toInteger(n);
11534
- return function() {
11535
- if (--n > 0) {
11536
- result = func.apply(this, arguments);
11537
- }
11538
- if (n <= 1) {
11539
- func = undefined;
11540
- }
11541
- return result;
11542
- };
11543
- }
11544
-
11545
- /**
11546
- * Creates a function that invokes `func` with the `this` binding of `thisArg`
11547
- * and `partials` prepended to the arguments it receives.
11548
- *
11549
- * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
11550
- * may be used as a placeholder for partially applied arguments.
11551
- *
11552
- * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
11553
- * property of bound functions.
11554
- *
11555
- * @static
11556
- * @memberOf _
11557
- * @since 0.1.0
11558
- * @category Function
11559
- * @param {Function} func The function to bind.
11560
- * @param {*} thisArg The `this` binding of `func`.
11561
- * @param {...*} [partials] The arguments to be partially applied.
11562
- * @returns {Function} Returns the new bound function.
11563
- * @example
11564
- *
11565
- * function greet(greeting, punctuation) {
11566
- * return greeting + ' ' + this.user + punctuation;
11567
- * }
11568
- *
11569
- * var object = { 'user': 'fred' };
11570
- *
11571
- * var bound = _.bind(greet, object, 'hi');
11572
- * bound('!');
11573
- * // => 'hi fred!'
11574
- *
11575
- * // Bound with placeholders.
11576
- * var bound = _.bind(greet, object, _, '!');
11577
- * bound('hi');
11578
- * // => 'hi fred!'
11579
- */
11580
- var bind = baseRest(function(func, thisArg, partials) {
11581
- var bitmask = WRAP_BIND_FLAG;
11582
- if (partials.length) {
11583
- var holders = replaceHolders(partials, getHolder(bind));
11584
- bitmask |= WRAP_PARTIAL_FLAG;
11585
- }
11586
- return createWrap(func, bitmask, thisArg, partials, holders);
11587
- });
11588
-
11589
- /**
11590
- * Creates a function that invokes the method at `object[key]` with `partials`
11591
- * prepended to the arguments it receives.
11592
- *
11593
- * This method differs from `_.bind` by allowing bound functions to reference
11594
- * methods that may be redefined or don't yet exist. See
11595
- * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
11596
- * for more details.
11597
- *
11598
- * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
11599
- * builds, may be used as a placeholder for partially applied arguments.
11600
- *
11601
- * @static
11602
- * @memberOf _
11603
- * @since 0.10.0
11604
- * @category Function
11605
- * @param {Object} object The object to invoke the method on.
11606
- * @param {string} key The key of the method.
11607
- * @param {...*} [partials] The arguments to be partially applied.
11608
- * @returns {Function} Returns the new bound function.
11609
- * @example
11610
- *
11611
- * var object = {
11612
- * 'user': 'fred',
11613
- * 'greet': function(greeting, punctuation) {
11614
- * return greeting + ' ' + this.user + punctuation;
11615
- * }
11616
- * };
11617
- *
11618
- * var bound = _.bindKey(object, 'greet', 'hi');
11619
- * bound('!');
11620
- * // => 'hi fred!'
11621
- *
11622
- * object.greet = function(greeting, punctuation) {
11623
- * return greeting + 'ya ' + this.user + punctuation;
11624
- * };
11625
- *
11626
- * bound('!');
11627
- * // => 'hiya fred!'
11628
- *
11629
- * // Bound with placeholders.
11630
- * var bound = _.bindKey(object, 'greet', _, '!');
11631
- * bound('hi');
11632
- * // => 'hiya fred!'
11633
- */
11634
- var bindKey = baseRest(function(object, key, partials) {
11635
- var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
11636
- if (partials.length) {
11637
- var holders = replaceHolders(partials, getHolder(bindKey));
11638
- bitmask |= WRAP_PARTIAL_FLAG;
11639
- }
11640
- return createWrap(key, bitmask, object, partials, holders);
11641
- });
11642
-
11643
- /**
11644
- * Creates a function that accepts arguments of `func` and either invokes
11645
- * `func` returning its result, if at least `arity` number of arguments have
11646
- * been provided, or returns a function that accepts the remaining `func`
11647
- * arguments, and so on. The arity of `func` may be specified if `func.length`
11648
- * is not sufficient.
11649
- *
11650
- * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
11651
- * may be used as a placeholder for provided arguments.
11652
- *
11653
- * **Note:** This method doesn't set the "length" property of curried functions.
11654
- *
11655
- * @static
11656
- * @memberOf _
11657
- * @since 2.0.0
11658
- * @category Function
11659
- * @param {Function} func The function to curry.
11660
- * @param {number} [arity=func.length] The arity of `func`.
11661
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11662
- * @returns {Function} Returns the new curried function.
11663
- * @example
11664
- *
11665
- * var abc = function(a, b, c) {
11666
- * return [a, b, c];
11667
- * };
11668
- *
11669
- * var curried = _.curry(abc);
11670
- *
11671
- * curried(1)(2)(3);
11672
- * // => [1, 2, 3]
11673
- *
11674
- * curried(1, 2)(3);
11675
- * // => [1, 2, 3]
11676
- *
11677
- * curried(1, 2, 3);
11678
- * // => [1, 2, 3]
11679
- *
11680
- * // Curried with placeholders.
11681
- * curried(1)(_, 3)(2);
11682
- * // => [1, 2, 3]
11683
- */
11684
- function curry(func, arity, guard) {
11685
- arity = guard ? undefined : arity;
11686
- var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
11687
- result.placeholder = curry.placeholder;
11688
- return result;
11689
- }
11690
-
11691
- /**
11692
- * This method is like `_.curry` except that arguments are applied to `func`
11693
- * in the manner of `_.partialRight` instead of `_.partial`.
11694
- *
11695
- * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
11696
- * builds, may be used as a placeholder for provided arguments.
11697
- *
11698
- * **Note:** This method doesn't set the "length" property of curried functions.
11699
- *
11700
- * @static
11701
- * @memberOf _
11702
- * @since 3.0.0
11703
- * @category Function
11704
- * @param {Function} func The function to curry.
11705
- * @param {number} [arity=func.length] The arity of `func`.
11706
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11707
- * @returns {Function} Returns the new curried function.
11708
- * @example
11709
- *
11710
- * var abc = function(a, b, c) {
11711
- * return [a, b, c];
11712
- * };
11713
- *
11714
- * var curried = _.curryRight(abc);
11715
- *
11716
- * curried(3)(2)(1);
11717
- * // => [1, 2, 3]
11718
- *
11719
- * curried(2, 3)(1);
11720
- * // => [1, 2, 3]
11721
- *
11722
- * curried(1, 2, 3);
11723
- * // => [1, 2, 3]
11724
- *
11725
- * // Curried with placeholders.
11726
- * curried(3)(1, _)(2);
11727
- * // => [1, 2, 3]
11728
- */
11729
- function curryRight(func, arity, guard) {
11730
- arity = guard ? undefined : arity;
11731
- var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
11732
- result.placeholder = curryRight.placeholder;
11733
- return result;
11734
- }
11735
-
11736
- /**
11737
- * Creates a debounced function that delays invoking `func` until after `wait`
11738
- * milliseconds have elapsed since the last time the debounced function was
11739
- * invoked. The debounced function comes with a `cancel` method to cancel
11740
- * delayed `func` invocations and a `flush` method to immediately invoke them.
11741
- * Provide `options` to indicate whether `func` should be invoked on the
11742
- * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
11743
- * with the last arguments provided to the debounced function. Subsequent
11744
- * calls to the debounced function return the result of the last `func`
11745
- * invocation.
11746
- *
11747
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
11748
- * invoked on the trailing edge of the timeout only if the debounced function
11749
- * is invoked more than once during the `wait` timeout.
11750
- *
11751
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
11752
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
11753
- *
11754
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
11755
- * for details over the differences between `_.debounce` and `_.throttle`.
11756
- *
11757
- * @static
11758
- * @memberOf _
11759
- * @since 0.1.0
11760
- * @category Function
11761
- * @param {Function} func The function to debounce.
11762
- * @param {number} [wait=0] The number of milliseconds to delay.
11763
- * @param {Object} [options={}] The options object.
11764
- * @param {boolean} [options.leading=false]
11765
- * Specify invoking on the leading edge of the timeout.
11766
- * @param {number} [options.maxWait]
11767
- * The maximum time `func` is allowed to be delayed before it's invoked.
11768
- * @param {boolean} [options.trailing=true]
11769
- * Specify invoking on the trailing edge of the timeout.
11770
- * @returns {Function} Returns the new debounced function.
11771
- * @example
11772
- *
11773
- * // Avoid costly calculations while the window size is in flux.
11774
- * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
11775
- *
11776
- * // Invoke `sendMail` when clicked, debouncing subsequent calls.
11777
- * jQuery(element).on('click', _.debounce(sendMail, 300, {
11778
- * 'leading': true,
11779
- * 'trailing': false
11780
- * }));
11781
- *
11782
- * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
11783
- * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
11784
- * var source = new EventSource('/stream');
11785
- * jQuery(source).on('message', debounced);
11786
- *
11787
- * // Cancel the trailing debounced invocation.
11788
- * jQuery(window).on('popstate', debounced.cancel);
11789
- */
11790
- function debounce(func, wait, options) {
11791
- var lastArgs,
11792
- lastThis,
11793
- maxWait,
11794
- result,
11795
- timerId,
11796
- lastCallTime,
11797
- lastInvokeTime = 0,
11798
- leading = false,
11799
- maxing = false,
11800
- trailing = true;
11801
-
11802
- if (typeof func != 'function') {
11803
- throw new TypeError(FUNC_ERROR_TEXT);
11804
- }
11805
- wait = toNumber(wait) || 0;
11806
- if (isObject(options)) {
11807
- leading = !!options.leading;
11808
- maxing = 'maxWait' in options;
11809
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
11810
- trailing = 'trailing' in options ? !!options.trailing : trailing;
11811
- }
11812
-
11813
- function invokeFunc(time) {
11814
- var args = lastArgs,
11815
- thisArg = lastThis;
11816
-
11817
- lastArgs = lastThis = undefined;
11818
- lastInvokeTime = time;
11819
- result = func.apply(thisArg, args);
11820
- return result;
11821
- }
11822
-
11823
- function leadingEdge(time) {
11824
- // Reset any `maxWait` timer.
11825
- lastInvokeTime = time;
11826
- // Start the timer for the trailing edge.
11827
- timerId = setTimeout(timerExpired, wait);
11828
- // Invoke the leading edge.
11829
- return leading ? invokeFunc(time) : result;
11830
- }
11831
-
11832
- function remainingWait(time) {
11833
- var timeSinceLastCall = time - lastCallTime,
11834
- timeSinceLastInvoke = time - lastInvokeTime,
11835
- timeWaiting = wait - timeSinceLastCall;
11836
-
11837
- return maxing
11838
- ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
11839
- : timeWaiting;
11840
- }
11841
-
11842
- function shouldInvoke(time) {
11843
- var timeSinceLastCall = time - lastCallTime,
11844
- timeSinceLastInvoke = time - lastInvokeTime;
11845
-
11846
- // Either this is the first call, activity has stopped and we're at the
11847
- // trailing edge, the system time has gone backwards and we're treating
11848
- // it as the trailing edge, or we've hit the `maxWait` limit.
11849
- return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
11850
- (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
11851
- }
11852
-
11853
- function timerExpired() {
11854
- var time = now();
11855
- if (shouldInvoke(time)) {
11856
- return trailingEdge(time);
11857
- }
11858
- // Restart the timer.
11859
- timerId = setTimeout(timerExpired, remainingWait(time));
11860
- }
11861
-
11862
- function trailingEdge(time) {
11863
- timerId = undefined;
11864
-
11865
- // Only invoke if we have `lastArgs` which means `func` has been
11866
- // debounced at least once.
11867
- if (trailing && lastArgs) {
11868
- return invokeFunc(time);
11869
- }
11870
- lastArgs = lastThis = undefined;
11871
- return result;
11872
- }
11873
-
11874
- function cancel() {
11875
- if (timerId !== undefined) {
11876
- clearTimeout(timerId);
11877
- }
11878
- lastInvokeTime = 0;
11879
- lastArgs = lastCallTime = lastThis = timerId = undefined;
11880
- }
11881
-
11882
- function flush() {
11883
- return timerId === undefined ? result : trailingEdge(now());
11884
- }
11885
-
11886
- function debounced() {
11887
- var time = now(),
11888
- isInvoking = shouldInvoke(time);
11889
-
11890
- lastArgs = arguments;
11891
- lastThis = this;
11892
- lastCallTime = time;
11893
-
11894
- if (isInvoking) {
11895
- if (timerId === undefined) {
11896
- return leadingEdge(lastCallTime);
11897
- }
11898
- if (maxing) {
11899
- // Handle invocations in a tight loop.
11900
- timerId = setTimeout(timerExpired, wait);
11901
- return invokeFunc(lastCallTime);
11902
- }
11903
- }
11904
- if (timerId === undefined) {
11905
- timerId = setTimeout(timerExpired, wait);
11906
- }
11907
- return result;
11908
- }
11909
- debounced.cancel = cancel;
11910
- debounced.flush = flush;
11911
- return debounced;
11912
- }
11913
-
11914
- /**
11915
- * Defers invoking the `func` until the current call stack has cleared. Any
11916
- * additional arguments are provided to `func` when it's invoked.
11917
- *
11918
- * @static
11919
- * @memberOf _
11920
- * @since 0.1.0
11921
- * @category Function
11922
- * @param {Function} func The function to defer.
11923
- * @param {...*} [args] The arguments to invoke `func` with.
11924
- * @returns {number} Returns the timer id.
11925
- * @example
11926
- *
11927
- * _.defer(function(text) {
11928
- * console.log(text);
11929
- * }, 'deferred');
11930
- * // => Logs 'deferred' after one millisecond.
11931
- */
11932
- var defer = baseRest(function(func, args) {
11933
- return baseDelay(func, 1, args);
11934
- });
11935
-
11936
- /**
11937
- * Invokes `func` after `wait` milliseconds. Any additional arguments are
11938
- * provided to `func` when it's invoked.
11939
- *
11940
- * @static
11941
- * @memberOf _
11942
- * @since 0.1.0
11943
- * @category Function
11944
- * @param {Function} func The function to delay.
11945
- * @param {number} wait The number of milliseconds to delay invocation.
11946
- * @param {...*} [args] The arguments to invoke `func` with.
11947
- * @returns {number} Returns the timer id.
11948
- * @example
11949
- *
11950
- * _.delay(function(text) {
11951
- * console.log(text);
11952
- * }, 1000, 'later');
11953
- * // => Logs 'later' after one second.
11954
- */
11955
- var delay = baseRest(function(func, wait, args) {
11956
- return baseDelay(func, toNumber(wait) || 0, args);
11957
- });
11958
-
11959
- /**
11960
- * Creates a function that invokes `func` with arguments reversed.
11961
- *
11962
- * @static
11963
- * @memberOf _
11964
- * @since 4.0.0
11965
- * @category Function
11966
- * @param {Function} func The function to flip arguments for.
11967
- * @returns {Function} Returns the new flipped function.
11968
- * @example
11969
- *
11970
- * var flipped = _.flip(function() {
11971
- * return _.toArray(arguments);
11972
- * });
11973
- *
11974
- * flipped('a', 'b', 'c', 'd');
11975
- * // => ['d', 'c', 'b', 'a']
11976
- */
11977
- function flip(func) {
11978
- return createWrap(func, WRAP_FLIP_FLAG);
11979
- }
11980
-
11981
- /**
11982
- * Creates a function that memoizes the result of `func`. If `resolver` is
11983
- * provided, it determines the cache key for storing the result based on the
11984
- * arguments provided to the memoized function. By default, the first argument
11985
- * provided to the memoized function is used as the map cache key. The `func`
11986
- * is invoked with the `this` binding of the memoized function.
11987
- *
11988
- * **Note:** The cache is exposed as the `cache` property on the memoized
11989
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
11990
- * constructor with one whose instances implement the
11991
- * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
11992
- * method interface of `clear`, `delete`, `get`, `has`, and `set`.
11993
- *
11994
- * @static
11995
- * @memberOf _
11996
- * @since 0.1.0
11997
- * @category Function
11998
- * @param {Function} func The function to have its output memoized.
11999
- * @param {Function} [resolver] The function to resolve the cache key.
12000
- * @returns {Function} Returns the new memoized function.
12001
- * @example
12002
- *
12003
- * var object = { 'a': 1, 'b': 2 };
12004
- * var other = { 'c': 3, 'd': 4 };
12005
- *
12006
- * var values = _.memoize(_.values);
12007
- * values(object);
12008
- * // => [1, 2]
12009
- *
12010
- * values(other);
12011
- * // => [3, 4]
12012
- *
12013
- * object.a = 2;
12014
- * values(object);
12015
- * // => [1, 2]
12016
- *
12017
- * // Modify the result cache.
12018
- * values.cache.set(object, ['a', 'b']);
12019
- * values(object);
12020
- * // => ['a', 'b']
12021
- *
12022
- * // Replace `_.memoize.Cache`.
12023
- * _.memoize.Cache = WeakMap;
12024
- */
12025
- function memoize(func, resolver) {
12026
- if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
12027
- throw new TypeError(FUNC_ERROR_TEXT);
12028
- }
12029
- var memoized = function() {
12030
- var args = arguments,
12031
- key = resolver ? resolver.apply(this, args) : args[0],
12032
- cache = memoized.cache;
12033
-
12034
- if (cache.has(key)) {
12035
- return cache.get(key);
12036
- }
12037
- var result = func.apply(this, args);
12038
- memoized.cache = cache.set(key, result) || cache;
12039
- return result;
12040
- };
12041
- memoized.cache = new (memoize.Cache || MapCache);
12042
- return memoized;
12043
- }
12044
-
12045
- // Expose `MapCache`.
12046
- memoize.Cache = MapCache;
12047
-
12048
- /**
12049
- * Creates a function that negates the result of the predicate `func`. The
12050
- * `func` predicate is invoked with the `this` binding and arguments of the
12051
- * created function.
12052
- *
12053
- * @static
12054
- * @memberOf _
12055
- * @since 3.0.0
12056
- * @category Function
12057
- * @param {Function} predicate The predicate to negate.
12058
- * @returns {Function} Returns the new negated function.
12059
- * @example
12060
- *
12061
- * function isEven(n) {
12062
- * return n % 2 == 0;
12063
- * }
12064
- *
12065
- * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
12066
- * // => [1, 3, 5]
12067
- */
12068
- function negate(predicate) {
12069
- if (typeof predicate != 'function') {
12070
- throw new TypeError(FUNC_ERROR_TEXT);
12071
- }
12072
- return function() {
12073
- var args = arguments;
12074
- switch (args.length) {
12075
- case 0: return !predicate.call(this);
12076
- case 1: return !predicate.call(this, args[0]);
12077
- case 2: return !predicate.call(this, args[0], args[1]);
12078
- case 3: return !predicate.call(this, args[0], args[1], args[2]);
12079
- }
12080
- return !predicate.apply(this, args);
12081
- };
12082
- }
12083
-
12084
- /**
12085
- * Creates a function that is restricted to invoking `func` once. Repeat calls
12086
- * to the function return the value of the first invocation. The `func` is
12087
- * invoked with the `this` binding and arguments of the created function.
12088
- *
12089
- * @static
12090
- * @memberOf _
12091
- * @since 0.1.0
12092
- * @category Function
12093
- * @param {Function} func The function to restrict.
12094
- * @returns {Function} Returns the new restricted function.
12095
- * @example
12096
- *
12097
- * var initialize = _.once(createApplication);
12098
- * initialize();
12099
- * initialize();
12100
- * // => `createApplication` is invoked once
12101
- */
12102
- function once(func) {
12103
- return before(2, func);
12104
- }
12105
-
12106
- /**
12107
- * Creates a function that invokes `func` with its arguments transformed.
12108
- *
12109
- * @static
12110
- * @since 4.0.0
12111
- * @memberOf _
12112
- * @category Function
12113
- * @param {Function} func The function to wrap.
12114
- * @param {...(Function|Function[])} [transforms=[_.identity]]
12115
- * The argument transforms.
12116
- * @returns {Function} Returns the new function.
12117
- * @example
12118
- *
12119
- * function doubled(n) {
12120
- * return n * 2;
12121
- * }
12122
- *
12123
- * function square(n) {
12124
- * return n * n;
12125
- * }
12126
- *
12127
- * var func = _.overArgs(function(x, y) {
12128
- * return [x, y];
12129
- * }, [square, doubled]);
12130
- *
12131
- * func(9, 3);
12132
- * // => [81, 6]
12133
- *
12134
- * func(10, 5);
12135
- * // => [100, 10]
12136
- */
12137
- var overArgs = castRest(function(func, transforms) {
12138
- transforms = (transforms.length == 1 && isArray(transforms[0]))
12139
- ? arrayMap(transforms[0], baseUnary(getIteratee()))
12140
- : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
12141
-
12142
- var funcsLength = transforms.length;
12143
- return baseRest(function(args) {
12144
- var index = -1,
12145
- length = nativeMin(args.length, funcsLength);
12146
-
12147
- while (++index < length) {
12148
- args[index] = transforms[index].call(this, args[index]);
12149
- }
12150
- return apply(func, this, args);
12151
- });
12152
- });
12153
-
12154
- /**
12155
- * Creates a function that invokes `func` with `partials` prepended to the
12156
- * arguments it receives. This method is like `_.bind` except it does **not**
12157
- * alter the `this` binding.
12158
- *
12159
- * The `_.partial.placeholder` value, which defaults to `_` in monolithic
12160
- * builds, may be used as a placeholder for partially applied arguments.
12161
- *
12162
- * **Note:** This method doesn't set the "length" property of partially
12163
- * applied functions.
12164
- *
12165
- * @static
12166
- * @memberOf _
12167
- * @since 0.2.0
12168
- * @category Function
12169
- * @param {Function} func The function to partially apply arguments to.
12170
- * @param {...*} [partials] The arguments to be partially applied.
12171
- * @returns {Function} Returns the new partially applied function.
12172
- * @example
12173
- *
12174
- * function greet(greeting, name) {
12175
- * return greeting + ' ' + name;
12176
- * }
12177
- *
12178
- * var sayHelloTo = _.partial(greet, 'hello');
12179
- * sayHelloTo('fred');
12180
- * // => 'hello fred'
12181
- *
12182
- * // Partially applied with placeholders.
12183
- * var greetFred = _.partial(greet, _, 'fred');
12184
- * greetFred('hi');
12185
- * // => 'hi fred'
12186
- */
12187
- var partial = baseRest(function(func, partials) {
12188
- var holders = replaceHolders(partials, getHolder(partial));
12189
- return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
12190
- });
12191
-
12192
- /**
12193
- * This method is like `_.partial` except that partially applied arguments
12194
- * are appended to the arguments it receives.
12195
- *
12196
- * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
12197
- * builds, may be used as a placeholder for partially applied arguments.
12198
- *
12199
- * **Note:** This method doesn't set the "length" property of partially
12200
- * applied functions.
12201
- *
12202
- * @static
12203
- * @memberOf _
12204
- * @since 1.0.0
12205
- * @category Function
12206
- * @param {Function} func The function to partially apply arguments to.
12207
- * @param {...*} [partials] The arguments to be partially applied.
12208
- * @returns {Function} Returns the new partially applied function.
12209
- * @example
12210
- *
12211
- * function greet(greeting, name) {
12212
- * return greeting + ' ' + name;
12213
- * }
12214
- *
12215
- * var greetFred = _.partialRight(greet, 'fred');
12216
- * greetFred('hi');
12217
- * // => 'hi fred'
12218
- *
12219
- * // Partially applied with placeholders.
12220
- * var sayHelloTo = _.partialRight(greet, 'hello', _);
12221
- * sayHelloTo('fred');
12222
- * // => 'hello fred'
12223
- */
12224
- var partialRight = baseRest(function(func, partials) {
12225
- var holders = replaceHolders(partials, getHolder(partialRight));
12226
- return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
12227
- });
12228
-
12229
- /**
12230
- * Creates a function that invokes `func` with arguments arranged according
12231
- * to the specified `indexes` where the argument value at the first index is
12232
- * provided as the first argument, the argument value at the second index is
12233
- * provided as the second argument, and so on.
12234
- *
12235
- * @static
12236
- * @memberOf _
12237
- * @since 3.0.0
12238
- * @category Function
12239
- * @param {Function} func The function to rearrange arguments for.
12240
- * @param {...(number|number[])} indexes The arranged argument indexes.
12241
- * @returns {Function} Returns the new function.
12242
- * @example
12243
- *
12244
- * var rearged = _.rearg(function(a, b, c) {
12245
- * return [a, b, c];
12246
- * }, [2, 0, 1]);
12247
- *
12248
- * rearged('b', 'c', 'a')
12249
- * // => ['a', 'b', 'c']
12250
- */
12251
- var rearg = flatRest(function(func, indexes) {
12252
- return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
12253
- });
12254
-
12255
- /**
12256
- * Creates a function that invokes `func` with the `this` binding of the
12257
- * created function and arguments from `start` and beyond provided as
12258
- * an array.
12259
- *
12260
- * **Note:** This method is based on the
12261
- * [rest parameter](https://mdn.io/rest_parameters).
12262
- *
12263
- * @static
12264
- * @memberOf _
12265
- * @since 4.0.0
12266
- * @category Function
12267
- * @param {Function} func The function to apply a rest parameter to.
12268
- * @param {number} [start=func.length-1] The start position of the rest parameter.
12269
- * @returns {Function} Returns the new function.
12270
- * @example
12271
- *
12272
- * var say = _.rest(function(what, names) {
12273
- * return what + ' ' + _.initial(names).join(', ') +
12274
- * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
12275
- * });
12276
- *
12277
- * say('hello', 'fred', 'barney', 'pebbles');
12278
- * // => 'hello fred, barney, & pebbles'
12279
- */
12280
- function rest(func, start) {
12281
- if (typeof func != 'function') {
12282
- throw new TypeError(FUNC_ERROR_TEXT);
12283
- }
12284
- start = start === undefined ? start : toInteger(start);
12285
- return baseRest(func, start);
12286
- }
12287
-
12288
- /**
12289
- * Creates a function that invokes `func` with the `this` binding of the
12290
- * create function and an array of arguments much like
12291
- * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
12292
- *
12293
- * **Note:** This method is based on the
12294
- * [spread operator](https://mdn.io/spread_operator).
12295
- *
12296
- * @static
12297
- * @memberOf _
12298
- * @since 3.2.0
12299
- * @category Function
12300
- * @param {Function} func The function to spread arguments over.
12301
- * @param {number} [start=0] The start position of the spread.
12302
- * @returns {Function} Returns the new function.
12303
- * @example
12304
- *
12305
- * var say = _.spread(function(who, what) {
12306
- * return who + ' says ' + what;
12307
- * });
12308
- *
12309
- * say(['fred', 'hello']);
12310
- * // => 'fred says hello'
12311
- *
12312
- * var numbers = Promise.all([
12313
- * Promise.resolve(40),
12314
- * Promise.resolve(36)
12315
- * ]);
12316
- *
12317
- * numbers.then(_.spread(function(x, y) {
12318
- * return x + y;
12319
- * }));
12320
- * // => a Promise of 76
12321
- */
12322
- function spread(func, start) {
12323
- if (typeof func != 'function') {
12324
- throw new TypeError(FUNC_ERROR_TEXT);
12325
- }
12326
- start = start == null ? 0 : nativeMax(toInteger(start), 0);
12327
- return baseRest(function(args) {
12328
- var array = args[start],
12329
- otherArgs = castSlice(args, 0, start);
12330
-
12331
- if (array) {
12332
- arrayPush(otherArgs, array);
12333
- }
12334
- return apply(func, this, otherArgs);
12335
- });
12336
- }
12337
-
12338
- /**
12339
- * Creates a throttled function that only invokes `func` at most once per
12340
- * every `wait` milliseconds. The throttled function comes with a `cancel`
12341
- * method to cancel delayed `func` invocations and a `flush` method to
12342
- * immediately invoke them. Provide `options` to indicate whether `func`
12343
- * should be invoked on the leading and/or trailing edge of the `wait`
12344
- * timeout. The `func` is invoked with the last arguments provided to the
12345
- * throttled function. Subsequent calls to the throttled function return the
12346
- * result of the last `func` invocation.
12347
- *
12348
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
12349
- * invoked on the trailing edge of the timeout only if the throttled function
12350
- * is invoked more than once during the `wait` timeout.
12351
- *
12352
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
12353
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
12354
- *
12355
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
12356
- * for details over the differences between `_.throttle` and `_.debounce`.
12357
- *
12358
- * @static
12359
- * @memberOf _
12360
- * @since 0.1.0
12361
- * @category Function
12362
- * @param {Function} func The function to throttle.
12363
- * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
12364
- * @param {Object} [options={}] The options object.
12365
- * @param {boolean} [options.leading=true]
12366
- * Specify invoking on the leading edge of the timeout.
12367
- * @param {boolean} [options.trailing=true]
12368
- * Specify invoking on the trailing edge of the timeout.
12369
- * @returns {Function} Returns the new throttled function.
12370
- * @example
12371
- *
12372
- * // Avoid excessively updating the position while scrolling.
12373
- * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
12374
- *
12375
- * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
12376
- * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
12377
- * jQuery(element).on('click', throttled);
12378
- *
12379
- * // Cancel the trailing throttled invocation.
12380
- * jQuery(window).on('popstate', throttled.cancel);
12381
- */
12382
- function throttle(func, wait, options) {
12383
- var leading = true,
12384
- trailing = true;
12385
-
12386
- if (typeof func != 'function') {
12387
- throw new TypeError(FUNC_ERROR_TEXT);
12388
- }
12389
- if (isObject(options)) {
12390
- leading = 'leading' in options ? !!options.leading : leading;
12391
- trailing = 'trailing' in options ? !!options.trailing : trailing;
12392
- }
12393
- return debounce(func, wait, {
12394
- 'leading': leading,
12395
- 'maxWait': wait,
12396
- 'trailing': trailing
12397
- });
12398
- }
12399
-
12400
- /**
12401
- * Creates a function that accepts up to one argument, ignoring any
12402
- * additional arguments.
12403
- *
12404
- * @static
12405
- * @memberOf _
12406
- * @since 4.0.0
12407
- * @category Function
12408
- * @param {Function} func The function to cap arguments for.
12409
- * @returns {Function} Returns the new capped function.
12410
- * @example
12411
- *
12412
- * _.map(['6', '8', '10'], _.unary(parseInt));
12413
- * // => [6, 8, 10]
12414
- */
12415
- function unary(func) {
12416
- return ary(func, 1);
12417
- }
12418
-
12419
- /**
12420
- * Creates a function that provides `value` to `wrapper` as its first
12421
- * argument. Any additional arguments provided to the function are appended
12422
- * to those provided to the `wrapper`. The wrapper is invoked with the `this`
12423
- * binding of the created function.
12424
- *
12425
- * @static
12426
- * @memberOf _
12427
- * @since 0.1.0
12428
- * @category Function
12429
- * @param {*} value The value to wrap.
12430
- * @param {Function} [wrapper=identity] The wrapper function.
12431
- * @returns {Function} Returns the new function.
12432
- * @example
12433
- *
12434
- * var p = _.wrap(_.escape, function(func, text) {
12435
- * return '<p>' + func(text) + '</p>';
12436
- * });
12437
- *
12438
- * p('fred, barney, & pebbles');
12439
- * // => '<p>fred, barney, &amp; pebbles</p>'
12440
- */
12441
- function wrap(value, wrapper) {
12442
- return partial(castFunction(wrapper), value);
12443
- }
12444
-
12445
- /*------------------------------------------------------------------------*/
12446
-
12447
- /**
12448
- * Casts `value` as an array if it's not one.
12449
- *
12450
- * @static
12451
- * @memberOf _
12452
- * @since 4.4.0
12453
- * @category Lang
12454
- * @param {*} value The value to inspect.
12455
- * @returns {Array} Returns the cast array.
12456
- * @example
12457
- *
12458
- * _.castArray(1);
12459
- * // => [1]
12460
- *
12461
- * _.castArray({ 'a': 1 });
12462
- * // => [{ 'a': 1 }]
12463
- *
12464
- * _.castArray('abc');
12465
- * // => ['abc']
12466
- *
12467
- * _.castArray(null);
12468
- * // => [null]
12469
- *
12470
- * _.castArray(undefined);
12471
- * // => [undefined]
12472
- *
12473
- * _.castArray();
12474
- * // => []
12475
- *
12476
- * var array = [1, 2, 3];
12477
- * console.log(_.castArray(array) === array);
12478
- * // => true
12479
- */
12480
- function castArray() {
12481
- if (!arguments.length) {
12482
- return [];
12483
- }
12484
- var value = arguments[0];
12485
- return isArray(value) ? value : [value];
12486
- }
12487
-
12488
- /**
12489
- * Creates a shallow clone of `value`.
12490
- *
12491
- * **Note:** This method is loosely based on the
12492
- * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
12493
- * and supports cloning arrays, array buffers, booleans, date objects, maps,
12494
- * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
12495
- * arrays. The own enumerable properties of `arguments` objects are cloned
12496
- * as plain objects. An empty object is returned for uncloneable values such
12497
- * as error objects, functions, DOM nodes, and WeakMaps.
12498
- *
12499
- * @static
12500
- * @memberOf _
12501
- * @since 0.1.0
12502
- * @category Lang
12503
- * @param {*} value The value to clone.
12504
- * @returns {*} Returns the cloned value.
12505
- * @see _.cloneDeep
12506
- * @example
12507
- *
12508
- * var objects = [{ 'a': 1 }, { 'b': 2 }];
12509
- *
12510
- * var shallow = _.clone(objects);
12511
- * console.log(shallow[0] === objects[0]);
12512
- * // => true
12513
- */
12514
- function clone(value) {
12515
- return baseClone(value, CLONE_SYMBOLS_FLAG);
12516
- }
12517
-
12518
- /**
12519
- * This method is like `_.clone` except that it accepts `customizer` which
12520
- * is invoked to produce the cloned value. If `customizer` returns `undefined`,
12521
- * cloning is handled by the method instead. The `customizer` is invoked with
12522
- * up to four arguments; (value [, index|key, object, stack]).
12523
- *
12524
- * @static
12525
- * @memberOf _
12526
- * @since 4.0.0
12527
- * @category Lang
12528
- * @param {*} value The value to clone.
12529
- * @param {Function} [customizer] The function to customize cloning.
12530
- * @returns {*} Returns the cloned value.
12531
- * @see _.cloneDeepWith
12532
- * @example
12533
- *
12534
- * function customizer(value) {
12535
- * if (_.isElement(value)) {
12536
- * return value.cloneNode(false);
12537
- * }
12538
- * }
12539
- *
12540
- * var el = _.cloneWith(document.body, customizer);
12541
- *
12542
- * console.log(el === document.body);
12543
- * // => false
12544
- * console.log(el.nodeName);
12545
- * // => 'BODY'
12546
- * console.log(el.childNodes.length);
12547
- * // => 0
12548
- */
12549
- function cloneWith(value, customizer) {
12550
- customizer = typeof customizer == 'function' ? customizer : undefined;
12551
- return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
12552
- }
12553
-
12554
- /**
12555
- * This method is like `_.clone` except that it recursively clones `value`.
12556
- *
12557
- * @static
12558
- * @memberOf _
12559
- * @since 1.0.0
12560
- * @category Lang
12561
- * @param {*} value The value to recursively clone.
12562
- * @returns {*} Returns the deep cloned value.
12563
- * @see _.clone
12564
- * @example
12565
- *
12566
- * var objects = [{ 'a': 1 }, { 'b': 2 }];
12567
- *
12568
- * var deep = _.cloneDeep(objects);
12569
- * console.log(deep[0] === objects[0]);
12570
- * // => false
12571
- */
12572
- function cloneDeep(value) {
12573
- return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
12574
- }
12575
-
12576
- /**
12577
- * This method is like `_.cloneWith` except that it recursively clones `value`.
12578
- *
12579
- * @static
12580
- * @memberOf _
12581
- * @since 4.0.0
12582
- * @category Lang
12583
- * @param {*} value The value to recursively clone.
12584
- * @param {Function} [customizer] The function to customize cloning.
12585
- * @returns {*} Returns the deep cloned value.
12586
- * @see _.cloneWith
12587
- * @example
12588
- *
12589
- * function customizer(value) {
12590
- * if (_.isElement(value)) {
12591
- * return value.cloneNode(true);
12592
- * }
12593
- * }
12594
- *
12595
- * var el = _.cloneDeepWith(document.body, customizer);
12596
- *
12597
- * console.log(el === document.body);
12598
- * // => false
12599
- * console.log(el.nodeName);
12600
- * // => 'BODY'
12601
- * console.log(el.childNodes.length);
12602
- * // => 20
12603
- */
12604
- function cloneDeepWith(value, customizer) {
12605
- customizer = typeof customizer == 'function' ? customizer : undefined;
12606
- return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
12607
- }
12608
-
12609
- /**
12610
- * Checks if `object` conforms to `source` by invoking the predicate
12611
- * properties of `source` with the corresponding property values of `object`.
12612
- *
12613
- * **Note:** This method is equivalent to `_.conforms` when `source` is
12614
- * partially applied.
12615
- *
12616
- * @static
12617
- * @memberOf _
12618
- * @since 4.14.0
12619
- * @category Lang
12620
- * @param {Object} object The object to inspect.
12621
- * @param {Object} source The object of property predicates to conform to.
12622
- * @returns {boolean} Returns `true` if `object` conforms, else `false`.
12623
- * @example
12624
- *
12625
- * var object = { 'a': 1, 'b': 2 };
12626
- *
12627
- * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
12628
- * // => true
12629
- *
12630
- * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
12631
- * // => false
12632
- */
12633
- function conformsTo(object, source) {
12634
- return source == null || baseConformsTo(object, source, keys(source));
12635
- }
12636
-
12637
- /**
12638
- * Performs a
12639
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
12640
- * comparison between two values to determine if they are equivalent.
12641
- *
12642
- * @static
12643
- * @memberOf _
12644
- * @since 4.0.0
12645
- * @category Lang
12646
- * @param {*} value The value to compare.
12647
- * @param {*} other The other value to compare.
12648
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
12649
- * @example
12650
- *
12651
- * var object = { 'a': 1 };
12652
- * var other = { 'a': 1 };
12653
- *
12654
- * _.eq(object, object);
12655
- * // => true
12656
- *
12657
- * _.eq(object, other);
12658
- * // => false
12659
- *
12660
- * _.eq('a', 'a');
12661
- * // => true
12662
- *
12663
- * _.eq('a', Object('a'));
12664
- * // => false
12665
- *
12666
- * _.eq(NaN, NaN);
12667
- * // => true
12668
- */
12669
- function eq(value, other) {
12670
- return value === other || (value !== value && other !== other);
12671
- }
12672
-
12673
- /**
12674
- * Checks if `value` is greater than `other`.
12675
- *
12676
- * @static
12677
- * @memberOf _
12678
- * @since 3.9.0
12679
- * @category Lang
12680
- * @param {*} value The value to compare.
12681
- * @param {*} other The other value to compare.
12682
- * @returns {boolean} Returns `true` if `value` is greater than `other`,
12683
- * else `false`.
12684
- * @see _.lt
12685
- * @example
12686
- *
12687
- * _.gt(3, 1);
12688
- * // => true
12689
- *
12690
- * _.gt(3, 3);
12691
- * // => false
12692
- *
12693
- * _.gt(1, 3);
12694
- * // => false
12695
- */
12696
- var gt = createRelationalOperation(baseGt);
12697
-
12698
- /**
12699
- * Checks if `value` is greater than or equal to `other`.
12700
- *
12701
- * @static
12702
- * @memberOf _
12703
- * @since 3.9.0
12704
- * @category Lang
12705
- * @param {*} value The value to compare.
12706
- * @param {*} other The other value to compare.
12707
- * @returns {boolean} Returns `true` if `value` is greater than or equal to
12708
- * `other`, else `false`.
12709
- * @see _.lte
12710
- * @example
12711
- *
12712
- * _.gte(3, 1);
12713
- * // => true
12714
- *
12715
- * _.gte(3, 3);
12716
- * // => true
12717
- *
12718
- * _.gte(1, 3);
12719
- * // => false
12720
- */
12721
- var gte = createRelationalOperation(function(value, other) {
12722
- return value >= other;
12723
- });
12724
-
12725
- /**
12726
- * Checks if `value` is likely an `arguments` object.
12727
- *
12728
- * @static
12729
- * @memberOf _
12730
- * @since 0.1.0
12731
- * @category Lang
12732
- * @param {*} value The value to check.
12733
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
12734
- * else `false`.
12735
- * @example
12736
- *
12737
- * _.isArguments(function() { return arguments; }());
12738
- * // => true
12739
- *
12740
- * _.isArguments([1, 2, 3]);
12741
- * // => false
12742
- */
12743
- var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
12744
- return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
12745
- !propertyIsEnumerable.call(value, 'callee');
12746
- };
12747
-
12748
- /**
12749
- * Checks if `value` is classified as an `Array` object.
12750
- *
12751
- * @static
12752
- * @memberOf _
12753
- * @since 0.1.0
12754
- * @category Lang
12755
- * @param {*} value The value to check.
12756
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
12757
- * @example
12758
- *
12759
- * _.isArray([1, 2, 3]);
12760
- * // => true
12761
- *
12762
- * _.isArray(document.body.children);
12763
- * // => false
12764
- *
12765
- * _.isArray('abc');
12766
- * // => false
12767
- *
12768
- * _.isArray(_.noop);
12769
- * // => false
12770
- */
12771
- var isArray = Array.isArray;
12772
-
12773
- /**
12774
- * Checks if `value` is classified as an `ArrayBuffer` object.
12775
- *
12776
- * @static
12777
- * @memberOf _
12778
- * @since 4.3.0
12779
- * @category Lang
12780
- * @param {*} value The value to check.
12781
- * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
12782
- * @example
12783
- *
12784
- * _.isArrayBuffer(new ArrayBuffer(2));
12785
- * // => true
12786
- *
12787
- * _.isArrayBuffer(new Array(2));
12788
- * // => false
12789
- */
12790
- var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
12791
-
12792
- /**
12793
- * Checks if `value` is array-like. A value is considered array-like if it's
12794
- * not a function and has a `value.length` that's an integer greater than or
12795
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
12796
- *
12797
- * @static
12798
- * @memberOf _
12799
- * @since 4.0.0
12800
- * @category Lang
12801
- * @param {*} value The value to check.
12802
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
12803
- * @example
12804
- *
12805
- * _.isArrayLike([1, 2, 3]);
12806
- * // => true
12807
- *
12808
- * _.isArrayLike(document.body.children);
12809
- * // => true
12810
- *
12811
- * _.isArrayLike('abc');
12812
- * // => true
12813
- *
12814
- * _.isArrayLike(_.noop);
12815
- * // => false
12816
- */
12817
- function isArrayLike(value) {
12818
- return value != null && isLength(value.length) && !isFunction(value);
12819
- }
12820
-
12821
- /**
12822
- * This method is like `_.isArrayLike` except that it also checks if `value`
12823
- * is an object.
12824
- *
12825
- * @static
12826
- * @memberOf _
12827
- * @since 4.0.0
12828
- * @category Lang
12829
- * @param {*} value The value to check.
12830
- * @returns {boolean} Returns `true` if `value` is an array-like object,
12831
- * else `false`.
12832
- * @example
12833
- *
12834
- * _.isArrayLikeObject([1, 2, 3]);
12835
- * // => true
12836
- *
12837
- * _.isArrayLikeObject(document.body.children);
12838
- * // => true
12839
- *
12840
- * _.isArrayLikeObject('abc');
12841
- * // => false
12842
- *
12843
- * _.isArrayLikeObject(_.noop);
12844
- * // => false
12845
- */
12846
- function isArrayLikeObject(value) {
12847
- return isObjectLike(value) && isArrayLike(value);
12848
- }
12849
-
12850
- /**
12851
- * Checks if `value` is classified as a boolean primitive or object.
12852
- *
12853
- * @static
12854
- * @memberOf _
12855
- * @since 0.1.0
12856
- * @category Lang
12857
- * @param {*} value The value to check.
12858
- * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
12859
- * @example
12860
- *
12861
- * _.isBoolean(false);
12862
- * // => true
12863
- *
12864
- * _.isBoolean(null);
12865
- * // => false
12866
- */
12867
- function isBoolean(value) {
12868
- return value === true || value === false ||
12869
- (isObjectLike(value) && baseGetTag(value) == boolTag);
12870
- }
12871
-
12872
- /**
12873
- * Checks if `value` is a buffer.
12874
- *
12875
- * @static
12876
- * @memberOf _
12877
- * @since 4.3.0
12878
- * @category Lang
12879
- * @param {*} value The value to check.
12880
- * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
12881
- * @example
12882
- *
12883
- * _.isBuffer(new Buffer(2));
12884
- * // => true
12885
- *
12886
- * _.isBuffer(new Uint8Array(2));
12887
- * // => false
12888
- */
12889
- var isBuffer = nativeIsBuffer || stubFalse;
12890
-
12891
- /**
12892
- * Checks if `value` is classified as a `Date` object.
12893
- *
12894
- * @static
12895
- * @memberOf _
12896
- * @since 0.1.0
12897
- * @category Lang
12898
- * @param {*} value The value to check.
12899
- * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
12900
- * @example
12901
- *
12902
- * _.isDate(new Date);
12903
- * // => true
12904
- *
12905
- * _.isDate('Mon April 23 2012');
12906
- * // => false
12907
- */
12908
- var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
12909
-
12910
- /**
12911
- * Checks if `value` is likely a DOM element.
12912
- *
12913
- * @static
12914
- * @memberOf _
12915
- * @since 0.1.0
12916
- * @category Lang
12917
- * @param {*} value The value to check.
12918
- * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
12919
- * @example
12920
- *
12921
- * _.isElement(document.body);
12922
- * // => true
12923
- *
12924
- * _.isElement('<body>');
12925
- * // => false
12926
- */
12927
- function isElement(value) {
12928
- return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
12929
- }
12930
-
12931
- /**
12932
- * Checks if `value` is an empty object, collection, map, or set.
12933
- *
12934
- * Objects are considered empty if they have no own enumerable string keyed
12935
- * properties.
12936
- *
12937
- * Array-like values such as `arguments` objects, arrays, buffers, strings, or
12938
- * jQuery-like collections are considered empty if they have a `length` of `0`.
12939
- * Similarly, maps and sets are considered empty if they have a `size` of `0`.
12940
- *
12941
- * @static
12942
- * @memberOf _
12943
- * @since 0.1.0
12944
- * @category Lang
12945
- * @param {*} value The value to check.
12946
- * @returns {boolean} Returns `true` if `value` is empty, else `false`.
12947
- * @example
12948
- *
12949
- * _.isEmpty(null);
12950
- * // => true
12951
- *
12952
- * _.isEmpty(true);
12953
- * // => true
12954
- *
12955
- * _.isEmpty(1);
12956
- * // => true
12957
- *
12958
- * _.isEmpty([1, 2, 3]);
12959
- * // => false
12960
- *
12961
- * _.isEmpty({ 'a': 1 });
12962
- * // => false
12963
- */
12964
- function isEmpty(value) {
12965
- if (value == null) {
12966
- return true;
12967
- }
12968
- if (isArrayLike(value) &&
12969
- (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
12970
- isBuffer(value) || isTypedArray(value) || isArguments(value))) {
12971
- return !value.length;
12972
- }
12973
- var tag = getTag(value);
12974
- if (tag == mapTag || tag == setTag) {
12975
- return !value.size;
12976
- }
12977
- if (isPrototype(value)) {
12978
- return !baseKeys(value).length;
12979
- }
12980
- for (var key in value) {
12981
- if (hasOwnProperty.call(value, key)) {
12982
- return false;
12983
- }
12984
- }
12985
- return true;
12986
- }
12987
-
12988
- /**
12989
- * Performs a deep comparison between two values to determine if they are
12990
- * equivalent.
12991
- *
12992
- * **Note:** This method supports comparing arrays, array buffers, booleans,
12993
- * date objects, error objects, maps, numbers, `Object` objects, regexes,
12994
- * sets, strings, symbols, and typed arrays. `Object` objects are compared
12995
- * by their own, not inherited, enumerable properties. Functions and DOM
12996
- * nodes are compared by strict equality, i.e. `===`.
12997
- *
12998
- * @static
12999
- * @memberOf _
13000
- * @since 0.1.0
13001
- * @category Lang
13002
- * @param {*} value The value to compare.
13003
- * @param {*} other The other value to compare.
13004
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
13005
- * @example
13006
- *
13007
- * var object = { 'a': 1 };
13008
- * var other = { 'a': 1 };
13009
- *
13010
- * _.isEqual(object, other);
13011
- * // => true
13012
- *
13013
- * object === other;
13014
- * // => false
13015
- */
13016
- function isEqual(value, other) {
13017
- return baseIsEqual(value, other);
13018
- }
13019
-
13020
- /**
13021
- * This method is like `_.isEqual` except that it accepts `customizer` which
13022
- * is invoked to compare values. If `customizer` returns `undefined`, comparisons
13023
- * are handled by the method instead. The `customizer` is invoked with up to
13024
- * six arguments: (objValue, othValue [, index|key, object, other, stack]).
13025
- *
13026
- * @static
13027
- * @memberOf _
13028
- * @since 4.0.0
13029
- * @category Lang
13030
- * @param {*} value The value to compare.
13031
- * @param {*} other The other value to compare.
13032
- * @param {Function} [customizer] The function to customize comparisons.
13033
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
13034
- * @example
13035
- *
13036
- * function isGreeting(value) {
13037
- * return /^h(?:i|ello)$/.test(value);
13038
- * }
13039
- *
13040
- * function customizer(objValue, othValue) {
13041
- * if (isGreeting(objValue) && isGreeting(othValue)) {
13042
- * return true;
13043
- * }
13044
- * }
13045
- *
13046
- * var array = ['hello', 'goodbye'];
13047
- * var other = ['hi', 'goodbye'];
13048
- *
13049
- * _.isEqualWith(array, other, customizer);
13050
- * // => true
13051
- */
13052
- function isEqualWith(value, other, customizer) {
13053
- customizer = typeof customizer == 'function' ? customizer : undefined;
13054
- var result = customizer ? customizer(value, other) : undefined;
13055
- return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
13056
- }
13057
-
13058
- /**
13059
- * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
13060
- * `SyntaxError`, `TypeError`, or `URIError` object.
13061
- *
13062
- * @static
13063
- * @memberOf _
13064
- * @since 3.0.0
13065
- * @category Lang
13066
- * @param {*} value The value to check.
13067
- * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
13068
- * @example
13069
- *
13070
- * _.isError(new Error);
13071
- * // => true
13072
- *
13073
- * _.isError(Error);
13074
- * // => false
13075
- */
13076
- function isError(value) {
13077
- if (!isObjectLike(value)) {
13078
- return false;
13079
- }
13080
- var tag = baseGetTag(value);
13081
- return tag == errorTag || tag == domExcTag ||
13082
- (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
13083
- }
13084
-
13085
- /**
13086
- * Checks if `value` is a finite primitive number.
13087
- *
13088
- * **Note:** This method is based on
13089
- * [`Number.isFinite`](https://mdn.io/Number/isFinite).
13090
- *
13091
- * @static
13092
- * @memberOf _
13093
- * @since 0.1.0
13094
- * @category Lang
13095
- * @param {*} value The value to check.
13096
- * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
13097
- * @example
13098
- *
13099
- * _.isFinite(3);
13100
- * // => true
13101
- *
13102
- * _.isFinite(Number.MIN_VALUE);
13103
- * // => true
13104
- *
13105
- * _.isFinite(Infinity);
13106
- * // => false
13107
- *
13108
- * _.isFinite('3');
13109
- * // => false
13110
- */
13111
- function isFinite(value) {
13112
- return typeof value == 'number' && nativeIsFinite(value);
13113
- }
13114
-
13115
- /**
13116
- * Checks if `value` is classified as a `Function` object.
13117
- *
13118
- * @static
13119
- * @memberOf _
13120
- * @since 0.1.0
13121
- * @category Lang
13122
- * @param {*} value The value to check.
13123
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
13124
- * @example
13125
- *
13126
- * _.isFunction(_);
13127
- * // => true
13128
- *
13129
- * _.isFunction(/abc/);
13130
- * // => false
13131
- */
13132
- function isFunction(value) {
13133
- if (!isObject(value)) {
13134
- return false;
13135
- }
13136
- // The use of `Object#toString` avoids issues with the `typeof` operator
13137
- // in Safari 9 which returns 'object' for typed arrays and other constructors.
13138
- var tag = baseGetTag(value);
13139
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
13140
- }
13141
-
13142
- /**
13143
- * Checks if `value` is an integer.
13144
- *
13145
- * **Note:** This method is based on
13146
- * [`Number.isInteger`](https://mdn.io/Number/isInteger).
13147
- *
13148
- * @static
13149
- * @memberOf _
13150
- * @since 4.0.0
13151
- * @category Lang
13152
- * @param {*} value The value to check.
13153
- * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
13154
- * @example
13155
- *
13156
- * _.isInteger(3);
13157
- * // => true
13158
- *
13159
- * _.isInteger(Number.MIN_VALUE);
13160
- * // => false
13161
- *
13162
- * _.isInteger(Infinity);
13163
- * // => false
13164
- *
13165
- * _.isInteger('3');
13166
- * // => false
13167
- */
13168
- function isInteger(value) {
13169
- return typeof value == 'number' && value == toInteger(value);
13170
- }
13171
-
13172
- /**
13173
- * Checks if `value` is a valid array-like length.
13174
- *
13175
- * **Note:** This method is loosely based on
13176
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
13177
- *
13178
- * @static
13179
- * @memberOf _
13180
- * @since 4.0.0
13181
- * @category Lang
13182
- * @param {*} value The value to check.
13183
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
13184
- * @example
13185
- *
13186
- * _.isLength(3);
13187
- * // => true
13188
- *
13189
- * _.isLength(Number.MIN_VALUE);
13190
- * // => false
13191
- *
13192
- * _.isLength(Infinity);
13193
- * // => false
13194
- *
13195
- * _.isLength('3');
13196
- * // => false
13197
- */
13198
- function isLength(value) {
13199
- return typeof value == 'number' &&
13200
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
13201
- }
13202
-
13203
- /**
13204
- * Checks if `value` is the
13205
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
13206
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
13207
- *
13208
- * @static
13209
- * @memberOf _
13210
- * @since 0.1.0
13211
- * @category Lang
13212
- * @param {*} value The value to check.
13213
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
13214
- * @example
13215
- *
13216
- * _.isObject({});
13217
- * // => true
13218
- *
13219
- * _.isObject([1, 2, 3]);
13220
- * // => true
13221
- *
13222
- * _.isObject(_.noop);
13223
- * // => true
13224
- *
13225
- * _.isObject(null);
13226
- * // => false
13227
- */
13228
- function isObject(value) {
13229
- var type = typeof value;
13230
- return value != null && (type == 'object' || type == 'function');
13231
- }
13232
-
13233
- /**
13234
- * Checks if `value` is object-like. A value is object-like if it's not `null`
13235
- * and has a `typeof` result of "object".
13236
- *
13237
- * @static
13238
- * @memberOf _
13239
- * @since 4.0.0
13240
- * @category Lang
13241
- * @param {*} value The value to check.
13242
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
13243
- * @example
13244
- *
13245
- * _.isObjectLike({});
13246
- * // => true
13247
- *
13248
- * _.isObjectLike([1, 2, 3]);
13249
- * // => true
13250
- *
13251
- * _.isObjectLike(_.noop);
13252
- * // => false
13253
- *
13254
- * _.isObjectLike(null);
13255
- * // => false
13256
- */
13257
- function isObjectLike(value) {
13258
- return value != null && typeof value == 'object';
13259
- }
13260
-
13261
- /**
13262
- * Checks if `value` is classified as a `Map` object.
13263
- *
13264
- * @static
13265
- * @memberOf _
13266
- * @since 4.3.0
13267
- * @category Lang
13268
- * @param {*} value The value to check.
13269
- * @returns {boolean} Returns `true` if `value` is a map, else `false`.
13270
- * @example
13271
- *
13272
- * _.isMap(new Map);
13273
- * // => true
13274
- *
13275
- * _.isMap(new WeakMap);
13276
- * // => false
13277
- */
13278
- var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
13279
-
13280
- /**
13281
- * Performs a partial deep comparison between `object` and `source` to
13282
- * determine if `object` contains equivalent property values.
13283
- *
13284
- * **Note:** This method is equivalent to `_.matches` when `source` is
13285
- * partially applied.
13286
- *
13287
- * Partial comparisons will match empty array and empty object `source`
13288
- * values against any array or object value, respectively. See `_.isEqual`
13289
- * for a list of supported value comparisons.
13290
- *
13291
- * @static
13292
- * @memberOf _
13293
- * @since 3.0.0
13294
- * @category Lang
13295
- * @param {Object} object The object to inspect.
13296
- * @param {Object} source The object of property values to match.
13297
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
13298
- * @example
13299
- *
13300
- * var object = { 'a': 1, 'b': 2 };
13301
- *
13302
- * _.isMatch(object, { 'b': 2 });
13303
- * // => true
13304
- *
13305
- * _.isMatch(object, { 'b': 1 });
13306
- * // => false
13307
- */
13308
- function isMatch(object, source) {
13309
- return object === source || baseIsMatch(object, source, getMatchData(source));
13310
- }
13311
-
13312
- /**
13313
- * This method is like `_.isMatch` except that it accepts `customizer` which
13314
- * is invoked to compare values. If `customizer` returns `undefined`, comparisons
13315
- * are handled by the method instead. The `customizer` is invoked with five
13316
- * arguments: (objValue, srcValue, index|key, object, source).
13317
- *
13318
- * @static
13319
- * @memberOf _
13320
- * @since 4.0.0
13321
- * @category Lang
13322
- * @param {Object} object The object to inspect.
13323
- * @param {Object} source The object of property values to match.
13324
- * @param {Function} [customizer] The function to customize comparisons.
13325
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
13326
- * @example
13327
- *
13328
- * function isGreeting(value) {
13329
- * return /^h(?:i|ello)$/.test(value);
13330
- * }
13331
- *
13332
- * function customizer(objValue, srcValue) {
13333
- * if (isGreeting(objValue) && isGreeting(srcValue)) {
13334
- * return true;
13335
- * }
13336
- * }
13337
- *
13338
- * var object = { 'greeting': 'hello' };
13339
- * var source = { 'greeting': 'hi' };
13340
- *
13341
- * _.isMatchWith(object, source, customizer);
13342
- * // => true
13343
- */
13344
- function isMatchWith(object, source, customizer) {
13345
- customizer = typeof customizer == 'function' ? customizer : undefined;
13346
- return baseIsMatch(object, source, getMatchData(source), customizer);
13347
- }
13348
-
13349
- /**
13350
- * Checks if `value` is `NaN`.
13351
- *
13352
- * **Note:** This method is based on
13353
- * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
13354
- * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
13355
- * `undefined` and other non-number values.
13356
- *
13357
- * @static
13358
- * @memberOf _
13359
- * @since 0.1.0
13360
- * @category Lang
13361
- * @param {*} value The value to check.
13362
- * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
13363
- * @example
13364
- *
13365
- * _.isNaN(NaN);
13366
- * // => true
13367
- *
13368
- * _.isNaN(new Number(NaN));
13369
- * // => true
13370
- *
13371
- * isNaN(undefined);
13372
- * // => true
13373
- *
13374
- * _.isNaN(undefined);
13375
- * // => false
13376
- */
13377
- function isNaN(value) {
13378
- // An `NaN` primitive is the only value that is not equal to itself.
13379
- // Perform the `toStringTag` check first to avoid errors with some
13380
- // ActiveX objects in IE.
13381
- return isNumber(value) && value != +value;
13382
- }
13383
-
13384
- /**
13385
- * Checks if `value` is a pristine native function.
13386
- *
13387
- * **Note:** This method can't reliably detect native functions in the presence
13388
- * of the core-js package because core-js circumvents this kind of detection.
13389
- * Despite multiple requests, the core-js maintainer has made it clear: any
13390
- * attempt to fix the detection will be obstructed. As a result, we're left
13391
- * with little choice but to throw an error. Unfortunately, this also affects
13392
- * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
13393
- * which rely on core-js.
13394
- *
13395
- * @static
13396
- * @memberOf _
13397
- * @since 3.0.0
13398
- * @category Lang
13399
- * @param {*} value The value to check.
13400
- * @returns {boolean} Returns `true` if `value` is a native function,
13401
- * else `false`.
13402
- * @example
13403
- *
13404
- * _.isNative(Array.prototype.push);
13405
- * // => true
13406
- *
13407
- * _.isNative(_);
13408
- * // => false
13409
- */
13410
- function isNative(value) {
13411
- if (isMaskable(value)) {
13412
- throw new Error(CORE_ERROR_TEXT);
13413
- }
13414
- return baseIsNative(value);
13415
- }
13416
-
13417
- /**
13418
- * Checks if `value` is `null`.
13419
- *
13420
- * @static
13421
- * @memberOf _
13422
- * @since 0.1.0
13423
- * @category Lang
13424
- * @param {*} value The value to check.
13425
- * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
13426
- * @example
13427
- *
13428
- * _.isNull(null);
13429
- * // => true
13430
- *
13431
- * _.isNull(void 0);
13432
- * // => false
13433
- */
13434
- function isNull(value) {
13435
- return value === null;
13436
- }
13437
-
13438
- /**
13439
- * Checks if `value` is `null` or `undefined`.
13440
- *
13441
- * @static
13442
- * @memberOf _
13443
- * @since 4.0.0
13444
- * @category Lang
13445
- * @param {*} value The value to check.
13446
- * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
13447
- * @example
13448
- *
13449
- * _.isNil(null);
13450
- * // => true
13451
- *
13452
- * _.isNil(void 0);
13453
- * // => true
13454
- *
13455
- * _.isNil(NaN);
13456
- * // => false
13457
- */
13458
- function isNil(value) {
13459
- return value == null;
13460
- }
13461
-
13462
- /**
13463
- * Checks if `value` is classified as a `Number` primitive or object.
13464
- *
13465
- * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
13466
- * classified as numbers, use the `_.isFinite` method.
13467
- *
13468
- * @static
13469
- * @memberOf _
13470
- * @since 0.1.0
13471
- * @category Lang
13472
- * @param {*} value The value to check.
13473
- * @returns {boolean} Returns `true` if `value` is a number, else `false`.
13474
- * @example
13475
- *
13476
- * _.isNumber(3);
13477
- * // => true
13478
- *
13479
- * _.isNumber(Number.MIN_VALUE);
13480
- * // => true
13481
- *
13482
- * _.isNumber(Infinity);
13483
- * // => true
13484
- *
13485
- * _.isNumber('3');
13486
- * // => false
13487
- */
13488
- function isNumber(value) {
13489
- return typeof value == 'number' ||
13490
- (isObjectLike(value) && baseGetTag(value) == numberTag);
13491
- }
13492
-
13493
- /**
13494
- * Checks if `value` is a plain object, that is, an object created by the
13495
- * `Object` constructor or one with a `[[Prototype]]` of `null`.
13496
- *
13497
- * @static
13498
- * @memberOf _
13499
- * @since 0.8.0
13500
- * @category Lang
13501
- * @param {*} value The value to check.
13502
- * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
13503
- * @example
13504
- *
13505
- * function Foo() {
13506
- * this.a = 1;
13507
- * }
13508
- *
13509
- * _.isPlainObject(new Foo);
13510
- * // => false
13511
- *
13512
- * _.isPlainObject([1, 2, 3]);
13513
- * // => false
13514
- *
13515
- * _.isPlainObject({ 'x': 0, 'y': 0 });
13516
- * // => true
13517
- *
13518
- * _.isPlainObject(Object.create(null));
13519
- * // => true
13520
- */
13521
- function isPlainObject(value) {
13522
- if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
13523
- return false;
13524
- }
13525
- var proto = getPrototype(value);
13526
- if (proto === null) {
13527
- return true;
13528
- }
13529
- var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
13530
- return typeof Ctor == 'function' && Ctor instanceof Ctor &&
13531
- funcToString.call(Ctor) == objectCtorString;
13532
- }
13533
-
13534
- /**
13535
- * Checks if `value` is classified as a `RegExp` object.
13536
- *
13537
- * @static
13538
- * @memberOf _
13539
- * @since 0.1.0
13540
- * @category Lang
13541
- * @param {*} value The value to check.
13542
- * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
13543
- * @example
13544
- *
13545
- * _.isRegExp(/abc/);
13546
- * // => true
13547
- *
13548
- * _.isRegExp('/abc/');
13549
- * // => false
13550
- */
13551
- var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
13552
-
13553
- /**
13554
- * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
13555
- * double precision number which isn't the result of a rounded unsafe integer.
13556
- *
13557
- * **Note:** This method is based on
13558
- * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
13559
- *
13560
- * @static
13561
- * @memberOf _
13562
- * @since 4.0.0
13563
- * @category Lang
13564
- * @param {*} value The value to check.
13565
- * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
13566
- * @example
13567
- *
13568
- * _.isSafeInteger(3);
13569
- * // => true
13570
- *
13571
- * _.isSafeInteger(Number.MIN_VALUE);
13572
- * // => false
13573
- *
13574
- * _.isSafeInteger(Infinity);
13575
- * // => false
13576
- *
13577
- * _.isSafeInteger('3');
13578
- * // => false
13579
- */
13580
- function isSafeInteger(value) {
13581
- return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
13582
- }
13583
-
13584
- /**
13585
- * Checks if `value` is classified as a `Set` object.
13586
- *
13587
- * @static
13588
- * @memberOf _
13589
- * @since 4.3.0
13590
- * @category Lang
13591
- * @param {*} value The value to check.
13592
- * @returns {boolean} Returns `true` if `value` is a set, else `false`.
13593
- * @example
13594
- *
13595
- * _.isSet(new Set);
13596
- * // => true
13597
- *
13598
- * _.isSet(new WeakSet);
13599
- * // => false
13600
- */
13601
- var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
13602
-
13603
- /**
13604
- * Checks if `value` is classified as a `String` primitive or object.
13605
- *
13606
- * @static
13607
- * @since 0.1.0
13608
- * @memberOf _
13609
- * @category Lang
13610
- * @param {*} value The value to check.
13611
- * @returns {boolean} Returns `true` if `value` is a string, else `false`.
13612
- * @example
13613
- *
13614
- * _.isString('abc');
13615
- * // => true
13616
- *
13617
- * _.isString(1);
13618
- * // => false
13619
- */
13620
- function isString(value) {
13621
- return typeof value == 'string' ||
13622
- (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
13623
- }
13624
-
13625
- /**
13626
- * Checks if `value` is classified as a `Symbol` primitive or object.
13627
- *
13628
- * @static
13629
- * @memberOf _
13630
- * @since 4.0.0
13631
- * @category Lang
13632
- * @param {*} value The value to check.
13633
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
13634
- * @example
13635
- *
13636
- * _.isSymbol(Symbol.iterator);
13637
- * // => true
13638
- *
13639
- * _.isSymbol('abc');
13640
- * // => false
13641
- */
13642
- function isSymbol(value) {
13643
- return typeof value == 'symbol' ||
13644
- (isObjectLike(value) && baseGetTag(value) == symbolTag);
13645
- }
13646
-
13647
- /**
13648
- * Checks if `value` is classified as a typed array.
13649
- *
13650
- * @static
13651
- * @memberOf _
13652
- * @since 3.0.0
13653
- * @category Lang
13654
- * @param {*} value The value to check.
13655
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
13656
- * @example
13657
- *
13658
- * _.isTypedArray(new Uint8Array);
13659
- * // => true
13660
- *
13661
- * _.isTypedArray([]);
13662
- * // => false
13663
- */
13664
- var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
13665
-
13666
- /**
13667
- * Checks if `value` is `undefined`.
13668
- *
13669
- * @static
13670
- * @since 0.1.0
13671
- * @memberOf _
13672
- * @category Lang
13673
- * @param {*} value The value to check.
13674
- * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
13675
- * @example
13676
- *
13677
- * _.isUndefined(void 0);
13678
- * // => true
13679
- *
13680
- * _.isUndefined(null);
13681
- * // => false
13682
- */
13683
- function isUndefined(value) {
13684
- return value === undefined;
13685
- }
13686
-
13687
- /**
13688
- * Checks if `value` is classified as a `WeakMap` object.
13689
- *
13690
- * @static
13691
- * @memberOf _
13692
- * @since 4.3.0
13693
- * @category Lang
13694
- * @param {*} value The value to check.
13695
- * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
13696
- * @example
13697
- *
13698
- * _.isWeakMap(new WeakMap);
13699
- * // => true
13700
- *
13701
- * _.isWeakMap(new Map);
13702
- * // => false
13703
- */
13704
- function isWeakMap(value) {
13705
- return isObjectLike(value) && getTag(value) == weakMapTag;
13706
- }
13707
-
13708
- /**
13709
- * Checks if `value` is classified as a `WeakSet` object.
13710
- *
13711
- * @static
13712
- * @memberOf _
13713
- * @since 4.3.0
13714
- * @category Lang
13715
- * @param {*} value The value to check.
13716
- * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
13717
- * @example
13718
- *
13719
- * _.isWeakSet(new WeakSet);
13720
- * // => true
13721
- *
13722
- * _.isWeakSet(new Set);
13723
- * // => false
13724
- */
13725
- function isWeakSet(value) {
13726
- return isObjectLike(value) && baseGetTag(value) == weakSetTag;
13727
- }
13728
-
13729
- /**
13730
- * Checks if `value` is less than `other`.
13731
- *
13732
- * @static
13733
- * @memberOf _
13734
- * @since 3.9.0
13735
- * @category Lang
13736
- * @param {*} value The value to compare.
13737
- * @param {*} other The other value to compare.
13738
- * @returns {boolean} Returns `true` if `value` is less than `other`,
13739
- * else `false`.
13740
- * @see _.gt
13741
- * @example
13742
- *
13743
- * _.lt(1, 3);
13744
- * // => true
13745
- *
13746
- * _.lt(3, 3);
13747
- * // => false
13748
- *
13749
- * _.lt(3, 1);
13750
- * // => false
13751
- */
13752
- var lt = createRelationalOperation(baseLt);
13753
-
13754
- /**
13755
- * Checks if `value` is less than or equal to `other`.
13756
- *
13757
- * @static
13758
- * @memberOf _
13759
- * @since 3.9.0
13760
- * @category Lang
13761
- * @param {*} value The value to compare.
13762
- * @param {*} other The other value to compare.
13763
- * @returns {boolean} Returns `true` if `value` is less than or equal to
13764
- * `other`, else `false`.
13765
- * @see _.gte
13766
- * @example
13767
- *
13768
- * _.lte(1, 3);
13769
- * // => true
13770
- *
13771
- * _.lte(3, 3);
13772
- * // => true
13773
- *
13774
- * _.lte(3, 1);
13775
- * // => false
13776
- */
13777
- var lte = createRelationalOperation(function(value, other) {
13778
- return value <= other;
13779
- });
13780
-
13781
- /**
13782
- * Converts `value` to an array.
13783
- *
13784
- * @static
13785
- * @since 0.1.0
13786
- * @memberOf _
13787
- * @category Lang
13788
- * @param {*} value The value to convert.
13789
- * @returns {Array} Returns the converted array.
13790
- * @example
13791
- *
13792
- * _.toArray({ 'a': 1, 'b': 2 });
13793
- * // => [1, 2]
13794
- *
13795
- * _.toArray('abc');
13796
- * // => ['a', 'b', 'c']
13797
- *
13798
- * _.toArray(1);
13799
- * // => []
13800
- *
13801
- * _.toArray(null);
13802
- * // => []
13803
- */
13804
- function toArray(value) {
13805
- if (!value) {
13806
- return [];
13807
- }
13808
- if (isArrayLike(value)) {
13809
- return isString(value) ? stringToArray(value) : copyArray(value);
13810
- }
13811
- if (symIterator && value[symIterator]) {
13812
- return iteratorToArray(value[symIterator]());
13813
- }
13814
- var tag = getTag(value),
13815
- func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
13816
-
13817
- return func(value);
13818
- }
13819
-
13820
- /**
13821
- * Converts `value` to a finite number.
13822
- *
13823
- * @static
13824
- * @memberOf _
13825
- * @since 4.12.0
13826
- * @category Lang
13827
- * @param {*} value The value to convert.
13828
- * @returns {number} Returns the converted number.
13829
- * @example
13830
- *
13831
- * _.toFinite(3.2);
13832
- * // => 3.2
13833
- *
13834
- * _.toFinite(Number.MIN_VALUE);
13835
- * // => 5e-324
13836
- *
13837
- * _.toFinite(Infinity);
13838
- * // => 1.7976931348623157e+308
13839
- *
13840
- * _.toFinite('3.2');
13841
- * // => 3.2
13842
- */
13843
- function toFinite(value) {
13844
- if (!value) {
13845
- return value === 0 ? value : 0;
13846
- }
13847
- value = toNumber(value);
13848
- if (value === INFINITY || value === -INFINITY) {
13849
- var sign = (value < 0 ? -1 : 1);
13850
- return sign * MAX_INTEGER;
13851
- }
13852
- return value === value ? value : 0;
13853
- }
13854
-
13855
- /**
13856
- * Converts `value` to an integer.
13857
- *
13858
- * **Note:** This method is loosely based on
13859
- * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
13860
- *
13861
- * @static
13862
- * @memberOf _
13863
- * @since 4.0.0
13864
- * @category Lang
13865
- * @param {*} value The value to convert.
13866
- * @returns {number} Returns the converted integer.
13867
- * @example
13868
- *
13869
- * _.toInteger(3.2);
13870
- * // => 3
13871
- *
13872
- * _.toInteger(Number.MIN_VALUE);
13873
- * // => 0
13874
- *
13875
- * _.toInteger(Infinity);
13876
- * // => 1.7976931348623157e+308
13877
- *
13878
- * _.toInteger('3.2');
13879
- * // => 3
13880
- */
13881
- function toInteger(value) {
13882
- var result = toFinite(value),
13883
- remainder = result % 1;
13884
-
13885
- return result === result ? (remainder ? result - remainder : result) : 0;
13886
- }
13887
-
13888
- /**
13889
- * Converts `value` to an integer suitable for use as the length of an
13890
- * array-like object.
13891
- *
13892
- * **Note:** This method is based on
13893
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
13894
- *
13895
- * @static
13896
- * @memberOf _
13897
- * @since 4.0.0
13898
- * @category Lang
13899
- * @param {*} value The value to convert.
13900
- * @returns {number} Returns the converted integer.
13901
- * @example
13902
- *
13903
- * _.toLength(3.2);
13904
- * // => 3
13905
- *
13906
- * _.toLength(Number.MIN_VALUE);
13907
- * // => 0
13908
- *
13909
- * _.toLength(Infinity);
13910
- * // => 4294967295
13911
- *
13912
- * _.toLength('3.2');
13913
- * // => 3
13914
- */
13915
- function toLength(value) {
13916
- return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
13917
- }
13918
-
13919
- /**
13920
- * Converts `value` to a number.
13921
- *
13922
- * @static
13923
- * @memberOf _
13924
- * @since 4.0.0
13925
- * @category Lang
13926
- * @param {*} value The value to process.
13927
- * @returns {number} Returns the number.
13928
- * @example
13929
- *
13930
- * _.toNumber(3.2);
13931
- * // => 3.2
13932
- *
13933
- * _.toNumber(Number.MIN_VALUE);
13934
- * // => 5e-324
13935
- *
13936
- * _.toNumber(Infinity);
13937
- * // => Infinity
13938
- *
13939
- * _.toNumber('3.2');
13940
- * // => 3.2
13941
- */
13942
- function toNumber(value) {
13943
- if (typeof value == 'number') {
13944
- return value;
13945
- }
13946
- if (isSymbol(value)) {
13947
- return NAN;
13948
- }
13949
- if (isObject(value)) {
13950
- var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
13951
- value = isObject(other) ? (other + '') : other;
13952
- }
13953
- if (typeof value != 'string') {
13954
- return value === 0 ? value : +value;
13955
- }
13956
- value = value.replace(reTrim, '');
13957
- var isBinary = reIsBinary.test(value);
13958
- return (isBinary || reIsOctal.test(value))
13959
- ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
13960
- : (reIsBadHex.test(value) ? NAN : +value);
13961
- }
13962
-
13963
- /**
13964
- * Converts `value` to a plain object flattening inherited enumerable string
13965
- * keyed properties of `value` to own properties of the plain object.
13966
- *
13967
- * @static
13968
- * @memberOf _
13969
- * @since 3.0.0
13970
- * @category Lang
13971
- * @param {*} value The value to convert.
13972
- * @returns {Object} Returns the converted plain object.
13973
- * @example
13974
- *
13975
- * function Foo() {
13976
- * this.b = 2;
13977
- * }
13978
- *
13979
- * Foo.prototype.c = 3;
13980
- *
13981
- * _.assign({ 'a': 1 }, new Foo);
13982
- * // => { 'a': 1, 'b': 2 }
13983
- *
13984
- * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
13985
- * // => { 'a': 1, 'b': 2, 'c': 3 }
13986
- */
13987
- function toPlainObject(value) {
13988
- return copyObject(value, keysIn(value));
13989
- }
13990
-
13991
- /**
13992
- * Converts `value` to a safe integer. A safe integer can be compared and
13993
- * represented correctly.
13994
- *
13995
- * @static
13996
- * @memberOf _
13997
- * @since 4.0.0
13998
- * @category Lang
13999
- * @param {*} value The value to convert.
14000
- * @returns {number} Returns the converted integer.
14001
- * @example
14002
- *
14003
- * _.toSafeInteger(3.2);
14004
- * // => 3
14005
- *
14006
- * _.toSafeInteger(Number.MIN_VALUE);
14007
- * // => 0
14008
- *
14009
- * _.toSafeInteger(Infinity);
14010
- * // => 9007199254740991
14011
- *
14012
- * _.toSafeInteger('3.2');
14013
- * // => 3
14014
- */
14015
- function toSafeInteger(value) {
14016
- return value
14017
- ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
14018
- : (value === 0 ? value : 0);
14019
- }
14020
-
14021
- /**
14022
- * Converts `value` to a string. An empty string is returned for `null`
14023
- * and `undefined` values. The sign of `-0` is preserved.
14024
- *
14025
- * @static
14026
- * @memberOf _
14027
- * @since 4.0.0
14028
- * @category Lang
14029
- * @param {*} value The value to convert.
14030
- * @returns {string} Returns the converted string.
14031
- * @example
14032
- *
14033
- * _.toString(null);
14034
- * // => ''
14035
- *
14036
- * _.toString(-0);
14037
- * // => '-0'
14038
- *
14039
- * _.toString([1, 2, 3]);
14040
- * // => '1,2,3'
14041
- */
14042
- function toString(value) {
14043
- return value == null ? '' : baseToString(value);
14044
- }
14045
-
14046
- /*------------------------------------------------------------------------*/
14047
-
14048
- /**
14049
- * Assigns own enumerable string keyed properties of source objects to the
14050
- * destination object. Source objects are applied from left to right.
14051
- * Subsequent sources overwrite property assignments of previous sources.
14052
- *
14053
- * **Note:** This method mutates `object` and is loosely based on
14054
- * [`Object.assign`](https://mdn.io/Object/assign).
14055
- *
14056
- * @static
14057
- * @memberOf _
14058
- * @since 0.10.0
14059
- * @category Object
14060
- * @param {Object} object The destination object.
14061
- * @param {...Object} [sources] The source objects.
14062
- * @returns {Object} Returns `object`.
14063
- * @see _.assignIn
14064
- * @example
14065
- *
14066
- * function Foo() {
14067
- * this.a = 1;
14068
- * }
14069
- *
14070
- * function Bar() {
14071
- * this.c = 3;
14072
- * }
14073
- *
14074
- * Foo.prototype.b = 2;
14075
- * Bar.prototype.d = 4;
14076
- *
14077
- * _.assign({ 'a': 0 }, new Foo, new Bar);
14078
- * // => { 'a': 1, 'c': 3 }
14079
- */
14080
- var assign = createAssigner(function(object, source) {
14081
- if (isPrototype(source) || isArrayLike(source)) {
14082
- copyObject(source, keys(source), object);
14083
- return;
14084
- }
14085
- for (var key in source) {
14086
- if (hasOwnProperty.call(source, key)) {
14087
- assignValue(object, key, source[key]);
14088
- }
14089
- }
14090
- });
14091
-
14092
- /**
14093
- * This method is like `_.assign` except that it iterates over own and
14094
- * inherited source properties.
14095
- *
14096
- * **Note:** This method mutates `object`.
14097
- *
14098
- * @static
14099
- * @memberOf _
14100
- * @since 4.0.0
14101
- * @alias extend
14102
- * @category Object
14103
- * @param {Object} object The destination object.
14104
- * @param {...Object} [sources] The source objects.
14105
- * @returns {Object} Returns `object`.
14106
- * @see _.assign
14107
- * @example
14108
- *
14109
- * function Foo() {
14110
- * this.a = 1;
14111
- * }
14112
- *
14113
- * function Bar() {
14114
- * this.c = 3;
14115
- * }
14116
- *
14117
- * Foo.prototype.b = 2;
14118
- * Bar.prototype.d = 4;
14119
- *
14120
- * _.assignIn({ 'a': 0 }, new Foo, new Bar);
14121
- * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
14122
- */
14123
- var assignIn = createAssigner(function(object, source) {
14124
- copyObject(source, keysIn(source), object);
14125
- });
14126
-
14127
- /**
14128
- * This method is like `_.assignIn` except that it accepts `customizer`
14129
- * which is invoked to produce the assigned values. If `customizer` returns
14130
- * `undefined`, assignment is handled by the method instead. The `customizer`
14131
- * is invoked with five arguments: (objValue, srcValue, key, object, source).
14132
- *
14133
- * **Note:** This method mutates `object`.
14134
- *
14135
- * @static
14136
- * @memberOf _
14137
- * @since 4.0.0
14138
- * @alias extendWith
14139
- * @category Object
14140
- * @param {Object} object The destination object.
14141
- * @param {...Object} sources The source objects.
14142
- * @param {Function} [customizer] The function to customize assigned values.
14143
- * @returns {Object} Returns `object`.
14144
- * @see _.assignWith
14145
- * @example
14146
- *
14147
- * function customizer(objValue, srcValue) {
14148
- * return _.isUndefined(objValue) ? srcValue : objValue;
14149
- * }
14150
- *
14151
- * var defaults = _.partialRight(_.assignInWith, customizer);
14152
- *
14153
- * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
14154
- * // => { 'a': 1, 'b': 2 }
14155
- */
14156
- var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
14157
- copyObject(source, keysIn(source), object, customizer);
14158
- });
14159
-
14160
- /**
14161
- * This method is like `_.assign` except that it accepts `customizer`
14162
- * which is invoked to produce the assigned values. If `customizer` returns
14163
- * `undefined`, assignment is handled by the method instead. The `customizer`
14164
- * is invoked with five arguments: (objValue, srcValue, key, object, source).
14165
- *
14166
- * **Note:** This method mutates `object`.
14167
- *
14168
- * @static
14169
- * @memberOf _
14170
- * @since 4.0.0
14171
- * @category Object
14172
- * @param {Object} object The destination object.
14173
- * @param {...Object} sources The source objects.
14174
- * @param {Function} [customizer] The function to customize assigned values.
14175
- * @returns {Object} Returns `object`.
14176
- * @see _.assignInWith
14177
- * @example
14178
- *
14179
- * function customizer(objValue, srcValue) {
14180
- * return _.isUndefined(objValue) ? srcValue : objValue;
14181
- * }
14182
- *
14183
- * var defaults = _.partialRight(_.assignWith, customizer);
14184
- *
14185
- * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
14186
- * // => { 'a': 1, 'b': 2 }
14187
- */
14188
- var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
14189
- copyObject(source, keys(source), object, customizer);
14190
- });
14191
-
14192
- /**
14193
- * Creates an array of values corresponding to `paths` of `object`.
14194
- *
14195
- * @static
14196
- * @memberOf _
14197
- * @since 1.0.0
14198
- * @category Object
14199
- * @param {Object} object The object to iterate over.
14200
- * @param {...(string|string[])} [paths] The property paths to pick.
14201
- * @returns {Array} Returns the picked values.
14202
- * @example
14203
- *
14204
- * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
14205
- *
14206
- * _.at(object, ['a[0].b.c', 'a[1]']);
14207
- * // => [3, 4]
14208
- */
14209
- var at = flatRest(baseAt);
14210
-
14211
- /**
14212
- * Creates an object that inherits from the `prototype` object. If a
14213
- * `properties` object is given, its own enumerable string keyed properties
14214
- * are assigned to the created object.
14215
- *
14216
- * @static
14217
- * @memberOf _
14218
- * @since 2.3.0
14219
- * @category Object
14220
- * @param {Object} prototype The object to inherit from.
14221
- * @param {Object} [properties] The properties to assign to the object.
14222
- * @returns {Object} Returns the new object.
14223
- * @example
14224
- *
14225
- * function Shape() {
14226
- * this.x = 0;
14227
- * this.y = 0;
14228
- * }
14229
- *
14230
- * function Circle() {
14231
- * Shape.call(this);
14232
- * }
14233
- *
14234
- * Circle.prototype = _.create(Shape.prototype, {
14235
- * 'constructor': Circle
14236
- * });
14237
- *
14238
- * var circle = new Circle;
14239
- * circle instanceof Circle;
14240
- * // => true
14241
- *
14242
- * circle instanceof Shape;
14243
- * // => true
14244
- */
14245
- function create(prototype, properties) {
14246
- var result = baseCreate(prototype);
14247
- return properties == null ? result : baseAssign(result, properties);
14248
- }
14249
-
14250
- /**
14251
- * Assigns own and inherited enumerable string keyed properties of source
14252
- * objects to the destination object for all destination properties that
14253
- * resolve to `undefined`. Source objects are applied from left to right.
14254
- * Once a property is set, additional values of the same property are ignored.
14255
- *
14256
- * **Note:** This method mutates `object`.
14257
- *
14258
- * @static
14259
- * @since 0.1.0
14260
- * @memberOf _
14261
- * @category Object
14262
- * @param {Object} object The destination object.
14263
- * @param {...Object} [sources] The source objects.
14264
- * @returns {Object} Returns `object`.
14265
- * @see _.defaultsDeep
14266
- * @example
14267
- *
14268
- * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
14269
- * // => { 'a': 1, 'b': 2 }
14270
- */
14271
- var defaults = baseRest(function(object, sources) {
14272
- object = Object(object);
14273
-
14274
- var index = -1;
14275
- var length = sources.length;
14276
- var guard = length > 2 ? sources[2] : undefined;
14277
-
14278
- if (guard && isIterateeCall(sources[0], sources[1], guard)) {
14279
- length = 1;
14280
- }
14281
-
14282
- while (++index < length) {
14283
- var source = sources[index];
14284
- var props = keysIn(source);
14285
- var propsIndex = -1;
14286
- var propsLength = props.length;
14287
-
14288
- while (++propsIndex < propsLength) {
14289
- var key = props[propsIndex];
14290
- var value = object[key];
14291
-
14292
- if (value === undefined ||
14293
- (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
14294
- object[key] = source[key];
14295
- }
14296
- }
14297
- }
14298
-
14299
- return object;
14300
- });
14301
-
14302
- /**
14303
- * This method is like `_.defaults` except that it recursively assigns
14304
- * default properties.
14305
- *
14306
- * **Note:** This method mutates `object`.
14307
- *
14308
- * @static
14309
- * @memberOf _
14310
- * @since 3.10.0
14311
- * @category Object
14312
- * @param {Object} object The destination object.
14313
- * @param {...Object} [sources] The source objects.
14314
- * @returns {Object} Returns `object`.
14315
- * @see _.defaults
14316
- * @example
14317
- *
14318
- * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
14319
- * // => { 'a': { 'b': 2, 'c': 3 } }
14320
- */
14321
- var defaultsDeep = baseRest(function(args) {
14322
- args.push(undefined, customDefaultsMerge);
14323
- return apply(mergeWith, undefined, args);
14324
- });
14325
-
14326
- /**
14327
- * This method is like `_.find` except that it returns the key of the first
14328
- * element `predicate` returns truthy for instead of the element itself.
14329
- *
14330
- * @static
14331
- * @memberOf _
14332
- * @since 1.1.0
14333
- * @category Object
14334
- * @param {Object} object The object to inspect.
14335
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
14336
- * @returns {string|undefined} Returns the key of the matched element,
14337
- * else `undefined`.
14338
- * @example
14339
- *
14340
- * var users = {
14341
- * 'barney': { 'age': 36, 'active': true },
14342
- * 'fred': { 'age': 40, 'active': false },
14343
- * 'pebbles': { 'age': 1, 'active': true }
14344
- * };
14345
- *
14346
- * _.findKey(users, function(o) { return o.age < 40; });
14347
- * // => 'barney' (iteration order is not guaranteed)
14348
- *
14349
- * // The `_.matches` iteratee shorthand.
14350
- * _.findKey(users, { 'age': 1, 'active': true });
14351
- * // => 'pebbles'
14352
- *
14353
- * // The `_.matchesProperty` iteratee shorthand.
14354
- * _.findKey(users, ['active', false]);
14355
- * // => 'fred'
14356
- *
14357
- * // The `_.property` iteratee shorthand.
14358
- * _.findKey(users, 'active');
14359
- * // => 'barney'
14360
- */
14361
- function findKey(object, predicate) {
14362
- return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
14363
- }
14364
-
14365
- /**
14366
- * This method is like `_.findKey` except that it iterates over elements of
14367
- * a collection in the opposite order.
14368
- *
14369
- * @static
14370
- * @memberOf _
14371
- * @since 2.0.0
14372
- * @category Object
14373
- * @param {Object} object The object to inspect.
14374
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
14375
- * @returns {string|undefined} Returns the key of the matched element,
14376
- * else `undefined`.
14377
- * @example
14378
- *
14379
- * var users = {
14380
- * 'barney': { 'age': 36, 'active': true },
14381
- * 'fred': { 'age': 40, 'active': false },
14382
- * 'pebbles': { 'age': 1, 'active': true }
14383
- * };
14384
- *
14385
- * _.findLastKey(users, function(o) { return o.age < 40; });
14386
- * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
14387
- *
14388
- * // The `_.matches` iteratee shorthand.
14389
- * _.findLastKey(users, { 'age': 36, 'active': true });
14390
- * // => 'barney'
14391
- *
14392
- * // The `_.matchesProperty` iteratee shorthand.
14393
- * _.findLastKey(users, ['active', false]);
14394
- * // => 'fred'
14395
- *
14396
- * // The `_.property` iteratee shorthand.
14397
- * _.findLastKey(users, 'active');
14398
- * // => 'pebbles'
14399
- */
14400
- function findLastKey(object, predicate) {
14401
- return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
14402
- }
14403
-
14404
- /**
14405
- * Iterates over own and inherited enumerable string keyed properties of an
14406
- * object and invokes `iteratee` for each property. The iteratee is invoked
14407
- * with three arguments: (value, key, object). Iteratee functions may exit
14408
- * iteration early by explicitly returning `false`.
14409
- *
14410
- * @static
14411
- * @memberOf _
14412
- * @since 0.3.0
14413
- * @category Object
14414
- * @param {Object} object The object to iterate over.
14415
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
14416
- * @returns {Object} Returns `object`.
14417
- * @see _.forInRight
14418
- * @example
14419
- *
14420
- * function Foo() {
14421
- * this.a = 1;
14422
- * this.b = 2;
14423
- * }
14424
- *
14425
- * Foo.prototype.c = 3;
14426
- *
14427
- * _.forIn(new Foo, function(value, key) {
14428
- * console.log(key);
14429
- * });
14430
- * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
14431
- */
14432
- function forIn(object, iteratee) {
14433
- return object == null
14434
- ? object
14435
- : baseFor(object, getIteratee(iteratee, 3), keysIn);
14436
- }
14437
-
14438
- /**
14439
- * This method is like `_.forIn` except that it iterates over properties of
14440
- * `object` in the opposite order.
14441
- *
14442
- * @static
14443
- * @memberOf _
14444
- * @since 2.0.0
14445
- * @category Object
14446
- * @param {Object} object The object to iterate over.
14447
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
14448
- * @returns {Object} Returns `object`.
14449
- * @see _.forIn
14450
- * @example
14451
- *
14452
- * function Foo() {
14453
- * this.a = 1;
14454
- * this.b = 2;
14455
- * }
14456
- *
14457
- * Foo.prototype.c = 3;
14458
- *
14459
- * _.forInRight(new Foo, function(value, key) {
14460
- * console.log(key);
14461
- * });
14462
- * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
14463
- */
14464
- function forInRight(object, iteratee) {
14465
- return object == null
14466
- ? object
14467
- : baseForRight(object, getIteratee(iteratee, 3), keysIn);
14468
- }
14469
-
14470
- /**
14471
- * Iterates over own enumerable string keyed properties of an object and
14472
- * invokes `iteratee` for each property. The iteratee is invoked with three
14473
- * arguments: (value, key, object). Iteratee functions may exit iteration
14474
- * early by explicitly returning `false`.
14475
- *
14476
- * @static
14477
- * @memberOf _
14478
- * @since 0.3.0
14479
- * @category Object
14480
- * @param {Object} object The object to iterate over.
14481
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
14482
- * @returns {Object} Returns `object`.
14483
- * @see _.forOwnRight
14484
- * @example
14485
- *
14486
- * function Foo() {
14487
- * this.a = 1;
14488
- * this.b = 2;
14489
- * }
14490
- *
14491
- * Foo.prototype.c = 3;
14492
- *
14493
- * _.forOwn(new Foo, function(value, key) {
14494
- * console.log(key);
14495
- * });
14496
- * // => Logs 'a' then 'b' (iteration order is not guaranteed).
14497
- */
14498
- function forOwn(object, iteratee) {
14499
- return object && baseForOwn(object, getIteratee(iteratee, 3));
14500
- }
14501
-
14502
- /**
14503
- * This method is like `_.forOwn` except that it iterates over properties of
14504
- * `object` in the opposite order.
14505
- *
14506
- * @static
14507
- * @memberOf _
14508
- * @since 2.0.0
14509
- * @category Object
14510
- * @param {Object} object The object to iterate over.
14511
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
14512
- * @returns {Object} Returns `object`.
14513
- * @see _.forOwn
14514
- * @example
14515
- *
14516
- * function Foo() {
14517
- * this.a = 1;
14518
- * this.b = 2;
14519
- * }
14520
- *
14521
- * Foo.prototype.c = 3;
14522
- *
14523
- * _.forOwnRight(new Foo, function(value, key) {
14524
- * console.log(key);
14525
- * });
14526
- * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
14527
- */
14528
- function forOwnRight(object, iteratee) {
14529
- return object && baseForOwnRight(object, getIteratee(iteratee, 3));
14530
- }
14531
-
14532
- /**
14533
- * Creates an array of function property names from own enumerable properties
14534
- * of `object`.
14535
- *
14536
- * @static
14537
- * @since 0.1.0
14538
- * @memberOf _
14539
- * @category Object
14540
- * @param {Object} object The object to inspect.
14541
- * @returns {Array} Returns the function names.
14542
- * @see _.functionsIn
14543
- * @example
14544
- *
14545
- * function Foo() {
14546
- * this.a = _.constant('a');
14547
- * this.b = _.constant('b');
14548
- * }
14549
- *
14550
- * Foo.prototype.c = _.constant('c');
14551
- *
14552
- * _.functions(new Foo);
14553
- * // => ['a', 'b']
14554
- */
14555
- function functions(object) {
14556
- return object == null ? [] : baseFunctions(object, keys(object));
14557
- }
14558
-
14559
- /**
14560
- * Creates an array of function property names from own and inherited
14561
- * enumerable properties of `object`.
14562
- *
14563
- * @static
14564
- * @memberOf _
14565
- * @since 4.0.0
14566
- * @category Object
14567
- * @param {Object} object The object to inspect.
14568
- * @returns {Array} Returns the function names.
14569
- * @see _.functions
14570
- * @example
14571
- *
14572
- * function Foo() {
14573
- * this.a = _.constant('a');
14574
- * this.b = _.constant('b');
14575
- * }
14576
- *
14577
- * Foo.prototype.c = _.constant('c');
14578
- *
14579
- * _.functionsIn(new Foo);
14580
- * // => ['a', 'b', 'c']
14581
- */
14582
- function functionsIn(object) {
14583
- return object == null ? [] : baseFunctions(object, keysIn(object));
14584
- }
14585
-
14586
- /**
14587
- * Gets the value at `path` of `object`. If the resolved value is
14588
- * `undefined`, the `defaultValue` is returned in its place.
14589
- *
14590
- * @static
14591
- * @memberOf _
14592
- * @since 3.7.0
14593
- * @category Object
14594
- * @param {Object} object The object to query.
14595
- * @param {Array|string} path The path of the property to get.
14596
- * @param {*} [defaultValue] The value returned for `undefined` resolved values.
14597
- * @returns {*} Returns the resolved value.
14598
- * @example
14599
- *
14600
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
14601
- *
14602
- * _.get(object, 'a[0].b.c');
14603
- * // => 3
14604
- *
14605
- * _.get(object, ['a', '0', 'b', 'c']);
14606
- * // => 3
14607
- *
14608
- * _.get(object, 'a.b.c', 'default');
14609
- * // => 'default'
14610
- */
14611
- function get(object, path, defaultValue) {
14612
- var result = object == null ? undefined : baseGet(object, path);
14613
- return result === undefined ? defaultValue : result;
14614
- }
14615
-
14616
- /**
14617
- * Checks if `path` is a direct property of `object`.
14618
- *
14619
- * @static
14620
- * @since 0.1.0
14621
- * @memberOf _
14622
- * @category Object
14623
- * @param {Object} object The object to query.
14624
- * @param {Array|string} path The path to check.
14625
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
14626
- * @example
14627
- *
14628
- * var object = { 'a': { 'b': 2 } };
14629
- * var other = _.create({ 'a': _.create({ 'b': 2 }) });
14630
- *
14631
- * _.has(object, 'a');
14632
- * // => true
14633
- *
14634
- * _.has(object, 'a.b');
14635
- * // => true
14636
- *
14637
- * _.has(object, ['a', 'b']);
14638
- * // => true
14639
- *
14640
- * _.has(other, 'a');
14641
- * // => false
14642
- */
14643
- function has(object, path) {
14644
- return object != null && hasPath(object, path, baseHas);
14645
- }
14646
-
14647
- /**
14648
- * Checks if `path` is a direct or inherited property of `object`.
14649
- *
14650
- * @static
14651
- * @memberOf _
14652
- * @since 4.0.0
14653
- * @category Object
14654
- * @param {Object} object The object to query.
14655
- * @param {Array|string} path The path to check.
14656
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
14657
- * @example
14658
- *
14659
- * var object = _.create({ 'a': _.create({ 'b': 2 }) });
14660
- *
14661
- * _.hasIn(object, 'a');
14662
- * // => true
14663
- *
14664
- * _.hasIn(object, 'a.b');
14665
- * // => true
14666
- *
14667
- * _.hasIn(object, ['a', 'b']);
14668
- * // => true
14669
- *
14670
- * _.hasIn(object, 'b');
14671
- * // => false
14672
- */
14673
- function hasIn(object, path) {
14674
- return object != null && hasPath(object, path, baseHasIn);
14675
- }
14676
-
14677
- /**
14678
- * Creates an object composed of the inverted keys and values of `object`.
14679
- * If `object` contains duplicate values, subsequent values overwrite
14680
- * property assignments of previous values.
14681
- *
14682
- * @static
14683
- * @memberOf _
14684
- * @since 0.7.0
14685
- * @category Object
14686
- * @param {Object} object The object to invert.
14687
- * @returns {Object} Returns the new inverted object.
14688
- * @example
14689
- *
14690
- * var object = { 'a': 1, 'b': 2, 'c': 1 };
14691
- *
14692
- * _.invert(object);
14693
- * // => { '1': 'c', '2': 'b' }
14694
- */
14695
- var invert = createInverter(function(result, value, key) {
14696
- if (value != null &&
14697
- typeof value.toString != 'function') {
14698
- value = nativeObjectToString.call(value);
14699
- }
14700
-
14701
- result[value] = key;
14702
- }, constant(identity));
14703
-
14704
- /**
14705
- * This method is like `_.invert` except that the inverted object is generated
14706
- * from the results of running each element of `object` thru `iteratee`. The
14707
- * corresponding inverted value of each inverted key is an array of keys
14708
- * responsible for generating the inverted value. The iteratee is invoked
14709
- * with one argument: (value).
14710
- *
14711
- * @static
14712
- * @memberOf _
14713
- * @since 4.1.0
14714
- * @category Object
14715
- * @param {Object} object The object to invert.
14716
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
14717
- * @returns {Object} Returns the new inverted object.
14718
- * @example
14719
- *
14720
- * var object = { 'a': 1, 'b': 2, 'c': 1 };
14721
- *
14722
- * _.invertBy(object);
14723
- * // => { '1': ['a', 'c'], '2': ['b'] }
14724
- *
14725
- * _.invertBy(object, function(value) {
14726
- * return 'group' + value;
14727
- * });
14728
- * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
14729
- */
14730
- var invertBy = createInverter(function(result, value, key) {
14731
- if (value != null &&
14732
- typeof value.toString != 'function') {
14733
- value = nativeObjectToString.call(value);
14734
- }
14735
-
14736
- if (hasOwnProperty.call(result, value)) {
14737
- result[value].push(key);
14738
- } else {
14739
- result[value] = [key];
14740
- }
14741
- }, getIteratee);
14742
-
14743
- /**
14744
- * Invokes the method at `path` of `object`.
14745
- *
14746
- * @static
14747
- * @memberOf _
14748
- * @since 4.0.0
14749
- * @category Object
14750
- * @param {Object} object The object to query.
14751
- * @param {Array|string} path The path of the method to invoke.
14752
- * @param {...*} [args] The arguments to invoke the method with.
14753
- * @returns {*} Returns the result of the invoked method.
14754
- * @example
14755
- *
14756
- * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
14757
- *
14758
- * _.invoke(object, 'a[0].b.c.slice', 1, 3);
14759
- * // => [2, 3]
14760
- */
14761
- var invoke = baseRest(baseInvoke);
14762
-
14763
- /**
14764
- * Creates an array of the own enumerable property names of `object`.
14765
- *
14766
- * **Note:** Non-object values are coerced to objects. See the
14767
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
14768
- * for more details.
14769
- *
14770
- * @static
14771
- * @since 0.1.0
14772
- * @memberOf _
14773
- * @category Object
14774
- * @param {Object} object The object to query.
14775
- * @returns {Array} Returns the array of property names.
14776
- * @example
14777
- *
14778
- * function Foo() {
14779
- * this.a = 1;
14780
- * this.b = 2;
14781
- * }
14782
- *
14783
- * Foo.prototype.c = 3;
14784
- *
14785
- * _.keys(new Foo);
14786
- * // => ['a', 'b'] (iteration order is not guaranteed)
14787
- *
14788
- * _.keys('hi');
14789
- * // => ['0', '1']
14790
- */
14791
- function keys(object) {
14792
- return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
14793
- }
14794
-
14795
- /**
14796
- * Creates an array of the own and inherited enumerable property names of `object`.
14797
- *
14798
- * **Note:** Non-object values are coerced to objects.
14799
- *
14800
- * @static
14801
- * @memberOf _
14802
- * @since 3.0.0
14803
- * @category Object
14804
- * @param {Object} object The object to query.
14805
- * @returns {Array} Returns the array of property names.
14806
- * @example
14807
- *
14808
- * function Foo() {
14809
- * this.a = 1;
14810
- * this.b = 2;
14811
- * }
14812
- *
14813
- * Foo.prototype.c = 3;
14814
- *
14815
- * _.keysIn(new Foo);
14816
- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
14817
- */
14818
- function keysIn(object) {
14819
- return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
14820
- }
14821
-
14822
- /**
14823
- * The opposite of `_.mapValues`; this method creates an object with the
14824
- * same values as `object` and keys generated by running each own enumerable
14825
- * string keyed property of `object` thru `iteratee`. The iteratee is invoked
14826
- * with three arguments: (value, key, object).
14827
- *
14828
- * @static
14829
- * @memberOf _
14830
- * @since 3.8.0
14831
- * @category Object
14832
- * @param {Object} object The object to iterate over.
14833
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
14834
- * @returns {Object} Returns the new mapped object.
14835
- * @see _.mapValues
14836
- * @example
14837
- *
14838
- * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
14839
- * return key + value;
14840
- * });
14841
- * // => { 'a1': 1, 'b2': 2 }
14842
- */
14843
- function mapKeys(object, iteratee) {
14844
- var result = {};
14845
- iteratee = getIteratee(iteratee, 3);
14846
-
14847
- baseForOwn(object, function(value, key, object) {
14848
- baseAssignValue(result, iteratee(value, key, object), value);
14849
- });
14850
- return result;
14851
- }
14852
-
14853
- /**
14854
- * Creates an object with the same keys as `object` and values generated
14855
- * by running each own enumerable string keyed property of `object` thru
14856
- * `iteratee`. The iteratee is invoked with three arguments:
14857
- * (value, key, object).
14858
- *
14859
- * @static
14860
- * @memberOf _
14861
- * @since 2.4.0
14862
- * @category Object
14863
- * @param {Object} object The object to iterate over.
14864
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
14865
- * @returns {Object} Returns the new mapped object.
14866
- * @see _.mapKeys
14867
- * @example
14868
- *
14869
- * var users = {
14870
- * 'fred': { 'user': 'fred', 'age': 40 },
14871
- * 'pebbles': { 'user': 'pebbles', 'age': 1 }
14872
- * };
14873
- *
14874
- * _.mapValues(users, function(o) { return o.age; });
14875
- * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
14876
- *
14877
- * // The `_.property` iteratee shorthand.
14878
- * _.mapValues(users, 'age');
14879
- * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
14880
- */
14881
- function mapValues(object, iteratee) {
14882
- var result = {};
14883
- iteratee = getIteratee(iteratee, 3);
14884
-
14885
- baseForOwn(object, function(value, key, object) {
14886
- baseAssignValue(result, key, iteratee(value, key, object));
14887
- });
14888
- return result;
14889
- }
14890
-
14891
- /**
14892
- * This method is like `_.assign` except that it recursively merges own and
14893
- * inherited enumerable string keyed properties of source objects into the
14894
- * destination object. Source properties that resolve to `undefined` are
14895
- * skipped if a destination value exists. Array and plain object properties
14896
- * are merged recursively. Other objects and value types are overridden by
14897
- * assignment. Source objects are applied from left to right. Subsequent
14898
- * sources overwrite property assignments of previous sources.
14899
- *
14900
- * **Note:** This method mutates `object`.
14901
- *
14902
- * @static
14903
- * @memberOf _
14904
- * @since 0.5.0
14905
- * @category Object
14906
- * @param {Object} object The destination object.
14907
- * @param {...Object} [sources] The source objects.
14908
- * @returns {Object} Returns `object`.
14909
- * @example
14910
- *
14911
- * var object = {
14912
- * 'a': [{ 'b': 2 }, { 'd': 4 }]
14913
- * };
14914
- *
14915
- * var other = {
14916
- * 'a': [{ 'c': 3 }, { 'e': 5 }]
14917
- * };
14918
- *
14919
- * _.merge(object, other);
14920
- * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
14921
- */
14922
- var merge = createAssigner(function(object, source, srcIndex) {
14923
- baseMerge(object, source, srcIndex);
14924
- });
14925
-
14926
- /**
14927
- * This method is like `_.merge` except that it accepts `customizer` which
14928
- * is invoked to produce the merged values of the destination and source
14929
- * properties. If `customizer` returns `undefined`, merging is handled by the
14930
- * method instead. The `customizer` is invoked with six arguments:
14931
- * (objValue, srcValue, key, object, source, stack).
14932
- *
14933
- * **Note:** This method mutates `object`.
14934
- *
14935
- * @static
14936
- * @memberOf _
14937
- * @since 4.0.0
14938
- * @category Object
14939
- * @param {Object} object The destination object.
14940
- * @param {...Object} sources The source objects.
14941
- * @param {Function} customizer The function to customize assigned values.
14942
- * @returns {Object} Returns `object`.
14943
- * @example
14944
- *
14945
- * function customizer(objValue, srcValue) {
14946
- * if (_.isArray(objValue)) {
14947
- * return objValue.concat(srcValue);
14948
- * }
14949
- * }
14950
- *
14951
- * var object = { 'a': [1], 'b': [2] };
14952
- * var other = { 'a': [3], 'b': [4] };
14953
- *
14954
- * _.mergeWith(object, other, customizer);
14955
- * // => { 'a': [1, 3], 'b': [2, 4] }
14956
- */
14957
- var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
14958
- baseMerge(object, source, srcIndex, customizer);
14959
- });
14960
-
14961
- /**
14962
- * The opposite of `_.pick`; this method creates an object composed of the
14963
- * own and inherited enumerable property paths of `object` that are not omitted.
14964
- *
14965
- * **Note:** This method is considerably slower than `_.pick`.
14966
- *
14967
- * @static
14968
- * @since 0.1.0
14969
- * @memberOf _
14970
- * @category Object
14971
- * @param {Object} object The source object.
14972
- * @param {...(string|string[])} [paths] The property paths to omit.
14973
- * @returns {Object} Returns the new object.
14974
- * @example
14975
- *
14976
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
14977
- *
14978
- * _.omit(object, ['a', 'c']);
14979
- * // => { 'b': '2' }
14980
- */
14981
- var omit = flatRest(function(object, paths) {
14982
- var result = {};
14983
- if (object == null) {
14984
- return result;
14985
- }
14986
- var isDeep = false;
14987
- paths = arrayMap(paths, function(path) {
14988
- path = castPath(path, object);
14989
- isDeep || (isDeep = path.length > 1);
14990
- return path;
14991
- });
14992
- copyObject(object, getAllKeysIn(object), result);
14993
- if (isDeep) {
14994
- result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
14995
- }
14996
- var length = paths.length;
14997
- while (length--) {
14998
- baseUnset(result, paths[length]);
14999
- }
15000
- return result;
15001
- });
15002
-
15003
- /**
15004
- * The opposite of `_.pickBy`; this method creates an object composed of
15005
- * the own and inherited enumerable string keyed properties of `object` that
15006
- * `predicate` doesn't return truthy for. The predicate is invoked with two
15007
- * arguments: (value, key).
15008
- *
15009
- * @static
15010
- * @memberOf _
15011
- * @since 4.0.0
15012
- * @category Object
15013
- * @param {Object} object The source object.
15014
- * @param {Function} [predicate=_.identity] The function invoked per property.
15015
- * @returns {Object} Returns the new object.
15016
- * @example
15017
- *
15018
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
15019
- *
15020
- * _.omitBy(object, _.isNumber);
15021
- * // => { 'b': '2' }
15022
- */
15023
- function omitBy(object, predicate) {
15024
- return pickBy(object, negate(getIteratee(predicate)));
15025
- }
15026
-
15027
- /**
15028
- * Creates an object composed of the picked `object` properties.
15029
- *
15030
- * @static
15031
- * @since 0.1.0
15032
- * @memberOf _
15033
- * @category Object
15034
- * @param {Object} object The source object.
15035
- * @param {...(string|string[])} [paths] The property paths to pick.
15036
- * @returns {Object} Returns the new object.
15037
- * @example
15038
- *
15039
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
15040
- *
15041
- * _.pick(object, ['a', 'c']);
15042
- * // => { 'a': 1, 'c': 3 }
15043
- */
15044
- var pick = flatRest(function(object, paths) {
15045
- return object == null ? {} : basePick(object, paths);
15046
- });
15047
-
15048
- /**
15049
- * Creates an object composed of the `object` properties `predicate` returns
15050
- * truthy for. The predicate is invoked with two arguments: (value, key).
15051
- *
15052
- * @static
15053
- * @memberOf _
15054
- * @since 4.0.0
15055
- * @category Object
15056
- * @param {Object} object The source object.
15057
- * @param {Function} [predicate=_.identity] The function invoked per property.
15058
- * @returns {Object} Returns the new object.
15059
- * @example
15060
- *
15061
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
15062
- *
15063
- * _.pickBy(object, _.isNumber);
15064
- * // => { 'a': 1, 'c': 3 }
15065
- */
15066
- function pickBy(object, predicate) {
15067
- if (object == null) {
15068
- return {};
15069
- }
15070
- var props = arrayMap(getAllKeysIn(object), function(prop) {
15071
- return [prop];
15072
- });
15073
- predicate = getIteratee(predicate);
15074
- return basePickBy(object, props, function(value, path) {
15075
- return predicate(value, path[0]);
15076
- });
15077
- }
15078
-
15079
- /**
15080
- * This method is like `_.get` except that if the resolved value is a
15081
- * function it's invoked with the `this` binding of its parent object and
15082
- * its result is returned.
15083
- *
15084
- * @static
15085
- * @since 0.1.0
15086
- * @memberOf _
15087
- * @category Object
15088
- * @param {Object} object The object to query.
15089
- * @param {Array|string} path The path of the property to resolve.
15090
- * @param {*} [defaultValue] The value returned for `undefined` resolved values.
15091
- * @returns {*} Returns the resolved value.
15092
- * @example
15093
- *
15094
- * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
15095
- *
15096
- * _.result(object, 'a[0].b.c1');
15097
- * // => 3
15098
- *
15099
- * _.result(object, 'a[0].b.c2');
15100
- * // => 4
15101
- *
15102
- * _.result(object, 'a[0].b.c3', 'default');
15103
- * // => 'default'
15104
- *
15105
- * _.result(object, 'a[0].b.c3', _.constant('default'));
15106
- * // => 'default'
15107
- */
15108
- function result(object, path, defaultValue) {
15109
- path = castPath(path, object);
15110
-
15111
- var index = -1,
15112
- length = path.length;
15113
-
15114
- // Ensure the loop is entered when path is empty.
15115
- if (!length) {
15116
- length = 1;
15117
- object = undefined;
15118
- }
15119
- while (++index < length) {
15120
- var value = object == null ? undefined : object[toKey(path[index])];
15121
- if (value === undefined) {
15122
- index = length;
15123
- value = defaultValue;
15124
- }
15125
- object = isFunction(value) ? value.call(object) : value;
15126
- }
15127
- return object;
15128
- }
15129
-
15130
- /**
15131
- * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
15132
- * it's created. Arrays are created for missing index properties while objects
15133
- * are created for all other missing properties. Use `_.setWith` to customize
15134
- * `path` creation.
15135
- *
15136
- * **Note:** This method mutates `object`.
15137
- *
15138
- * @static
15139
- * @memberOf _
15140
- * @since 3.7.0
15141
- * @category Object
15142
- * @param {Object} object The object to modify.
15143
- * @param {Array|string} path The path of the property to set.
15144
- * @param {*} value The value to set.
15145
- * @returns {Object} Returns `object`.
15146
- * @example
15147
- *
15148
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
15149
- *
15150
- * _.set(object, 'a[0].b.c', 4);
15151
- * console.log(object.a[0].b.c);
15152
- * // => 4
15153
- *
15154
- * _.set(object, ['x', '0', 'y', 'z'], 5);
15155
- * console.log(object.x[0].y.z);
15156
- * // => 5
15157
- */
15158
- function set(object, path, value) {
15159
- return object == null ? object : baseSet(object, path, value);
15160
- }
15161
-
15162
- /**
15163
- * This method is like `_.set` except that it accepts `customizer` which is
15164
- * invoked to produce the objects of `path`. If `customizer` returns `undefined`
15165
- * path creation is handled by the method instead. The `customizer` is invoked
15166
- * with three arguments: (nsValue, key, nsObject).
15167
- *
15168
- * **Note:** This method mutates `object`.
15169
- *
15170
- * @static
15171
- * @memberOf _
15172
- * @since 4.0.0
15173
- * @category Object
15174
- * @param {Object} object The object to modify.
15175
- * @param {Array|string} path The path of the property to set.
15176
- * @param {*} value The value to set.
15177
- * @param {Function} [customizer] The function to customize assigned values.
15178
- * @returns {Object} Returns `object`.
15179
- * @example
15180
- *
15181
- * var object = {};
15182
- *
15183
- * _.setWith(object, '[0][1]', 'a', Object);
15184
- * // => { '0': { '1': 'a' } }
15185
- */
15186
- function setWith(object, path, value, customizer) {
15187
- customizer = typeof customizer == 'function' ? customizer : undefined;
15188
- return object == null ? object : baseSet(object, path, value, customizer);
15189
- }
15190
-
15191
- /**
15192
- * Creates an array of own enumerable string keyed-value pairs for `object`
15193
- * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
15194
- * entries are returned.
15195
- *
15196
- * @static
15197
- * @memberOf _
15198
- * @since 4.0.0
15199
- * @alias entries
15200
- * @category Object
15201
- * @param {Object} object The object to query.
15202
- * @returns {Array} Returns the key-value pairs.
15203
- * @example
15204
- *
15205
- * function Foo() {
15206
- * this.a = 1;
15207
- * this.b = 2;
15208
- * }
15209
- *
15210
- * Foo.prototype.c = 3;
15211
- *
15212
- * _.toPairs(new Foo);
15213
- * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
15214
- */
15215
- var toPairs = createToPairs(keys);
15216
-
15217
- /**
15218
- * Creates an array of own and inherited enumerable string keyed-value pairs
15219
- * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
15220
- * or set, its entries are returned.
15221
- *
15222
- * @static
15223
- * @memberOf _
15224
- * @since 4.0.0
15225
- * @alias entriesIn
15226
- * @category Object
15227
- * @param {Object} object The object to query.
15228
- * @returns {Array} Returns the key-value pairs.
15229
- * @example
15230
- *
15231
- * function Foo() {
15232
- * this.a = 1;
15233
- * this.b = 2;
15234
- * }
15235
- *
15236
- * Foo.prototype.c = 3;
15237
- *
15238
- * _.toPairsIn(new Foo);
15239
- * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
15240
- */
15241
- var toPairsIn = createToPairs(keysIn);
15242
-
15243
- /**
15244
- * An alternative to `_.reduce`; this method transforms `object` to a new
15245
- * `accumulator` object which is the result of running each of its own
15246
- * enumerable string keyed properties thru `iteratee`, with each invocation
15247
- * potentially mutating the `accumulator` object. If `accumulator` is not
15248
- * provided, a new object with the same `[[Prototype]]` will be used. The
15249
- * iteratee is invoked with four arguments: (accumulator, value, key, object).
15250
- * Iteratee functions may exit iteration early by explicitly returning `false`.
15251
- *
15252
- * @static
15253
- * @memberOf _
15254
- * @since 1.3.0
15255
- * @category Object
15256
- * @param {Object} object The object to iterate over.
15257
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
15258
- * @param {*} [accumulator] The custom accumulator value.
15259
- * @returns {*} Returns the accumulated value.
15260
- * @example
15261
- *
15262
- * _.transform([2, 3, 4], function(result, n) {
15263
- * result.push(n *= n);
15264
- * return n % 2 == 0;
15265
- * }, []);
15266
- * // => [4, 9]
15267
- *
15268
- * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
15269
- * (result[value] || (result[value] = [])).push(key);
15270
- * }, {});
15271
- * // => { '1': ['a', 'c'], '2': ['b'] }
15272
- */
15273
- function transform(object, iteratee, accumulator) {
15274
- var isArr = isArray(object),
15275
- isArrLike = isArr || isBuffer(object) || isTypedArray(object);
15276
-
15277
- iteratee = getIteratee(iteratee, 4);
15278
- if (accumulator == null) {
15279
- var Ctor = object && object.constructor;
15280
- if (isArrLike) {
15281
- accumulator = isArr ? new Ctor : [];
15282
- }
15283
- else if (isObject(object)) {
15284
- accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
15285
- }
15286
- else {
15287
- accumulator = {};
15288
- }
15289
- }
15290
- (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
15291
- return iteratee(accumulator, value, index, object);
15292
- });
15293
- return accumulator;
15294
- }
15295
-
15296
- /**
15297
- * Removes the property at `path` of `object`.
15298
- *
15299
- * **Note:** This method mutates `object`.
15300
- *
15301
- * @static
15302
- * @memberOf _
15303
- * @since 4.0.0
15304
- * @category Object
15305
- * @param {Object} object The object to modify.
15306
- * @param {Array|string} path The path of the property to unset.
15307
- * @returns {boolean} Returns `true` if the property is deleted, else `false`.
15308
- * @example
15309
- *
15310
- * var object = { 'a': [{ 'b': { 'c': 7 } }] };
15311
- * _.unset(object, 'a[0].b.c');
15312
- * // => true
15313
- *
15314
- * console.log(object);
15315
- * // => { 'a': [{ 'b': {} }] };
15316
- *
15317
- * _.unset(object, ['a', '0', 'b', 'c']);
15318
- * // => true
15319
- *
15320
- * console.log(object);
15321
- * // => { 'a': [{ 'b': {} }] };
15322
- */
15323
- function unset(object, path) {
15324
- return object == null ? true : baseUnset(object, path);
15325
- }
15326
-
15327
- /**
15328
- * This method is like `_.set` except that accepts `updater` to produce the
15329
- * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
15330
- * is invoked with one argument: (value).
15331
- *
15332
- * **Note:** This method mutates `object`.
15333
- *
15334
- * @static
15335
- * @memberOf _
15336
- * @since 4.6.0
15337
- * @category Object
15338
- * @param {Object} object The object to modify.
15339
- * @param {Array|string} path The path of the property to set.
15340
- * @param {Function} updater The function to produce the updated value.
15341
- * @returns {Object} Returns `object`.
15342
- * @example
15343
- *
15344
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
15345
- *
15346
- * _.update(object, 'a[0].b.c', function(n) { return n * n; });
15347
- * console.log(object.a[0].b.c);
15348
- * // => 9
15349
- *
15350
- * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
15351
- * console.log(object.x[0].y.z);
15352
- * // => 0
15353
- */
15354
- function update(object, path, updater) {
15355
- return object == null ? object : baseUpdate(object, path, castFunction(updater));
15356
- }
15357
-
15358
- /**
15359
- * This method is like `_.update` except that it accepts `customizer` which is
15360
- * invoked to produce the objects of `path`. If `customizer` returns `undefined`
15361
- * path creation is handled by the method instead. The `customizer` is invoked
15362
- * with three arguments: (nsValue, key, nsObject).
15363
- *
15364
- * **Note:** This method mutates `object`.
15365
- *
15366
- * @static
15367
- * @memberOf _
15368
- * @since 4.6.0
15369
- * @category Object
15370
- * @param {Object} object The object to modify.
15371
- * @param {Array|string} path The path of the property to set.
15372
- * @param {Function} updater The function to produce the updated value.
15373
- * @param {Function} [customizer] The function to customize assigned values.
15374
- * @returns {Object} Returns `object`.
15375
- * @example
15376
- *
15377
- * var object = {};
15378
- *
15379
- * _.updateWith(object, '[0][1]', _.constant('a'), Object);
15380
- * // => { '0': { '1': 'a' } }
15381
- */
15382
- function updateWith(object, path, updater, customizer) {
15383
- customizer = typeof customizer == 'function' ? customizer : undefined;
15384
- return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
15385
- }
15386
-
15387
- /**
15388
- * Creates an array of the own enumerable string keyed property values of `object`.
15389
- *
15390
- * **Note:** Non-object values are coerced to objects.
15391
- *
15392
- * @static
15393
- * @since 0.1.0
15394
- * @memberOf _
15395
- * @category Object
15396
- * @param {Object} object The object to query.
15397
- * @returns {Array} Returns the array of property values.
15398
- * @example
15399
- *
15400
- * function Foo() {
15401
- * this.a = 1;
15402
- * this.b = 2;
15403
- * }
15404
- *
15405
- * Foo.prototype.c = 3;
15406
- *
15407
- * _.values(new Foo);
15408
- * // => [1, 2] (iteration order is not guaranteed)
15409
- *
15410
- * _.values('hi');
15411
- * // => ['h', 'i']
15412
- */
15413
- function values(object) {
15414
- return object == null ? [] : baseValues(object, keys(object));
15415
- }
15416
-
15417
- /**
15418
- * Creates an array of the own and inherited enumerable string keyed property
15419
- * values of `object`.
15420
- *
15421
- * **Note:** Non-object values are coerced to objects.
15422
- *
15423
- * @static
15424
- * @memberOf _
15425
- * @since 3.0.0
15426
- * @category Object
15427
- * @param {Object} object The object to query.
15428
- * @returns {Array} Returns the array of property values.
15429
- * @example
15430
- *
15431
- * function Foo() {
15432
- * this.a = 1;
15433
- * this.b = 2;
15434
- * }
15435
- *
15436
- * Foo.prototype.c = 3;
15437
- *
15438
- * _.valuesIn(new Foo);
15439
- * // => [1, 2, 3] (iteration order is not guaranteed)
15440
- */
15441
- function valuesIn(object) {
15442
- return object == null ? [] : baseValues(object, keysIn(object));
15443
- }
15444
-
15445
- /*------------------------------------------------------------------------*/
15446
-
15447
- /**
15448
- * Clamps `number` within the inclusive `lower` and `upper` bounds.
15449
- *
15450
- * @static
15451
- * @memberOf _
15452
- * @since 4.0.0
15453
- * @category Number
15454
- * @param {number} number The number to clamp.
15455
- * @param {number} [lower] The lower bound.
15456
- * @param {number} upper The upper bound.
15457
- * @returns {number} Returns the clamped number.
15458
- * @example
15459
- *
15460
- * _.clamp(-10, -5, 5);
15461
- * // => -5
15462
- *
15463
- * _.clamp(10, -5, 5);
15464
- * // => 5
15465
- */
15466
- function clamp(number, lower, upper) {
15467
- if (upper === undefined) {
15468
- upper = lower;
15469
- lower = undefined;
15470
- }
15471
- if (upper !== undefined) {
15472
- upper = toNumber(upper);
15473
- upper = upper === upper ? upper : 0;
15474
- }
15475
- if (lower !== undefined) {
15476
- lower = toNumber(lower);
15477
- lower = lower === lower ? lower : 0;
15478
- }
15479
- return baseClamp(toNumber(number), lower, upper);
15480
- }
15481
-
15482
- /**
15483
- * Checks if `n` is between `start` and up to, but not including, `end`. If
15484
- * `end` is not specified, it's set to `start` with `start` then set to `0`.
15485
- * If `start` is greater than `end` the params are swapped to support
15486
- * negative ranges.
15487
- *
15488
- * @static
15489
- * @memberOf _
15490
- * @since 3.3.0
15491
- * @category Number
15492
- * @param {number} number The number to check.
15493
- * @param {number} [start=0] The start of the range.
15494
- * @param {number} end The end of the range.
15495
- * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
15496
- * @see _.range, _.rangeRight
15497
- * @example
15498
- *
15499
- * _.inRange(3, 2, 4);
15500
- * // => true
15501
- *
15502
- * _.inRange(4, 8);
15503
- * // => true
15504
- *
15505
- * _.inRange(4, 2);
15506
- * // => false
15507
- *
15508
- * _.inRange(2, 2);
15509
- * // => false
15510
- *
15511
- * _.inRange(1.2, 2);
15512
- * // => true
15513
- *
15514
- * _.inRange(5.2, 4);
15515
- * // => false
15516
- *
15517
- * _.inRange(-3, -2, -6);
15518
- * // => true
15519
- */
15520
- function inRange(number, start, end) {
15521
- start = toFinite(start);
15522
- if (end === undefined) {
15523
- end = start;
15524
- start = 0;
15525
- } else {
15526
- end = toFinite(end);
15527
- }
15528
- number = toNumber(number);
15529
- return baseInRange(number, start, end);
15530
- }
15531
-
15532
- /**
15533
- * Produces a random number between the inclusive `lower` and `upper` bounds.
15534
- * If only one argument is provided a number between `0` and the given number
15535
- * is returned. If `floating` is `true`, or either `lower` or `upper` are
15536
- * floats, a floating-point number is returned instead of an integer.
15537
- *
15538
- * **Note:** JavaScript follows the IEEE-754 standard for resolving
15539
- * floating-point values which can produce unexpected results.
15540
- *
15541
- * @static
15542
- * @memberOf _
15543
- * @since 0.7.0
15544
- * @category Number
15545
- * @param {number} [lower=0] The lower bound.
15546
- * @param {number} [upper=1] The upper bound.
15547
- * @param {boolean} [floating] Specify returning a floating-point number.
15548
- * @returns {number} Returns the random number.
15549
- * @example
15550
- *
15551
- * _.random(0, 5);
15552
- * // => an integer between 0 and 5
15553
- *
15554
- * _.random(5);
15555
- * // => also an integer between 0 and 5
15556
- *
15557
- * _.random(5, true);
15558
- * // => a floating-point number between 0 and 5
15559
- *
15560
- * _.random(1.2, 5.2);
15561
- * // => a floating-point number between 1.2 and 5.2
15562
- */
15563
- function random(lower, upper, floating) {
15564
- if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
15565
- upper = floating = undefined;
15566
- }
15567
- if (floating === undefined) {
15568
- if (typeof upper == 'boolean') {
15569
- floating = upper;
15570
- upper = undefined;
15571
- }
15572
- else if (typeof lower == 'boolean') {
15573
- floating = lower;
15574
- lower = undefined;
15575
- }
15576
- }
15577
- if (lower === undefined && upper === undefined) {
15578
- lower = 0;
15579
- upper = 1;
15580
- }
15581
- else {
15582
- lower = toFinite(lower);
15583
- if (upper === undefined) {
15584
- upper = lower;
15585
- lower = 0;
15586
- } else {
15587
- upper = toFinite(upper);
15588
- }
15589
- }
15590
- if (lower > upper) {
15591
- var temp = lower;
15592
- lower = upper;
15593
- upper = temp;
15594
- }
15595
- if (floating || lower % 1 || upper % 1) {
15596
- var rand = nativeRandom();
15597
- return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
15598
- }
15599
- return baseRandom(lower, upper);
15600
- }
15601
-
15602
- /*------------------------------------------------------------------------*/
15603
-
15604
- /**
15605
- * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
15606
- *
15607
- * @static
15608
- * @memberOf _
15609
- * @since 3.0.0
15610
- * @category String
15611
- * @param {string} [string=''] The string to convert.
15612
- * @returns {string} Returns the camel cased string.
15613
- * @example
15614
- *
15615
- * _.camelCase('Foo Bar');
15616
- * // => 'fooBar'
15617
- *
15618
- * _.camelCase('--foo-bar--');
15619
- * // => 'fooBar'
15620
- *
15621
- * _.camelCase('__FOO_BAR__');
15622
- * // => 'fooBar'
15623
- */
15624
- var camelCase = createCompounder(function(result, word, index) {
15625
- word = word.toLowerCase();
15626
- return result + (index ? capitalize(word) : word);
15627
- });
15628
-
15629
- /**
15630
- * Converts the first character of `string` to upper case and the remaining
15631
- * to lower case.
15632
- *
15633
- * @static
15634
- * @memberOf _
15635
- * @since 3.0.0
15636
- * @category String
15637
- * @param {string} [string=''] The string to capitalize.
15638
- * @returns {string} Returns the capitalized string.
15639
- * @example
15640
- *
15641
- * _.capitalize('FRED');
15642
- * // => 'Fred'
15643
- */
15644
- function capitalize(string) {
15645
- return upperFirst(toString(string).toLowerCase());
15646
- }
15647
-
15648
- /**
15649
- * Deburrs `string` by converting
15650
- * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
15651
- * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
15652
- * letters to basic Latin letters and removing
15653
- * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
15654
- *
15655
- * @static
15656
- * @memberOf _
15657
- * @since 3.0.0
15658
- * @category String
15659
- * @param {string} [string=''] The string to deburr.
15660
- * @returns {string} Returns the deburred string.
15661
- * @example
15662
- *
15663
- * _.deburr('déjà vu');
15664
- * // => 'deja vu'
15665
- */
15666
- function deburr(string) {
15667
- string = toString(string);
15668
- return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
15669
- }
15670
-
15671
- /**
15672
- * Checks if `string` ends with the given target string.
15673
- *
15674
- * @static
15675
- * @memberOf _
15676
- * @since 3.0.0
15677
- * @category String
15678
- * @param {string} [string=''] The string to inspect.
15679
- * @param {string} [target] The string to search for.
15680
- * @param {number} [position=string.length] The position to search up to.
15681
- * @returns {boolean} Returns `true` if `string` ends with `target`,
15682
- * else `false`.
15683
- * @example
15684
- *
15685
- * _.endsWith('abc', 'c');
15686
- * // => true
15687
- *
15688
- * _.endsWith('abc', 'b');
15689
- * // => false
15690
- *
15691
- * _.endsWith('abc', 'b', 2);
15692
- * // => true
15693
- */
15694
- function endsWith(string, target, position) {
15695
- string = toString(string);
15696
- target = baseToString(target);
15697
-
15698
- var length = string.length;
15699
- position = position === undefined
15700
- ? length
15701
- : baseClamp(toInteger(position), 0, length);
15702
-
15703
- var end = position;
15704
- position -= target.length;
15705
- return position >= 0 && string.slice(position, end) == target;
15706
- }
15707
-
15708
- /**
15709
- * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
15710
- * corresponding HTML entities.
15711
- *
15712
- * **Note:** No other characters are escaped. To escape additional
15713
- * characters use a third-party library like [_he_](https://mths.be/he).
15714
- *
15715
- * Though the ">" character is escaped for symmetry, characters like
15716
- * ">" and "/" don't need escaping in HTML and have no special meaning
15717
- * unless they're part of a tag or unquoted attribute value. See
15718
- * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
15719
- * (under "semi-related fun fact") for more details.
15720
- *
15721
- * When working with HTML you should always
15722
- * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
15723
- * XSS vectors.
15724
- *
15725
- * @static
15726
- * @since 0.1.0
15727
- * @memberOf _
15728
- * @category String
15729
- * @param {string} [string=''] The string to escape.
15730
- * @returns {string} Returns the escaped string.
15731
- * @example
15732
- *
15733
- * _.escape('fred, barney, & pebbles');
15734
- * // => 'fred, barney, &amp; pebbles'
15735
- */
15736
- function escape(string) {
15737
- string = toString(string);
15738
- return (string && reHasUnescapedHtml.test(string))
15739
- ? string.replace(reUnescapedHtml, escapeHtmlChar)
15740
- : string;
15741
- }
15742
-
15743
- /**
15744
- * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
15745
- * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
15746
- *
15747
- * @static
15748
- * @memberOf _
15749
- * @since 3.0.0
15750
- * @category String
15751
- * @param {string} [string=''] The string to escape.
15752
- * @returns {string} Returns the escaped string.
15753
- * @example
15754
- *
15755
- * _.escapeRegExp('[lodash](https://lodash.com/)');
15756
- * // => '\[lodash\]\(https://lodash\.com/\)'
15757
- */
15758
- function escapeRegExp(string) {
15759
- string = toString(string);
15760
- return (string && reHasRegExpChar.test(string))
15761
- ? string.replace(reRegExpChar, '\\$&')
15762
- : string;
15763
- }
15764
-
15765
- /**
15766
- * Converts `string` to
15767
- * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
15768
- *
15769
- * @static
15770
- * @memberOf _
15771
- * @since 3.0.0
15772
- * @category String
15773
- * @param {string} [string=''] The string to convert.
15774
- * @returns {string} Returns the kebab cased string.
15775
- * @example
15776
- *
15777
- * _.kebabCase('Foo Bar');
15778
- * // => 'foo-bar'
15779
- *
15780
- * _.kebabCase('fooBar');
15781
- * // => 'foo-bar'
15782
- *
15783
- * _.kebabCase('__FOO_BAR__');
15784
- * // => 'foo-bar'
15785
- */
15786
- var kebabCase = createCompounder(function(result, word, index) {
15787
- return result + (index ? '-' : '') + word.toLowerCase();
15788
- });
15789
-
15790
- /**
15791
- * Converts `string`, as space separated words, to lower case.
15792
- *
15793
- * @static
15794
- * @memberOf _
15795
- * @since 4.0.0
15796
- * @category String
15797
- * @param {string} [string=''] The string to convert.
15798
- * @returns {string} Returns the lower cased string.
15799
- * @example
15800
- *
15801
- * _.lowerCase('--Foo-Bar--');
15802
- * // => 'foo bar'
15803
- *
15804
- * _.lowerCase('fooBar');
15805
- * // => 'foo bar'
15806
- *
15807
- * _.lowerCase('__FOO_BAR__');
15808
- * // => 'foo bar'
15809
- */
15810
- var lowerCase = createCompounder(function(result, word, index) {
15811
- return result + (index ? ' ' : '') + word.toLowerCase();
15812
- });
15813
-
15814
- /**
15815
- * Converts the first character of `string` to lower case.
15816
- *
15817
- * @static
15818
- * @memberOf _
15819
- * @since 4.0.0
15820
- * @category String
15821
- * @param {string} [string=''] The string to convert.
15822
- * @returns {string} Returns the converted string.
15823
- * @example
15824
- *
15825
- * _.lowerFirst('Fred');
15826
- * // => 'fred'
15827
- *
15828
- * _.lowerFirst('FRED');
15829
- * // => 'fRED'
15830
- */
15831
- var lowerFirst = createCaseFirst('toLowerCase');
15832
-
15833
- /**
15834
- * Pads `string` on the left and right sides if it's shorter than `length`.
15835
- * Padding characters are truncated if they can't be evenly divided by `length`.
15836
- *
15837
- * @static
15838
- * @memberOf _
15839
- * @since 3.0.0
15840
- * @category String
15841
- * @param {string} [string=''] The string to pad.
15842
- * @param {number} [length=0] The padding length.
15843
- * @param {string} [chars=' '] The string used as padding.
15844
- * @returns {string} Returns the padded string.
15845
- * @example
15846
- *
15847
- * _.pad('abc', 8);
15848
- * // => ' abc '
15849
- *
15850
- * _.pad('abc', 8, '_-');
15851
- * // => '_-abc_-_'
15852
- *
15853
- * _.pad('abc', 3);
15854
- * // => 'abc'
15855
- */
15856
- function pad(string, length, chars) {
15857
- string = toString(string);
15858
- length = toInteger(length);
15859
-
15860
- var strLength = length ? stringSize(string) : 0;
15861
- if (!length || strLength >= length) {
15862
- return string;
15863
- }
15864
- var mid = (length - strLength) / 2;
15865
- return (
15866
- createPadding(nativeFloor(mid), chars) +
15867
- string +
15868
- createPadding(nativeCeil(mid), chars)
15869
- );
15870
- }
15871
-
15872
- /**
15873
- * Pads `string` on the right side if it's shorter than `length`. Padding
15874
- * characters are truncated if they exceed `length`.
15875
- *
15876
- * @static
15877
- * @memberOf _
15878
- * @since 4.0.0
15879
- * @category String
15880
- * @param {string} [string=''] The string to pad.
15881
- * @param {number} [length=0] The padding length.
15882
- * @param {string} [chars=' '] The string used as padding.
15883
- * @returns {string} Returns the padded string.
15884
- * @example
15885
- *
15886
- * _.padEnd('abc', 6);
15887
- * // => 'abc '
15888
- *
15889
- * _.padEnd('abc', 6, '_-');
15890
- * // => 'abc_-_'
15891
- *
15892
- * _.padEnd('abc', 3);
15893
- * // => 'abc'
15894
- */
15895
- function padEnd(string, length, chars) {
15896
- string = toString(string);
15897
- length = toInteger(length);
15898
-
15899
- var strLength = length ? stringSize(string) : 0;
15900
- return (length && strLength < length)
15901
- ? (string + createPadding(length - strLength, chars))
15902
- : string;
15903
- }
15904
-
15905
- /**
15906
- * Pads `string` on the left side if it's shorter than `length`. Padding
15907
- * characters are truncated if they exceed `length`.
15908
- *
15909
- * @static
15910
- * @memberOf _
15911
- * @since 4.0.0
15912
- * @category String
15913
- * @param {string} [string=''] The string to pad.
15914
- * @param {number} [length=0] The padding length.
15915
- * @param {string} [chars=' '] The string used as padding.
15916
- * @returns {string} Returns the padded string.
15917
- * @example
15918
- *
15919
- * _.padStart('abc', 6);
15920
- * // => ' abc'
15921
- *
15922
- * _.padStart('abc', 6, '_-');
15923
- * // => '_-_abc'
15924
- *
15925
- * _.padStart('abc', 3);
15926
- * // => 'abc'
15927
- */
15928
- function padStart(string, length, chars) {
15929
- string = toString(string);
15930
- length = toInteger(length);
15931
-
15932
- var strLength = length ? stringSize(string) : 0;
15933
- return (length && strLength < length)
15934
- ? (createPadding(length - strLength, chars) + string)
15935
- : string;
15936
- }
15937
-
15938
- /**
15939
- * Converts `string` to an integer of the specified radix. If `radix` is
15940
- * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
15941
- * hexadecimal, in which case a `radix` of `16` is used.
15942
- *
15943
- * **Note:** This method aligns with the
15944
- * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
15945
- *
15946
- * @static
15947
- * @memberOf _
15948
- * @since 1.1.0
15949
- * @category String
15950
- * @param {string} string The string to convert.
15951
- * @param {number} [radix=10] The radix to interpret `value` by.
15952
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
15953
- * @returns {number} Returns the converted integer.
15954
- * @example
15955
- *
15956
- * _.parseInt('08');
15957
- * // => 8
15958
- *
15959
- * _.map(['6', '08', '10'], _.parseInt);
15960
- * // => [6, 8, 10]
15961
- */
15962
- function parseInt(string, radix, guard) {
15963
- if (guard || radix == null) {
15964
- radix = 0;
15965
- } else if (radix) {
15966
- radix = +radix;
15967
- }
15968
- return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
15969
- }
15970
-
15971
- /**
15972
- * Repeats the given string `n` times.
15973
- *
15974
- * @static
15975
- * @memberOf _
15976
- * @since 3.0.0
15977
- * @category String
15978
- * @param {string} [string=''] The string to repeat.
15979
- * @param {number} [n=1] The number of times to repeat the string.
15980
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
15981
- * @returns {string} Returns the repeated string.
15982
- * @example
15983
- *
15984
- * _.repeat('*', 3);
15985
- * // => '***'
15986
- *
15987
- * _.repeat('abc', 2);
15988
- * // => 'abcabc'
15989
- *
15990
- * _.repeat('abc', 0);
15991
- * // => ''
15992
- */
15993
- function repeat(string, n, guard) {
15994
- if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
15995
- n = 1;
15996
- } else {
15997
- n = toInteger(n);
15998
- }
15999
- return baseRepeat(toString(string), n);
16000
- }
16001
-
16002
- /**
16003
- * Replaces matches for `pattern` in `string` with `replacement`.
16004
- *
16005
- * **Note:** This method is based on
16006
- * [`String#replace`](https://mdn.io/String/replace).
16007
- *
16008
- * @static
16009
- * @memberOf _
16010
- * @since 4.0.0
16011
- * @category String
16012
- * @param {string} [string=''] The string to modify.
16013
- * @param {RegExp|string} pattern The pattern to replace.
16014
- * @param {Function|string} replacement The match replacement.
16015
- * @returns {string} Returns the modified string.
16016
- * @example
16017
- *
16018
- * _.replace('Hi Fred', 'Fred', 'Barney');
16019
- * // => 'Hi Barney'
16020
- */
16021
- function replace() {
16022
- var args = arguments,
16023
- string = toString(args[0]);
16024
-
16025
- return args.length < 3 ? string : string.replace(args[1], args[2]);
16026
- }
16027
-
16028
- /**
16029
- * Converts `string` to
16030
- * [snake case](https://en.wikipedia.org/wiki/Snake_case).
16031
- *
16032
- * @static
16033
- * @memberOf _
16034
- * @since 3.0.0
16035
- * @category String
16036
- * @param {string} [string=''] The string to convert.
16037
- * @returns {string} Returns the snake cased string.
16038
- * @example
16039
- *
16040
- * _.snakeCase('Foo Bar');
16041
- * // => 'foo_bar'
16042
- *
16043
- * _.snakeCase('fooBar');
16044
- * // => 'foo_bar'
16045
- *
16046
- * _.snakeCase('--FOO-BAR--');
16047
- * // => 'foo_bar'
16048
- */
16049
- var snakeCase = createCompounder(function(result, word, index) {
16050
- return result + (index ? '_' : '') + word.toLowerCase();
16051
- });
16052
-
16053
- /**
16054
- * Splits `string` by `separator`.
16055
- *
16056
- * **Note:** This method is based on
16057
- * [`String#split`](https://mdn.io/String/split).
16058
- *
16059
- * @static
16060
- * @memberOf _
16061
- * @since 4.0.0
16062
- * @category String
16063
- * @param {string} [string=''] The string to split.
16064
- * @param {RegExp|string} separator The separator pattern to split by.
16065
- * @param {number} [limit] The length to truncate results to.
16066
- * @returns {Array} Returns the string segments.
16067
- * @example
16068
- *
16069
- * _.split('a-b-c', '-', 2);
16070
- * // => ['a', 'b']
16071
- */
16072
- function split(string, separator, limit) {
16073
- if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
16074
- separator = limit = undefined;
16075
- }
16076
- limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
16077
- if (!limit) {
16078
- return [];
16079
- }
16080
- string = toString(string);
16081
- if (string && (
16082
- typeof separator == 'string' ||
16083
- (separator != null && !isRegExp(separator))
16084
- )) {
16085
- separator = baseToString(separator);
16086
- if (!separator && hasUnicode(string)) {
16087
- return castSlice(stringToArray(string), 0, limit);
16088
- }
16089
- }
16090
- return string.split(separator, limit);
16091
- }
16092
-
16093
- /**
16094
- * Converts `string` to
16095
- * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
16096
- *
16097
- * @static
16098
- * @memberOf _
16099
- * @since 3.1.0
16100
- * @category String
16101
- * @param {string} [string=''] The string to convert.
16102
- * @returns {string} Returns the start cased string.
16103
- * @example
16104
- *
16105
- * _.startCase('--foo-bar--');
16106
- * // => 'Foo Bar'
16107
- *
16108
- * _.startCase('fooBar');
16109
- * // => 'Foo Bar'
16110
- *
16111
- * _.startCase('__FOO_BAR__');
16112
- * // => 'FOO BAR'
16113
- */
16114
- var startCase = createCompounder(function(result, word, index) {
16115
- return result + (index ? ' ' : '') + upperFirst(word);
16116
- });
16117
-
16118
- /**
16119
- * Checks if `string` starts with the given target string.
16120
- *
16121
- * @static
16122
- * @memberOf _
16123
- * @since 3.0.0
16124
- * @category String
16125
- * @param {string} [string=''] The string to inspect.
16126
- * @param {string} [target] The string to search for.
16127
- * @param {number} [position=0] The position to search from.
16128
- * @returns {boolean} Returns `true` if `string` starts with `target`,
16129
- * else `false`.
16130
- * @example
16131
- *
16132
- * _.startsWith('abc', 'a');
16133
- * // => true
16134
- *
16135
- * _.startsWith('abc', 'b');
16136
- * // => false
16137
- *
16138
- * _.startsWith('abc', 'b', 1);
16139
- * // => true
16140
- */
16141
- function startsWith(string, target, position) {
16142
- string = toString(string);
16143
- position = position == null
16144
- ? 0
16145
- : baseClamp(toInteger(position), 0, string.length);
16146
-
16147
- target = baseToString(target);
16148
- return string.slice(position, position + target.length) == target;
16149
- }
16150
-
16151
- /**
16152
- * Creates a compiled template function that can interpolate data properties
16153
- * in "interpolate" delimiters, HTML-escape interpolated data properties in
16154
- * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
16155
- * properties may be accessed as free variables in the template. If a setting
16156
- * object is given, it takes precedence over `_.templateSettings` values.
16157
- *
16158
- * **Note:** In the development build `_.template` utilizes
16159
- * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
16160
- * for easier debugging.
16161
- *
16162
- * For more information on precompiling templates see
16163
- * [lodash's custom builds documentation](https://lodash.com/custom-builds).
16164
- *
16165
- * For more information on Chrome extension sandboxes see
16166
- * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
16167
- *
16168
- * @static
16169
- * @since 0.1.0
16170
- * @memberOf _
16171
- * @category String
16172
- * @param {string} [string=''] The template string.
16173
- * @param {Object} [options={}] The options object.
16174
- * @param {RegExp} [options.escape=_.templateSettings.escape]
16175
- * The HTML "escape" delimiter.
16176
- * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
16177
- * The "evaluate" delimiter.
16178
- * @param {Object} [options.imports=_.templateSettings.imports]
16179
- * An object to import into the template as free variables.
16180
- * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
16181
- * The "interpolate" delimiter.
16182
- * @param {string} [options.sourceURL='lodash.templateSources[n]']
16183
- * The sourceURL of the compiled template.
16184
- * @param {string} [options.variable='obj']
16185
- * The data object variable name.
16186
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
16187
- * @returns {Function} Returns the compiled template function.
16188
- * @example
16189
- *
16190
- * // Use the "interpolate" delimiter to create a compiled template.
16191
- * var compiled = _.template('hello <%= user %>!');
16192
- * compiled({ 'user': 'fred' });
16193
- * // => 'hello fred!'
16194
- *
16195
- * // Use the HTML "escape" delimiter to escape data property values.
16196
- * var compiled = _.template('<b><%- value %></b>');
16197
- * compiled({ 'value': '<script>' });
16198
- * // => '<b>&lt;script&gt;</b>'
16199
- *
16200
- * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
16201
- * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
16202
- * compiled({ 'users': ['fred', 'barney'] });
16203
- * // => '<li>fred</li><li>barney</li>'
16204
- *
16205
- * // Use the internal `print` function in "evaluate" delimiters.
16206
- * var compiled = _.template('<% print("hello " + user); %>!');
16207
- * compiled({ 'user': 'barney' });
16208
- * // => 'hello barney!'
16209
- *
16210
- * // Use the ES template literal delimiter as an "interpolate" delimiter.
16211
- * // Disable support by replacing the "interpolate" delimiter.
16212
- * var compiled = _.template('hello ${ user }!');
16213
- * compiled({ 'user': 'pebbles' });
16214
- * // => 'hello pebbles!'
16215
- *
16216
- * // Use backslashes to treat delimiters as plain text.
16217
- * var compiled = _.template('<%= "\\<%- value %\\>" %>');
16218
- * compiled({ 'value': 'ignored' });
16219
- * // => '<%- value %>'
16220
- *
16221
- * // Use the `imports` option to import `jQuery` as `jq`.
16222
- * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
16223
- * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
16224
- * compiled({ 'users': ['fred', 'barney'] });
16225
- * // => '<li>fred</li><li>barney</li>'
16226
- *
16227
- * // Use the `sourceURL` option to specify a custom sourceURL for the template.
16228
- * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
16229
- * compiled(data);
16230
- * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
16231
- *
16232
- * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
16233
- * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
16234
- * compiled.source;
16235
- * // => function(data) {
16236
- * // var __t, __p = '';
16237
- * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
16238
- * // return __p;
16239
- * // }
16240
- *
16241
- * // Use custom template delimiters.
16242
- * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
16243
- * var compiled = _.template('hello {{ user }}!');
16244
- * compiled({ 'user': 'mustache' });
16245
- * // => 'hello mustache!'
16246
- *
16247
- * // Use the `source` property to inline compiled templates for meaningful
16248
- * // line numbers in error messages and stack traces.
16249
- * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
16250
- * var JST = {\
16251
- * "main": ' + _.template(mainText).source + '\
16252
- * };\
16253
- * ');
16254
- */
16255
- function template(string, options, guard) {
16256
- // Based on John Resig's `tmpl` implementation
16257
- // (http://ejohn.org/blog/javascript-micro-templating/)
16258
- // and Laura Doktorova's doT.js (https://github.com/olado/doT).
16259
- var settings = lodash.templateSettings;
16260
-
16261
- if (guard && isIterateeCall(string, options, guard)) {
16262
- options = undefined;
16263
- }
16264
- string = toString(string);
16265
- options = assignInWith({}, options, settings, customDefaultsAssignIn);
16266
-
16267
- var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
16268
- importsKeys = keys(imports),
16269
- importsValues = baseValues(imports, importsKeys);
16270
-
16271
- var isEscaping,
16272
- isEvaluating,
16273
- index = 0,
16274
- interpolate = options.interpolate || reNoMatch,
16275
- source = "__p += '";
16276
-
16277
- // Compile the regexp to match each delimiter.
16278
- var reDelimiters = RegExp(
16279
- (options.escape || reNoMatch).source + '|' +
16280
- interpolate.source + '|' +
16281
- (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
16282
- (options.evaluate || reNoMatch).source + '|$'
16283
- , 'g');
16284
-
16285
- // Use a sourceURL for easier debugging.
16286
- var sourceURL = '//# sourceURL=' +
16287
- ('sourceURL' in options
16288
- ? options.sourceURL
16289
- : ('lodash.templateSources[' + (++templateCounter) + ']')
16290
- ) + '\n';
16291
-
16292
- string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
16293
- interpolateValue || (interpolateValue = esTemplateValue);
16294
-
16295
- // Escape characters that can't be included in string literals.
16296
- source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
16297
-
16298
- // Replace delimiters with snippets.
16299
- if (escapeValue) {
16300
- isEscaping = true;
16301
- source += "' +\n__e(" + escapeValue + ") +\n'";
16302
- }
16303
- if (evaluateValue) {
16304
- isEvaluating = true;
16305
- source += "';\n" + evaluateValue + ";\n__p += '";
16306
- }
16307
- if (interpolateValue) {
16308
- source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
16309
- }
16310
- index = offset + match.length;
16311
-
16312
- // The JS engine embedded in Adobe products needs `match` returned in
16313
- // order to produce the correct `offset` value.
16314
- return match;
16315
- });
16316
-
16317
- source += "';\n";
16318
-
16319
- // If `variable` is not specified wrap a with-statement around the generated
16320
- // code to add the data object to the top of the scope chain.
16321
- var variable = options.variable;
16322
- if (!variable) {
16323
- source = 'with (obj) {\n' + source + '\n}\n';
16324
- }
16325
- // Cleanup code by stripping empty strings.
16326
- source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
16327
- .replace(reEmptyStringMiddle, '$1')
16328
- .replace(reEmptyStringTrailing, '$1;');
16329
-
16330
- // Frame code as the function body.
16331
- source = 'function(' + (variable || 'obj') + ') {\n' +
16332
- (variable
16333
- ? ''
16334
- : 'obj || (obj = {});\n'
16335
- ) +
16336
- "var __t, __p = ''" +
16337
- (isEscaping
16338
- ? ', __e = _.escape'
16339
- : ''
16340
- ) +
16341
- (isEvaluating
16342
- ? ', __j = Array.prototype.join;\n' +
16343
- "function print() { __p += __j.call(arguments, '') }\n"
16344
- : ';\n'
16345
- ) +
16346
- source +
16347
- 'return __p\n}';
16348
-
16349
- var result = attempt(function() {
16350
- return Function(importsKeys, sourceURL + 'return ' + source)
16351
- .apply(undefined, importsValues);
16352
- });
16353
-
16354
- // Provide the compiled function's source by its `toString` method or
16355
- // the `source` property as a convenience for inlining compiled templates.
16356
- result.source = source;
16357
- if (isError(result)) {
16358
- throw result;
16359
- }
16360
- return result;
16361
- }
16362
-
16363
- /**
16364
- * Converts `string`, as a whole, to lower case just like
16365
- * [String#toLowerCase](https://mdn.io/toLowerCase).
16366
- *
16367
- * @static
16368
- * @memberOf _
16369
- * @since 4.0.0
16370
- * @category String
16371
- * @param {string} [string=''] The string to convert.
16372
- * @returns {string} Returns the lower cased string.
16373
- * @example
16374
- *
16375
- * _.toLower('--Foo-Bar--');
16376
- * // => '--foo-bar--'
16377
- *
16378
- * _.toLower('fooBar');
16379
- * // => 'foobar'
16380
- *
16381
- * _.toLower('__FOO_BAR__');
16382
- * // => '__foo_bar__'
16383
- */
16384
- function toLower(value) {
16385
- return toString(value).toLowerCase();
16386
- }
16387
-
16388
- /**
16389
- * Converts `string`, as a whole, to upper case just like
16390
- * [String#toUpperCase](https://mdn.io/toUpperCase).
16391
- *
16392
- * @static
16393
- * @memberOf _
16394
- * @since 4.0.0
16395
- * @category String
16396
- * @param {string} [string=''] The string to convert.
16397
- * @returns {string} Returns the upper cased string.
16398
- * @example
16399
- *
16400
- * _.toUpper('--foo-bar--');
16401
- * // => '--FOO-BAR--'
16402
- *
16403
- * _.toUpper('fooBar');
16404
- * // => 'FOOBAR'
16405
- *
16406
- * _.toUpper('__foo_bar__');
16407
- * // => '__FOO_BAR__'
16408
- */
16409
- function toUpper(value) {
16410
- return toString(value).toUpperCase();
16411
- }
16412
-
16413
- /**
16414
- * Removes leading and trailing whitespace or specified characters from `string`.
16415
- *
16416
- * @static
16417
- * @memberOf _
16418
- * @since 3.0.0
16419
- * @category String
16420
- * @param {string} [string=''] The string to trim.
16421
- * @param {string} [chars=whitespace] The characters to trim.
16422
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
16423
- * @returns {string} Returns the trimmed string.
16424
- * @example
16425
- *
16426
- * _.trim(' abc ');
16427
- * // => 'abc'
16428
- *
16429
- * _.trim('-_-abc-_-', '_-');
16430
- * // => 'abc'
16431
- *
16432
- * _.map([' foo ', ' bar '], _.trim);
16433
- * // => ['foo', 'bar']
16434
- */
16435
- function trim(string, chars, guard) {
16436
- string = toString(string);
16437
- if (string && (guard || chars === undefined)) {
16438
- return string.replace(reTrim, '');
16439
- }
16440
- if (!string || !(chars = baseToString(chars))) {
16441
- return string;
16442
- }
16443
- var strSymbols = stringToArray(string),
16444
- chrSymbols = stringToArray(chars),
16445
- start = charsStartIndex(strSymbols, chrSymbols),
16446
- end = charsEndIndex(strSymbols, chrSymbols) + 1;
16447
-
16448
- return castSlice(strSymbols, start, end).join('');
16449
- }
16450
-
16451
- /**
16452
- * Removes trailing whitespace or specified characters from `string`.
16453
- *
16454
- * @static
16455
- * @memberOf _
16456
- * @since 4.0.0
16457
- * @category String
16458
- * @param {string} [string=''] The string to trim.
16459
- * @param {string} [chars=whitespace] The characters to trim.
16460
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
16461
- * @returns {string} Returns the trimmed string.
16462
- * @example
16463
- *
16464
- * _.trimEnd(' abc ');
16465
- * // => ' abc'
16466
- *
16467
- * _.trimEnd('-_-abc-_-', '_-');
16468
- * // => '-_-abc'
16469
- */
16470
- function trimEnd(string, chars, guard) {
16471
- string = toString(string);
16472
- if (string && (guard || chars === undefined)) {
16473
- return string.replace(reTrimEnd, '');
16474
- }
16475
- if (!string || !(chars = baseToString(chars))) {
16476
- return string;
16477
- }
16478
- var strSymbols = stringToArray(string),
16479
- end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
16480
-
16481
- return castSlice(strSymbols, 0, end).join('');
16482
- }
16483
-
16484
- /**
16485
- * Removes leading whitespace or specified characters from `string`.
16486
- *
16487
- * @static
16488
- * @memberOf _
16489
- * @since 4.0.0
16490
- * @category String
16491
- * @param {string} [string=''] The string to trim.
16492
- * @param {string} [chars=whitespace] The characters to trim.
16493
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
16494
- * @returns {string} Returns the trimmed string.
16495
- * @example
16496
- *
16497
- * _.trimStart(' abc ');
16498
- * // => 'abc '
16499
- *
16500
- * _.trimStart('-_-abc-_-', '_-');
16501
- * // => 'abc-_-'
16502
- */
16503
- function trimStart(string, chars, guard) {
16504
- string = toString(string);
16505
- if (string && (guard || chars === undefined)) {
16506
- return string.replace(reTrimStart, '');
16507
- }
16508
- if (!string || !(chars = baseToString(chars))) {
16509
- return string;
16510
- }
16511
- var strSymbols = stringToArray(string),
16512
- start = charsStartIndex(strSymbols, stringToArray(chars));
16513
-
16514
- return castSlice(strSymbols, start).join('');
16515
- }
16516
-
16517
- /**
16518
- * Truncates `string` if it's longer than the given maximum string length.
16519
- * The last characters of the truncated string are replaced with the omission
16520
- * string which defaults to "...".
16521
- *
16522
- * @static
16523
- * @memberOf _
16524
- * @since 4.0.0
16525
- * @category String
16526
- * @param {string} [string=''] The string to truncate.
16527
- * @param {Object} [options={}] The options object.
16528
- * @param {number} [options.length=30] The maximum string length.
16529
- * @param {string} [options.omission='...'] The string to indicate text is omitted.
16530
- * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
16531
- * @returns {string} Returns the truncated string.
16532
- * @example
16533
- *
16534
- * _.truncate('hi-diddly-ho there, neighborino');
16535
- * // => 'hi-diddly-ho there, neighbo...'
16536
- *
16537
- * _.truncate('hi-diddly-ho there, neighborino', {
16538
- * 'length': 24,
16539
- * 'separator': ' '
16540
- * });
16541
- * // => 'hi-diddly-ho there,...'
16542
- *
16543
- * _.truncate('hi-diddly-ho there, neighborino', {
16544
- * 'length': 24,
16545
- * 'separator': /,? +/
16546
- * });
16547
- * // => 'hi-diddly-ho there...'
16548
- *
16549
- * _.truncate('hi-diddly-ho there, neighborino', {
16550
- * 'omission': ' [...]'
16551
- * });
16552
- * // => 'hi-diddly-ho there, neig [...]'
16553
- */
16554
- function truncate(string, options) {
16555
- var length = DEFAULT_TRUNC_LENGTH,
16556
- omission = DEFAULT_TRUNC_OMISSION;
16557
-
16558
- if (isObject(options)) {
16559
- var separator = 'separator' in options ? options.separator : separator;
16560
- length = 'length' in options ? toInteger(options.length) : length;
16561
- omission = 'omission' in options ? baseToString(options.omission) : omission;
16562
- }
16563
- string = toString(string);
16564
-
16565
- var strLength = string.length;
16566
- if (hasUnicode(string)) {
16567
- var strSymbols = stringToArray(string);
16568
- strLength = strSymbols.length;
16569
- }
16570
- if (length >= strLength) {
16571
- return string;
16572
- }
16573
- var end = length - stringSize(omission);
16574
- if (end < 1) {
16575
- return omission;
16576
- }
16577
- var result = strSymbols
16578
- ? castSlice(strSymbols, 0, end).join('')
16579
- : string.slice(0, end);
16580
-
16581
- if (separator === undefined) {
16582
- return result + omission;
16583
- }
16584
- if (strSymbols) {
16585
- end += (result.length - end);
16586
- }
16587
- if (isRegExp(separator)) {
16588
- if (string.slice(end).search(separator)) {
16589
- var match,
16590
- substring = result;
16591
-
16592
- if (!separator.global) {
16593
- separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
16594
- }
16595
- separator.lastIndex = 0;
16596
- while ((match = separator.exec(substring))) {
16597
- var newEnd = match.index;
16598
- }
16599
- result = result.slice(0, newEnd === undefined ? end : newEnd);
16600
- }
16601
- } else if (string.indexOf(baseToString(separator), end) != end) {
16602
- var index = result.lastIndexOf(separator);
16603
- if (index > -1) {
16604
- result = result.slice(0, index);
16605
- }
16606
- }
16607
- return result + omission;
16608
- }
16609
-
16610
- /**
16611
- * The inverse of `_.escape`; this method converts the HTML entities
16612
- * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
16613
- * their corresponding characters.
16614
- *
16615
- * **Note:** No other HTML entities are unescaped. To unescape additional
16616
- * HTML entities use a third-party library like [_he_](https://mths.be/he).
16617
- *
16618
- * @static
16619
- * @memberOf _
16620
- * @since 0.6.0
16621
- * @category String
16622
- * @param {string} [string=''] The string to unescape.
16623
- * @returns {string} Returns the unescaped string.
16624
- * @example
16625
- *
16626
- * _.unescape('fred, barney, &amp; pebbles');
16627
- * // => 'fred, barney, & pebbles'
16628
- */
16629
- function unescape(string) {
16630
- string = toString(string);
16631
- return (string && reHasEscapedHtml.test(string))
16632
- ? string.replace(reEscapedHtml, unescapeHtmlChar)
16633
- : string;
16634
- }
16635
-
16636
- /**
16637
- * Converts `string`, as space separated words, to upper case.
16638
- *
16639
- * @static
16640
- * @memberOf _
16641
- * @since 4.0.0
16642
- * @category String
16643
- * @param {string} [string=''] The string to convert.
16644
- * @returns {string} Returns the upper cased string.
16645
- * @example
16646
- *
16647
- * _.upperCase('--foo-bar');
16648
- * // => 'FOO BAR'
16649
- *
16650
- * _.upperCase('fooBar');
16651
- * // => 'FOO BAR'
16652
- *
16653
- * _.upperCase('__foo_bar__');
16654
- * // => 'FOO BAR'
16655
- */
16656
- var upperCase = createCompounder(function(result, word, index) {
16657
- return result + (index ? ' ' : '') + word.toUpperCase();
16658
- });
16659
-
16660
- /**
16661
- * Converts the first character of `string` to upper case.
16662
- *
16663
- * @static
16664
- * @memberOf _
16665
- * @since 4.0.0
16666
- * @category String
16667
- * @param {string} [string=''] The string to convert.
16668
- * @returns {string} Returns the converted string.
16669
- * @example
16670
- *
16671
- * _.upperFirst('fred');
16672
- * // => 'Fred'
16673
- *
16674
- * _.upperFirst('FRED');
16675
- * // => 'FRED'
16676
- */
16677
- var upperFirst = createCaseFirst('toUpperCase');
16678
-
16679
- /**
16680
- * Splits `string` into an array of its words.
16681
- *
16682
- * @static
16683
- * @memberOf _
16684
- * @since 3.0.0
16685
- * @category String
16686
- * @param {string} [string=''] The string to inspect.
16687
- * @param {RegExp|string} [pattern] The pattern to match words.
16688
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
16689
- * @returns {Array} Returns the words of `string`.
16690
- * @example
16691
- *
16692
- * _.words('fred, barney, & pebbles');
16693
- * // => ['fred', 'barney', 'pebbles']
16694
- *
16695
- * _.words('fred, barney, & pebbles', /[^, ]+/g);
16696
- * // => ['fred', 'barney', '&', 'pebbles']
16697
- */
16698
- function words(string, pattern, guard) {
16699
- string = toString(string);
16700
- pattern = guard ? undefined : pattern;
16701
-
16702
- if (pattern === undefined) {
16703
- return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
16704
- }
16705
- return string.match(pattern) || [];
16706
- }
16707
-
16708
- /*------------------------------------------------------------------------*/
16709
-
16710
- /**
16711
- * Attempts to invoke `func`, returning either the result or the caught error
16712
- * object. Any additional arguments are provided to `func` when it's invoked.
16713
- *
16714
- * @static
16715
- * @memberOf _
16716
- * @since 3.0.0
16717
- * @category Util
16718
- * @param {Function} func The function to attempt.
16719
- * @param {...*} [args] The arguments to invoke `func` with.
16720
- * @returns {*} Returns the `func` result or error object.
16721
- * @example
16722
- *
16723
- * // Avoid throwing errors for invalid selectors.
16724
- * var elements = _.attempt(function(selector) {
16725
- * return document.querySelectorAll(selector);
16726
- * }, '>_>');
16727
- *
16728
- * if (_.isError(elements)) {
16729
- * elements = [];
16730
- * }
16731
- */
16732
- var attempt = baseRest(function(func, args) {
16733
- try {
16734
- return apply(func, undefined, args);
16735
- } catch (e) {
16736
- return isError(e) ? e : new Error(e);
16737
- }
16738
- });
16739
-
16740
- /**
16741
- * Binds methods of an object to the object itself, overwriting the existing
16742
- * method.
16743
- *
16744
- * **Note:** This method doesn't set the "length" property of bound functions.
16745
- *
16746
- * @static
16747
- * @since 0.1.0
16748
- * @memberOf _
16749
- * @category Util
16750
- * @param {Object} object The object to bind and assign the bound methods to.
16751
- * @param {...(string|string[])} methodNames The object method names to bind.
16752
- * @returns {Object} Returns `object`.
16753
- * @example
16754
- *
16755
- * var view = {
16756
- * 'label': 'docs',
16757
- * 'click': function() {
16758
- * console.log('clicked ' + this.label);
16759
- * }
16760
- * };
16761
- *
16762
- * _.bindAll(view, ['click']);
16763
- * jQuery(element).on('click', view.click);
16764
- * // => Logs 'clicked docs' when clicked.
16765
- */
16766
- var bindAll = flatRest(function(object, methodNames) {
16767
- arrayEach(methodNames, function(key) {
16768
- key = toKey(key);
16769
- baseAssignValue(object, key, bind(object[key], object));
16770
- });
16771
- return object;
16772
- });
16773
-
16774
- /**
16775
- * Creates a function that iterates over `pairs` and invokes the corresponding
16776
- * function of the first predicate to return truthy. The predicate-function
16777
- * pairs are invoked with the `this` binding and arguments of the created
16778
- * function.
16779
- *
16780
- * @static
16781
- * @memberOf _
16782
- * @since 4.0.0
16783
- * @category Util
16784
- * @param {Array} pairs The predicate-function pairs.
16785
- * @returns {Function} Returns the new composite function.
16786
- * @example
16787
- *
16788
- * var func = _.cond([
16789
- * [_.matches({ 'a': 1 }), _.constant('matches A')],
16790
- * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
16791
- * [_.stubTrue, _.constant('no match')]
16792
- * ]);
16793
- *
16794
- * func({ 'a': 1, 'b': 2 });
16795
- * // => 'matches A'
16796
- *
16797
- * func({ 'a': 0, 'b': 1 });
16798
- * // => 'matches B'
16799
- *
16800
- * func({ 'a': '1', 'b': '2' });
16801
- * // => 'no match'
16802
- */
16803
- function cond(pairs) {
16804
- var length = pairs == null ? 0 : pairs.length,
16805
- toIteratee = getIteratee();
16806
-
16807
- pairs = !length ? [] : arrayMap(pairs, function(pair) {
16808
- if (typeof pair[1] != 'function') {
16809
- throw new TypeError(FUNC_ERROR_TEXT);
16810
- }
16811
- return [toIteratee(pair[0]), pair[1]];
16812
- });
16813
-
16814
- return baseRest(function(args) {
16815
- var index = -1;
16816
- while (++index < length) {
16817
- var pair = pairs[index];
16818
- if (apply(pair[0], this, args)) {
16819
- return apply(pair[1], this, args);
16820
- }
16821
- }
16822
- });
16823
- }
16824
-
16825
- /**
16826
- * Creates a function that invokes the predicate properties of `source` with
16827
- * the corresponding property values of a given object, returning `true` if
16828
- * all predicates return truthy, else `false`.
16829
- *
16830
- * **Note:** The created function is equivalent to `_.conformsTo` with
16831
- * `source` partially applied.
16832
- *
16833
- * @static
16834
- * @memberOf _
16835
- * @since 4.0.0
16836
- * @category Util
16837
- * @param {Object} source The object of property predicates to conform to.
16838
- * @returns {Function} Returns the new spec function.
16839
- * @example
16840
- *
16841
- * var objects = [
16842
- * { 'a': 2, 'b': 1 },
16843
- * { 'a': 1, 'b': 2 }
16844
- * ];
16845
- *
16846
- * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
16847
- * // => [{ 'a': 1, 'b': 2 }]
16848
- */
16849
- function conforms(source) {
16850
- return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
16851
- }
16852
-
16853
- /**
16854
- * Creates a function that returns `value`.
16855
- *
16856
- * @static
16857
- * @memberOf _
16858
- * @since 2.4.0
16859
- * @category Util
16860
- * @param {*} value The value to return from the new function.
16861
- * @returns {Function} Returns the new constant function.
16862
- * @example
16863
- *
16864
- * var objects = _.times(2, _.constant({ 'a': 1 }));
16865
- *
16866
- * console.log(objects);
16867
- * // => [{ 'a': 1 }, { 'a': 1 }]
16868
- *
16869
- * console.log(objects[0] === objects[1]);
16870
- * // => true
16871
- */
16872
- function constant(value) {
16873
- return function() {
16874
- return value;
16875
- };
16876
- }
16877
-
16878
- /**
16879
- * Checks `value` to determine whether a default value should be returned in
16880
- * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
16881
- * or `undefined`.
16882
- *
16883
- * @static
16884
- * @memberOf _
16885
- * @since 4.14.0
16886
- * @category Util
16887
- * @param {*} value The value to check.
16888
- * @param {*} defaultValue The default value.
16889
- * @returns {*} Returns the resolved value.
16890
- * @example
16891
- *
16892
- * _.defaultTo(1, 10);
16893
- * // => 1
16894
- *
16895
- * _.defaultTo(undefined, 10);
16896
- * // => 10
16897
- */
16898
- function defaultTo(value, defaultValue) {
16899
- return (value == null || value !== value) ? defaultValue : value;
16900
- }
16901
-
16902
- /**
16903
- * Creates a function that returns the result of invoking the given functions
16904
- * with the `this` binding of the created function, where each successive
16905
- * invocation is supplied the return value of the previous.
16906
- *
16907
- * @static
16908
- * @memberOf _
16909
- * @since 3.0.0
16910
- * @category Util
16911
- * @param {...(Function|Function[])} [funcs] The functions to invoke.
16912
- * @returns {Function} Returns the new composite function.
16913
- * @see _.flowRight
16914
- * @example
16915
- *
16916
- * function square(n) {
16917
- * return n * n;
16918
- * }
16919
- *
16920
- * var addSquare = _.flow([_.add, square]);
16921
- * addSquare(1, 2);
16922
- * // => 9
16923
- */
16924
- var flow = createFlow();
16925
-
16926
- /**
16927
- * This method is like `_.flow` except that it creates a function that
16928
- * invokes the given functions from right to left.
16929
- *
16930
- * @static
16931
- * @since 3.0.0
16932
- * @memberOf _
16933
- * @category Util
16934
- * @param {...(Function|Function[])} [funcs] The functions to invoke.
16935
- * @returns {Function} Returns the new composite function.
16936
- * @see _.flow
16937
- * @example
16938
- *
16939
- * function square(n) {
16940
- * return n * n;
16941
- * }
16942
- *
16943
- * var addSquare = _.flowRight([square, _.add]);
16944
- * addSquare(1, 2);
16945
- * // => 9
16946
- */
16947
- var flowRight = createFlow(true);
16948
-
16949
- /**
16950
- * This method returns the first argument it receives.
16951
- *
16952
- * @static
16953
- * @since 0.1.0
16954
- * @memberOf _
16955
- * @category Util
16956
- * @param {*} value Any value.
16957
- * @returns {*} Returns `value`.
16958
- * @example
16959
- *
16960
- * var object = { 'a': 1 };
16961
- *
16962
- * console.log(_.identity(object) === object);
16963
- * // => true
16964
- */
16965
- function identity(value) {
16966
- return value;
16967
- }
16968
-
16969
- /**
16970
- * Creates a function that invokes `func` with the arguments of the created
16971
- * function. If `func` is a property name, the created function returns the
16972
- * property value for a given element. If `func` is an array or object, the
16973
- * created function returns `true` for elements that contain the equivalent
16974
- * source properties, otherwise it returns `false`.
16975
- *
16976
- * @static
16977
- * @since 4.0.0
16978
- * @memberOf _
16979
- * @category Util
16980
- * @param {*} [func=_.identity] The value to convert to a callback.
16981
- * @returns {Function} Returns the callback.
16982
- * @example
16983
- *
16984
- * var users = [
16985
- * { 'user': 'barney', 'age': 36, 'active': true },
16986
- * { 'user': 'fred', 'age': 40, 'active': false }
16987
- * ];
16988
- *
16989
- * // The `_.matches` iteratee shorthand.
16990
- * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
16991
- * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
16992
- *
16993
- * // The `_.matchesProperty` iteratee shorthand.
16994
- * _.filter(users, _.iteratee(['user', 'fred']));
16995
- * // => [{ 'user': 'fred', 'age': 40 }]
16996
- *
16997
- * // The `_.property` iteratee shorthand.
16998
- * _.map(users, _.iteratee('user'));
16999
- * // => ['barney', 'fred']
17000
- *
17001
- * // Create custom iteratee shorthands.
17002
- * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
17003
- * return !_.isRegExp(func) ? iteratee(func) : function(string) {
17004
- * return func.test(string);
17005
- * };
17006
- * });
17007
- *
17008
- * _.filter(['abc', 'def'], /ef/);
17009
- * // => ['def']
17010
- */
17011
- function iteratee(func) {
17012
- return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
17013
- }
17014
-
17015
- /**
17016
- * Creates a function that performs a partial deep comparison between a given
17017
- * object and `source`, returning `true` if the given object has equivalent
17018
- * property values, else `false`.
17019
- *
17020
- * **Note:** The created function is equivalent to `_.isMatch` with `source`
17021
- * partially applied.
17022
- *
17023
- * Partial comparisons will match empty array and empty object `source`
17024
- * values against any array or object value, respectively. See `_.isEqual`
17025
- * for a list of supported value comparisons.
17026
- *
17027
- * @static
17028
- * @memberOf _
17029
- * @since 3.0.0
17030
- * @category Util
17031
- * @param {Object} source The object of property values to match.
17032
- * @returns {Function} Returns the new spec function.
17033
- * @example
17034
- *
17035
- * var objects = [
17036
- * { 'a': 1, 'b': 2, 'c': 3 },
17037
- * { 'a': 4, 'b': 5, 'c': 6 }
17038
- * ];
17039
- *
17040
- * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
17041
- * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
17042
- */
17043
- function matches(source) {
17044
- return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
17045
- }
17046
-
17047
- /**
17048
- * Creates a function that performs a partial deep comparison between the
17049
- * value at `path` of a given object to `srcValue`, returning `true` if the
17050
- * object value is equivalent, else `false`.
17051
- *
17052
- * **Note:** Partial comparisons will match empty array and empty object
17053
- * `srcValue` values against any array or object value, respectively. See
17054
- * `_.isEqual` for a list of supported value comparisons.
17055
- *
17056
- * @static
17057
- * @memberOf _
17058
- * @since 3.2.0
17059
- * @category Util
17060
- * @param {Array|string} path The path of the property to get.
17061
- * @param {*} srcValue The value to match.
17062
- * @returns {Function} Returns the new spec function.
17063
- * @example
17064
- *
17065
- * var objects = [
17066
- * { 'a': 1, 'b': 2, 'c': 3 },
17067
- * { 'a': 4, 'b': 5, 'c': 6 }
17068
- * ];
17069
- *
17070
- * _.find(objects, _.matchesProperty('a', 4));
17071
- * // => { 'a': 4, 'b': 5, 'c': 6 }
17072
- */
17073
- function matchesProperty(path, srcValue) {
17074
- return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
17075
- }
17076
-
17077
- /**
17078
- * Creates a function that invokes the method at `path` of a given object.
17079
- * Any additional arguments are provided to the invoked method.
17080
- *
17081
- * @static
17082
- * @memberOf _
17083
- * @since 3.7.0
17084
- * @category Util
17085
- * @param {Array|string} path The path of the method to invoke.
17086
- * @param {...*} [args] The arguments to invoke the method with.
17087
- * @returns {Function} Returns the new invoker function.
17088
- * @example
17089
- *
17090
- * var objects = [
17091
- * { 'a': { 'b': _.constant(2) } },
17092
- * { 'a': { 'b': _.constant(1) } }
17093
- * ];
17094
- *
17095
- * _.map(objects, _.method('a.b'));
17096
- * // => [2, 1]
17097
- *
17098
- * _.map(objects, _.method(['a', 'b']));
17099
- * // => [2, 1]
17100
- */
17101
- var method = baseRest(function(path, args) {
17102
- return function(object) {
17103
- return baseInvoke(object, path, args);
17104
- };
17105
- });
17106
-
17107
- /**
17108
- * The opposite of `_.method`; this method creates a function that invokes
17109
- * the method at a given path of `object`. Any additional arguments are
17110
- * provided to the invoked method.
17111
- *
17112
- * @static
17113
- * @memberOf _
17114
- * @since 3.7.0
17115
- * @category Util
17116
- * @param {Object} object The object to query.
17117
- * @param {...*} [args] The arguments to invoke the method with.
17118
- * @returns {Function} Returns the new invoker function.
17119
- * @example
17120
- *
17121
- * var array = _.times(3, _.constant),
17122
- * object = { 'a': array, 'b': array, 'c': array };
17123
- *
17124
- * _.map(['a[2]', 'c[0]'], _.methodOf(object));
17125
- * // => [2, 0]
17126
- *
17127
- * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
17128
- * // => [2, 0]
17129
- */
17130
- var methodOf = baseRest(function(object, args) {
17131
- return function(path) {
17132
- return baseInvoke(object, path, args);
17133
- };
17134
- });
17135
-
17136
- /**
17137
- * Adds all own enumerable string keyed function properties of a source
17138
- * object to the destination object. If `object` is a function, then methods
17139
- * are added to its prototype as well.
17140
- *
17141
- * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
17142
- * avoid conflicts caused by modifying the original.
17143
- *
17144
- * @static
17145
- * @since 0.1.0
17146
- * @memberOf _
17147
- * @category Util
17148
- * @param {Function|Object} [object=lodash] The destination object.
17149
- * @param {Object} source The object of functions to add.
17150
- * @param {Object} [options={}] The options object.
17151
- * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
17152
- * @returns {Function|Object} Returns `object`.
17153
- * @example
17154
- *
17155
- * function vowels(string) {
17156
- * return _.filter(string, function(v) {
17157
- * return /[aeiou]/i.test(v);
17158
- * });
17159
- * }
17160
- *
17161
- * _.mixin({ 'vowels': vowels });
17162
- * _.vowels('fred');
17163
- * // => ['e']
17164
- *
17165
- * _('fred').vowels().value();
17166
- * // => ['e']
17167
- *
17168
- * _.mixin({ 'vowels': vowels }, { 'chain': false });
17169
- * _('fred').vowels();
17170
- * // => ['e']
17171
- */
17172
- function mixin(object, source, options) {
17173
- var props = keys(source),
17174
- methodNames = baseFunctions(source, props);
17175
-
17176
- if (options == null &&
17177
- !(isObject(source) && (methodNames.length || !props.length))) {
17178
- options = source;
17179
- source = object;
17180
- object = this;
17181
- methodNames = baseFunctions(source, keys(source));
17182
- }
17183
- var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
17184
- isFunc = isFunction(object);
17185
-
17186
- arrayEach(methodNames, function(methodName) {
17187
- var func = source[methodName];
17188
- object[methodName] = func;
17189
- if (isFunc) {
17190
- object.prototype[methodName] = function() {
17191
- var chainAll = this.__chain__;
17192
- if (chain || chainAll) {
17193
- var result = object(this.__wrapped__),
17194
- actions = result.__actions__ = copyArray(this.__actions__);
17195
-
17196
- actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
17197
- result.__chain__ = chainAll;
17198
- return result;
17199
- }
17200
- return func.apply(object, arrayPush([this.value()], arguments));
17201
- };
17202
- }
17203
- });
17204
-
17205
- return object;
17206
- }
17207
-
17208
- /**
17209
- * Reverts the `_` variable to its previous value and returns a reference to
17210
- * the `lodash` function.
17211
- *
17212
- * @static
17213
- * @since 0.1.0
17214
- * @memberOf _
17215
- * @category Util
17216
- * @returns {Function} Returns the `lodash` function.
17217
- * @example
17218
- *
17219
- * var lodash = _.noConflict();
17220
- */
17221
- function noConflict() {
17222
- if (root._ === this) {
17223
- root._ = oldDash;
17224
- }
17225
- return this;
17226
- }
17227
-
17228
- /**
17229
- * This method returns `undefined`.
17230
- *
17231
- * @static
17232
- * @memberOf _
17233
- * @since 2.3.0
17234
- * @category Util
17235
- * @example
17236
- *
17237
- * _.times(2, _.noop);
17238
- * // => [undefined, undefined]
17239
- */
17240
- function noop() {
17241
- // No operation performed.
17242
- }
17243
-
17244
- /**
17245
- * Creates a function that gets the argument at index `n`. If `n` is negative,
17246
- * the nth argument from the end is returned.
17247
- *
17248
- * @static
17249
- * @memberOf _
17250
- * @since 4.0.0
17251
- * @category Util
17252
- * @param {number} [n=0] The index of the argument to return.
17253
- * @returns {Function} Returns the new pass-thru function.
17254
- * @example
17255
- *
17256
- * var func = _.nthArg(1);
17257
- * func('a', 'b', 'c', 'd');
17258
- * // => 'b'
17259
- *
17260
- * var func = _.nthArg(-2);
17261
- * func('a', 'b', 'c', 'd');
17262
- * // => 'c'
17263
- */
17264
- function nthArg(n) {
17265
- n = toInteger(n);
17266
- return baseRest(function(args) {
17267
- return baseNth(args, n);
17268
- });
17269
- }
17270
-
17271
- /**
17272
- * Creates a function that invokes `iteratees` with the arguments it receives
17273
- * and returns their results.
17274
- *
17275
- * @static
17276
- * @memberOf _
17277
- * @since 4.0.0
17278
- * @category Util
17279
- * @param {...(Function|Function[])} [iteratees=[_.identity]]
17280
- * The iteratees to invoke.
17281
- * @returns {Function} Returns the new function.
17282
- * @example
17283
- *
17284
- * var func = _.over([Math.max, Math.min]);
17285
- *
17286
- * func(1, 2, 3, 4);
17287
- * // => [4, 1]
17288
- */
17289
- var over = createOver(arrayMap);
17290
-
17291
- /**
17292
- * Creates a function that checks if **all** of the `predicates` return
17293
- * truthy when invoked with the arguments it receives.
17294
- *
17295
- * @static
17296
- * @memberOf _
17297
- * @since 4.0.0
17298
- * @category Util
17299
- * @param {...(Function|Function[])} [predicates=[_.identity]]
17300
- * The predicates to check.
17301
- * @returns {Function} Returns the new function.
17302
- * @example
17303
- *
17304
- * var func = _.overEvery([Boolean, isFinite]);
17305
- *
17306
- * func('1');
17307
- * // => true
17308
- *
17309
- * func(null);
17310
- * // => false
17311
- *
17312
- * func(NaN);
17313
- * // => false
17314
- */
17315
- var overEvery = createOver(arrayEvery);
17316
-
17317
- /**
17318
- * Creates a function that checks if **any** of the `predicates` return
17319
- * truthy when invoked with the arguments it receives.
17320
- *
17321
- * @static
17322
- * @memberOf _
17323
- * @since 4.0.0
17324
- * @category Util
17325
- * @param {...(Function|Function[])} [predicates=[_.identity]]
17326
- * The predicates to check.
17327
- * @returns {Function} Returns the new function.
17328
- * @example
17329
- *
17330
- * var func = _.overSome([Boolean, isFinite]);
17331
- *
17332
- * func('1');
17333
- * // => true
17334
- *
17335
- * func(null);
17336
- * // => true
17337
- *
17338
- * func(NaN);
17339
- * // => false
17340
- */
17341
- var overSome = createOver(arraySome);
17342
-
17343
- /**
17344
- * Creates a function that returns the value at `path` of a given object.
17345
- *
17346
- * @static
17347
- * @memberOf _
17348
- * @since 2.4.0
17349
- * @category Util
17350
- * @param {Array|string} path The path of the property to get.
17351
- * @returns {Function} Returns the new accessor function.
17352
- * @example
17353
- *
17354
- * var objects = [
17355
- * { 'a': { 'b': 2 } },
17356
- * { 'a': { 'b': 1 } }
17357
- * ];
17358
- *
17359
- * _.map(objects, _.property('a.b'));
17360
- * // => [2, 1]
17361
- *
17362
- * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
17363
- * // => [1, 2]
17364
- */
17365
- function property(path) {
17366
- return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
17367
- }
17368
-
17369
- /**
17370
- * The opposite of `_.property`; this method creates a function that returns
17371
- * the value at a given path of `object`.
17372
- *
17373
- * @static
17374
- * @memberOf _
17375
- * @since 3.0.0
17376
- * @category Util
17377
- * @param {Object} object The object to query.
17378
- * @returns {Function} Returns the new accessor function.
17379
- * @example
17380
- *
17381
- * var array = [0, 1, 2],
17382
- * object = { 'a': array, 'b': array, 'c': array };
17383
- *
17384
- * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
17385
- * // => [2, 0]
17386
- *
17387
- * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
17388
- * // => [2, 0]
17389
- */
17390
- function propertyOf(object) {
17391
- return function(path) {
17392
- return object == null ? undefined : baseGet(object, path);
17393
- };
17394
- }
17395
-
17396
- /**
17397
- * Creates an array of numbers (positive and/or negative) progressing from
17398
- * `start` up to, but not including, `end`. A step of `-1` is used if a negative
17399
- * `start` is specified without an `end` or `step`. If `end` is not specified,
17400
- * it's set to `start` with `start` then set to `0`.
17401
- *
17402
- * **Note:** JavaScript follows the IEEE-754 standard for resolving
17403
- * floating-point values which can produce unexpected results.
17404
- *
17405
- * @static
17406
- * @since 0.1.0
17407
- * @memberOf _
17408
- * @category Util
17409
- * @param {number} [start=0] The start of the range.
17410
- * @param {number} end The end of the range.
17411
- * @param {number} [step=1] The value to increment or decrement by.
17412
- * @returns {Array} Returns the range of numbers.
17413
- * @see _.inRange, _.rangeRight
17414
- * @example
17415
- *
17416
- * _.range(4);
17417
- * // => [0, 1, 2, 3]
17418
- *
17419
- * _.range(-4);
17420
- * // => [0, -1, -2, -3]
17421
- *
17422
- * _.range(1, 5);
17423
- * // => [1, 2, 3, 4]
17424
- *
17425
- * _.range(0, 20, 5);
17426
- * // => [0, 5, 10, 15]
17427
- *
17428
- * _.range(0, -4, -1);
17429
- * // => [0, -1, -2, -3]
17430
- *
17431
- * _.range(1, 4, 0);
17432
- * // => [1, 1, 1]
17433
- *
17434
- * _.range(0);
17435
- * // => []
17436
- */
17437
- var range = createRange();
17438
-
17439
- /**
17440
- * This method is like `_.range` except that it populates values in
17441
- * descending order.
17442
- *
17443
- * @static
17444
- * @memberOf _
17445
- * @since 4.0.0
17446
- * @category Util
17447
- * @param {number} [start=0] The start of the range.
17448
- * @param {number} end The end of the range.
17449
- * @param {number} [step=1] The value to increment or decrement by.
17450
- * @returns {Array} Returns the range of numbers.
17451
- * @see _.inRange, _.range
17452
- * @example
17453
- *
17454
- * _.rangeRight(4);
17455
- * // => [3, 2, 1, 0]
17456
- *
17457
- * _.rangeRight(-4);
17458
- * // => [-3, -2, -1, 0]
17459
- *
17460
- * _.rangeRight(1, 5);
17461
- * // => [4, 3, 2, 1]
17462
- *
17463
- * _.rangeRight(0, 20, 5);
17464
- * // => [15, 10, 5, 0]
17465
- *
17466
- * _.rangeRight(0, -4, -1);
17467
- * // => [-3, -2, -1, 0]
17468
- *
17469
- * _.rangeRight(1, 4, 0);
17470
- * // => [1, 1, 1]
17471
- *
17472
- * _.rangeRight(0);
17473
- * // => []
17474
- */
17475
- var rangeRight = createRange(true);
17476
-
17477
- /**
17478
- * This method returns a new empty array.
17479
- *
17480
- * @static
17481
- * @memberOf _
17482
- * @since 4.13.0
17483
- * @category Util
17484
- * @returns {Array} Returns the new empty array.
17485
- * @example
17486
- *
17487
- * var arrays = _.times(2, _.stubArray);
17488
- *
17489
- * console.log(arrays);
17490
- * // => [[], []]
17491
- *
17492
- * console.log(arrays[0] === arrays[1]);
17493
- * // => false
17494
- */
17495
- function stubArray() {
17496
- return [];
17497
- }
17498
-
17499
- /**
17500
- * This method returns `false`.
17501
- *
17502
- * @static
17503
- * @memberOf _
17504
- * @since 4.13.0
17505
- * @category Util
17506
- * @returns {boolean} Returns `false`.
17507
- * @example
17508
- *
17509
- * _.times(2, _.stubFalse);
17510
- * // => [false, false]
17511
- */
17512
- function stubFalse() {
17513
- return false;
17514
- }
17515
-
17516
- /**
17517
- * This method returns a new empty object.
17518
- *
17519
- * @static
17520
- * @memberOf _
17521
- * @since 4.13.0
17522
- * @category Util
17523
- * @returns {Object} Returns the new empty object.
17524
- * @example
17525
- *
17526
- * var objects = _.times(2, _.stubObject);
17527
- *
17528
- * console.log(objects);
17529
- * // => [{}, {}]
17530
- *
17531
- * console.log(objects[0] === objects[1]);
17532
- * // => false
17533
- */
17534
- function stubObject() {
17535
- return {};
17536
- }
17537
-
17538
- /**
17539
- * This method returns an empty string.
17540
- *
17541
- * @static
17542
- * @memberOf _
17543
- * @since 4.13.0
17544
- * @category Util
17545
- * @returns {string} Returns the empty string.
17546
- * @example
17547
- *
17548
- * _.times(2, _.stubString);
17549
- * // => ['', '']
17550
- */
17551
- function stubString() {
17552
- return '';
17553
- }
17554
-
17555
- /**
17556
- * This method returns `true`.
17557
- *
17558
- * @static
17559
- * @memberOf _
17560
- * @since 4.13.0
17561
- * @category Util
17562
- * @returns {boolean} Returns `true`.
17563
- * @example
17564
- *
17565
- * _.times(2, _.stubTrue);
17566
- * // => [true, true]
17567
- */
17568
- function stubTrue() {
17569
- return true;
17570
- }
17571
-
17572
- /**
17573
- * Invokes the iteratee `n` times, returning an array of the results of
17574
- * each invocation. The iteratee is invoked with one argument; (index).
17575
- *
17576
- * @static
17577
- * @since 0.1.0
17578
- * @memberOf _
17579
- * @category Util
17580
- * @param {number} n The number of times to invoke `iteratee`.
17581
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
17582
- * @returns {Array} Returns the array of results.
17583
- * @example
17584
- *
17585
- * _.times(3, String);
17586
- * // => ['0', '1', '2']
17587
- *
17588
- * _.times(4, _.constant(0));
17589
- * // => [0, 0, 0, 0]
17590
- */
17591
- function times(n, iteratee) {
17592
- n = toInteger(n);
17593
- if (n < 1 || n > MAX_SAFE_INTEGER) {
17594
- return [];
17595
- }
17596
- var index = MAX_ARRAY_LENGTH,
17597
- length = nativeMin(n, MAX_ARRAY_LENGTH);
17598
-
17599
- iteratee = getIteratee(iteratee);
17600
- n -= MAX_ARRAY_LENGTH;
17601
-
17602
- var result = baseTimes(length, iteratee);
17603
- while (++index < n) {
17604
- iteratee(index);
17605
- }
17606
- return result;
17607
- }
17608
-
17609
- /**
17610
- * Converts `value` to a property path array.
17611
- *
17612
- * @static
17613
- * @memberOf _
17614
- * @since 4.0.0
17615
- * @category Util
17616
- * @param {*} value The value to convert.
17617
- * @returns {Array} Returns the new property path array.
17618
- * @example
17619
- *
17620
- * _.toPath('a.b.c');
17621
- * // => ['a', 'b', 'c']
17622
- *
17623
- * _.toPath('a[0].b.c');
17624
- * // => ['a', '0', 'b', 'c']
17625
- */
17626
- function toPath(value) {
17627
- if (isArray(value)) {
17628
- return arrayMap(value, toKey);
17629
- }
17630
- return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
17631
- }
17632
-
17633
- /**
17634
- * Generates a unique ID. If `prefix` is given, the ID is appended to it.
17635
- *
17636
- * @static
17637
- * @since 0.1.0
17638
- * @memberOf _
17639
- * @category Util
17640
- * @param {string} [prefix=''] The value to prefix the ID with.
17641
- * @returns {string} Returns the unique ID.
17642
- * @example
17643
- *
17644
- * _.uniqueId('contact_');
17645
- * // => 'contact_104'
17646
- *
17647
- * _.uniqueId();
17648
- * // => '105'
17649
- */
17650
- function uniqueId(prefix) {
17651
- var id = ++idCounter;
17652
- return toString(prefix) + id;
17653
- }
17654
-
17655
- /*------------------------------------------------------------------------*/
17656
-
17657
- /**
17658
- * Adds two numbers.
17659
- *
17660
- * @static
17661
- * @memberOf _
17662
- * @since 3.4.0
17663
- * @category Math
17664
- * @param {number} augend The first number in an addition.
17665
- * @param {number} addend The second number in an addition.
17666
- * @returns {number} Returns the total.
17667
- * @example
17668
- *
17669
- * _.add(6, 4);
17670
- * // => 10
17671
- */
17672
- var add = createMathOperation(function(augend, addend) {
17673
- return augend + addend;
17674
- }, 0);
17675
-
17676
- /**
17677
- * Computes `number` rounded up to `precision`.
17678
- *
17679
- * @static
17680
- * @memberOf _
17681
- * @since 3.10.0
17682
- * @category Math
17683
- * @param {number} number The number to round up.
17684
- * @param {number} [precision=0] The precision to round up to.
17685
- * @returns {number} Returns the rounded up number.
17686
- * @example
17687
- *
17688
- * _.ceil(4.006);
17689
- * // => 5
17690
- *
17691
- * _.ceil(6.004, 2);
17692
- * // => 6.01
17693
- *
17694
- * _.ceil(6040, -2);
17695
- * // => 6100
17696
- */
17697
- var ceil = createRound('ceil');
17698
-
17699
- /**
17700
- * Divide two numbers.
17701
- *
17702
- * @static
17703
- * @memberOf _
17704
- * @since 4.7.0
17705
- * @category Math
17706
- * @param {number} dividend The first number in a division.
17707
- * @param {number} divisor The second number in a division.
17708
- * @returns {number} Returns the quotient.
17709
- * @example
17710
- *
17711
- * _.divide(6, 4);
17712
- * // => 1.5
17713
- */
17714
- var divide = createMathOperation(function(dividend, divisor) {
17715
- return dividend / divisor;
17716
- }, 1);
17717
-
17718
- /**
17719
- * Computes `number` rounded down to `precision`.
17720
- *
17721
- * @static
17722
- * @memberOf _
17723
- * @since 3.10.0
17724
- * @category Math
17725
- * @param {number} number The number to round down.
17726
- * @param {number} [precision=0] The precision to round down to.
17727
- * @returns {number} Returns the rounded down number.
17728
- * @example
17729
- *
17730
- * _.floor(4.006);
17731
- * // => 4
17732
- *
17733
- * _.floor(0.046, 2);
17734
- * // => 0.04
17735
- *
17736
- * _.floor(4060, -2);
17737
- * // => 4000
17738
- */
17739
- var floor = createRound('floor');
17740
-
17741
- /**
17742
- * Computes the maximum value of `array`. If `array` is empty or falsey,
17743
- * `undefined` is returned.
17744
- *
17745
- * @static
17746
- * @since 0.1.0
17747
- * @memberOf _
17748
- * @category Math
17749
- * @param {Array} array The array to iterate over.
17750
- * @returns {*} Returns the maximum value.
17751
- * @example
17752
- *
17753
- * _.max([4, 2, 8, 6]);
17754
- * // => 8
17755
- *
17756
- * _.max([]);
17757
- * // => undefined
17758
- */
17759
- function max(array) {
17760
- return (array && array.length)
17761
- ? baseExtremum(array, identity, baseGt)
17762
- : undefined;
17763
- }
17764
-
17765
- /**
17766
- * This method is like `_.max` except that it accepts `iteratee` which is
17767
- * invoked for each element in `array` to generate the criterion by which
17768
- * the value is ranked. The iteratee is invoked with one argument: (value).
17769
- *
17770
- * @static
17771
- * @memberOf _
17772
- * @since 4.0.0
17773
- * @category Math
17774
- * @param {Array} array The array to iterate over.
17775
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
17776
- * @returns {*} Returns the maximum value.
17777
- * @example
17778
- *
17779
- * var objects = [{ 'n': 1 }, { 'n': 2 }];
17780
- *
17781
- * _.maxBy(objects, function(o) { return o.n; });
17782
- * // => { 'n': 2 }
17783
- *
17784
- * // The `_.property` iteratee shorthand.
17785
- * _.maxBy(objects, 'n');
17786
- * // => { 'n': 2 }
17787
- */
17788
- function maxBy(array, iteratee) {
17789
- return (array && array.length)
17790
- ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
17791
- : undefined;
17792
- }
17793
-
17794
- /**
17795
- * Computes the mean of the values in `array`.
17796
- *
17797
- * @static
17798
- * @memberOf _
17799
- * @since 4.0.0
17800
- * @category Math
17801
- * @param {Array} array The array to iterate over.
17802
- * @returns {number} Returns the mean.
17803
- * @example
17804
- *
17805
- * _.mean([4, 2, 8, 6]);
17806
- * // => 5
17807
- */
17808
- function mean(array) {
17809
- return baseMean(array, identity);
17810
- }
17811
-
17812
- /**
17813
- * This method is like `_.mean` except that it accepts `iteratee` which is
17814
- * invoked for each element in `array` to generate the value to be averaged.
17815
- * The iteratee is invoked with one argument: (value).
17816
- *
17817
- * @static
17818
- * @memberOf _
17819
- * @since 4.7.0
17820
- * @category Math
17821
- * @param {Array} array The array to iterate over.
17822
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
17823
- * @returns {number} Returns the mean.
17824
- * @example
17825
- *
17826
- * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
17827
- *
17828
- * _.meanBy(objects, function(o) { return o.n; });
17829
- * // => 5
17830
- *
17831
- * // The `_.property` iteratee shorthand.
17832
- * _.meanBy(objects, 'n');
17833
- * // => 5
17834
- */
17835
- function meanBy(array, iteratee) {
17836
- return baseMean(array, getIteratee(iteratee, 2));
17837
- }
17838
-
17839
- /**
17840
- * Computes the minimum value of `array`. If `array` is empty or falsey,
17841
- * `undefined` is returned.
17842
- *
17843
- * @static
17844
- * @since 0.1.0
17845
- * @memberOf _
17846
- * @category Math
17847
- * @param {Array} array The array to iterate over.
17848
- * @returns {*} Returns the minimum value.
17849
- * @example
17850
- *
17851
- * _.min([4, 2, 8, 6]);
17852
- * // => 2
17853
- *
17854
- * _.min([]);
17855
- * // => undefined
17856
- */
17857
- function min(array) {
17858
- return (array && array.length)
17859
- ? baseExtremum(array, identity, baseLt)
17860
- : undefined;
17861
- }
17862
-
17863
- /**
17864
- * This method is like `_.min` except that it accepts `iteratee` which is
17865
- * invoked for each element in `array` to generate the criterion by which
17866
- * the value is ranked. The iteratee is invoked with one argument: (value).
17867
- *
17868
- * @static
17869
- * @memberOf _
17870
- * @since 4.0.0
17871
- * @category Math
17872
- * @param {Array} array The array to iterate over.
17873
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
17874
- * @returns {*} Returns the minimum value.
17875
- * @example
17876
- *
17877
- * var objects = [{ 'n': 1 }, { 'n': 2 }];
17878
- *
17879
- * _.minBy(objects, function(o) { return o.n; });
17880
- * // => { 'n': 1 }
17881
- *
17882
- * // The `_.property` iteratee shorthand.
17883
- * _.minBy(objects, 'n');
17884
- * // => { 'n': 1 }
17885
- */
17886
- function minBy(array, iteratee) {
17887
- return (array && array.length)
17888
- ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
17889
- : undefined;
17890
- }
17891
-
17892
- /**
17893
- * Multiply two numbers.
17894
- *
17895
- * @static
17896
- * @memberOf _
17897
- * @since 4.7.0
17898
- * @category Math
17899
- * @param {number} multiplier The first number in a multiplication.
17900
- * @param {number} multiplicand The second number in a multiplication.
17901
- * @returns {number} Returns the product.
17902
- * @example
17903
- *
17904
- * _.multiply(6, 4);
17905
- * // => 24
17906
- */
17907
- var multiply = createMathOperation(function(multiplier, multiplicand) {
17908
- return multiplier * multiplicand;
17909
- }, 1);
17910
-
17911
- /**
17912
- * Computes `number` rounded to `precision`.
17913
- *
17914
- * @static
17915
- * @memberOf _
17916
- * @since 3.10.0
17917
- * @category Math
17918
- * @param {number} number The number to round.
17919
- * @param {number} [precision=0] The precision to round to.
17920
- * @returns {number} Returns the rounded number.
17921
- * @example
17922
- *
17923
- * _.round(4.006);
17924
- * // => 4
17925
- *
17926
- * _.round(4.006, 2);
17927
- * // => 4.01
17928
- *
17929
- * _.round(4060, -2);
17930
- * // => 4100
17931
- */
17932
- var round = createRound('round');
17933
-
17934
- /**
17935
- * Subtract two numbers.
17936
- *
17937
- * @static
17938
- * @memberOf _
17939
- * @since 4.0.0
17940
- * @category Math
17941
- * @param {number} minuend The first number in a subtraction.
17942
- * @param {number} subtrahend The second number in a subtraction.
17943
- * @returns {number} Returns the difference.
17944
- * @example
17945
- *
17946
- * _.subtract(6, 4);
17947
- * // => 2
17948
- */
17949
- var subtract = createMathOperation(function(minuend, subtrahend) {
17950
- return minuend - subtrahend;
17951
- }, 0);
17952
-
17953
- /**
17954
- * Computes the sum of the values in `array`.
17955
- *
17956
- * @static
17957
- * @memberOf _
17958
- * @since 3.4.0
17959
- * @category Math
17960
- * @param {Array} array The array to iterate over.
17961
- * @returns {number} Returns the sum.
17962
- * @example
17963
- *
17964
- * _.sum([4, 2, 8, 6]);
17965
- * // => 20
17966
- */
17967
- function sum(array) {
17968
- return (array && array.length)
17969
- ? baseSum(array, identity)
17970
- : 0;
17971
- }
17972
-
17973
- /**
17974
- * This method is like `_.sum` except that it accepts `iteratee` which is
17975
- * invoked for each element in `array` to generate the value to be summed.
17976
- * The iteratee is invoked with one argument: (value).
17977
- *
17978
- * @static
17979
- * @memberOf _
17980
- * @since 4.0.0
17981
- * @category Math
17982
- * @param {Array} array The array to iterate over.
17983
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
17984
- * @returns {number} Returns the sum.
17985
- * @example
17986
- *
17987
- * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
17988
- *
17989
- * _.sumBy(objects, function(o) { return o.n; });
17990
- * // => 20
17991
- *
17992
- * // The `_.property` iteratee shorthand.
17993
- * _.sumBy(objects, 'n');
17994
- * // => 20
17995
- */
17996
- function sumBy(array, iteratee) {
17997
- return (array && array.length)
17998
- ? baseSum(array, getIteratee(iteratee, 2))
17999
- : 0;
18000
- }
18001
-
18002
- /*------------------------------------------------------------------------*/
18003
-
18004
- // Add methods that return wrapped values in chain sequences.
18005
- lodash.after = after;
18006
- lodash.ary = ary;
18007
- lodash.assign = assign;
18008
- lodash.assignIn = assignIn;
18009
- lodash.assignInWith = assignInWith;
18010
- lodash.assignWith = assignWith;
18011
- lodash.at = at;
18012
- lodash.before = before;
18013
- lodash.bind = bind;
18014
- lodash.bindAll = bindAll;
18015
- lodash.bindKey = bindKey;
18016
- lodash.castArray = castArray;
18017
- lodash.chain = chain;
18018
- lodash.chunk = chunk;
18019
- lodash.compact = compact;
18020
- lodash.concat = concat;
18021
- lodash.cond = cond;
18022
- lodash.conforms = conforms;
18023
- lodash.constant = constant;
18024
- lodash.countBy = countBy;
18025
- lodash.create = create;
18026
- lodash.curry = curry;
18027
- lodash.curryRight = curryRight;
18028
- lodash.debounce = debounce;
18029
- lodash.defaults = defaults;
18030
- lodash.defaultsDeep = defaultsDeep;
18031
- lodash.defer = defer;
18032
- lodash.delay = delay;
18033
- lodash.difference = difference;
18034
- lodash.differenceBy = differenceBy;
18035
- lodash.differenceWith = differenceWith;
18036
- lodash.drop = drop;
18037
- lodash.dropRight = dropRight;
18038
- lodash.dropRightWhile = dropRightWhile;
18039
- lodash.dropWhile = dropWhile;
18040
- lodash.fill = fill;
18041
- lodash.filter = filter;
18042
- lodash.flatMap = flatMap;
18043
- lodash.flatMapDeep = flatMapDeep;
18044
- lodash.flatMapDepth = flatMapDepth;
18045
- lodash.flatten = flatten;
18046
- lodash.flattenDeep = flattenDeep;
18047
- lodash.flattenDepth = flattenDepth;
18048
- lodash.flip = flip;
18049
- lodash.flow = flow;
18050
- lodash.flowRight = flowRight;
18051
- lodash.fromPairs = fromPairs;
18052
- lodash.functions = functions;
18053
- lodash.functionsIn = functionsIn;
18054
- lodash.groupBy = groupBy;
18055
- lodash.initial = initial;
18056
- lodash.intersection = intersection;
18057
- lodash.intersectionBy = intersectionBy;
18058
- lodash.intersectionWith = intersectionWith;
18059
- lodash.invert = invert;
18060
- lodash.invertBy = invertBy;
18061
- lodash.invokeMap = invokeMap;
18062
- lodash.iteratee = iteratee;
18063
- lodash.keyBy = keyBy;
18064
- lodash.keys = keys;
18065
- lodash.keysIn = keysIn;
18066
- lodash.map = map;
18067
- lodash.mapKeys = mapKeys;
18068
- lodash.mapValues = mapValues;
18069
- lodash.matches = matches;
18070
- lodash.matchesProperty = matchesProperty;
18071
- lodash.memoize = memoize;
18072
- lodash.merge = merge;
18073
- lodash.mergeWith = mergeWith;
18074
- lodash.method = method;
18075
- lodash.methodOf = methodOf;
18076
- lodash.mixin = mixin;
18077
- lodash.negate = negate;
18078
- lodash.nthArg = nthArg;
18079
- lodash.omit = omit;
18080
- lodash.omitBy = omitBy;
18081
- lodash.once = once;
18082
- lodash.orderBy = orderBy;
18083
- lodash.over = over;
18084
- lodash.overArgs = overArgs;
18085
- lodash.overEvery = overEvery;
18086
- lodash.overSome = overSome;
18087
- lodash.partial = partial;
18088
- lodash.partialRight = partialRight;
18089
- lodash.partition = partition;
18090
- lodash.pick = pick;
18091
- lodash.pickBy = pickBy;
18092
- lodash.property = property;
18093
- lodash.propertyOf = propertyOf;
18094
- lodash.pull = pull;
18095
- lodash.pullAll = pullAll;
18096
- lodash.pullAllBy = pullAllBy;
18097
- lodash.pullAllWith = pullAllWith;
18098
- lodash.pullAt = pullAt;
18099
- lodash.range = range;
18100
- lodash.rangeRight = rangeRight;
18101
- lodash.rearg = rearg;
18102
- lodash.reject = reject;
18103
- lodash.remove = remove;
18104
- lodash.rest = rest;
18105
- lodash.reverse = reverse;
18106
- lodash.sampleSize = sampleSize;
18107
- lodash.set = set;
18108
- lodash.setWith = setWith;
18109
- lodash.shuffle = shuffle;
18110
- lodash.slice = slice;
18111
- lodash.sortBy = sortBy;
18112
- lodash.sortedUniq = sortedUniq;
18113
- lodash.sortedUniqBy = sortedUniqBy;
18114
- lodash.split = split;
18115
- lodash.spread = spread;
18116
- lodash.tail = tail;
18117
- lodash.take = take;
18118
- lodash.takeRight = takeRight;
18119
- lodash.takeRightWhile = takeRightWhile;
18120
- lodash.takeWhile = takeWhile;
18121
- lodash.tap = tap;
18122
- lodash.throttle = throttle;
18123
- lodash.thru = thru;
18124
- lodash.toArray = toArray;
18125
- lodash.toPairs = toPairs;
18126
- lodash.toPairsIn = toPairsIn;
18127
- lodash.toPath = toPath;
18128
- lodash.toPlainObject = toPlainObject;
18129
- lodash.transform = transform;
18130
- lodash.unary = unary;
18131
- lodash.union = union;
18132
- lodash.unionBy = unionBy;
18133
- lodash.unionWith = unionWith;
18134
- lodash.uniq = uniq;
18135
- lodash.uniqBy = uniqBy;
18136
- lodash.uniqWith = uniqWith;
18137
- lodash.unset = unset;
18138
- lodash.unzip = unzip;
18139
- lodash.unzipWith = unzipWith;
18140
- lodash.update = update;
18141
- lodash.updateWith = updateWith;
18142
- lodash.values = values;
18143
- lodash.valuesIn = valuesIn;
18144
- lodash.without = without;
18145
- lodash.words = words;
18146
- lodash.wrap = wrap;
18147
- lodash.xor = xor;
18148
- lodash.xorBy = xorBy;
18149
- lodash.xorWith = xorWith;
18150
- lodash.zip = zip;
18151
- lodash.zipObject = zipObject;
18152
- lodash.zipObjectDeep = zipObjectDeep;
18153
- lodash.zipWith = zipWith;
18154
-
18155
- // Add aliases.
18156
- lodash.entries = toPairs;
18157
- lodash.entriesIn = toPairsIn;
18158
- lodash.extend = assignIn;
18159
- lodash.extendWith = assignInWith;
18160
-
18161
- // Add methods to `lodash.prototype`.
18162
- mixin(lodash, lodash);
18163
-
18164
- /*------------------------------------------------------------------------*/
18165
-
18166
- // Add methods that return unwrapped values in chain sequences.
18167
- lodash.add = add;
18168
- lodash.attempt = attempt;
18169
- lodash.camelCase = camelCase;
18170
- lodash.capitalize = capitalize;
18171
- lodash.ceil = ceil;
18172
- lodash.clamp = clamp;
18173
- lodash.clone = clone;
18174
- lodash.cloneDeep = cloneDeep;
18175
- lodash.cloneDeepWith = cloneDeepWith;
18176
- lodash.cloneWith = cloneWith;
18177
- lodash.conformsTo = conformsTo;
18178
- lodash.deburr = deburr;
18179
- lodash.defaultTo = defaultTo;
18180
- lodash.divide = divide;
18181
- lodash.endsWith = endsWith;
18182
- lodash.eq = eq;
18183
- lodash.escape = escape;
18184
- lodash.escapeRegExp = escapeRegExp;
18185
- lodash.every = every;
18186
- lodash.find = find;
18187
- lodash.findIndex = findIndex;
18188
- lodash.findKey = findKey;
18189
- lodash.findLast = findLast;
18190
- lodash.findLastIndex = findLastIndex;
18191
- lodash.findLastKey = findLastKey;
18192
- lodash.floor = floor;
18193
- lodash.forEach = forEach;
18194
- lodash.forEachRight = forEachRight;
18195
- lodash.forIn = forIn;
18196
- lodash.forInRight = forInRight;
18197
- lodash.forOwn = forOwn;
18198
- lodash.forOwnRight = forOwnRight;
18199
- lodash.get = get;
18200
- lodash.gt = gt;
18201
- lodash.gte = gte;
18202
- lodash.has = has;
18203
- lodash.hasIn = hasIn;
18204
- lodash.head = head;
18205
- lodash.identity = identity;
18206
- lodash.includes = includes;
18207
- lodash.indexOf = indexOf;
18208
- lodash.inRange = inRange;
18209
- lodash.invoke = invoke;
18210
- lodash.isArguments = isArguments;
18211
- lodash.isArray = isArray;
18212
- lodash.isArrayBuffer = isArrayBuffer;
18213
- lodash.isArrayLike = isArrayLike;
18214
- lodash.isArrayLikeObject = isArrayLikeObject;
18215
- lodash.isBoolean = isBoolean;
18216
- lodash.isBuffer = isBuffer;
18217
- lodash.isDate = isDate;
18218
- lodash.isElement = isElement;
18219
- lodash.isEmpty = isEmpty;
18220
- lodash.isEqual = isEqual;
18221
- lodash.isEqualWith = isEqualWith;
18222
- lodash.isError = isError;
18223
- lodash.isFinite = isFinite;
18224
- lodash.isFunction = isFunction;
18225
- lodash.isInteger = isInteger;
18226
- lodash.isLength = isLength;
18227
- lodash.isMap = isMap;
18228
- lodash.isMatch = isMatch;
18229
- lodash.isMatchWith = isMatchWith;
18230
- lodash.isNaN = isNaN;
18231
- lodash.isNative = isNative;
18232
- lodash.isNil = isNil;
18233
- lodash.isNull = isNull;
18234
- lodash.isNumber = isNumber;
18235
- lodash.isObject = isObject;
18236
- lodash.isObjectLike = isObjectLike;
18237
- lodash.isPlainObject = isPlainObject;
18238
- lodash.isRegExp = isRegExp;
18239
- lodash.isSafeInteger = isSafeInteger;
18240
- lodash.isSet = isSet;
18241
- lodash.isString = isString;
18242
- lodash.isSymbol = isSymbol;
18243
- lodash.isTypedArray = isTypedArray;
18244
- lodash.isUndefined = isUndefined;
18245
- lodash.isWeakMap = isWeakMap;
18246
- lodash.isWeakSet = isWeakSet;
18247
- lodash.join = join;
18248
- lodash.kebabCase = kebabCase;
18249
- lodash.last = last;
18250
- lodash.lastIndexOf = lastIndexOf;
18251
- lodash.lowerCase = lowerCase;
18252
- lodash.lowerFirst = lowerFirst;
18253
- lodash.lt = lt;
18254
- lodash.lte = lte;
18255
- lodash.max = max;
18256
- lodash.maxBy = maxBy;
18257
- lodash.mean = mean;
18258
- lodash.meanBy = meanBy;
18259
- lodash.min = min;
18260
- lodash.minBy = minBy;
18261
- lodash.stubArray = stubArray;
18262
- lodash.stubFalse = stubFalse;
18263
- lodash.stubObject = stubObject;
18264
- lodash.stubString = stubString;
18265
- lodash.stubTrue = stubTrue;
18266
- lodash.multiply = multiply;
18267
- lodash.nth = nth;
18268
- lodash.noConflict = noConflict;
18269
- lodash.noop = noop;
18270
- lodash.now = now;
18271
- lodash.pad = pad;
18272
- lodash.padEnd = padEnd;
18273
- lodash.padStart = padStart;
18274
- lodash.parseInt = parseInt;
18275
- lodash.random = random;
18276
- lodash.reduce = reduce;
18277
- lodash.reduceRight = reduceRight;
18278
- lodash.repeat = repeat;
18279
- lodash.replace = replace;
18280
- lodash.result = result;
18281
- lodash.round = round;
18282
- lodash.runInContext = runInContext;
18283
- lodash.sample = sample;
18284
- lodash.size = size;
18285
- lodash.snakeCase = snakeCase;
18286
- lodash.some = some;
18287
- lodash.sortedIndex = sortedIndex;
18288
- lodash.sortedIndexBy = sortedIndexBy;
18289
- lodash.sortedIndexOf = sortedIndexOf;
18290
- lodash.sortedLastIndex = sortedLastIndex;
18291
- lodash.sortedLastIndexBy = sortedLastIndexBy;
18292
- lodash.sortedLastIndexOf = sortedLastIndexOf;
18293
- lodash.startCase = startCase;
18294
- lodash.startsWith = startsWith;
18295
- lodash.subtract = subtract;
18296
- lodash.sum = sum;
18297
- lodash.sumBy = sumBy;
18298
- lodash.template = template;
18299
- lodash.times = times;
18300
- lodash.toFinite = toFinite;
18301
- lodash.toInteger = toInteger;
18302
- lodash.toLength = toLength;
18303
- lodash.toLower = toLower;
18304
- lodash.toNumber = toNumber;
18305
- lodash.toSafeInteger = toSafeInteger;
18306
- lodash.toString = toString;
18307
- lodash.toUpper = toUpper;
18308
- lodash.trim = trim;
18309
- lodash.trimEnd = trimEnd;
18310
- lodash.trimStart = trimStart;
18311
- lodash.truncate = truncate;
18312
- lodash.unescape = unescape;
18313
- lodash.uniqueId = uniqueId;
18314
- lodash.upperCase = upperCase;
18315
- lodash.upperFirst = upperFirst;
18316
-
18317
- // Add aliases.
18318
- lodash.each = forEach;
18319
- lodash.eachRight = forEachRight;
18320
- lodash.first = head;
18321
-
18322
- mixin(lodash, (function() {
18323
- var source = {};
18324
- baseForOwn(lodash, function(func, methodName) {
18325
- if (!hasOwnProperty.call(lodash.prototype, methodName)) {
18326
- source[methodName] = func;
18327
- }
18328
- });
18329
- return source;
18330
- }()), { 'chain': false });
18331
-
18332
- /*------------------------------------------------------------------------*/
18333
-
18334
- /**
18335
- * The semantic version number.
18336
- *
18337
- * @static
18338
- * @memberOf _
18339
- * @type {string}
18340
- */
18341
- lodash.VERSION = VERSION;
18342
-
18343
- // Assign default placeholders.
18344
- arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
18345
- lodash[methodName].placeholder = lodash;
18346
- });
18347
-
18348
- // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
18349
- arrayEach(['drop', 'take'], function(methodName, index) {
18350
- LazyWrapper.prototype[methodName] = function(n) {
18351
- n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
18352
-
18353
- var result = (this.__filtered__ && !index)
18354
- ? new LazyWrapper(this)
18355
- : this.clone();
18356
-
18357
- if (result.__filtered__) {
18358
- result.__takeCount__ = nativeMin(n, result.__takeCount__);
18359
- } else {
18360
- result.__views__.push({
18361
- 'size': nativeMin(n, MAX_ARRAY_LENGTH),
18362
- 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
18363
- });
18364
- }
18365
- return result;
18366
- };
18367
-
18368
- LazyWrapper.prototype[methodName + 'Right'] = function(n) {
18369
- return this.reverse()[methodName](n).reverse();
18370
- };
18371
- });
18372
-
18373
- // Add `LazyWrapper` methods that accept an `iteratee` value.
18374
- arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
18375
- var type = index + 1,
18376
- isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
18377
-
18378
- LazyWrapper.prototype[methodName] = function(iteratee) {
18379
- var result = this.clone();
18380
- result.__iteratees__.push({
18381
- 'iteratee': getIteratee(iteratee, 3),
18382
- 'type': type
18383
- });
18384
- result.__filtered__ = result.__filtered__ || isFilter;
18385
- return result;
18386
- };
18387
- });
18388
-
18389
- // Add `LazyWrapper` methods for `_.head` and `_.last`.
18390
- arrayEach(['head', 'last'], function(methodName, index) {
18391
- var takeName = 'take' + (index ? 'Right' : '');
18392
-
18393
- LazyWrapper.prototype[methodName] = function() {
18394
- return this[takeName](1).value()[0];
18395
- };
18396
- });
18397
-
18398
- // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
18399
- arrayEach(['initial', 'tail'], function(methodName, index) {
18400
- var dropName = 'drop' + (index ? '' : 'Right');
18401
-
18402
- LazyWrapper.prototype[methodName] = function() {
18403
- return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
18404
- };
18405
- });
18406
-
18407
- LazyWrapper.prototype.compact = function() {
18408
- return this.filter(identity);
18409
- };
18410
-
18411
- LazyWrapper.prototype.find = function(predicate) {
18412
- return this.filter(predicate).head();
18413
- };
18414
-
18415
- LazyWrapper.prototype.findLast = function(predicate) {
18416
- return this.reverse().find(predicate);
18417
- };
18418
-
18419
- LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
18420
- if (typeof path == 'function') {
18421
- return new LazyWrapper(this);
18422
- }
18423
- return this.map(function(value) {
18424
- return baseInvoke(value, path, args);
18425
- });
18426
- });
18427
-
18428
- LazyWrapper.prototype.reject = function(predicate) {
18429
- return this.filter(negate(getIteratee(predicate)));
18430
- };
18431
-
18432
- LazyWrapper.prototype.slice = function(start, end) {
18433
- start = toInteger(start);
18434
-
18435
- var result = this;
18436
- if (result.__filtered__ && (start > 0 || end < 0)) {
18437
- return new LazyWrapper(result);
18438
- }
18439
- if (start < 0) {
18440
- result = result.takeRight(-start);
18441
- } else if (start) {
18442
- result = result.drop(start);
18443
- }
18444
- if (end !== undefined) {
18445
- end = toInteger(end);
18446
- result = end < 0 ? result.dropRight(-end) : result.take(end - start);
18447
- }
18448
- return result;
18449
- };
18450
-
18451
- LazyWrapper.prototype.takeRightWhile = function(predicate) {
18452
- return this.reverse().takeWhile(predicate).reverse();
18453
- };
18454
-
18455
- LazyWrapper.prototype.toArray = function() {
18456
- return this.take(MAX_ARRAY_LENGTH);
18457
- };
18458
-
18459
- // Add `LazyWrapper` methods to `lodash.prototype`.
18460
- baseForOwn(LazyWrapper.prototype, function(func, methodName) {
18461
- var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
18462
- isTaker = /^(?:head|last)$/.test(methodName),
18463
- lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
18464
- retUnwrapped = isTaker || /^find/.test(methodName);
18465
-
18466
- if (!lodashFunc) {
18467
- return;
18468
- }
18469
- lodash.prototype[methodName] = function() {
18470
- var value = this.__wrapped__,
18471
- args = isTaker ? [1] : arguments,
18472
- isLazy = value instanceof LazyWrapper,
18473
- iteratee = args[0],
18474
- useLazy = isLazy || isArray(value);
18475
-
18476
- var interceptor = function(value) {
18477
- var result = lodashFunc.apply(lodash, arrayPush([value], args));
18478
- return (isTaker && chainAll) ? result[0] : result;
18479
- };
18480
-
18481
- if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
18482
- // Avoid lazy use if the iteratee has a "length" value other than `1`.
18483
- isLazy = useLazy = false;
18484
- }
18485
- var chainAll = this.__chain__,
18486
- isHybrid = !!this.__actions__.length,
18487
- isUnwrapped = retUnwrapped && !chainAll,
18488
- onlyLazy = isLazy && !isHybrid;
18489
-
18490
- if (!retUnwrapped && useLazy) {
18491
- value = onlyLazy ? value : new LazyWrapper(this);
18492
- var result = func.apply(value, args);
18493
- result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
18494
- return new LodashWrapper(result, chainAll);
18495
- }
18496
- if (isUnwrapped && onlyLazy) {
18497
- return func.apply(this, args);
18498
- }
18499
- result = this.thru(interceptor);
18500
- return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
18501
- };
18502
- });
18503
-
18504
- // Add `Array` methods to `lodash.prototype`.
18505
- arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
18506
- var func = arrayProto[methodName],
18507
- chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
18508
- retUnwrapped = /^(?:pop|shift)$/.test(methodName);
18509
-
18510
- lodash.prototype[methodName] = function() {
18511
- var args = arguments;
18512
- if (retUnwrapped && !this.__chain__) {
18513
- var value = this.value();
18514
- return func.apply(isArray(value) ? value : [], args);
18515
- }
18516
- return this[chainName](function(value) {
18517
- return func.apply(isArray(value) ? value : [], args);
18518
- });
18519
- };
18520
- });
18521
-
18522
- // Map minified method names to their real names.
18523
- baseForOwn(LazyWrapper.prototype, function(func, methodName) {
18524
- var lodashFunc = lodash[methodName];
18525
- if (lodashFunc) {
18526
- var key = (lodashFunc.name + ''),
18527
- names = realNames[key] || (realNames[key] = []);
18528
-
18529
- names.push({ 'name': methodName, 'func': lodashFunc });
18530
- }
18531
- });
18532
-
18533
- realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
18534
- 'name': 'wrapper',
18535
- 'func': undefined
18536
- }];
18537
-
18538
- // Add methods to `LazyWrapper`.
18539
- LazyWrapper.prototype.clone = lazyClone;
18540
- LazyWrapper.prototype.reverse = lazyReverse;
18541
- LazyWrapper.prototype.value = lazyValue;
18542
-
18543
- // Add chain sequence methods to the `lodash` wrapper.
18544
- lodash.prototype.at = wrapperAt;
18545
- lodash.prototype.chain = wrapperChain;
18546
- lodash.prototype.commit = wrapperCommit;
18547
- lodash.prototype.next = wrapperNext;
18548
- lodash.prototype.plant = wrapperPlant;
18549
- lodash.prototype.reverse = wrapperReverse;
18550
- lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
18551
-
18552
- // Add lazy aliases.
18553
- lodash.prototype.first = lodash.prototype.head;
18554
-
18555
- if (symIterator) {
18556
- lodash.prototype[symIterator] = wrapperToIterator;
18557
- }
18558
- return lodash;
18559
- });
18560
-
18561
- /*--------------------------------------------------------------------------*/
18562
-
18563
- // Export lodash.
18564
- var _ = runInContext();
18565
-
18566
- // Some AMD build optimizers, like r.js, check for condition patterns like:
18567
- if (true) {
18568
- // Expose Lodash on the global object to prevent errors when Lodash is
18569
- // loaded by a script tag in the presence of an AMD loader.
18570
- // See http://requirejs.org/docs/errors.html#mismatch for more details.
18571
- // Use `_.noConflict` to remove Lodash from the global object.
18572
- root._ = _;
18573
-
18574
- // Define as an anonymous module so, through path mapping, it can be
18575
- // referenced as the "underscore" module.
18576
- !(__WEBPACK_AMD_DEFINE_RESULT__ = function() {
18577
- return _;
18578
- }.call(exports, __webpack_require__, exports, module),
18579
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
18580
- }
18581
- // Check for `exports` after `define` in case a build optimizer adds it.
18582
- else if (freeModule) {
18583
- // Export for Node.js.
18584
- (freeModule.exports = _)._ = _;
18585
- // Export for CommonJS support.
18586
- freeExports._ = _;
18587
- }
18588
- else {
18589
- // Export to the global object.
18590
- root._ = _;
18591
- }
18592
- }.call(this));
18593
-
18594
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22), __webpack_require__(41)(module)))
18595
-
18596
- /***/ }),
18597
- /* 64 */
18598
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
18599
-
18600
- "use strict";
18601
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__propertyUtils__ = __webpack_require__(468);
18602
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
18603
-
18604
-
18605
-
18606
- var RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source;
18607
-
18608
- var getComputedStyleX = void 0;
18609
-
18610
- // https://stackoverflow.com/a/3485654/3040605
18611
- function forceRelayout(elem) {
18612
- var originalStyle = elem.style.display;
18613
- elem.style.display = 'none';
18614
- elem.offsetHeight; // eslint-disable-line
18615
- elem.style.display = originalStyle;
18616
- }
18617
-
18618
- function css(el, name, v) {
18619
- var value = v;
18620
- if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {
18621
- for (var i in name) {
18622
- if (name.hasOwnProperty(i)) {
18623
- css(el, i, name[i]);
18624
- }
18625
- }
18626
- return undefined;
18627
- }
18628
- if (typeof value !== 'undefined') {
18629
- if (typeof value === 'number') {
18630
- value = value + 'px';
18631
- }
18632
- el.style[name] = value;
18633
- return undefined;
18634
- }
18635
- return getComputedStyleX(el, name);
18636
- }
18637
-
18638
- function getClientPosition(elem) {
18639
- var box = void 0;
18640
- var x = void 0;
18641
- var y = void 0;
18642
- var doc = elem.ownerDocument;
18643
- var body = doc.body;
18644
- var docElem = doc && doc.documentElement;
18645
- // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式
18646
- box = elem.getBoundingClientRect();
18647
-
18648
- // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop
18649
- // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确
18650
- // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin
18651
-
18652
- x = box.left;
18653
- y = box.top;
18654
-
18655
- // In IE, most of the time, 2 extra pixels are added to the top and left
18656
- // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and
18657
- // IE6 standards mode, this border can be overridden by setting the
18658
- // document element's border to zero -- thus, we cannot rely on the
18659
- // offset always being 2 pixels.
18660
-
18661
- // In quirks mode, the offset can be determined by querying the body's
18662
- // clientLeft/clientTop, but in standards mode, it is found by querying
18663
- // the document element's clientLeft/clientTop. Since we already called
18664
- // getClientBoundingRect we have already forced a reflow, so it is not
18665
- // too expensive just to query them all.
18666
-
18667
- // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的
18668
- // 窗口边框标准是设 documentElement ,quirks 时设置 body
18669
- // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去
18670
- // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置
18671
- // 标准 ie 下 docElem.clientTop 就是 border-top
18672
- // ie7 html 即窗口边框改变不了。永远为 2
18673
- // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0
18674
-
18675
- x -= docElem.clientLeft || body.clientLeft || 0;
18676
- y -= docElem.clientTop || body.clientTop || 0;
18677
-
18678
- return {
18679
- left: x,
18680
- top: y
18681
- };
18682
- }
18683
-
18684
- function getScroll(w, top) {
18685
- var ret = w['page' + (top ? 'Y' : 'X') + 'Offset'];
18686
- var method = 'scroll' + (top ? 'Top' : 'Left');
18687
- if (typeof ret !== 'number') {
18688
- var d = w.document;
18689
- // ie6,7,8 standard mode
18690
- ret = d.documentElement[method];
18691
- if (typeof ret !== 'number') {
18692
- // quirks mode
18693
- ret = d.body[method];
18694
- }
18695
- }
18696
- return ret;
18697
- }
18698
-
18699
- function getScrollLeft(w) {
18700
- return getScroll(w);
18701
- }
18702
-
18703
- function getScrollTop(w) {
18704
- return getScroll(w, true);
18705
- }
18706
-
18707
- function getOffset(el) {
18708
- var pos = getClientPosition(el);
18709
- var doc = el.ownerDocument;
18710
- var w = doc.defaultView || doc.parentWindow;
18711
- pos.left += getScrollLeft(w);
18712
- pos.top += getScrollTop(w);
18713
- return pos;
18714
- }
18715
-
18716
- /**
18717
- * A crude way of determining if an object is a window
18718
- * @member util
18719
- */
18720
- function isWindow(obj) {
18721
- // must use == for ie8
18722
- /* eslint eqeqeq:0 */
18723
- return obj !== null && obj !== undefined && obj == obj.window;
18724
- }
18725
-
18726
- function getDocument(node) {
18727
- if (isWindow(node)) {
18728
- return node.document;
18729
- }
18730
- if (node.nodeType === 9) {
18731
- return node;
18732
- }
18733
- return node.ownerDocument;
18734
- }
18735
-
18736
- function _getComputedStyle(elem, name, cs) {
18737
- var computedStyle = cs;
18738
- var val = '';
18739
- var d = getDocument(elem);
18740
- computedStyle = computedStyle || d.defaultView.getComputedStyle(elem, null);
18741
-
18742
- // https://github.com/kissyteam/kissy/issues/61
18743
- if (computedStyle) {
18744
- val = computedStyle.getPropertyValue(name) || computedStyle[name];
18745
- }
18746
-
18747
- return val;
18748
- }
18749
-
18750
- var _RE_NUM_NO_PX = new RegExp('^(' + RE_NUM + ')(?!px)[a-z%]+$', 'i');
18751
- var RE_POS = /^(top|right|bottom|left)$/;
18752
- var CURRENT_STYLE = 'currentStyle';
18753
- var RUNTIME_STYLE = 'runtimeStyle';
18754
- var LEFT = 'left';
18755
- var PX = 'px';
18756
-
18757
- function _getComputedStyleIE(elem, name) {
18758
- // currentStyle maybe null
18759
- // http://msdn.microsoft.com/en-us/library/ms535231.aspx
18760
- var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name];
18761
-
18762
- // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值
18763
- // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19
18764
- // 在 ie 下不对,需要直接用 offset 方式
18765
- // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了
18766
-
18767
- // From the awesome hack by Dean Edwards
18768
- // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
18769
- // If we're not dealing with a regular pixel number
18770
- // but a number that has a weird ending, we need to convert it to pixels
18771
- // exclude left right for relativity
18772
- if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) {
18773
- // Remember the original values
18774
- var style = elem.style;
18775
- var left = style[LEFT];
18776
- var rsLeft = elem[RUNTIME_STYLE][LEFT];
18777
-
18778
- // prevent flashing of content
18779
- elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT];
18780
-
18781
- // Put in the new values to get a computed value out
18782
- style[LEFT] = name === 'fontSize' ? '1em' : ret || 0;
18783
- ret = style.pixelLeft + PX;
18784
-
18785
- // Revert the changed values
18786
- style[LEFT] = left;
18787
-
18788
- elem[RUNTIME_STYLE][LEFT] = rsLeft;
18789
- }
18790
- return ret === '' ? 'auto' : ret;
18791
- }
18792
-
18793
- if (typeof window !== 'undefined') {
18794
- getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE;
18795
- }
18796
-
18797
- function getOffsetDirection(dir, option) {
18798
- if (dir === 'left') {
18799
- return option.useCssRight ? 'right' : dir;
18800
- }
18801
- return option.useCssBottom ? 'bottom' : dir;
18802
- }
18803
-
18804
- function oppositeOffsetDirection(dir) {
18805
- if (dir === 'left') {
18806
- return 'right';
18807
- } else if (dir === 'right') {
18808
- return 'left';
18809
- } else if (dir === 'top') {
18810
- return 'bottom';
18811
- } else if (dir === 'bottom') {
18812
- return 'top';
18813
- }
18814
- }
18815
-
18816
- // 设置 elem 相对 elem.ownerDocument 的坐标
18817
- function setLeftTop(elem, offset, option) {
18818
- // set position first, in-case top/left are set even on static elem
18819
- if (css(elem, 'position') === 'static') {
18820
- elem.style.position = 'relative';
18821
- }
18822
- var presetH = -999;
18823
- var presetV = -999;
18824
- var horizontalProperty = getOffsetDirection('left', option);
18825
- var verticalProperty = getOffsetDirection('top', option);
18826
- var oppositeHorizontalProperty = oppositeOffsetDirection(horizontalProperty);
18827
- var oppositeVerticalProperty = oppositeOffsetDirection(verticalProperty);
18828
-
18829
- if (horizontalProperty !== 'left') {
18830
- presetH = 999;
18831
- }
18832
-
18833
- if (verticalProperty !== 'top') {
18834
- presetV = 999;
18835
- }
18836
- var originalTransition = '';
18837
- var originalOffset = getOffset(elem);
18838
- if ('left' in offset || 'top' in offset) {
18839
- originalTransition = Object(__WEBPACK_IMPORTED_MODULE_0__propertyUtils__["c" /* getTransitionProperty */])(elem) || '';
18840
- Object(__WEBPACK_IMPORTED_MODULE_0__propertyUtils__["e" /* setTransitionProperty */])(elem, 'none');
18841
- }
18842
- if ('left' in offset) {
18843
- elem.style[oppositeHorizontalProperty] = '';
18844
- elem.style[horizontalProperty] = presetH + 'px';
18845
- }
18846
- if ('top' in offset) {
18847
- elem.style[oppositeVerticalProperty] = '';
18848
- elem.style[verticalProperty] = presetV + 'px';
18849
- }
18850
- // force relayout
18851
- forceRelayout(elem);
18852
- var old = getOffset(elem);
18853
- var originalStyle = {};
18854
- for (var key in offset) {
18855
- if (offset.hasOwnProperty(key)) {
18856
- var dir = getOffsetDirection(key, option);
18857
- var preset = key === 'left' ? presetH : presetV;
18858
- var off = originalOffset[key] - old[key];
18859
- if (dir === key) {
18860
- originalStyle[dir] = preset + off;
18861
- } else {
18862
- originalStyle[dir] = preset - off;
18863
- }
18864
- }
18865
- }
18866
- css(elem, originalStyle);
18867
- // force relayout
18868
- forceRelayout(elem);
18869
- if ('left' in offset || 'top' in offset) {
18870
- Object(__WEBPACK_IMPORTED_MODULE_0__propertyUtils__["e" /* setTransitionProperty */])(elem, originalTransition);
18871
- }
18872
- var ret = {};
18873
- for (var _key in offset) {
18874
- if (offset.hasOwnProperty(_key)) {
18875
- var _dir = getOffsetDirection(_key, option);
18876
- var _off = offset[_key] - originalOffset[_key];
18877
- if (_key === _dir) {
18878
- ret[_dir] = originalStyle[_dir] + _off;
18879
- } else {
18880
- ret[_dir] = originalStyle[_dir] - _off;
18881
- }
18882
- }
18883
- }
18884
- css(elem, ret);
18885
- }
18886
-
18887
- function setTransform(elem, offset) {
18888
- var originalOffset = getOffset(elem);
18889
- var originalXY = Object(__WEBPACK_IMPORTED_MODULE_0__propertyUtils__["b" /* getTransformXY */])(elem);
18890
- var resultXY = { x: originalXY.x, y: originalXY.y };
18891
- if ('left' in offset) {
18892
- resultXY.x = originalXY.x + offset.left - originalOffset.left;
18893
- }
18894
- if ('top' in offset) {
18895
- resultXY.y = originalXY.y + offset.top - originalOffset.top;
18896
- }
18897
- Object(__WEBPACK_IMPORTED_MODULE_0__propertyUtils__["d" /* setTransformXY */])(elem, resultXY);
18898
- }
18899
-
18900
- function setOffset(elem, offset, option) {
18901
- if (option.useCssRight || option.useCssBottom) {
18902
- setLeftTop(elem, offset, option);
18903
- } else if (option.useCssTransform && Object(__WEBPACK_IMPORTED_MODULE_0__propertyUtils__["a" /* getTransformName */])() in document.body.style) {
18904
- setTransform(elem, offset, option);
18905
- } else {
18906
- setLeftTop(elem, offset, option);
18907
- }
18908
- }
18909
-
18910
- function each(arr, fn) {
18911
- for (var i = 0; i < arr.length; i++) {
18912
- fn(arr[i]);
18913
- }
18914
- }
18915
-
18916
- function isBorderBoxFn(elem) {
18917
- return getComputedStyleX(elem, 'boxSizing') === 'border-box';
18918
- }
18919
-
18920
- var BOX_MODELS = ['margin', 'border', 'padding'];
18921
- var CONTENT_INDEX = -1;
18922
- var PADDING_INDEX = 2;
18923
- var BORDER_INDEX = 1;
18924
- var MARGIN_INDEX = 0;
18925
-
18926
- function swap(elem, options, callback) {
18927
- var old = {};
18928
- var style = elem.style;
18929
- var name = void 0;
18930
-
18931
- // Remember the old values, and insert the new ones
18932
- for (name in options) {
18933
- if (options.hasOwnProperty(name)) {
18934
- old[name] = style[name];
18935
- style[name] = options[name];
18936
- }
18937
- }
18938
-
18939
- callback.call(elem);
18940
-
18941
- // Revert the old values
18942
- for (name in options) {
18943
- if (options.hasOwnProperty(name)) {
18944
- style[name] = old[name];
18945
- }
18946
- }
18947
- }
18948
-
18949
- function getPBMWidth(elem, props, which) {
18950
- var value = 0;
18951
- var prop = void 0;
18952
- var j = void 0;
18953
- var i = void 0;
18954
- for (j = 0; j < props.length; j++) {
18955
- prop = props[j];
18956
- if (prop) {
18957
- for (i = 0; i < which.length; i++) {
18958
- var cssProp = void 0;
18959
- if (prop === 'border') {
18960
- cssProp = '' + prop + which[i] + 'Width';
18961
- } else {
18962
- cssProp = prop + which[i];
18963
- }
18964
- value += parseFloat(getComputedStyleX(elem, cssProp)) || 0;
18965
- }
18966
- }
18967
- }
18968
- return value;
18969
- }
18970
-
18971
- var domUtils = {};
18972
-
18973
- each(['Width', 'Height'], function (name) {
18974
- domUtils['doc' + name] = function (refWin) {
18975
- var d = refWin.document;
18976
- return Math.max(
18977
- // firefox chrome documentElement.scrollHeight< body.scrollHeight
18978
- // ie standard mode : documentElement.scrollHeight> body.scrollHeight
18979
- d.documentElement['scroll' + name],
18980
- // quirks : documentElement.scrollHeight 最大等于可视窗口多一点?
18981
- d.body['scroll' + name], domUtils['viewport' + name](d));
18982
- };
18983
-
18984
- domUtils['viewport' + name] = function (win) {
18985
- // pc browser includes scrollbar in window.innerWidth
18986
- var prop = 'client' + name;
18987
- var doc = win.document;
18988
- var body = doc.body;
18989
- var documentElement = doc.documentElement;
18990
- var documentElementProp = documentElement[prop];
18991
- // 标准模式取 documentElement
18992
- // backcompat 取 body
18993
- return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp;
18994
- };
18995
- });
18996
-
18997
- /*
18998
- 得到元素的大小信息
18999
- @param elem
19000
- @param name
19001
- @param {String} [extra] 'padding' : (css width) + padding
19002
- 'border' : (css width) + padding + border
19003
- 'margin' : (css width) + padding + border + margin
19004
- */
19005
- function getWH(elem, name, ex) {
19006
- var extra = ex;
19007
- if (isWindow(elem)) {
19008
- return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem);
19009
- } else if (elem.nodeType === 9) {
19010
- return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem);
19011
- }
19012
- var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];
19013
- var borderBoxValue = name === 'width' ? elem.getBoundingClientRect().width : elem.getBoundingClientRect().height;
19014
- var computedStyle = getComputedStyleX(elem);
19015
- var isBorderBox = isBorderBoxFn(elem, computedStyle);
19016
- var cssBoxValue = 0;
19017
- if (borderBoxValue === null || borderBoxValue === undefined || borderBoxValue <= 0) {
19018
- borderBoxValue = undefined;
19019
- // Fall back to computed then un computed css if necessary
19020
- cssBoxValue = getComputedStyleX(elem, name);
19021
- if (cssBoxValue === null || cssBoxValue === undefined || Number(cssBoxValue) < 0) {
19022
- cssBoxValue = elem.style[name] || 0;
19023
- }
19024
- // Normalize '', auto, and prepare for extra
19025
- cssBoxValue = parseFloat(cssBoxValue) || 0;
19026
- }
19027
- if (extra === undefined) {
19028
- extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX;
19029
- }
19030
- var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox;
19031
- var val = borderBoxValue || cssBoxValue;
19032
- if (extra === CONTENT_INDEX) {
19033
- if (borderBoxValueOrIsBorderBox) {
19034
- return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle);
19035
- }
19036
- return cssBoxValue;
19037
- } else if (borderBoxValueOrIsBorderBox) {
19038
- if (extra === BORDER_INDEX) {
19039
- return val;
19040
- }
19041
- return val + (extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle));
19042
- }
19043
- return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle);
19044
- }
19045
-
19046
- var cssShow = {
19047
- position: 'absolute',
19048
- visibility: 'hidden',
19049
- display: 'block'
19050
- };
19051
-
19052
- // fix #119 : https://github.com/kissyteam/kissy/issues/119
19053
- function getWHIgnoreDisplay() {
19054
- for (var _len = arguments.length, args = Array(_len), _key2 = 0; _key2 < _len; _key2++) {
19055
- args[_key2] = arguments[_key2];
19056
- }
19057
-
19058
- var val = void 0;
19059
- var elem = args[0];
19060
- // in case elem is window
19061
- // elem.offsetWidth === undefined
19062
- if (elem.offsetWidth !== 0) {
19063
- val = getWH.apply(undefined, args);
19064
- } else {
19065
- swap(elem, cssShow, function () {
19066
- val = getWH.apply(undefined, args);
19067
- });
19068
- }
19069
- return val;
19070
- }
19071
-
19072
- each(['width', 'height'], function (name) {
19073
- var first = name.charAt(0).toUpperCase() + name.slice(1);
19074
- domUtils['outer' + first] = function (el, includeMargin) {
19075
- return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX);
19076
- };
19077
- var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];
19078
-
19079
- domUtils[name] = function (elem, v) {
19080
- var val = v;
19081
- if (val !== undefined) {
19082
- if (elem) {
19083
- var computedStyle = getComputedStyleX(elem);
19084
- var isBorderBox = isBorderBoxFn(elem);
19085
- if (isBorderBox) {
19086
- val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle);
19087
- }
19088
- return css(elem, name, val);
19089
- }
19090
- return undefined;
19091
- }
19092
- return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX);
19093
- };
19094
- });
19095
-
19096
- function mix(to, from) {
19097
- for (var i in from) {
19098
- if (from.hasOwnProperty(i)) {
19099
- to[i] = from[i];
19100
- }
19101
- }
19102
- return to;
19103
- }
19104
-
19105
- var utils = {
19106
- getWindow: function getWindow(node) {
19107
- if (node && node.document && node.setTimeout) {
19108
- return node;
19109
- }
19110
- var doc = node.ownerDocument || node;
19111
- return doc.defaultView || doc.parentWindow;
19112
- },
19113
-
19114
- getDocument: getDocument,
19115
- offset: function offset(el, value, option) {
19116
- if (typeof value !== 'undefined') {
19117
- setOffset(el, value, option || {});
19118
- } else {
19119
- return getOffset(el);
19120
- }
19121
- },
19122
-
19123
- isWindow: isWindow,
19124
- each: each,
19125
- css: css,
19126
- clone: function clone(obj) {
19127
- var i = void 0;
19128
- var ret = {};
19129
- for (i in obj) {
19130
- if (obj.hasOwnProperty(i)) {
19131
- ret[i] = obj[i];
19132
- }
19133
- }
19134
- var overflow = obj.overflow;
19135
- if (overflow) {
19136
- for (i in obj) {
19137
- if (obj.hasOwnProperty(i)) {
19138
- ret.overflow[i] = obj.overflow[i];
19139
- }
19140
- }
19141
- }
19142
- return ret;
19143
- },
19144
-
19145
- mix: mix,
19146
- getWindowScrollLeft: function getWindowScrollLeft(w) {
19147
- return getScrollLeft(w);
19148
- },
19149
- getWindowScrollTop: function getWindowScrollTop(w) {
19150
- return getScrollTop(w);
19151
- },
19152
- merge: function merge() {
19153
- var ret = {};
19154
-
19155
- for (var _len2 = arguments.length, args = Array(_len2), _key3 = 0; _key3 < _len2; _key3++) {
19156
- args[_key3] = arguments[_key3];
19157
- }
19158
-
19159
- for (var i = 0; i < args.length; i++) {
19160
- utils.mix(ret, args[i]);
19161
- }
19162
- return ret;
19163
- },
19164
-
19165
- viewportWidth: 0,
19166
- viewportHeight: 0
19167
- };
19168
-
19169
- mix(utils, domUtils);
19170
-
19171
- /* harmony default export */ __webpack_exports__["a"] = (utils);
19172
-
19173
- /***/ }),
19174
- /* 65 */
19175
- /***/ (function(module, exports, __webpack_require__) {
19176
-
19177
- "use strict";
19178
-
19179
-
19180
- /**
19181
- * Copyright (c) 2013-present, Facebook, Inc.
19182
- *
19183
- * This source code is licensed under the MIT license found in the
19184
- * LICENSE file in the root directory of this source tree.
19185
- *
19186
- *
19187
- */
19188
-
19189
- function makeEmptyFunction(arg) {
19190
- return function () {
19191
- return arg;
19192
- };
19193
- }
19194
-
19195
- /**
19196
- * This function accepts and discards inputs; it has no side effects. This is
19197
- * primarily useful idiomatically for overridable function endpoints which
19198
- * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
19199
- */
19200
- var emptyFunction = function emptyFunction() {};
19201
-
19202
- emptyFunction.thatReturns = makeEmptyFunction;
19203
- emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
19204
- emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
19205
- emptyFunction.thatReturnsNull = makeEmptyFunction(null);
19206
- emptyFunction.thatReturnsThis = function () {
19207
- return this;
19208
- };
19209
- emptyFunction.thatReturnsArgument = function (arg) {
19210
- return arg;
19211
- };
19212
-
19213
- module.exports = emptyFunction;
19214
-
19215
- /***/ }),
19216
- /* 66 */,
19217
- /* 67 */,
19218
- /* 68 */
19219
- /***/ (function(module, exports, __webpack_require__) {
19220
-
19221
- module.exports = { "default": __webpack_require__(69), __esModule: true };
19222
-
19223
- /***/ }),
19224
- /* 69 */
19225
- /***/ (function(module, exports, __webpack_require__) {
19226
-
19227
- __webpack_require__(70);
19228
- module.exports = __webpack_require__(3).Object.assign;
19229
-
19230
-
19231
- /***/ }),
19232
- /* 70 */
19233
- /***/ (function(module, exports, __webpack_require__) {
19234
-
19235
- // 19.1.3.1 Object.assign(target, source)
19236
- var $export = __webpack_require__(12);
19237
-
19238
- $export($export.S + $export.F, 'Object', { assign: __webpack_require__(71) });
19239
-
19240
-
19241
- /***/ }),
19242
- /* 71 */
19243
- /***/ (function(module, exports, __webpack_require__) {
19244
-
19245
- "use strict";
19246
-
19247
- // 19.1.2.1 Object.assign(target, source, ...)
19248
- var getKeys = __webpack_require__(27);
19249
- var gOPS = __webpack_require__(38);
19250
- var pIE = __webpack_require__(28);
19251
- var toObject = __webpack_require__(32);
19252
- var IObject = __webpack_require__(112);
19253
- var $assign = Object.assign;
19254
-
19255
- // should work with symbols and should have deterministic property order (V8 bug)
19256
- module.exports = !$assign || __webpack_require__(26)(function () {
19257
- var A = {};
19258
- var B = {};
19259
- // eslint-disable-next-line no-undef
19260
- var S = Symbol();
19261
- var K = 'abcdefghijklmnopqrst';
19262
- A[S] = 7;
19263
- K.split('').forEach(function (k) { B[k] = k; });
19264
- return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
19265
- }) ? function assign(target, source) { // eslint-disable-line no-unused-vars
19266
- var T = toObject(target);
19267
- var aLen = arguments.length;
19268
- var index = 1;
19269
- var getSymbols = gOPS.f;
19270
- var isEnum = pIE.f;
19271
- while (aLen > index) {
19272
- var S = IObject(arguments[index++]);
19273
- var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
19274
- var length = keys.length;
19275
- var j = 0;
19276
- var key;
19277
- while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
19278
- } return T;
19279
- } : $assign;
19280
-
19281
-
19282
- /***/ }),
19283
- /* 72 */
19284
- /***/ (function(module, exports, __webpack_require__) {
19285
-
19286
- module.exports = { "default": __webpack_require__(73), __esModule: true };
19287
-
19288
- /***/ }),
19289
- /* 73 */
19290
- /***/ (function(module, exports, __webpack_require__) {
19291
-
19292
- __webpack_require__(34);
19293
- __webpack_require__(47);
19294
- module.exports = __webpack_require__(30).f('iterator');
19295
-
19296
-
19297
- /***/ }),
19298
- /* 74 */
19299
- /***/ (function(module, exports, __webpack_require__) {
19300
-
19301
- module.exports = { "default": __webpack_require__(75), __esModule: true };
19302
-
19303
- /***/ }),
19304
- /* 75 */
19305
- /***/ (function(module, exports, __webpack_require__) {
19306
-
19307
- __webpack_require__(76);
19308
- __webpack_require__(58);
19309
- __webpack_require__(81);
19310
- __webpack_require__(82);
19311
- module.exports = __webpack_require__(3).Symbol;
19312
-
19313
-
19314
- /***/ }),
19315
- /* 76 */
19316
- /***/ (function(module, exports, __webpack_require__) {
19317
-
19318
- "use strict";
19319
-
19320
- // ECMAScript 6 symbols shim
19321
- var global = __webpack_require__(13);
19322
- var has = __webpack_require__(23);
19323
- var DESCRIPTORS = __webpack_require__(20);
19324
- var $export = __webpack_require__(12);
19325
- var redefine = __webpack_require__(110);
19326
- var META = __webpack_require__(77).KEY;
19327
- var $fails = __webpack_require__(26);
19328
- var shared = __webpack_require__(66);
19329
- var setToStringTag = __webpack_require__(57);
19330
- var uid = __webpack_require__(46);
19331
- var wks = __webpack_require__(11);
19332
- var wksExt = __webpack_require__(30);
19333
- var wksDefine = __webpack_require__(31);
19334
- var enumKeys = __webpack_require__(78);
19335
- var isArray = __webpack_require__(79);
19336
- var anObject = __webpack_require__(18);
19337
- var isObject = __webpack_require__(19);
19338
- var toIObject = __webpack_require__(24);
19339
- var toPrimitive = __webpack_require__(50);
19340
- var createDesc = __webpack_require__(36);
19341
- var _create = __webpack_require__(51);
19342
- var gOPNExt = __webpack_require__(80);
19343
- var $GOPD = __webpack_require__(39);
19344
- var $DP = __webpack_require__(14);
19345
- var $keys = __webpack_require__(27);
19346
- var gOPD = $GOPD.f;
19347
- var dP = $DP.f;
19348
- var gOPN = gOPNExt.f;
19349
- var $Symbol = global.Symbol;
19350
- var $JSON = global.JSON;
19351
- var _stringify = $JSON && $JSON.stringify;
19352
- var PROTOTYPE = 'prototype';
19353
- var HIDDEN = wks('_hidden');
19354
- var TO_PRIMITIVE = wks('toPrimitive');
19355
- var isEnum = {}.propertyIsEnumerable;
19356
- var SymbolRegistry = shared('symbol-registry');
19357
- var AllSymbols = shared('symbols');
19358
- var OPSymbols = shared('op-symbols');
19359
- var ObjectProto = Object[PROTOTYPE];
19360
- var USE_NATIVE = typeof $Symbol == 'function';
19361
- var QObject = global.QObject;
19362
- // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
19363
- var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
19364
-
19365
- // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
19366
- var setSymbolDesc = DESCRIPTORS && $fails(function () {
19367
- return _create(dP({}, 'a', {
19368
- get: function () { return dP(this, 'a', { value: 7 }).a; }
19369
- })).a != 7;
19370
- }) ? function (it, key, D) {
19371
- var protoDesc = gOPD(ObjectProto, key);
19372
- if (protoDesc) delete ObjectProto[key];
19373
- dP(it, key, D);
19374
- if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
19375
- } : dP;
19376
-
19377
- var wrap = function (tag) {
19378
- var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
19379
- sym._k = tag;
19380
- return sym;
19381
- };
19382
-
19383
- var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
19384
- return typeof it == 'symbol';
19385
- } : function (it) {
19386
- return it instanceof $Symbol;
19387
- };
19388
-
19389
- var $defineProperty = function defineProperty(it, key, D) {
19390
- if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
19391
- anObject(it);
19392
- key = toPrimitive(key, true);
19393
- anObject(D);
19394
- if (has(AllSymbols, key)) {
19395
- if (!D.enumerable) {
19396
- if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
19397
- it[HIDDEN][key] = true;
19398
- } else {
19399
- if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
19400
- D = _create(D, { enumerable: createDesc(0, false) });
19401
- } return setSymbolDesc(it, key, D);
19402
- } return dP(it, key, D);
19403
- };
19404
- var $defineProperties = function defineProperties(it, P) {
19405
- anObject(it);
19406
- var keys = enumKeys(P = toIObject(P));
19407
- var i = 0;
19408
- var l = keys.length;
19409
- var key;
19410
- while (l > i) $defineProperty(it, key = keys[i++], P[key]);
19411
- return it;
19412
- };
19413
- var $create = function create(it, P) {
19414
- return P === undefined ? _create(it) : $defineProperties(_create(it), P);
19415
- };
19416
- var $propertyIsEnumerable = function propertyIsEnumerable(key) {
19417
- var E = isEnum.call(this, key = toPrimitive(key, true));
19418
- if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
19419
- return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
19420
- };
19421
- var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
19422
- it = toIObject(it);
19423
- key = toPrimitive(key, true);
19424
- if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
19425
- var D = gOPD(it, key);
19426
- if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
19427
- return D;
19428
- };
19429
- var $getOwnPropertyNames = function getOwnPropertyNames(it) {
19430
- var names = gOPN(toIObject(it));
19431
- var result = [];
19432
- var i = 0;
19433
- var key;
19434
- while (names.length > i) {
19435
- if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
19436
- } return result;
19437
- };
19438
- var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
19439
- var IS_OP = it === ObjectProto;
19440
- var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
19441
- var result = [];
19442
- var i = 0;
19443
- var key;
19444
- while (names.length > i) {
19445
- if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
19446
- } return result;
19447
- };
19448
-
19449
- // 19.4.1.1 Symbol([description])
19450
- if (!USE_NATIVE) {
19451
- $Symbol = function Symbol() {
19452
- if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
19453
- var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
19454
- var $set = function (value) {
19455
- if (this === ObjectProto) $set.call(OPSymbols, value);
19456
- if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
19457
- setSymbolDesc(this, tag, createDesc(1, value));
19458
- };
19459
- if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
19460
- return wrap(tag);
19461
- };
19462
- redefine($Symbol[PROTOTYPE], 'toString', function toString() {
19463
- return this._k;
19464
- });
19465
-
19466
- $GOPD.f = $getOwnPropertyDescriptor;
19467
- $DP.f = $defineProperty;
19468
- __webpack_require__(48).f = gOPNExt.f = $getOwnPropertyNames;
19469
- __webpack_require__(28).f = $propertyIsEnumerable;
19470
- __webpack_require__(38).f = $getOwnPropertySymbols;
19471
-
19472
- if (DESCRIPTORS && !__webpack_require__(43)) {
19473
- redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
19474
- }
19475
-
19476
- wksExt.f = function (name) {
19477
- return wrap(wks(name));
19478
- };
19479
- }
19480
-
19481
- $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
19482
-
19483
- for (var es6Symbols = (
19484
- // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
19485
- 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
19486
- ).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
19487
-
19488
- for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
19489
-
19490
- $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
19491
- // 19.4.2.1 Symbol.for(key)
19492
- 'for': function (key) {
19493
- return has(SymbolRegistry, key += '')
19494
- ? SymbolRegistry[key]
19495
- : SymbolRegistry[key] = $Symbol(key);
19496
- },
19497
- // 19.4.2.5 Symbol.keyFor(sym)
19498
- keyFor: function keyFor(sym) {
19499
- if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
19500
- for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
19501
- },
19502
- useSetter: function () { setter = true; },
19503
- useSimple: function () { setter = false; }
19504
- });
19505
-
19506
- $export($export.S + $export.F * !USE_NATIVE, 'Object', {
19507
- // 19.1.2.2 Object.create(O [, Properties])
19508
- create: $create,
19509
- // 19.1.2.4 Object.defineProperty(O, P, Attributes)
19510
- defineProperty: $defineProperty,
19511
- // 19.1.2.3 Object.defineProperties(O, Properties)
19512
- defineProperties: $defineProperties,
19513
- // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
19514
- getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
19515
- // 19.1.2.7 Object.getOwnPropertyNames(O)
19516
- getOwnPropertyNames: $getOwnPropertyNames,
19517
- // 19.1.2.8 Object.getOwnPropertySymbols(O)
19518
- getOwnPropertySymbols: $getOwnPropertySymbols
19519
- });
19520
-
19521
- // 24.3.2 JSON.stringify(value [, replacer [, space]])
19522
- $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
19523
- var S = $Symbol();
19524
- // MS Edge converts symbol values to JSON as {}
19525
- // WebKit converts symbol values to JSON as null
19526
- // V8 throws on boxed symbols
19527
- return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
19528
- })), 'JSON', {
19529
- stringify: function stringify(it) {
19530
- var args = [it];
19531
- var i = 1;
19532
- var replacer, $replacer;
19533
- while (arguments.length > i) args.push(arguments[i++]);
19534
- $replacer = replacer = args[1];
19535
- if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
19536
- if (!isArray(replacer)) replacer = function (key, value) {
19537
- if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
19538
- if (!isSymbol(value)) return value;
19539
- };
19540
- args[1] = replacer;
19541
- return _stringify.apply($JSON, args);
19542
- }
19543
- });
19544
-
19545
- // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
19546
- $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(35)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
19547
- // 19.4.3.5 Symbol.prototype[@@toStringTag]
19548
- setToStringTag($Symbol, 'Symbol');
19549
- // 20.2.1.9 Math[@@toStringTag]
19550
- setToStringTag(Math, 'Math', true);
19551
- // 24.3.3 JSON[@@toStringTag]
19552
- setToStringTag(global.JSON, 'JSON', true);
19553
-
19554
-
19555
- /***/ }),
19556
- /* 77 */
19557
- /***/ (function(module, exports, __webpack_require__) {
19558
-
19559
- var META = __webpack_require__(46)('meta');
19560
- var isObject = __webpack_require__(19);
19561
- var has = __webpack_require__(23);
19562
- var setDesc = __webpack_require__(14).f;
19563
- var id = 0;
19564
- var isExtensible = Object.isExtensible || function () {
19565
- return true;
19566
- };
19567
- var FREEZE = !__webpack_require__(26)(function () {
19568
- return isExtensible(Object.preventExtensions({}));
19569
- });
19570
- var setMeta = function (it) {
19571
- setDesc(it, META, { value: {
19572
- i: 'O' + ++id, // object ID
19573
- w: {} // weak collections IDs
19574
- } });
19575
- };
19576
- var fastKey = function (it, create) {
19577
- // return primitive with prefix
19578
- if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
19579
- if (!has(it, META)) {
19580
- // can't set metadata to uncaught frozen object
19581
- if (!isExtensible(it)) return 'F';
19582
- // not necessary to add metadata
19583
- if (!create) return 'E';
19584
- // add missing metadata
19585
- setMeta(it);
19586
- // return object ID
19587
- } return it[META].i;
19588
- };
19589
- var getWeak = function (it, create) {
19590
- if (!has(it, META)) {
19591
- // can't set metadata to uncaught frozen object
19592
- if (!isExtensible(it)) return true;
19593
- // not necessary to add metadata
19594
- if (!create) return false;
19595
- // add missing metadata
19596
- setMeta(it);
19597
- // return hash weak collections IDs
19598
- } return it[META].w;
19599
- };
19600
- // add metadata on freeze-family methods calling
19601
- var onFreeze = function (it) {
19602
- if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
19603
- return it;
19604
- };
19605
- var meta = module.exports = {
19606
- KEY: META,
19607
- NEED: false,
19608
- fastKey: fastKey,
19609
- getWeak: getWeak,
19610
- onFreeze: onFreeze
19611
- };
19612
-
19613
-
19614
- /***/ }),
19615
- /* 78 */
19616
- /***/ (function(module, exports, __webpack_require__) {
19617
-
19618
- // all enumerable object keys, includes symbols
19619
- var getKeys = __webpack_require__(27);
19620
- var gOPS = __webpack_require__(38);
19621
- var pIE = __webpack_require__(28);
19622
- module.exports = function (it) {
19623
- var result = getKeys(it);
19624
- var getSymbols = gOPS.f;
19625
- if (getSymbols) {
19626
- var symbols = getSymbols(it);
19627
- var isEnum = pIE.f;
19628
- var i = 0;
19629
- var key;
19630
- while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
19631
- } return result;
19632
- };
19633
-
19634
-
19635
- /***/ }),
19636
- /* 79 */
19637
- /***/ (function(module, exports, __webpack_require__) {
19638
-
19639
- // 7.2.2 IsArray(argument)
19640
- var cof = __webpack_require__(37);
19641
- module.exports = Array.isArray || function isArray(arg) {
19642
- return cof(arg) == 'Array';
19643
- };
19644
-
19645
-
19646
- /***/ }),
19647
- /* 80 */
19648
- /***/ (function(module, exports, __webpack_require__) {
19649
-
19650
- // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
19651
- var toIObject = __webpack_require__(24);
19652
- var gOPN = __webpack_require__(48).f;
19653
- var toString = {}.toString;
19654
-
19655
- var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
19656
- ? Object.getOwnPropertyNames(window) : [];
19657
-
19658
- var getWindowNames = function (it) {
19659
- try {
19660
- return gOPN(it);
19661
- } catch (e) {
19662
- return windowNames.slice();
19663
- }
19664
- };
19665
-
19666
- module.exports.f = function getOwnPropertyNames(it) {
19667
- return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
19668
- };
19669
-
19670
-
19671
- /***/ }),
19672
- /* 81 */
19673
- /***/ (function(module, exports, __webpack_require__) {
19674
-
19675
- __webpack_require__(31)('asyncIterator');
19676
-
19677
-
19678
- /***/ }),
19679
- /* 82 */
19680
- /***/ (function(module, exports, __webpack_require__) {
19681
-
19682
- __webpack_require__(31)('observable');
19683
-
19684
-
19685
- /***/ }),
19686
- /* 83 */
19687
- /***/ (function(module, exports, __webpack_require__) {
19688
-
19689
- module.exports = { "default": __webpack_require__(133), __esModule: true };
19690
-
19691
- /***/ }),
19692
- /* 84 */
19693
- /***/ (function(module, exports, __webpack_require__) {
19694
-
19695
- __webpack_require__(47);
19696
- __webpack_require__(34);
19697
- module.exports = __webpack_require__(85);
19698
-
19699
-
19700
- /***/ }),
19701
- /* 85 */
19702
- /***/ (function(module, exports, __webpack_require__) {
19703
-
19704
- var anObject = __webpack_require__(18);
19705
- var get = __webpack_require__(52);
19706
- module.exports = __webpack_require__(3).getIterator = function (it) {
19707
- var iterFn = get(it);
19708
- if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');
19709
- return anObject(iterFn.call(it));
19710
- };
19711
-
19712
-
19713
- /***/ }),
19714
- /* 86 */
19715
- /***/ (function(module, exports, __webpack_require__) {
19716
-
19717
- __webpack_require__(87);
19718
- module.exports = __webpack_require__(3).Object.getPrototypeOf;
19719
-
19720
-
19721
- /***/ }),
19722
- /* 87 */
19723
- /***/ (function(module, exports, __webpack_require__) {
19724
-
19725
- // 19.1.2.9 Object.getPrototypeOf(O)
19726
- var toObject = __webpack_require__(32);
19727
- var $getPrototypeOf = __webpack_require__(113);
19728
-
19729
- __webpack_require__(60)('getPrototypeOf', function () {
19730
- return function getPrototypeOf(it) {
19731
- return $getPrototypeOf(toObject(it));
19732
- };
19733
- });
19734
-
19735
-
19736
- /***/ }),
19737
- /* 88 */
19738
- /***/ (function(module, exports, __webpack_require__) {
19739
-
19740
- __webpack_require__(89);
19741
- var $Object = __webpack_require__(3).Object;
19742
- module.exports = function defineProperty(it, key, desc) {
19743
- return $Object.defineProperty(it, key, desc);
19744
- };
19745
-
19746
-
19747
- /***/ }),
19748
- /* 89 */
19749
- /***/ (function(module, exports, __webpack_require__) {
19750
-
19751
- var $export = __webpack_require__(12);
19752
- // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
19753
- $export($export.S + $export.F * !__webpack_require__(20), 'Object', { defineProperty: __webpack_require__(14).f });
19754
-
19755
-
19756
- /***/ }),
19757
- /* 90 */
19758
- /***/ (function(module, exports, __webpack_require__) {
19759
-
19760
- module.exports = { "default": __webpack_require__(91), __esModule: true };
19761
-
19762
- /***/ }),
19763
- /* 91 */
19764
- /***/ (function(module, exports, __webpack_require__) {
19765
-
19766
- __webpack_require__(92);
19767
- module.exports = __webpack_require__(3).Object.setPrototypeOf;
19768
-
19769
-
19770
- /***/ }),
19771
- /* 92 */
19772
- /***/ (function(module, exports, __webpack_require__) {
19773
-
19774
- // 19.1.3.19 Object.setPrototypeOf(O, proto)
19775
- var $export = __webpack_require__(12);
19776
- $export($export.S, 'Object', { setPrototypeOf: __webpack_require__(93).set });
19777
-
19778
-
19779
- /***/ }),
19780
- /* 93 */
19781
- /***/ (function(module, exports, __webpack_require__) {
19782
-
19783
- // Works with __proto__ only. Old v8 can't work with null proto objects.
19784
- /* eslint-disable no-proto */
19785
- var isObject = __webpack_require__(19);
19786
- var anObject = __webpack_require__(18);
19787
- var check = function (O, proto) {
19788
- anObject(O);
19789
- if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
19790
- };
19791
- module.exports = {
19792
- set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
19793
- function (test, buggy, set) {
19794
- try {
19795
- set = __webpack_require__(44)(Function.call, __webpack_require__(39).f(Object.prototype, '__proto__').set, 2);
19796
- set(test, []);
19797
- buggy = !(test instanceof Array);
19798
- } catch (e) { buggy = true; }
19799
- return function setPrototypeOf(O, proto) {
19800
- check(O, proto);
19801
- if (buggy) O.__proto__ = proto;
19802
- else set(O, proto);
19803
- return O;
19804
- };
19805
- }({}, false) : undefined),
19806
- check: check
19807
- };
19808
-
19809
-
19810
- /***/ }),
19811
- /* 94 */
19812
- /***/ (function(module, exports, __webpack_require__) {
19813
-
19814
- module.exports = { "default": __webpack_require__(95), __esModule: true };
19815
-
19816
- /***/ }),
19817
- /* 95 */
19818
- /***/ (function(module, exports, __webpack_require__) {
19819
-
19820
- __webpack_require__(96);
19821
- var $Object = __webpack_require__(3).Object;
19822
- module.exports = function create(P, D) {
19823
- return $Object.create(P, D);
19824
- };
19825
-
19826
-
19827
- /***/ }),
19828
- /* 96 */
19829
- /***/ (function(module, exports, __webpack_require__) {
19830
-
19831
- var $export = __webpack_require__(12);
19832
- // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
19833
- $export($export.S, 'Object', { create: __webpack_require__(51) });
19834
-
19835
-
19836
- /***/ }),
19837
- /* 97 */
19838
- /***/ (function(module, exports, __webpack_require__) {
19839
-
19840
- "use strict";
19841
-
19842
-
19843
- exports.__esModule = true;
19844
-
19845
- exports.default = function (obj, keys) {
19846
- var target = {};
19847
-
19848
- for (var i in obj) {
19849
- if (keys.indexOf(i) >= 0) continue;
19850
- if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
19851
- target[i] = obj[i];
19852
- }
19853
-
19854
- return target;
19855
- };
19856
-
19857
- /***/ }),
19858
- /* 98 */
19859
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
19860
-
19861
- "use strict";
19862
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
19863
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cancelAnimationTimeout", function() { return cancelAnimationTimeout; });
19864
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "requestAnimationTimeout", function() { return requestAnimationTimeout; });
19865
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__animationFrame__ = __webpack_require__(264);
19866
-
19867
-
19868
- var babelPluginFlowReactPropTypes_proptype_AnimationTimeoutId = {
19869
- id: __webpack_require__(0).number.isRequired
19870
- };
19871
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_AnimationTimeoutId', {
19872
- value: babelPluginFlowReactPropTypes_proptype_AnimationTimeoutId,
19873
- configurable: true
19874
- });
19875
-
19876
-
19877
- var cancelAnimationTimeout = function cancelAnimationTimeout(frame) {
19878
- return Object(__WEBPACK_IMPORTED_MODULE_0__animationFrame__["a" /* caf */])(frame.id);
19879
- };
19880
-
19881
- /**
19882
- * Recursively calls requestAnimationFrame until a specified delay has been met or exceeded.
19883
- * When the delay time has been reached the function you're timing out will be called.
19884
- *
19885
- * Credit: Joe Lambert (https://gist.github.com/joelambert/1002116#file-requesttimeout-js)
19886
- */
19887
- var requestAnimationTimeout = function requestAnimationTimeout(callback, delay) {
19888
- var start = Date.now();
19889
-
19890
- var timeout = function timeout() {
19891
- if (Date.now() - start >= delay) {
19892
- callback.call();
19893
- } else {
19894
- frame.id = Object(__WEBPACK_IMPORTED_MODULE_0__animationFrame__["b" /* raf */])(timeout);
19895
- }
19896
- };
19897
-
19898
- var frame = {
19899
- id: Object(__WEBPACK_IMPORTED_MODULE_0__animationFrame__["b" /* raf */])(timeout)
19900
- };
19901
-
19902
- return frame;
19903
- };
19904
-
19905
- /***/ }),
19906
- /* 99 */
19907
- /***/ (function(module, exports, __webpack_require__) {
19908
-
19909
- var babelPluginFlowReactPropTypes_proptype_CellDataGetterParams = {
19910
- columnData: __webpack_require__(0).any,
19911
- dataKey: __webpack_require__(0).string.isRequired,
19912
- rowData: function rowData(props, propName, componentName) {
19913
- if (!Object.prototype.hasOwnProperty.call(props, propName)) {
19914
- throw new Error("Prop `" + propName + "` has type 'any' or 'mixed', but was not provided to `" + componentName + "`. Pass undefined or any other value.");
19915
- }
19916
- }
19917
- };
19918
- if (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype_CellDataGetterParams", {
19919
- value: babelPluginFlowReactPropTypes_proptype_CellDataGetterParams,
19920
- configurable: true
19921
- });
19922
- var babelPluginFlowReactPropTypes_proptype_CellRendererParams = {
19923
- cellData: __webpack_require__(0).any,
19924
- columnData: __webpack_require__(0).any,
19925
- dataKey: __webpack_require__(0).string.isRequired,
19926
- rowData: function rowData(props, propName, componentName) {
19927
- if (!Object.prototype.hasOwnProperty.call(props, propName)) {
19928
- throw new Error("Prop `" + propName + "` has type 'any' or 'mixed', but was not provided to `" + componentName + "`. Pass undefined or any other value.");
19929
- }
19930
- },
19931
- rowIndex: __webpack_require__(0).number.isRequired
19932
- };
19933
- if (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype_CellRendererParams", {
19934
- value: babelPluginFlowReactPropTypes_proptype_CellRendererParams,
19935
- configurable: true
19936
- });
19937
- var babelPluginFlowReactPropTypes_proptype_HeaderRowRendererParams = {
19938
- className: __webpack_require__(0).string.isRequired,
19939
- columns: __webpack_require__(0).arrayOf(__webpack_require__(0).any).isRequired,
19940
- style: function style(props, propName, componentName) {
19941
- if (!Object.prototype.hasOwnProperty.call(props, propName)) {
19942
- throw new Error("Prop `" + propName + "` has type 'any' or 'mixed', but was not provided to `" + componentName + "`. Pass undefined or any other value.");
19943
- }
19944
- }
19945
- };
19946
- if (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype_HeaderRowRendererParams", {
19947
- value: babelPluginFlowReactPropTypes_proptype_HeaderRowRendererParams,
19948
- configurable: true
19949
- });
19950
- var babelPluginFlowReactPropTypes_proptype_HeaderRendererParams = {
19951
- columnData: __webpack_require__(0).any,
19952
- dataKey: __webpack_require__(0).string.isRequired,
19953
- disableSort: __webpack_require__(0).bool,
19954
- label: __webpack_require__(0).any,
19955
- sortBy: __webpack_require__(0).string,
19956
- sortDirection: __webpack_require__(0).string
19957
- };
19958
- if (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype_HeaderRendererParams", {
19959
- value: babelPluginFlowReactPropTypes_proptype_HeaderRendererParams,
19960
- configurable: true
19961
- });
19962
- var babelPluginFlowReactPropTypes_proptype_RowRendererParams = {
19963
- className: __webpack_require__(0).string.isRequired,
19964
- columns: __webpack_require__(0).arrayOf(__webpack_require__(0).any).isRequired,
19965
- index: __webpack_require__(0).number.isRequired,
19966
- isScrolling: __webpack_require__(0).bool.isRequired,
19967
- onRowClick: __webpack_require__(0).func,
19968
- onRowDoubleClick: __webpack_require__(0).func,
19969
- onRowMouseOver: __webpack_require__(0).func,
19970
- onRowMouseOut: __webpack_require__(0).func,
19971
- rowData: function rowData(props, propName, componentName) {
19972
- if (!Object.prototype.hasOwnProperty.call(props, propName)) {
19973
- throw new Error("Prop `" + propName + "` has type 'any' or 'mixed', but was not provided to `" + componentName + "`. Pass undefined or any other value.");
19974
- }
19975
- },
19976
- style: function style(props, propName, componentName) {
19977
- if (!Object.prototype.hasOwnProperty.call(props, propName)) {
19978
- throw new Error("Prop `" + propName + "` has type 'any' or 'mixed', but was not provided to `" + componentName + "`. Pass undefined or any other value.");
19979
- }
19980
- }
19981
- };
19982
- if (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype_RowRendererParams", {
19983
- value: babelPluginFlowReactPropTypes_proptype_RowRendererParams,
19984
- configurable: true
19985
- });
19986
-
19987
- /***/ }),
19988
- /* 100 */
19989
- /***/ (function(module, exports, __webpack_require__) {
19990
-
19991
- var freeGlobal = __webpack_require__(190);
19992
-
19993
- /** Detect free variable `self`. */
19994
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
19995
-
19996
- /** Used as a reference to the global object. */
19997
- var root = freeGlobal || freeSelf || Function('return this')();
19998
-
19999
- module.exports = root;
20000
-
20001
-
20002
- /***/ }),
20003
- /* 101 */
20004
- /***/ (function(module, exports) {
20005
-
20006
- /**
20007
- * Checks if `value` is object-like. A value is object-like if it's not `null`
20008
- * and has a `typeof` result of "object".
20009
- *
20010
- * @static
20011
- * @memberOf _
20012
- * @since 4.0.0
20013
- * @category Lang
20014
- * @param {*} value The value to check.
20015
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
20016
- * @example
20017
- *
20018
- * _.isObjectLike({});
20019
- * // => true
20020
- *
20021
- * _.isObjectLike([1, 2, 3]);
20022
- * // => true
20023
- *
20024
- * _.isObjectLike(_.noop);
20025
- * // => false
20026
- *
20027
- * _.isObjectLike(null);
20028
- * // => false
20029
- */
20030
- function isObjectLike(value) {
20031
- return value != null && typeof value == 'object';
20032
- }
20033
-
20034
- module.exports = isObjectLike;
20035
-
20036
-
20037
- /***/ }),
20038
- /* 102 */
20039
- /***/ (function(module, exports) {
20040
-
20041
- /**
20042
- * Checks if `value` is the
20043
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
20044
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
20045
- *
20046
- * @static
20047
- * @memberOf _
20048
- * @since 0.1.0
20049
- * @category Lang
20050
- * @param {*} value The value to check.
20051
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
20052
- * @example
20053
- *
20054
- * _.isObject({});
20055
- * // => true
20056
- *
20057
- * _.isObject([1, 2, 3]);
20058
- * // => true
20059
- *
20060
- * _.isObject(_.noop);
20061
- * // => true
20062
- *
20063
- * _.isObject(null);
20064
- * // => false
20065
- */
20066
- function isObject(value) {
20067
- var type = typeof value;
20068
- return value != null && (type == 'object' || type == 'function');
20069
- }
20070
-
20071
- module.exports = isObject;
20072
-
20073
-
20074
- /***/ }),
20075
- /* 103 */
20076
- /***/ (function(module, exports, __webpack_require__) {
20077
-
20078
- var identity = __webpack_require__(197),
20079
- overRest = __webpack_require__(357),
20080
- setToString = __webpack_require__(359);
20081
-
20082
- /**
20083
- * The base implementation of `_.rest` which doesn't validate or coerce arguments.
20084
- *
20085
- * @private
20086
- * @param {Function} func The function to apply a rest parameter to.
20087
- * @param {number} [start=func.length-1] The start position of the rest parameter.
20088
- * @returns {Function} Returns the new function.
20089
- */
20090
- function baseRest(func, start) {
20091
- return setToString(overRest(func, start, identity), func + '');
20092
- }
20093
-
20094
- module.exports = baseRest;
20095
-
20096
-
20097
- /***/ }),
20098
- /* 104 */
20099
- /***/ (function(module, exports) {
20100
-
20101
-
20102
- /**
20103
- * When source maps are enabled, `style-loader` uses a link element with a data-uri to
20104
- * embed the css on the page. This breaks all relative urls because now they are relative to a
20105
- * bundle instead of the current page.
20106
- *
20107
- * One solution is to only use full urls, but that may be impossible.
20108
- *
20109
- * Instead, this function "fixes" the relative urls to be absolute according to the current page location.
20110
- *
20111
- * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
20112
- *
20113
- */
20114
-
20115
- module.exports = function (css) {
20116
- // get current location
20117
- var location = typeof window !== "undefined" && window.location;
20118
-
20119
- if (!location) {
20120
- throw new Error("fixUrls requires window.location");
20121
- }
20122
-
20123
- // blank or null?
20124
- if (!css || typeof css !== "string") {
20125
- return css;
20126
- }
20127
-
20128
- var baseUrl = location.protocol + "//" + location.host;
20129
- var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");
20130
-
20131
- // convert each url(...)
20132
- /*
20133
- This regular expression is just a way to recursively match brackets within
20134
- a string.
20135
-
20136
- /url\s*\( = Match on the word "url" with any whitespace after it and then a parens
20137
- ( = Start a capturing group
20138
- (?: = Start a non-capturing group
20139
- [^)(] = Match anything that isn't a parentheses
20140
- | = OR
20141
- \( = Match a start parentheses
20142
- (?: = Start another non-capturing groups
20143
- [^)(]+ = Match anything that isn't a parentheses
20144
- | = OR
20145
- \( = Match a start parentheses
20146
- [^)(]* = Match anything that isn't a parentheses
20147
- \) = Match a end parentheses
20148
- ) = End Group
20149
- *\) = Match anything and then a close parens
20150
- ) = Close non-capturing group
20151
- * = Match anything
20152
- ) = Close capturing group
20153
- \) = Match a close parens
20154
-
20155
- /gi = Get all matches, not the first. Be case insensitive.
20156
- */
20157
- var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) {
20158
- // strip quotes (if they exist)
20159
- var unquotedOrigUrl = origUrl
20160
- .trim()
20161
- .replace(/^"(.*)"$/, function(o, $1){ return $1; })
20162
- .replace(/^'(.*)'$/, function(o, $1){ return $1; });
20163
-
20164
- // already a full url? no change
20165
- if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(unquotedOrigUrl)) {
20166
- return fullMatch;
20167
- }
20168
-
20169
- // convert the url to a full url
20170
- var newUrl;
20171
-
20172
- if (unquotedOrigUrl.indexOf("//") === 0) {
20173
- //TODO: should we add protocol?
20174
- newUrl = unquotedOrigUrl;
20175
- } else if (unquotedOrigUrl.indexOf("/") === 0) {
20176
- // path should be relative to the base url
20177
- newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
20178
- } else {
20179
- // path should be relative to current directory
20180
- newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
20181
- }
20182
-
20183
- // send back the fixed url(...)
20184
- return "url(" + JSON.stringify(newUrl) + ")";
20185
- });
20186
-
20187
- // send back the fixed css
20188
- return fixedCss;
20189
- };
20190
-
20191
-
20192
- /***/ }),
20193
- /* 105 */
20194
- /***/ (function(module, exports, __webpack_require__) {
20195
-
20196
- "use strict";
20197
-
20198
-
20199
- Object.defineProperty(exports, "__esModule", {
20200
- value: true
20201
- });
20202
- exports.cf7sDuplicateRules = exports.cf7sSurroundingRules = exports.cf7sDropRules = exports.cf7sRequest = exports.versionCompare = exports.mergeDefault = exports.randomizeName = expo