유희정

photo classification and timeline

Showing 1000 changed files with 1948 additions and 4 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

...@@ -4,10 +4,8 @@ ...@@ -4,10 +4,8 @@
4 <component name="GradleSettings"> 4 <component name="GradleSettings">
5 <option name="linkedExternalProjectsSettings"> 5 <option name="linkedExternalProjectsSettings">
6 <GradleProjectSettings> 6 <GradleProjectSettings>
7 - <compositeConfiguration>
8 - <compositeBuild compositeDefinitionSource="SCRIPT" />
9 - </compositeConfiguration>
10 <option name="delegatedBuild" value="false" /> 7 <option name="delegatedBuild" value="false" />
8 + <option name="testRunner" value="PLATFORM" />
11 <option name="distributionType" value="DEFAULT_WRAPPED" /> 9 <option name="distributionType" value="DEFAULT_WRAPPED" />
12 <option name="externalProjectPath" value="$PROJECT_DIR$" /> 10 <option name="externalProjectPath" value="$PROJECT_DIR$" />
13 <option name="modules"> 11 <option name="modules">
...@@ -17,7 +15,6 @@ ...@@ -17,7 +15,6 @@
17 </set> 15 </set>
18 </option> 16 </option>
19 <option name="resolveModulePerSourceSet" value="false" /> 17 <option name="resolveModulePerSourceSet" value="false" />
20 - <option name="testRunner" value="PLATFORM" />
21 </GradleProjectSettings> 18 </GradleProjectSettings>
22 </option> 19 </option>
23 </component> 20 </component>
......
1 +.content{
2 + width :100%;
3 + height :100%;
4 +}
5 +.win_top{
6 + width :100%;
7 + height :10%;
8 + float:left;
9 +}
10 +#title{
11 + width :68%;
12 + height :10%;
13 + float:left;
14 +}
15 +#title img{
16 + height: 80px;
17 + width : auto;
18 + margin-left : 20px;
19 + float:left;
20 +}
21 +#title img:hover{
22 + opacity:0.6;
23 +}
24 +#selected-date{
25 + font-size: 10px;
26 + float:left;
27 + font-weight: bold;
28 + margin-top : -10px;
29 + margin-left:17px;
30 + border-bottom: 1px solid #4e73df;
31 +
32 +}
33 +#selected-file{
34 + font-size: 10px;
35 + float:left;
36 + font-weight: bold;
37 + margin-top : -10px;
38 + margin-left:70px;
39 + border-bottom: 1px solid #4e73df;
40 +}
41 +#date{
42 + width:28%;
43 + height :15%;
44 + float:left;
45 + vertical-align: middle;
46 +}
47 +p.float_left{
48 + float:left;
49 +}
50 +.results{
51 + width :98%;
52 + height :85%;
53 + position:absolute;
54 + bottom:10px;
55 + left:10px;
56 + text-align: center;
57 + float:left;
58 + border :2px dashed #4e73df;
59 + overflow-y:auto;
60 +}
61 +.photo{
62 + width : 240px;
63 + height : 300px;
64 + border :1px solid #4e73df;
65 + color:black;
66 + float : left;
67 + margin : 5px;
68 +
69 +}
70 +.top{
71 + width:240px;
72 + height:240px;
73 +}
74 +.top img{
75 + width:100%;
76 + height:100%;
77 + object-fit:contain;
78 +}
79 +.bottom{
80 + width:240px;
81 + height:60px;
82 +}
83 +.name{
84 + width : 200px;
85 + height:60px;
86 + float : left;
87 +}
88 +.check{
89 + width : 40px;
90 + height:60px;
91 + float : left;
92 +}
93 +.check input{
94 + width:20px;
95 + height :20px;
96 + margin-top:20px;
97 + margin-right:10px;
98 + border: 2px solid #bcbcbc;
99 +}
100 +.check input:checked{
101 + background-color: #4e73df;
102 +}
103 +#start_date{
104 + border: 1px solid #4e73df;
105 + background-color: white;
106 + line-height: 1;
107 + font-size: 17px;
108 + width: 200px;
109 + height :50px;
110 + padding:10px 15px;
111 + display: block;
112 + box-sizing: border-box;
113 + border-radius: 60px;
114 + color: dimgray;
115 + font-weight: 100;
116 + letter-spacing: 0.01em;
117 + position: relative;
118 + z-index: 1;
119 + margin-left: 10px;
120 +}
121 +#end_date{
122 + border: 1px solid #4e73df;
123 + background-color: white;
124 + line-height: 1;
125 + font-size: 17px;
126 + width: 200px;
127 + height :50px;
128 + padding:10px 15px;
129 + display: block;
130 + box-sizing: border-box;
131 + border-radius: 60px;
132 + color: dimgray;
133 + font-weight: 100;
134 + letter-spacing: 0.01em;
135 + position: relative;
136 + z-index: 1;
137 + margin-left: 10px;
138 +}
139 +#select{
140 + border: 1px solid #4e73df;
141 + background-color: #4e73df;
142 + line-height: 1;
143 + font-size: 17px;
144 + width: 135px;
145 + height :50px;
146 + padding:10px 15px;
147 + display: block;
148 + box-sizing: border-box;
149 + color: white;
150 + font-weight: 100;
151 + letter-spacing: 0.01em;
152 + position: relative;
153 + z-index: 1;
154 + margin-left: 10px;
155 +}
156 +#select:hover{
157 + background-color: white;
158 + color: #4e73df;
159 +}
160 +#submit{
161 + border: 1px solid #4e73df;
162 + background-color: #4e73df;
163 + line-height: 1;
164 + font-size: 17px;
165 + width: 100px;
166 + height :50px;
167 + padding:10px 15px;
168 + display: block;
169 + box-sizing: border-box;
170 + border-radius: 60px;
171 + color: white;
172 + font-weight: 100;
173 + letter-spacing: 0.01em;
174 + position: relative;
175 + z-index: 1;
176 + margin-left: 10px;
177 +}
178 +#submit:hover{
179 + background-color: white;
180 + color: #4e73df;
181 +}
182 +#save_photo{
183 + border: 1px solid #4e73df;
184 + background-color: #4e73df;
185 + line-height: 1;
186 + font-size: 17px;
187 + width: 135px;
188 + height :50px;
189 + padding:10px 15px;
190 + display: block;
191 + box-sizing: border-box;
192 + color: white;
193 + font-weight: 100;
194 + letter-spacing: 0.01em;
195 + position: relative;
196 + z-index: 1;
197 + margin-left: 10px;
198 + visibility: visible;
199 +}
200 +#save_photo:hover{
201 + background-color: white;
202 + color: #4e73df;
203 +}
204 +#closeBtn {
205 + border: 1px solid #4e73df;
206 + background-color: #4e73df;
207 + line-height: 1;
208 + font-size: 25px;
209 + width: 50px;
210 + height :50px;
211 + padding:10px 15px;
212 + display: block;
213 + box-sizing: border-box;
214 + border-radius: 60px;
215 + color: white;
216 + font-weight: 100;
217 + letter-spacing: 0.01em;
218 + position: relative;
219 + z-index: 1;
220 + margin-left: 5px;
221 +}
222 +#closeBtn:hover{
223 + background-color: white;
224 + color: #4e73df;
225 +}
1 +.content{
2 + width :100%;
3 + height :100%;
4 +}
5 +.win_top{
6 + width :100%;
7 + height :10%;
8 + float:left;
9 +}
10 +#title{
11 + width :68%;
12 + height :10%;
13 + float:left;
14 +}
15 +#title img{
16 + height: 80px;
17 + width : auto;
18 + margin-left : 20px;
19 + float:left;
20 +}
21 +#title img:hover{
22 + opacity :0.6;
23 +}
24 +#date{
25 + width:28%;
26 + height :15%;
27 + float:left;
28 + vertical-align: middle;
29 +}
30 +p.float_left{
31 + float:left;
32 +}
33 +.results{
34 + width :98%;
35 + height :85%;
36 + position:absolute;
37 + bottom:10px;
38 + left:10px;
39 + text-align: center;
40 + float:left;
41 + overflow-y:auto;
42 + border : 2px solid #4e73df
43 +}
44 +#image{
45 + float: left;
46 + filter:blur(5px);
47 + margin:5px;
48 +}
49 +#image:hover{
50 +opacity: 0.8;
51 +}
52 +#detect{
53 + border: 1px solid dimgray;
54 + background-color: dimgray;
55 + line-height: 1;
56 + font-size: 17px;
57 + width: 200px;
58 + height :40px;
59 + padding:10px 15px;
60 + display: block;
61 + box-sizing: border-box;
62 + color: white;
63 + font-weight: 100;
64 + letter-spacing: 0.01em;
65 + position: absolute;
66 + top:4%;
67 + right:5%;
68 + z-index: 1;
69 + margin-top: 10px;
70 +}
71 +#detect:hover{
72 + background-color: white;
73 + color: dimgray;
74 +}
...\ No newline at end of file ...\ No newline at end of file
1 +.all{
2 + width :100%;
3 + height :100%;
4 +}
5 +.top{
6 + width :100%;
7 + height :10%;
8 + float:left;
9 +}
10 +.title{
11 + width :70%;
12 + height :10%;
13 + float:left;
14 +}
15 +.title img{
16 + height: 80px;
17 + width : auto;
18 + margin-left : 20px;
19 + float:left;
20 +}.title img:hover{
21 + opacity:0.6;
22 +}
23 +.content{
24 + width :100%;
25 + height :90%;
26 +}
27 +p.float_left{
28 + float:left;
29 +}
30 +#explanation{
31 + width:35%;
32 + height:27.5%;
33 + position: absolute;
34 + right: 2%;
35 + bottom: 55%;
36 + text-align: center;
37 +}
38 +#explanation h1{
39 + margin-top:12%;
40 + color:dimgray;
41 +}
42 +#map {
43 + width:35%;
44 + height:50%;
45 + clear:both;
46 + border:solid 1px #4e73df;
47 + position: absolute;
48 + right: 2%;
49 + bottom: 3%;
50 +}
51 +#main{
52 + width:58%;
53 + height:78%;
54 + border:solid 5px #4e73df;
55 + position: absolute;
56 + left: 2%;
57 + bottom : 3%;
58 + overflow-y:auto;
59 + background-color: #7FB2F0;
60 +}
61 +.p{
62 + width:295px;
63 + height:295px;
64 + float : left;
65 + margin :1px;
66 + background-color: #4e73df;
67 +}
68 +.p img{
69 + width:100%;
70 + height:100%;
71 + object-fit:contain;
72 +}
73 +.ex{
74 + width: 147.5px;
75 + height:147.5px;
76 + float : left;
77 + margin :0.5px;
78 + background-color: #4e73df;
79 +}
80 +.ex img{
81 + width:100%;
82 + height:100%;
83 + object-fit:contain;
84 +}
...\ No newline at end of file ...\ No newline at end of file
1 +
2 +.all{
3 + width :100%;
4 + height :100%;
5 +}
6 +.top{
7 + width :100%;
8 + height :15%;
9 + float:left;
10 +}
11 +.title{
12 + width :80%;
13 + height :10%;
14 + float:left;
15 +}
16 +.title img{
17 + height: 80px;
18 + width : auto;
19 + margin-left : 20px;
20 + float:left;
21 +}
22 +.title img:hover{
23 + opacity:0.6;
24 +}
25 +#btn_area{
26 + width:20%;
27 + height :15%;
28 + float:left;
29 + vertical-align: middle;
30 +}
31 +#start{
32 + border: 1px solid #4e73df;
33 + background-color: #4e73df;
34 + line-height: 1;
35 + font-size: 17px;
36 + width: 150px;
37 + height :40px;
38 + padding:10px 15px;
39 + display: block;
40 + box-sizing: border-box;
41 + border-radius: 60px;
42 + color: white;
43 + font-weight: 100;
44 + letter-spacing: 0.01em;
45 + position: relative;
46 + z-index: 1;
47 + margin-top: -5px;
48 +}
49 +#next{
50 + border: 1px solid #4e73df;
51 + background-color: #4e73df;
52 + line-height: 1;
53 + font-size: 14px;
54 + width: 150px;
55 + height :40px;
56 + padding:10px 15px;
57 + display: block;
58 + box-sizing: border-box;
59 + border-radius: 60px;
60 + color: white;
61 + font-weight: 100;
62 + letter-spacing: 0.01em;
63 + position: relative;
64 + z-index: 1;
65 + visibility: hidden;
66 + margin-top: -5px;
67 +}
68 +#start:hover{
69 + background-color: white;
70 + color: #4e73df;
71 +}
72 +p.float_left{
73 + float:left;
74 +}
75 +.chart_cont{
76 + position:absolute;
77 + height:79%;
78 + width:27%;
79 + left : 3%;
80 + bottom :5%;
81 + overflow-y: auto;
82 + float:left;
83 + border:2px solid #4e73df;
84 +}
85 +.chart-container{
86 + position: relative;
87 + height:600px;
88 + width:280px;
89 +}
90 +#content{
91 + width :65%;
92 + height :79%;
93 + position: absolute;
94 + right : 3%;
95 + bottom:5%;
96 + overflow-y: auto;
97 + float:left;
98 + border:2px solid #4e73df;
99 +}
100 +.photo {
101 + width: 300px;
102 + height: 220px;
103 + margin : 5px;
104 + float:left;
105 + border:1px dashed #4e73df;
106 +}
107 +.p_title{
108 + width: 300px;
109 + height: 20px;
110 + float:left;
111 + text-align: center;
112 +}
113 +.p_title p{
114 + font-size : 13px;
115 + color: black;
116 + font-weight: bold;
117 + margin-top: -0.5px;
118 +}
119 +.image{
120 + height : 200px;
121 + width : 200px;
122 + text-align: center;
123 + float:left;
124 +}
125 +.image img{
126 + width:100%;
127 + height:100%;
128 + object-fit:contain;
129 +}
130 +.keyword{
131 + width :99%;
132 + height: 15%;
133 + float:left;
134 + text-align: center;
135 +}
136 +.k_content{
137 + width :99%;
138 + height: 85%;
139 + float:left;
140 + text-align: center;
141 + overflow-y: auto;
142 +}
143 +.keyword_photo{
144 + float:left;
145 + border:1px dashed #4e73df;
146 + height : 200px;
147 + width : 200px;
148 + text-align: center;
149 + margin : 10px;
150 +}
151 +.keyword_photo img{
152 + width:100%;
153 + height:100%;
154 + object-fit:contain;
155 +}
156 +.labels{
157 + width :100px;
158 + height : 200px;
159 + float :left;
160 + vertical-align: middle;
161 +}
162 +.labels p{
163 + font-size : 10px;
164 + margin-top: -0.2px;
165 + margin-bottom: -0.2px;
166 + margin-left :2px;
167 + color: navy;
168 +}
...\ No newline at end of file ...\ No newline at end of file
1 +.div_root{
2 + width:100%;
3 + height:100%;
4 + margin:0px;
5 +}
6 +.div_top{
7 + width:100%;
8 + height:20%;
9 + float:left;
10 +}
11 +.div_top img{
12 + margin-left: 20px;
13 + height:120px;
14 + float:left;
15 +}
16 +.div_top img:hover{
17 + opacity: 0.6;
18 +}
19 +.div_content{
20 + width : 100%;
21 + height: 80%;
22 + float:left;
23 +}
24 +.div_con_block{
25 + width:80%;
26 + height:25%;
27 + float:left;
28 + margin-left: 50px;
29 +}
30 +.div_con_block p{
31 + margin-left : 30px;
32 + margin-top: -10px;
33 + color : dimgray;
34 +}
35 +.div_con_block img{
36 + padding :20px;
37 + height : 100px;
38 +}
39 +.div_con_block img:hover{
40 + opacity: 0.5;
41 +}
42 +.fa-chevron-left{
43 + margin-top: 10px;
44 + margin-left :5px;
45 + margin-right : 5px;
46 + color: dimgray;
47 +}
48 +.fa-chevron-left:hover{
49 + opacity: 0.5;
50 +}
51 +.float_left{
52 + float :left;
53 +}
54 +#image{
55 + font-size: 15px;
56 + height :30px;
57 + width : 300px;
58 + float: left;
59 + margin:20px;
60 + border: 1px solid dimgray;
61 + background-color: dimgray;
62 +}
1 +
2 +.all{
3 + width :100%;
4 + height :100%;
5 +}
6 +.top{
7 + width :100%;
8 + height :15%;
9 + float:left;
10 +}
11 +#title{
12 + width :60%;
13 + height :15%;
14 + float:left;
15 +}
16 +#title img{
17 + height: 100px;
18 + width : auto;
19 + margin-left : 20px;
20 + float:left;
21 +}#title img:hover{
22 + opacity: 0.6;
23 +}
24 +#btn_area{
25 + width:40%;
26 + height :15%;
27 + float:left;
28 + vertical-align: middle;
29 +}
30 +#start{
31 + border: 1px solid dimgray;
32 + background-color: dimgray;
33 + line-height: 1;
34 + font-size: 17px;
35 + width: 150px;
36 + height :40px;
37 + padding:10px 15px;
38 + display: block;
39 + box-sizing: border-box;
40 + color: white;
41 + font-weight: 100;
42 + letter-spacing: 0.01em;
43 + position: relative;
44 + z-index: 1;
45 + margin-left : 20px;
46 +}
47 +#start:hover{
48 + background-color: white;
49 + color: dimgray;
50 +}
51 +button.p_btn{
52 + border: 1px solid dimgray;
53 + background-color: dimgray;
54 + line-height: 1;
55 + font-size: 17px;
56 + width: 50px;
57 + height :50px;
58 + padding:10px 15px;
59 + display: block;
60 + box-sizing: border-box;
61 + color: white;
62 + font-weight: 100;
63 + letter-spacing: 0.01em;
64 + position: relative;
65 + z-index: 1;
66 +}
67 +button.p_btn:hover{
68 + background-color: white;
69 + color: dimgray;
70 +}
71 +#date{
72 + border: 1px solid dimgray;
73 + background-color: white;
74 + line-height: 1;
75 + font-size: 17px;
76 + width: 200px;
77 + height :40px;
78 + padding:10px 15px;
79 + display: block;
80 + box-sizing: border-box;
81 + border-radius: 60px;
82 + color: dimgray;
83 + font-weight: 100;
84 + letter-spacing: 0.01em;
85 + position: relative;
86 + z-index: 1;
87 + margin-left: 10px;
88 +}
89 +p.float_left{
90 + float:left;
91 +}
92 +p.float_right{
93 + float:right;
94 +}
95 +#content{
96 + width :90%;
97 + height :80%;
98 + overflow-y: auto;
99 + position: absolute;
100 + left : 5%;
101 + bottom:5%;
102 + background-color: #FFFFFF;
103 +}
104 +/* -----------------------------------------------
105 +* Timeline
106 +* --------------------------------------------- */
107 +.main-timeline{
108 + font-family: 'Roboto Condensed', sans-serif;
109 + position: relative;
110 +}
111 +.main-timeline:after{
112 + content: '';
113 + display: block;
114 + clear: both;
115 +}
116 +.main-timeline:before{
117 + content: '';
118 + height: 100%;
119 + width: 7px;
120 + border-left: 7px dashed #999;
121 + transform: translateX(-50%);
122 + position: absolute;
123 + left: 50%;
124 + top: 0;
125 +}
126 +.main-timeline .timeline{
127 + width: 45%;
128 + padding: 0 0 0 40px;
129 + margin: 0 0 0 20px;
130 + float: right;
131 + position: relative;
132 +}
133 +.main-timeline .timeline:after{
134 + content: '';
135 + background-color: #6044F0;
136 + height: 35px;
137 + width: 40px;
138 + position: absolute;
139 + left: 0;
140 + top: 60px;
141 + clip-path: polygon(0 50%, 100% 0, 100% 100%);
142 +}
143 +.main-timeline .timeline-content{
144 + color: #555;
145 + text-align: center;
146 + padding: 35px 40px 35px;
147 + display: block;
148 + position: relative;
149 + z-index: 1;
150 +}
151 +.main-timeline .timeline-content:hover{ text-decoration: none; }
152 +.main-timeline .timeline-content:before,
153 +.main-timeline .timeline-content:after{
154 + content: '';
155 + background-color: #fff;
156 + border-radius: 50px 0;
157 + box-shadow: 0 0 10px -3px rgba(0,0,0,0.5);
158 + position: absolute;
159 + left: 10px;
160 + bottom: 10px;
161 + right: 0;
162 + top: 0;
163 + z-index: -1;
164 +}
165 +.main-timeline .timeline-content:after{
166 + background-color: transparent;
167 + box-shadow: none;
168 + border: 2px solid #6044F0;
169 + left: 0;
170 + bottom: 0;
171 + right: 10px;
172 + top: 10px;
173 +}
174 +.main-timeline .timeline-icon{
175 + color: #fff;
176 + background-color: #000;
177 + font-size: 25px;
178 + text-align: center;
179 + line-height: 50px;
180 + height: 50px;
181 + width: 50px;
182 + border-radius: 50%;
183 + position: absolute;
184 + left: 0;
185 + top: 0;
186 + z-index: 2;
187 +}
188 +.main-timeline .title{
189 + color: #6044F0;
190 + font-size: 20px;
191 + font-weight: 700;
192 + text-transform: uppercase;
193 + letter-spacing: 1px;
194 + margin: 0 0 5px;
195 +}
196 +.main-timeline .description{
197 + font-size: 15px;
198 + font-weight: 500;
199 + letter-spacing: 1px;
200 + margin: 0 0 0 10px;
201 +}
202 +.main-timeline .timeline:nth-child(even){
203 + float: left;
204 + padding: 0 40px 0 0;
205 + margin: 0 20px 0 0;
206 +}
207 +.main-timeline .timeline:nth-child(even):after{
208 + transform: rotateY(180deg);
209 + left: auto;
210 + right: 0;
211 +}
212 +.main-timeline .timeline:nth-child(even) .timeline-content:before,
213 +.main-timeline .timeline:nth-child(even) .timeline-content:after{
214 + border-radius: 0 50px;
215 +}
216 +.main-timeline .timeline:nth-child(even) .timeline-icon{
217 + left: auto;
218 + right: 0;
219 +}
220 +.main-timeline .timeline:nth-child(4n+2):after{ background-color: #FF3754; }
221 +.main-timeline .timeline:nth-child(4n+2) .timeline-content:after{ border-color: #FF3754; }
222 +.main-timeline .timeline:nth-child(4n+2) .title{ color: #FF3754; }
223 +.main-timeline .timeline:nth-child(4n+3):after{ background-color: #01C1E1; }
224 +.main-timeline .timeline:nth-child(4n+3) .timeline-content:after{ border-color: #01C1E1; }
225 +.main-timeline .timeline:nth-child(4n+3) .title{ color: #01C1E1; }
226 +.main-timeline .timeline:nth-child(4n+4):after{ background-color: #10B175; }
227 +.main-timeline .timeline:nth-child(4n+4) .timeline-content:after{ border-color: #10B175; }
228 +.main-timeline .timeline:nth-child(4n+4) .title{ color: #10B175; }
229 +@media screen and (max-width:767px){
230 + .main-timeline:before{ display: none; }
231 + .main-timeline .timeline,
232 + .main-timeline .timeline:nth-child(even){
233 + width: 100%;
234 + padding: 0 0 35px 0;
235 + margin: 0;
236 + }
237 + .main-timeline .timeline:last-child{ padding: 0; }
238 + .main-timeline .timeline:after,
239 + .main-timeline .timeline:nth-child(even):after{
240 + transform: translateX(-50%) rotate(-90deg);
241 + left: 50%;
242 + top: auto;
243 + bottom: 0;
244 + }
245 + .main-timeline .timeline:last-child:after{ display: none; }
246 +}
247 +@media screen and (max-width:576px){
248 + .main-timeline .title{ font-size: 18px; }
249 +}
250 +p.text-right{
251 + text-align: right;
252 +}
253 +.shadow-textarea textarea.form-control::placeholder {
254 + font-weight: 300;
255 +}
256 +.shadow-textarea textarea.form-control {
257 + padding-left: 0.8rem;
258 + padding-right: 0.8rem;
259 + width:80%;
260 + margin-top: 10px;
261 + margin-left:5px;
262 +}
263 +.fa-chevron-left{
264 + margin-left :5px;
265 + margin-right : 5px;
266 + color: dimgray;
267 +}
268 +.fa-chevron-left:hover{
269 + opacity: 0.5;
270 +}
...\ No newline at end of file ...\ No newline at end of file
1 const { app, BrowserWindow, ipcMain } = require('electron') 1 const { app, BrowserWindow, ipcMain } = require('electron')
2 const path = require('path') 2 const path = require('path')
3 const url = require('url') 3 const url = require('url')
4 +const vision = require('@google-cloud/vision');
4 5
5 // Keep a global reference of the window object, if you don't, the window will 6 // Keep a global reference of the window object, if you don't, the window will
6 // be closed automatically when the JavaScript object is garbage collected. 7 // be closed automatically when the JavaScript object is garbage collected.
...@@ -53,5 +54,152 @@ ipcMain.on("device-name", (e, arg) => { ...@@ -53,5 +54,152 @@ ipcMain.on("device-name", (e, arg) => {
53 win.webContents.send("device", arg); 54 win.webContents.send("device", arg);
54 }); 55 });
55 56
57 +//photos taken in selected dates
58 + ipcMain.on("photo", (e, arg) => {
59 + win.webContents.send("select_result", arg);
60 + });
61 +
62 + //open-file-dialog
63 + ipcMain.on('open-file-dialog', async (event) => {
64 +
65 + const result = await dialog.showOpenDialog({
66 + properties: ['openFile', 'openDirectory']
67 + })
68 + win.webContents.send('selected-directory',result);
69 + })
70 +
71 + //console 출력
72 + ipcMain.on('print', (e, arg)=>{
73 + console.log(arg);
74 + })
75 +
76 + //internet connect 확인
77 + /**
78 + * const check = require('check-internet-connected');
79 +
80 + const config = {
81 + timeout : 5000,
82 + retries : 3,
83 + domain : 'apple.com'
84 + }
85 +
86 + check(config)
87 + .then(()=>{
88 + console.log("Connection available");
89 + }).catch((err)=>{
90 + console.log("No connection", err);
91 + });
92 + */
93 + //이미지 라벨
94 + var label_result = new Array();
95 + ipcMain.on('image_labels', async (event, list) =>{
96 + label_result = [];
97 + await Promise.all(list.map(async (element)=>{
98 + var path = new String();
99 + path = element.path;
100 + var num = path.indexOf("DCIM");
101 + var folder_path = new String();
102 + folder_path = "./photos/" + path.substring(num);
103 + await quickstart(folder_path, element.display_name);
104 + }))
105 + //라벨 검출 결과 전송
106 + win.webContents.send('labels_result',label_result);
107 + console.log(label_result.length);
108 + })
109 +
110 + async function quickstart(path, name) {
111 +
112 + const client = new vision.ImageAnnotatorClient();
113 +
114 + // Performs label detection on the image file
115 + const [result] = await client.labelDetection(path);
116 + const labels = result.labelAnnotations;
117 +
118 + path = '../.'+path;
119 + var content = {path : path, name : name, labels : labels}
120 + label_result.push(content);
121 + }
122 +
123 +
124 + //detext unsafe image
125 + let detect_result = new Array();
126 +
127 + ipcMain.on("detect", async (e, result)=>{
128 + detect_result = [];
129 + await Promise.all(result.map(async (element)=>{
130 + var path = new String();
131 + path = element.path;
132 + var num = path.indexOf("DCIM");
133 + var folder_path = new String();
134 + folder_path = "./photos/" + path.substring(num);
135 + await detect(folder_path, element.display_name);
136 + }))
137 + win.webContents.send('detect_result', detect_result);
138 + console.log("detect_success");
139 + });
56 140
141 + async function detect(path, name){
142 + //const vision = require('@google-cloud/vision');
143 + // Creates a client
144 + const client = new vision.ImageAnnotatorClient();
145 + // Performs safe search detection on the local file
146 + const [result] = await client.safeSearchDetection(path);
147 + const detections = result.safeSearchAnnotation;
57 148
149 + var adult_sum = 0;
150 + var racy_sum = 0;
151 +
152 + if(detections.adult == "VERY_LIKELY"){
153 + adult_sum = 100;
154 + }
155 + else if(detections.adult == "LIKELY"){
156 + adult_sum = 80;
157 + }
158 + else if(detections.adult == "POSSIBLE"){
159 + adult_sum = 60;
160 + }
161 + else if(detections.adult == "UNLIKELY"){
162 + adult_sum = 40;
163 + }
164 + else if(detections.adult == "VERY_UNLIKELY"){
165 + adult_sum = 20;
166 + }
167 + else{
168 + adult_sum = 0;
169 + }
170 +
171 + if(detections.racy == "VERY_LIKELY"){
172 + racy_sum = 100;
173 + }
174 + else if(detections.racy == "LIKELY"){
175 + racy_sum = 80;
176 + }
177 + else if(detections.racy == "POSSIBLE"){
178 + racy_sum = 60;
179 + }
180 + else if(detections.racy == "UNLIKELY"){
181 + racy_sum = 40;
182 + }
183 + else if(detections.racy == "VERY_UNLIKELY"){
184 + racy_sum = 20;
185 + }
186 + else{
187 + racy_sum = 0;
188 + }
189 +
190 + var score = (adult_sum + racy_sum) / 2;
191 +
192 + path = '../.'+path;
193 +
194 + if(score>=60){
195 + var content = {path : path, name : name, score : score};
196 + detect_result.push(content);
197 + }
198 +
199 + }
200 + ipcMain.on('open-error-dialog', (event) => {
201 + dialog.showErrorBox('detected unsafe contents', '당신의 휴대폰에서 유해한 사진을 발견했습니다!')
202 + })
203 +//이전에 사용한 photos 폴더 삭제
204 +var rimraf = require("rimraf");
205 +rimraf("./photos", function(){console.log("")});
...\ No newline at end of file ...\ No newline at end of file
......
1 +#!/bin/sh
2 +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 +
4 +case `uname` in
5 + *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 +esac
7 +
8 +if [ -x "$basedir/node" ]; then
9 + "$basedir/node" "$basedir/../google-gax/build/tools/compileProtos.js" "$@"
10 + ret=$?
11 +else
12 + node "$basedir/../google-gax/build/tools/compileProtos.js" "$@"
13 + ret=$?
14 +fi
15 +exit $ret
1 +@IF EXIST "%~dp0\node.exe" (
2 + "%~dp0\node.exe" "%~dp0\..\google-gax\build\tools\compileProtos.js" %*
3 +) ELSE (
4 + @SETLOCAL
5 + @SET PATHEXT=%PATHEXT:;.JS;=;%
6 + node "%~dp0\..\google-gax\build\tools\compileProtos.js" %*
7 +)
...\ No newline at end of file ...\ No newline at end of file
1 +#!/bin/sh
2 +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 +
4 +case `uname` in
5 + *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 +esac
7 +
8 +if [ -x "$basedir/node" ]; then
9 + "$basedir/node" "$basedir/../electron/cli.js" "$@"
10 + ret=$?
11 +else
12 + node "$basedir/../electron/cli.js" "$@"
13 + ret=$?
14 +fi
15 +exit $ret
1 +@IF EXIST "%~dp0\node.exe" (
2 + "%~dp0\node.exe" "%~dp0\..\electron\cli.js" %*
3 +) ELSE (
4 + @SETLOCAL
5 + @SET PATHEXT=%PATHEXT:;.JS;=;%
6 + node "%~dp0\..\electron\cli.js" %*
7 +)
...\ No newline at end of file ...\ No newline at end of file
1 +#!/bin/sh
2 +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 +
4 +case `uname` in
5 + *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 +esac
7 +
8 +if [ -x "$basedir/node" ]; then
9 + "$basedir/node" "$basedir/../extract-zip/cli.js" "$@"
10 + ret=$?
11 +else
12 + node "$basedir/../extract-zip/cli.js" "$@"
13 + ret=$?
14 +fi
15 +exit $ret
1 +@IF EXIST "%~dp0\node.exe" (
2 + "%~dp0\node.exe" "%~dp0\..\extract-zip\cli.js" %*
3 +) ELSE (
4 + @SETLOCAL
5 + @SET PATHEXT=%PATHEXT:;.JS;=;%
6 + node "%~dp0\..\extract-zip\cli.js" %*
7 +)
...\ No newline at end of file ...\ No newline at end of file
1 +#!/bin/sh
2 +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 +
4 +case `uname` in
5 + *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 +esac
7 +
8 +if [ -x "$basedir/node" ]; then
9 + "$basedir/node" "$basedir/../google-p12-pem/build/src/bin/gp12-pem.js" "$@"
10 + ret=$?
11 +else
12 + node "$basedir/../google-p12-pem/build/src/bin/gp12-pem.js" "$@"
13 + ret=$?
14 +fi
15 +exit $ret
1 +@IF EXIST "%~dp0\node.exe" (
2 + "%~dp0\node.exe" "%~dp0\..\google-p12-pem\build\src\bin\gp12-pem.js" %*
3 +) ELSE (
4 + @SETLOCAL
5 + @SET PATHEXT=%PATHEXT:;.JS;=;%
6 + node "%~dp0\..\google-p12-pem\build\src\bin\gp12-pem.js" %*
7 +)
...\ No newline at end of file ...\ No newline at end of file
1 +#!/bin/sh
2 +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 +
4 +case `uname` in
5 + *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 +esac
7 +
8 +if [ -x "$basedir/node" ]; then
9 + "$basedir/node" "$basedir/../md5-file/cli.js" "$@"
10 + ret=$?
11 +else
12 + node "$basedir/../md5-file/cli.js" "$@"
13 + ret=$?
14 +fi
15 +exit $ret
1 +@IF EXIST "%~dp0\node.exe" (
2 + "%~dp0\node.exe" "%~dp0\..\md5-file\cli.js" %*
3 +) ELSE (
4 + @SETLOCAL
5 + @SET PATHEXT=%PATHEXT:;.JS;=;%
6 + node "%~dp0\..\md5-file\cli.js" %*
7 +)
...\ No newline at end of file ...\ No newline at end of file
1 +#!/bin/sh
2 +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 +
4 +case `uname` in
5 + *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 +esac
7 +
8 +if [ -x "$basedir/node" ]; then
9 + "$basedir/node" "$basedir/../mime/cli.js" "$@"
10 + ret=$?
11 +else
12 + node "$basedir/../mime/cli.js" "$@"
13 + ret=$?
14 +fi
15 +exit $ret
1 +@IF EXIST "%~dp0\node.exe" (
2 + "%~dp0\node.exe" "%~dp0\..\mime\cli.js" %*
3 +) ELSE (
4 + @SETLOCAL
5 + @SET PATHEXT=%PATHEXT:;.JS;=;%
6 + node "%~dp0\..\mime\cli.js" %*
7 +)
...\ No newline at end of file ...\ No newline at end of file
1 +#!/bin/sh
2 +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 +
4 +case `uname` in
5 + *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 +esac
7 +
8 +if [ -x "$basedir/node" ]; then
9 + "$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@"
10 + ret=$?
11 +else
12 + node "$basedir/../mkdirp/bin/cmd.js" "$@"
13 + ret=$?
14 +fi
15 +exit $ret
1 +@IF EXIST "%~dp0\node.exe" (
2 + "%~dp0\node.exe" "%~dp0\..\mkdirp\bin\cmd.js" %*
3 +) ELSE (
4 + @SETLOCAL
5 + @SET PATHEXT=%PATHEXT:;.JS;=;%
6 + node "%~dp0\..\mkdirp\bin\cmd.js" %*
7 +)
...\ No newline at end of file ...\ No newline at end of file
1 +#!/bin/sh
2 +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 +
4 +case `uname` in
5 + *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 +esac
7 +
8 +if [ -x "$basedir/node" ]; then
9 + "$basedir/node" "$basedir/../ncp/bin/ncp" "$@"
10 + ret=$?
11 +else
12 + node "$basedir/../ncp/bin/ncp" "$@"
13 + ret=$?
14 +fi
15 +exit $ret
1 +@IF EXIST "%~dp0\node.exe" (
2 + "%~dp0\node.exe" "%~dp0\..\ncp\bin\ncp" %*
3 +) ELSE (
4 + @SETLOCAL
5 + @SET PATHEXT=%PATHEXT:;.JS;=;%
6 + node "%~dp0\..\ncp\bin\ncp" %*
7 +)
...\ No newline at end of file ...\ No newline at end of file
1 +#!/bin/sh
2 +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 +
4 +case `uname` in
5 + *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 +esac
7 +
8 +if [ -x "$basedir/node" ]; then
9 + "$basedir/node" "$basedir/../which/bin/node-which" "$@"
10 + ret=$?
11 +else
12 + node "$basedir/../which/bin/node-which" "$@"
13 + ret=$?
14 +fi
15 +exit $ret
1 +@IF EXIST "%~dp0\node.exe" (
2 + "%~dp0\node.exe" "%~dp0\..\which\bin\node-which" %*
3 +) ELSE (
4 + @SETLOCAL
5 + @SET PATHEXT=%PATHEXT:;.JS;=;%
6 + node "%~dp0\..\which\bin\node-which" %*
7 +)
...\ No newline at end of file ...\ No newline at end of file
1 +#!/bin/sh
2 +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 +
4 +case `uname` in
5 + *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 +esac
7 +
8 +if [ -x "$basedir/node" ]; then
9 + "$basedir/node" "$basedir/../protobufjs/bin/pbjs" "$@"
10 + ret=$?
11 +else
12 + node "$basedir/../protobufjs/bin/pbjs" "$@"
13 + ret=$?
14 +fi
15 +exit $ret
1 +@IF EXIST "%~dp0\node.exe" (
2 + "%~dp0\node.exe" "%~dp0\..\protobufjs\bin\pbjs" %*
3 +) ELSE (
4 + @SETLOCAL
5 + @SET PATHEXT=%PATHEXT:;.JS;=;%
6 + node "%~dp0\..\protobufjs\bin\pbjs" %*
7 +)
...\ No newline at end of file ...\ No newline at end of file
1 +#!/bin/sh
2 +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 +
4 +case `uname` in
5 + *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 +esac
7 +
8 +if [ -x "$basedir/node" ]; then
9 + "$basedir/node" "$basedir/../protobufjs/bin/pbts" "$@"
10 + ret=$?
11 +else
12 + node "$basedir/../protobufjs/bin/pbts" "$@"
13 + ret=$?
14 +fi
15 +exit $ret
1 +@IF EXIST "%~dp0\node.exe" (
2 + "%~dp0\node.exe" "%~dp0\..\protobufjs\bin\pbts" %*
3 +) ELSE (
4 + @SETLOCAL
5 + @SET PATHEXT=%PATHEXT:;.JS;=;%
6 + node "%~dp0\..\protobufjs\bin\pbts" %*
7 +)
...\ No newline at end of file ...\ No newline at end of file
1 +#!/bin/sh
2 +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 +
4 +case `uname` in
5 + *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 +esac
7 +
8 +if [ -x "$basedir/node" ]; then
9 + "$basedir/node" "$basedir/../pixelmatch/bin/pixelmatch" "$@"
10 + ret=$?
11 +else
12 + node "$basedir/../pixelmatch/bin/pixelmatch" "$@"
13 + ret=$?
14 +fi
15 +exit $ret
1 +@IF EXIST "%~dp0\node.exe" (
2 + "%~dp0\node.exe" "%~dp0\..\pixelmatch\bin\pixelmatch" %*
3 +) ELSE (
4 + @SETLOCAL
5 + @SET PATHEXT=%PATHEXT:;.JS;=;%
6 + node "%~dp0\..\pixelmatch\bin\pixelmatch" %*
7 +)
...\ No newline at end of file ...\ No newline at end of file
1 +#!/bin/sh
2 +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 +
4 +case `uname` in
5 + *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 +esac
7 +
8 +if [ -x "$basedir/node" ]; then
9 + "$basedir/node" "$basedir/../rimraf/bin.js" "$@"
10 + ret=$?
11 +else
12 + node "$basedir/../rimraf/bin.js" "$@"
13 + ret=$?
14 +fi
15 +exit $ret
1 +@IF EXIST "%~dp0\node.exe" (
2 + "%~dp0\node.exe" "%~dp0\..\rimraf\bin.js" %*
3 +) ELSE (
4 + @SETLOCAL
5 + @SET PATHEXT=%PATHEXT:;.JS;=;%
6 + node "%~dp0\..\rimraf\bin.js" %*
7 +)
...\ No newline at end of file ...\ No newline at end of file
1 +#!/bin/sh
2 +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 +
4 +case `uname` in
5 + *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 +esac
7 +
8 +if [ -x "$basedir/node" ]; then
9 + "$basedir/node" "$basedir/../semver/bin/semver.js" "$@"
10 + ret=$?
11 +else
12 + node "$basedir/../semver/bin/semver.js" "$@"
13 + ret=$?
14 +fi
15 +exit $ret
1 +@IF EXIST "%~dp0\node.exe" (
2 + "%~dp0\node.exe" "%~dp0\..\semver\bin\semver.js" %*
3 +) ELSE (
4 + @SETLOCAL
5 + @SET PATHEXT=%PATHEXT:;.JS;=;%
6 + node "%~dp0\..\semver\bin\semver.js" %*
7 +)
...\ No newline at end of file ...\ No newline at end of file
1 +#!/bin/sh
2 +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 +
4 +case `uname` in
5 + *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 +esac
7 +
8 +if [ -x "$basedir/node" ]; then
9 + "$basedir/node" "$basedir/../sshpk/bin/sshpk-conv" "$@"
10 + ret=$?
11 +else
12 + node "$basedir/../sshpk/bin/sshpk-conv" "$@"
13 + ret=$?
14 +fi
15 +exit $ret
1 +@IF EXIST "%~dp0\node.exe" (
2 + "%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-conv" %*
3 +) ELSE (
4 + @SETLOCAL
5 + @SET PATHEXT=%PATHEXT:;.JS;=;%
6 + node "%~dp0\..\sshpk\bin\sshpk-conv" %*
7 +)
...\ No newline at end of file ...\ No newline at end of file
1 +#!/bin/sh
2 +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 +
4 +case `uname` in
5 + *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 +esac
7 +
8 +if [ -x "$basedir/node" ]; then
9 + "$basedir/node" "$basedir/../sshpk/bin/sshpk-sign" "$@"
10 + ret=$?
11 +else
12 + node "$basedir/../sshpk/bin/sshpk-sign" "$@"
13 + ret=$?
14 +fi
15 +exit $ret
1 +@IF EXIST "%~dp0\node.exe" (
2 + "%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-sign" %*
3 +) ELSE (
4 + @SETLOCAL
5 + @SET PATHEXT=%PATHEXT:;.JS;=;%
6 + node "%~dp0\..\sshpk\bin\sshpk-sign" %*
7 +)
...\ No newline at end of file ...\ No newline at end of file
1 +#!/bin/sh
2 +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 +
4 +case `uname` in
5 + *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 +esac
7 +
8 +if [ -x "$basedir/node" ]; then
9 + "$basedir/node" "$basedir/../sshpk/bin/sshpk-verify" "$@"
10 + ret=$?
11 +else
12 + node "$basedir/../sshpk/bin/sshpk-verify" "$@"
13 + ret=$?
14 +fi
15 +exit $ret
1 +@IF EXIST "%~dp0\node.exe" (
2 + "%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-verify" %*
3 +) ELSE (
4 + @SETLOCAL
5 + @SET PATHEXT=%PATHEXT:;.JS;=;%
6 + node "%~dp0\..\sshpk\bin\sshpk-verify" %*
7 +)
...\ No newline at end of file ...\ No newline at end of file
1 +#!/bin/sh
2 +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 +
4 +case `uname` in
5 + *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 +esac
7 +
8 +if [ -x "$basedir/node" ]; then
9 + "$basedir/node" "$basedir/../uuid/dist/bin/uuid" "$@"
10 + ret=$?
11 +else
12 + node "$basedir/../uuid/dist/bin/uuid" "$@"
13 + ret=$?
14 +fi
15 +exit $ret
1 +@IF EXIST "%~dp0\node.exe" (
2 + "%~dp0\node.exe" "%~dp0\..\uuid\dist\bin\uuid" %*
3 +) ELSE (
4 + @SETLOCAL
5 + @SET PATHEXT=%PATHEXT:;.JS;=;%
6 + node "%~dp0\..\uuid\dist\bin\uuid" %*
7 +)
...\ No newline at end of file ...\ No newline at end of file
1 +MIT License
2 +
3 +Copyright (c) 2014-present Sebastian McKenzie and other contributors
4 +
5 +Permission is hereby granted, free of charge, to any person obtaining
6 +a copy of this software and associated documentation files (the
7 +"Software"), to deal in the Software without restriction, including
8 +without limitation the rights to use, copy, modify, merge, publish,
9 +distribute, sublicense, and/or sell copies of the Software, and to
10 +permit persons to whom the Software is furnished to do so, subject to
11 +the following conditions:
12 +
13 +The above copyright notice and this permission notice shall be
14 +included in all copies or substantial portions of the Software.
15 +
16 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 +# @babel/runtime
2 +
3 +> babel's modular runtime helpers
4 +
5 +See our website [@babel/runtime](https://babeljs.io/docs/en/next/babel-runtime.html) for more information.
6 +
7 +## Install
8 +
9 +Using npm:
10 +
11 +```sh
12 +npm install --save @babel/runtime
13 +```
14 +
15 +or using yarn:
16 +
17 +```sh
18 +yarn add @babel/runtime
19 +```
1 +var AwaitValue = require("./AwaitValue");
2 +
3 +function AsyncGenerator(gen) {
4 + var front, back;
5 +
6 + function send(key, arg) {
7 + return new Promise(function (resolve, reject) {
8 + var request = {
9 + key: key,
10 + arg: arg,
11 + resolve: resolve,
12 + reject: reject,
13 + next: null
14 + };
15 +
16 + if (back) {
17 + back = back.next = request;
18 + } else {
19 + front = back = request;
20 + resume(key, arg);
21 + }
22 + });
23 + }
24 +
25 + function resume(key, arg) {
26 + try {
27 + var result = gen[key](arg);
28 + var value = result.value;
29 + var wrappedAwait = value instanceof AwaitValue;
30 + Promise.resolve(wrappedAwait ? value.wrapped : value).then(function (arg) {
31 + if (wrappedAwait) {
32 + resume(key === "return" ? "return" : "next", arg);
33 + return;
34 + }
35 +
36 + settle(result.done ? "return" : "normal", arg);
37 + }, function (err) {
38 + resume("throw", err);
39 + });
40 + } catch (err) {
41 + settle("throw", err);
42 + }
43 + }
44 +
45 + function settle(type, value) {
46 + switch (type) {
47 + case "return":
48 + front.resolve({
49 + value: value,
50 + done: true
51 + });
52 + break;
53 +
54 + case "throw":
55 + front.reject(value);
56 + break;
57 +
58 + default:
59 + front.resolve({
60 + value: value,
61 + done: false
62 + });
63 + break;
64 + }
65 +
66 + front = front.next;
67 +
68 + if (front) {
69 + resume(front.key, front.arg);
70 + } else {
71 + back = null;
72 + }
73 + }
74 +
75 + this._invoke = send;
76 +
77 + if (typeof gen["return"] !== "function") {
78 + this["return"] = undefined;
79 + }
80 +}
81 +
82 +if (typeof Symbol === "function" && Symbol.asyncIterator) {
83 + AsyncGenerator.prototype[Symbol.asyncIterator] = function () {
84 + return this;
85 + };
86 +}
87 +
88 +AsyncGenerator.prototype.next = function (arg) {
89 + return this._invoke("next", arg);
90 +};
91 +
92 +AsyncGenerator.prototype["throw"] = function (arg) {
93 + return this._invoke("throw", arg);
94 +};
95 +
96 +AsyncGenerator.prototype["return"] = function (arg) {
97 + return this._invoke("return", arg);
98 +};
99 +
100 +module.exports = AsyncGenerator;
...\ No newline at end of file ...\ No newline at end of file
1 +function _AwaitValue(value) {
2 + this.wrapped = value;
3 +}
4 +
5 +module.exports = _AwaitValue;
...\ No newline at end of file ...\ No newline at end of file
1 +function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
2 + var desc = {};
3 + Object.keys(descriptor).forEach(function (key) {
4 + desc[key] = descriptor[key];
5 + });
6 + desc.enumerable = !!desc.enumerable;
7 + desc.configurable = !!desc.configurable;
8 +
9 + if ('value' in desc || desc.initializer) {
10 + desc.writable = true;
11 + }
12 +
13 + desc = decorators.slice().reverse().reduce(function (desc, decorator) {
14 + return decorator(target, property, desc) || desc;
15 + }, desc);
16 +
17 + if (context && desc.initializer !== void 0) {
18 + desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
19 + desc.initializer = undefined;
20 + }
21 +
22 + if (desc.initializer === void 0) {
23 + Object.defineProperty(target, property, desc);
24 + desc = null;
25 + }
26 +
27 + return desc;
28 +}
29 +
30 +module.exports = _applyDecoratedDescriptor;
...\ No newline at end of file ...\ No newline at end of file
1 +function _arrayLikeToArray(arr, len) {
2 + if (len == null || len > arr.length) len = arr.length;
3 +
4 + for (var i = 0, arr2 = new Array(len); i < len; i++) {
5 + arr2[i] = arr[i];
6 + }
7 +
8 + return arr2;
9 +}
10 +
11 +module.exports = _arrayLikeToArray;
...\ No newline at end of file ...\ No newline at end of file
1 +function _arrayWithHoles(arr) {
2 + if (Array.isArray(arr)) return arr;
3 +}
4 +
5 +module.exports = _arrayWithHoles;
...\ No newline at end of file ...\ No newline at end of file
1 +var arrayLikeToArray = require("./arrayLikeToArray");
2 +
3 +function _arrayWithoutHoles(arr) {
4 + if (Array.isArray(arr)) return arrayLikeToArray(arr);
5 +}
6 +
7 +module.exports = _arrayWithoutHoles;
...\ No newline at end of file ...\ No newline at end of file
1 +function _assertThisInitialized(self) {
2 + if (self === void 0) {
3 + throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4 + }
5 +
6 + return self;
7 +}
8 +
9 +module.exports = _assertThisInitialized;
...\ No newline at end of file ...\ No newline at end of file
1 +function _asyncGeneratorDelegate(inner, awaitWrap) {
2 + var iter = {},
3 + waiting = false;
4 +
5 + function pump(key, value) {
6 + waiting = true;
7 + value = new Promise(function (resolve) {
8 + resolve(inner[key](value));
9 + });
10 + return {
11 + done: false,
12 + value: awaitWrap(value)
13 + };
14 + }
15 +
16 + ;
17 +
18 + if (typeof Symbol === "function" && Symbol.iterator) {
19 + iter[Symbol.iterator] = function () {
20 + return this;
21 + };
22 + }
23 +
24 + iter.next = function (value) {
25 + if (waiting) {
26 + waiting = false;
27 + return value;
28 + }
29 +
30 + return pump("next", value);
31 + };
32 +
33 + if (typeof inner["throw"] === "function") {
34 + iter["throw"] = function (value) {
35 + if (waiting) {
36 + waiting = false;
37 + throw value;
38 + }
39 +
40 + return pump("throw", value);
41 + };
42 + }
43 +
44 + if (typeof inner["return"] === "function") {
45 + iter["return"] = function (value) {
46 + if (waiting) {
47 + waiting = false;
48 + return value;
49 + }
50 +
51 + return pump("return", value);
52 + };
53 + }
54 +
55 + return iter;
56 +}
57 +
58 +module.exports = _asyncGeneratorDelegate;
...\ No newline at end of file ...\ No newline at end of file
1 +function _asyncIterator(iterable) {
2 + var method;
3 +
4 + if (typeof Symbol !== "undefined") {
5 + if (Symbol.asyncIterator) {
6 + method = iterable[Symbol.asyncIterator];
7 + if (method != null) return method.call(iterable);
8 + }
9 +
10 + if (Symbol.iterator) {
11 + method = iterable[Symbol.iterator];
12 + if (method != null) return method.call(iterable);
13 + }
14 + }
15 +
16 + throw new TypeError("Object is not async iterable");
17 +}
18 +
19 +module.exports = _asyncIterator;
...\ No newline at end of file ...\ No newline at end of file
1 +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
2 + try {
3 + var info = gen[key](arg);
4 + var value = info.value;
5 + } catch (error) {
6 + reject(error);
7 + return;
8 + }
9 +
10 + if (info.done) {
11 + resolve(value);
12 + } else {
13 + Promise.resolve(value).then(_next, _throw);
14 + }
15 +}
16 +
17 +function _asyncToGenerator(fn) {
18 + return function () {
19 + var self = this,
20 + args = arguments;
21 + return new Promise(function (resolve, reject) {
22 + var gen = fn.apply(self, args);
23 +
24 + function _next(value) {
25 + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
26 + }
27 +
28 + function _throw(err) {
29 + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
30 + }
31 +
32 + _next(undefined);
33 + });
34 + };
35 +}
36 +
37 +module.exports = _asyncToGenerator;
...\ No newline at end of file ...\ No newline at end of file
1 +var AwaitValue = require("./AwaitValue");
2 +
3 +function _awaitAsyncGenerator(value) {
4 + return new AwaitValue(value);
5 +}
6 +
7 +module.exports = _awaitAsyncGenerator;
...\ No newline at end of file ...\ No newline at end of file
1 +function _classCallCheck(instance, Constructor) {
2 + if (!(instance instanceof Constructor)) {
3 + throw new TypeError("Cannot call a class as a function");
4 + }
5 +}
6 +
7 +module.exports = _classCallCheck;
...\ No newline at end of file ...\ No newline at end of file
1 +function _classNameTDZError(name) {
2 + throw new Error("Class \"" + name + "\" cannot be referenced in computed property keys.");
3 +}
4 +
5 +module.exports = _classNameTDZError;
...\ No newline at end of file ...\ No newline at end of file
1 +function _classPrivateFieldDestructureSet(receiver, privateMap) {
2 + if (!privateMap.has(receiver)) {
3 + throw new TypeError("attempted to set private field on non-instance");
4 + }
5 +
6 + var descriptor = privateMap.get(receiver);
7 +
8 + if (descriptor.set) {
9 + if (!("__destrObj" in descriptor)) {
10 + descriptor.__destrObj = {
11 + set value(v) {
12 + descriptor.set.call(receiver, v);
13 + }
14 +
15 + };
16 + }
17 +
18 + return descriptor.__destrObj;
19 + } else {
20 + if (!descriptor.writable) {
21 + throw new TypeError("attempted to set read only private field");
22 + }
23 +
24 + return descriptor;
25 + }
26 +}
27 +
28 +module.exports = _classPrivateFieldDestructureSet;
...\ No newline at end of file ...\ No newline at end of file
1 +function _classPrivateFieldGet(receiver, privateMap) {
2 + var descriptor = privateMap.get(receiver);
3 +
4 + if (!descriptor) {
5 + throw new TypeError("attempted to get private field on non-instance");
6 + }
7 +
8 + if (descriptor.get) {
9 + return descriptor.get.call(receiver);
10 + }
11 +
12 + return descriptor.value;
13 +}
14 +
15 +module.exports = _classPrivateFieldGet;
...\ No newline at end of file ...\ No newline at end of file
1 +function _classPrivateFieldBase(receiver, privateKey) {
2 + if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {
3 + throw new TypeError("attempted to use private field on non-instance");
4 + }
5 +
6 + return receiver;
7 +}
8 +
9 +module.exports = _classPrivateFieldBase;
...\ No newline at end of file ...\ No newline at end of file
1 +var id = 0;
2 +
3 +function _classPrivateFieldKey(name) {
4 + return "__private_" + id++ + "_" + name;
5 +}
6 +
7 +module.exports = _classPrivateFieldKey;
...\ No newline at end of file ...\ No newline at end of file
1 +function _classPrivateFieldSet(receiver, privateMap, value) {
2 + var descriptor = privateMap.get(receiver);
3 +
4 + if (!descriptor) {
5 + throw new TypeError("attempted to set private field on non-instance");
6 + }
7 +
8 + if (descriptor.set) {
9 + descriptor.set.call(receiver, value);
10 + } else {
11 + if (!descriptor.writable) {
12 + throw new TypeError("attempted to set read only private field");
13 + }
14 +
15 + descriptor.value = value;
16 + }
17 +
18 + return value;
19 +}
20 +
21 +module.exports = _classPrivateFieldSet;
...\ No newline at end of file ...\ No newline at end of file
1 +function _classPrivateMethodGet(receiver, privateSet, fn) {
2 + if (!privateSet.has(receiver)) {
3 + throw new TypeError("attempted to get private field on non-instance");
4 + }
5 +
6 + return fn;
7 +}
8 +
9 +module.exports = _classPrivateMethodGet;
...\ No newline at end of file ...\ No newline at end of file
1 +function _classPrivateMethodSet() {
2 + throw new TypeError("attempted to reassign private method");
3 +}
4 +
5 +module.exports = _classPrivateMethodSet;
...\ No newline at end of file ...\ No newline at end of file
1 +function _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) {
2 + if (receiver !== classConstructor) {
3 + throw new TypeError("Private static access of wrong provenance");
4 + }
5 +
6 + if (descriptor.get) {
7 + return descriptor.get.call(receiver);
8 + }
9 +
10 + return descriptor.value;
11 +}
12 +
13 +module.exports = _classStaticPrivateFieldSpecGet;
...\ No newline at end of file ...\ No newline at end of file
1 +function _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) {
2 + if (receiver !== classConstructor) {
3 + throw new TypeError("Private static access of wrong provenance");
4 + }
5 +
6 + if (descriptor.set) {
7 + descriptor.set.call(receiver, value);
8 + } else {
9 + if (!descriptor.writable) {
10 + throw new TypeError("attempted to set read only private field");
11 + }
12 +
13 + descriptor.value = value;
14 + }
15 +
16 + return value;
17 +}
18 +
19 +module.exports = _classStaticPrivateFieldSpecSet;
...\ No newline at end of file ...\ No newline at end of file
1 +function _classStaticPrivateMethodGet(receiver, classConstructor, method) {
2 + if (receiver !== classConstructor) {
3 + throw new TypeError("Private static access of wrong provenance");
4 + }
5 +
6 + return method;
7 +}
8 +
9 +module.exports = _classStaticPrivateMethodGet;
...\ No newline at end of file ...\ No newline at end of file
1 +function _classStaticPrivateMethodSet() {
2 + throw new TypeError("attempted to set read only static private field");
3 +}
4 +
5 +module.exports = _classStaticPrivateMethodSet;
...\ No newline at end of file ...\ No newline at end of file
1 +var setPrototypeOf = require("./setPrototypeOf");
2 +
3 +var isNativeReflectConstruct = require("./isNativeReflectConstruct");
4 +
5 +function _construct(Parent, args, Class) {
6 + if (isNativeReflectConstruct()) {
7 + module.exports = _construct = Reflect.construct;
8 + } else {
9 + module.exports = _construct = function _construct(Parent, args, Class) {
10 + var a = [null];
11 + a.push.apply(a, args);
12 + var Constructor = Function.bind.apply(Parent, a);
13 + var instance = new Constructor();
14 + if (Class) setPrototypeOf(instance, Class.prototype);
15 + return instance;
16 + };
17 + }
18 +
19 + return _construct.apply(null, arguments);
20 +}
21 +
22 +module.exports = _construct;
...\ No newline at end of file ...\ No newline at end of file
1 +function _defineProperties(target, props) {
2 + for (var i = 0; i < props.length; i++) {
3 + var descriptor = props[i];
4 + descriptor.enumerable = descriptor.enumerable || false;
5 + descriptor.configurable = true;
6 + if ("value" in descriptor) descriptor.writable = true;
7 + Object.defineProperty(target, descriptor.key, descriptor);
8 + }
9 +}
10 +
11 +function _createClass(Constructor, protoProps, staticProps) {
12 + if (protoProps) _defineProperties(Constructor.prototype, protoProps);
13 + if (staticProps) _defineProperties(Constructor, staticProps);
14 + return Constructor;
15 +}
16 +
17 +module.exports = _createClass;
...\ No newline at end of file ...\ No newline at end of file
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.