MinsoftK

기존의 project 업로드

Showing 210 changed files with 11099 additions and 5 deletions
1 +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 +
3 +# dependencies
4 +/node_modules
5 +/.pnp
6 +.pnp.js
7 +
8 +# testing
9 +/coverage
10 +
11 +# production
12 +/build
13 +
14 +# misc
15 +.DS_Store
16 +.env.local
17 +.env.development.local
18 +.env.test.local
19 +.env.production.local
20 +
21 +npm-debug.log*
22 +yarn-debug.log*
23 +yarn-error.log*
1 +test
2 +This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
3 +
4 +## Available Scripts
5 +
6 +In the project directory, you can run:
7 +
8 +### `yarn start`
9 +
10 +Runs the app in the development mode.<br />
11 +Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
12 +
13 +The page will reload if you make edits.<br />
14 +You will also see any lint errors in the console.
15 +
16 +### `yarn test`
17 +
18 +Launches the test runner in the interactive watch mode.<br />
19 +See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
20 +
21 +### `yarn build`
22 +
23 +Builds the app for production to the `build` folder.<br />
24 +It correctly bundles React in production mode and optimizes the build for the best performance.
25 +
26 +The build is minified and the filenames include the hashes.<br />
27 +Your app is ready to be deployed!
28 +
29 +See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
30 +
31 +### `yarn eject`
32 +
33 +**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
34 +
35 +If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
36 +
37 +Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
38 +
39 +You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
40 +
41 +## Learn More
42 +
43 +You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
44 +
45 +To learn React, check out the [React documentation](https://reactjs.org/).
46 +
47 +### Code Splitting
48 +
49 +This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
50 +
51 +### Analyzing the Bundle Size
52 +
53 +This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
54 +
55 +### Making a Progressive Web App
56 +
57 +This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
58 +
59 +### Advanced Configuration
60 +
61 +This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
62 +
63 +### Deployment
64 +
65 +This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
66 +
67 +### `yarn build` fails to minify
68 +
69 +This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
1 +[0821/130724.166:ERROR:process_info.cc(359)] UncheckedAllocate
This diff could not be displayed because it is too large.
1 +{
2 + "name": "newsjuicer",
3 + "version": "0.1.0",
4 + "private": true,
5 + "dependencies": {
6 + "@ant-design/icons": "^4.2.1",
7 + "@testing-library/jest-dom": "^4.2.4",
8 + "@testing-library/react": "^9.3.2",
9 + "@testing-library/user-event": "^7.1.2",
10 + "ant-design": "^1.0.0",
11 + "antd": "^4.5.4",
12 + "axios": "^0.19.2",
13 + "connected-react-router": "^6.8.0",
14 + "draft-js": "^0.11.6",
15 + "mysql": "^2.18.1",
16 + "qs": "^6.9.4",
17 + "react": "^16.13.1",
18 + "react-dom": "^16.13.1",
19 + "react-draft-wysiwyg": "^1.14.5",
20 + "react-easy-panzoom": "^0.4.4",
21 + "react-notifications": "^1.6.0",
22 + "react-router-dom": "^5.2.0",
23 + "react-scripts": "3.4.1",
24 + "sequelize": "^6.3.3",
25 + "styled-components": "^5.1.1"
26 + },
27 + "proxy": "http://localhost:5000",
28 + "scripts": {
29 + "start": "cross-env NODE_PATH=src react-scripts start",
30 + "build": "cross-env NODE_PATH=src react-scripts build",
31 + "test": "cross-env NODE_PATH=src react-scripts test",
32 + "eject": "react-scripts eject"
33 + },
34 + "eslintConfig": {
35 + "extends": "react-app"
36 + },
37 + "browserslist": {
38 + "production": [
39 + ">0.2%",
40 + "not dead",
41 + "not op_mini all"
42 + ],
43 + "development": [
44 + "last 1 chrome version",
45 + "last 1 firefox version",
46 + "last 1 safari version"
47 + ]
48 + },
49 + "devDependencies": {
50 + "cross-env": "^7.0.2"
51 + }
52 +}
No preview for this file type
No preview for this file type
No preview for this file type
1 +<!DOCTYPE html>
2 +<html lang="en">
3 +
4 +<head>
5 + <meta charset="utf-8" />
6 + <link rel="icon" href="%PUBLIC_URL%/mathbank.png" />
7 + <meta name="viewport" content="width=device-width, initial-scale=1" />
8 + <meta name="theme-color" content="#000000" />
9 + <meta name="description" content="Web site created using create-react-app" />
10 + <link rel="apple-touch-icon" href="%PUBLIC_URL%/mathbank.png" />
11 + <!--
12 + manifest.json provides metadata used when your web app is installed on a
13 + user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
14 + -->
15 + <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
16 + <!--
17 + Notice the use of %PUBLIC_URL% in the tags above.
18 + It will be replaced with the URL of the `public` folder during the build.
19 + Only files inside the `public` folder can be referenced from the HTML.
20 +
21 + Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
22 + work correctly both with client-side routing and a non-root public URL.
23 + Learn how to configure a non-root public URL by running `npm run build`.
24 + -->
25 + <!-- <link rel="stylesheet" type="text/css" href="https://tikzjax.com/v1/fonts.css"/>
26 + <title>Mathmatical Graph Bank</title>
27 + <script src="https://tikzjax.com/v1/tikzjax.js"></script> -->
28 + <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js?ver=1.3.2'></script>
29 +<script type='text/javascript'>
30 +
31 + $(function(){
32 +
33 + var iFrames = $('iframe');
34 +
35 + function iResize() {
36 +
37 + for (var i = 0, j = iFrames.length; i < j; i++) {
38 + iFrames[i].style.height = iFrames[i].contentWindow.document.body.offsetHeight + 'px';}
39 + }
40 +
41 + if ($.browser.safari || $.browser.opera) {
42 +
43 + iFrames.load(function(){
44 + setTimeout(iResize, 0);
45 + });
46 +
47 + for (var i = 0, j = iFrames.length; i < j; i++) {
48 + var iSource = iFrames[i].src;
49 + iFrames[i].src = '';
50 + iFrames[i].src = iSource;
51 + }
52 +
53 + } else {
54 + iFrames.load(function() {
55 + this.style.height = this.contentWindow.document.body.offsetHeight + 'px';
56 + });
57 + }
58 +
59 + });
60 +
61 +</script>
62 +</head>
63 +
64 +<body>
65 + <noscript>You need to enable JavaScript to run this app.</noscript>
66 + <div id="root"></div>
67 + <!--
68 + This HTML file is a template.
69 + If you open it directly in the browser, you will see an empty page.
70 +
71 + You can add webfonts, meta tags, or analytics to this file.
72 + The build step will place the bundled scripts into the <body> tag.
73 +
74 + To begin the development, run `npm start` or `yarn start`.
75 + To create a production bundle, use `npm run build` or `yarn build`.
76 + -->
77 +</body>
78 +
79 +</html>
...\ No newline at end of file ...\ No newline at end of file
1 +{
2 + "short_name": "React App",
3 + "name": "Create React App Sample",
4 + "icons": [
5 + {
6 + "src": "favicon.ico",
7 + "sizes": "64x64 32x32 24x24 16x16",
8 + "type": "image/x-icon"
9 + },
10 + {
11 + "src": "logo192.png",
12 + "type": "image/png",
13 + "sizes": "192x192"
14 + },
15 + {
16 + "src": "logo512.png",
17 + "type": "image/png",
18 + "sizes": "512x512"
19 + }
20 + ],
21 + "start_url": ".",
22 + "display": "standalone",
23 + "theme_color": "#000000",
24 + "background_color": "#ffffff"
25 +}
1 +# https://www.robotstxt.org/robotstxt.html
2 +User-agent: *
3 +Disallow:
1 +.trigger {
2 + font-size: 18px;
3 + line-height: 64px;
4 + padding: 0 24px;
5 + cursor: pointer;
6 + transition: color 0.3s;
7 +}
8 +
9 +.trigger:hover {
10 + color: #1890ff;
11 +}
12 +
13 +.logo {
14 + height: 32px;
15 + background: rgba(255, 255, 255, 0.2);
16 + margin: 16px;
17 +}
18 +
19 +.site-layout .site-layout-background {
20 + background: #fff;
21 +}
...\ No newline at end of file ...\ No newline at end of file
1 +import React,{useState, useEffect} from 'react';
2 +import { Route, Redirect, withRouter, Switch} from 'react-router-dom';
3 +import { Home, Html, Mathcha, Tikz, Login} from './Container';
4 +import {isauth} from './Container/Login';
5 +//import {ConnectedRouter} from 'connected-react-router';
6 +
7 +
8 +const authentication = () => {}
9 +
10 +
11 +function App() {
12 + return (
13 + <div>
14 + <Switch>
15 + <Route exact path="/" component={Login}/>
16 + <Route path="/Home" component={Home}/>
17 + </Switch>
18 + </div>
19 + );
20 +}
21 +//history를 쓰는 경우는 Link
22 +export default withRouter(App);
1 +.site-layout .site-layout-background {
2 + background: #fff;
3 +}
4 +
5 +[data-theme="dark"] .site-layout .site-layout-background {
6 + background: #141414;
7 +}
8 +
9 +/*
10 +.ant-menu-item.ant-menu-item-only-child.ant-menu-item:link {
11 + background-color: red;
12 +}
13 +
14 +.ant-menu-item.ant-menu-item-only-child.ant-menu-item:visited {
15 + background-color: red;
16 +}
17 +*/
18 +.logout {
19 + position: absolute;
20 + right:15px;
21 + top:15px;
22 + text-align: center;
23 + justify-content: center;
24 +}
...\ No newline at end of file ...\ No newline at end of file
1 +import React, { useState, useEffect, useCallback } from 'react';
2 +import 'antd/dist/antd.css';
3 +import './Tikz.css';
4 +import './Home.css';
5 +import {withRouter} from 'react-router-dom';
6 +import { Layout, Menu, Table, Button, Card, Modal,message } from 'antd';
7 +import {
8 + MenuOutlined,
9 + FunctionOutlined,
10 + FontSizeOutlined,
11 + LineChartOutlined,
12 + EyeOutlined,
13 + DownloadOutlined,
14 + UploadOutlined,
15 + DeleteOutlined,
16 + UserOutlined,
17 + ReadOutlined
18 +} from '@ant-design/icons';
19 +import mathbank from '../lib/mathbank.png';
20 +import heartgraph from '../lib/heartgraph.png';
21 +import Html from './Html.js';
22 +import Mathcha from './Mathcha.js';
23 +import Tikz from './Tikz.js';
24 +import { Redirect } from 'react-router-dom';
25 +import {getData} from 'lib/api/html';
26 +import { getMathData } from '../lib/api/mathCha';
27 +import { removeItem,removeItems } from '../lib/api/tikz';
28 +
29 +const { Header, Sider, Content } = Layout;
30 +const { SubMenu } = Menu;
31 +
32 +const host= 'http://localhost:5000';
33 +
34 +/* 테이블에 들어가는 컨텐츠 메크로로 생성 */
35 +
36 +const fetchGetData = async(user, pageSize, currentPage, orderWhat,orderKind) => {
37 + try{
38 + console.log(pageSize);
39 + const result = await getData(user, pageSize, currentPage,orderWhat,orderKind);
40 + if(result.status === 200){
41 + return result.data;
42 + }else {
43 + return null;
44 + }
45 + }catch(e){
46 + console.log(e);
47 + return null;
48 + }
49 +};
50 +
51 +
52 +
53 +//로그아웃 기능 -> session storage 제거 및 Login으로 이동하게 해야함
54 +
55 +
56 +
57 +const Home = ({history}) => {
58 + const [html, setHtml] = useState(false);
59 +
60 + const [mathcha, setMathcha] = useState(false);
61 +
62 + const [tikz, setTikz] = useState(false);
63 +
64 + const [visible, setVisible] = useState(false);
65 +
66 + const [selectedRowKeys, setSelectedRowKeys] = useState(false);
67 +
68 + const [collapsed, setCollapsed] = useState(false);
69 +
70 + const [status,setStatus] = useState(null);
71 +
72 + const [data, setData] = useState([]);
73 +
74 + const [selectItem, setSelectItem] = useState(null);
75 +
76 + const [selectItems, setSelectItems] = useState([]);
77 +
78 + const [removeVisible,setRemoveVisible] = useState(false);
79 +
80 + const [mode ,setMode] =useState(null);
81 +
82 + const [tikzmode,setTikzMode] =useState(null);
83 +
84 + const [total, setTotal] =useState(0);
85 + const [currentPage, setCurrentPage] =useState(1);
86 + const [pageSize,setPageSize] =useState(10);
87 + const [orderWhat,setOrderWhat] = useState('qno');
88 + const [orderWhatKor,setOrderWhatKor] =useState('문제번호순');
89 + const [orderKind,setOrderKind] = useState('desc');
90 + const [orderKindKor,setOrderKindKor] = useState('내림차순');
91 + const [orderWhatStatus,setOrderWhatStatus] =useState(false);
92 + const [orderKindStatus,setOrderKindStatus] =useState(false);
93 + const callback = (param) => {
94 + const {status} = param;
95 + if(status){
96 + setStatus(status);
97 + }
98 + }
99 + const onOrderWhat = async() => {
100 + if(orderWhatKor ==="문제번호순"){
101 + setOrderWhat('id');
102 + setOrderWhatKor("최근등록순");
103 + setOrderWhatStatus(true);
104 + }else{
105 + setOrderWhat('qno');
106 + setOrderWhatKor("문제번호순");
107 + setOrderWhatStatus(true);
108 + }
109 + };
110 + const onOrderKind = () => {
111 + if(orderKindKor ==="내림차순"){
112 + setOrderKind('asc');
113 + setOrderKindKor("오름차순");
114 + setOrderKindStatus(true);
115 + }else{
116 + setOrderKind('desc')
117 + setOrderKindKor("내림차순");
118 + setOrderKindStatus(true);
119 + }
120 + };
121 +
122 + const callbackFetch = useCallback(async () => {
123 + const user = sessionStorage.getItem('id');
124 + const result = await fetchGetData(user,pageSize,currentPage,orderWhat, orderKind);
125 + console.log(pageSize);
126 + if(result){
127 + console.log(result.tikzs);
128 + setData(result.tikzs.map(x=>Object.assign({},x,{key: x.id})));
129 + setTotal(result.total);
130 + setStatus(null);
131 + setOrderKindStatus(false);
132 + setOrderWhatStatus(false);
133 + }
134 + },[fetchGetData,pageSize,currentPage,orderWhat,orderKind]);
135 +
136 + useEffect(() =>{
137 + if(status==null || (status!=null && status==='SAVE_OK')){
138 + callbackFetch();
139 + }
140 + if(orderKindStatus === true || orderWhatStatus ===true){
141 + callbackFetch();
142 + }
143 + },[status,orderKindStatus,orderWhatStatus])
144 +
145 +
146 + /*파일 정렬 */
147 + useEffect(()=>{
148 +
149 + },[orderWhat,orderWhatKor,orderKind,orderKindKor, Table])
150 +
151 + /* 모달 */
152 + const showModal = (e, value) => {
153 + console.log(value);
154 + setSelectItem(value);
155 + setVisible(!visible);
156 + };
157 +
158 + const handleOk = (e) => {
159 + console.log(e);
160 + setVisible(!visible);
161 + };
162 +
163 + const handleCancel = (e) => {
164 + console.log(e);
165 + setVisible(!visible);
166 + };
167 +
168 + /* 로그인 모달 */
169 + const showLogin = (e) => {
170 + console.log(e);
171 + setVisible(!visible);
172 + };
173 +
174 + const showTikz= (e, value) => {
175 + setTikzMode("preview");
176 + setSelectItem(value);
177 + setTikz(true);
178 + };
179 +
180 + const columns = [
181 +
182 + {
183 + title: '문제 번호',
184 + dataIndex: 'qno',
185 + },
186 + {
187 + title: '문제 타입',
188 + dataIndex: 'typeSol',
189 + },
190 + {
191 + title: '문제/풀이 구분',
192 + dataIndex: 'typeQue',
193 + },
194 + {
195 + title: 'HTML',
196 + dataIndex: 'htmlFileName',
197 + render: (value, row) => {
198 + if(value){
199 + return (
200 + <Button
201 + type="dashed"
202 + shape="round"
203 + icon={<LineChartOutlined />}
204 + onClick={(e)=>showModal(e, row)}
205 + />
206 + );
207 + }else{
208 + return <span>-</span>
209 + }
210 + },
211 + },
212 + {
213 + title: 'Mathcha',
214 + dataIndex: 'mathcharFileName',
215 + render: (value, row) => {
216 + if(value){
217 + return (
218 + <a href={`${host}/mathchaDownload/${value}`}>
219 + <DownloadOutlined/>
220 + </a>
221 +
222 + );
223 + }else{
224 + return <span>-</span>
225 + }
226 + },
227 + },
228 + {
229 + title: 'TikZ',
230 + dataIndex: 'tex',
231 + render:(value, row) => {
232 + if(value){
233 + return (
234 + <Button
235 + type="dashed"
236 + shape="round"
237 + icon={<LineChartOutlined />}
238 + onClick={(e)=> showTikz(e,row)}
239 + />
240 + );
241 + }else{
242 + return <span>-</span>
243 + }
244 + },
245 + },
246 + {
247 + title: '삭제',
248 + dataIndex: 'delete',
249 + render: (value, row) => {
250 + return <Button type="text" icon={<DeleteOutlined />} danger onClick={(e)=>removeShowModal(e,row)}/>;
251 + },
252 + },
253 + {
254 + title: '작성자',
255 + dataIndex: 'creator',
256 + },
257 + ];
258 +
259 + const removeShowModal = (e,row) => {
260 + setSelectItem(row);
261 + setMode('single');
262 + setRemoveVisible(true);
263 + };
264 +
265 + const removeItemsShowModal =() => {
266 + setMode('multi');
267 + setRemoveVisible(true);
268 + };
269 +
270 +
271 +
272 + const removeHandleCancel = () => {
273 +
274 + setRemoveVisible(false);
275 + };
276 + const removeHandleOk = async () => {
277 + if(mode === 'single'){
278 +
279 + try{
280 + const result = await removeItem(selectItem.id);
281 + if(result.status==200){
282 + message.info("삭제되었습니다.");
283 + callbackFetch();
284 + setRemoveVisible(false);
285 + }}catch(e){
286 + console.log(e);
287 + message.warn(e);
288 + }
289 + }
290 + if(mode ==='multi'){
291 +
292 + try{
293 + const result = await removeItems(selectItems);
294 + if(result.status==200){
295 + message.info("삭제되었습니다.");
296 + callbackFetch();
297 + setRemoveVisible(false);
298 + }}catch(e){
299 + console.log(e);
300 + message.warn(e);
301 + }
302 + }
303 +
304 + }
305 +
306 + const onSelectChange = selectedRowKeys => {
307 + console.log('selectedRowKeys Changed: ', selectedRowKeys);
308 + setSelectItems(selectedRowKeys);
309 + }
310 +
311 + const onCancelHtml = () => {
312 + setHtml(false);
313 + };
314 + const onCancelMathCha = () => {
315 + setMathcha(false);
316 + };
317 +
318 + const onExit = () => {
319 + setMathcha(false);
320 + };
321 +
322 + const onLeave = () => {
323 + setSelectItem(null);
324 + setTikz(false);
325 + };
326 +
327 + const onHtml = () => {
328 + setHtml(true);
329 + };
330 +
331 + const onMathcha = () => {
332 + setMathcha(true);
333 + };
334 +
335 + const onTikz = () => {
336 + setTikzMode("new")
337 + setTikz(true);
338 + };
339 +
340 + const toggle = () => {
341 + setCollapsed(!collapsed);
342 + };
343 +
344 + const onCollapse = (collapsed, type) => {
345 + //this.setState({ collapsed });
346 + setCollapsed(!collapsed);
347 + };
348 +
349 +
350 +
351 + const rowSelection = {
352 + selectedRowKeys: selectItems, onChange: onSelectChange
353 + };
354 + const hasSelected = selectedRowKeys.length > 0;
355 +
356 + const isAuth = sessionStorage.getItem('isAuth');
357 + const userId = sessionStorage.getItem('id');
358 + if (!isAuth) return <Redirect to="/" />;
359 +
360 +
361 + return (
362 + <Layout>
363 + <Sider
364 + trigger={null}
365 + collapsible
366 + collapsed={!collapsed}
367 + onCollapse={onCollapse}
368 + style={{ height: '100vh' }}>
369 + <img
370 + className="mathbank"
371 + src={mathbank}
372 + alt="mathbank"
373 + onClick={() => window.location.reload()}
374 + style={{
375 + width: 'auto',
376 + height: '54px',
377 + marginLeft: '22px',
378 + marginTop: '10px',
379 + cursor: 'pointer',
380 + }}
381 + />
382 + <Menu
383 +
384 + theme="dark"
385 + defaultSelectedKeys={['1']}
386 + mode="inline"
387 + style={{ fontSize: '18px' }}>
388 + <SubMenu
389 + key="sub1"
390 + icon={<UserOutlined style={{ fontSize: '18px' }} />}
391 + title="User's Info"
392 + style={{ backgroundColor: 'rgb(0, 21, 41)' }}>
393 + <Menu.Item
394 + key="1"
395 + onClick="none"
396 + style={{
397 + width: '200px',
398 + height: '100%',
399 + paddingLeft: '0px',
400 + background: 'rgb(0, 21, 41)',
401 + textAlign: 'center',
402 + }}>
403 + {userId} 환영합니다.
404 + </Menu.Item>
405 + </SubMenu>
406 + <SubMenu
407 + key="sub2"
408 + icon={<ReadOutlined style={{ fontsize: '15px'}}/>}
409 + title="MathCha"
410 + style={{
411 + backgroundColor: 'rgb(0, 21, 41)'
412 + }}>
413 + <Menu.Item
414 + key="1"
415 + style={{
416 + width: '200px',
417 + height: '100%',
418 + paddingLeft: '0px',
419 + background: 'rgb(0, 21, 41)',
420 + textAlign: 'center',
421 + }}><a href="http://mathcha.io" target="_blank">MathCha 다운로드</a>
422 + </Menu.Item>
423 + <Menu.Item
424 + key="2"
425 + style={{
426 + width: '200px',
427 + height: '100%',
428 + paddingLeft: '0px',
429 + background: 'rgb(0, 21, 41)',
430 + textAlign: 'center',
431 + }}><a href="https://m.blog.naver.com/PostView.nhn?blogId=wool613&logNo=221511340406&proxyReferer=https:%2F%2Fwww.google.com%2F" target="_blank">tikz 간단 설명</a>
432 + </Menu.Item>
433 + <Menu.Item
434 + key="3"
435 + style={{
436 + width: '200px',
437 + height: '100%',
438 + paddingLeft: '0px',
439 + background: 'rgb(0, 21, 41)',
440 + textAlign: 'center',
441 + }}><a href="https://www.bu.edu/math/files/2013/08/tikzpgfmanual.pdf" target="_blank">tikz 상세 메뉴얼</a>
442 + </Menu.Item>
443 + </SubMenu>
444 + </Menu>
445 + </Sider>
446 + <Layout className="site-layout">
447 + <Header className="site-layout-background" style={{ padding: 0 }}>
448 + <MenuOutlined
449 + style={{ marginLeft: '13px' }}
450 + onClick={(collapsed, toggle)}></MenuOutlined>
451 +
452 + <Button className="logout" type="default" onClick={(e)=>{
453 + sessionStorage.removeItem('id');
454 + sessionStorage.removeItem('isAuth');
455 + history.push('/');
456 +
457 + }}>
458 + 로그아웃
459 + </Button>
460 + </Header>
461 + <Content>
462 + <div>
463 + <div style={{ marginBottom: 16 }}>
464 + <span style={{ marginLeft: 8 }}>
465 + {hasSelected ? `Selected ${selectedRowKeys.length} items` : ''}
466 + </span>
467 + </div>
468 + <Button
469 + style={{ display: 'inline-block', top: '0.5vh', left: '8vw' }}
470 + type="primary"
471 + shape="round"
472 + icon={<UploadOutlined />}
473 + onClick={onHtml}>
474 + HTML 업로드
475 + </Button>
476 + <Button
477 + style={{ display: 'inline-block', top: '0.5vh', left: '8.5vw' }}
478 + type="primary"
479 + shape="round"
480 + icon={<UploadOutlined />}
481 + onClick={onMathcha}>
482 + Mathcha 업로드
483 + </Button>
484 + <Button
485 + style={{ display: 'inline-block', top: '0.5vh', left: '9vw' }}
486 + type="primary"
487 + shape="round"
488 + icon={<UploadOutlined />}
489 + onClick={onTikz}>
490 + TikZ 업로드
491 + </Button>
492 + <Button
493 + style={{
494 + display: 'inline-block',
495 + top: '0.5vh',
496 + left: '9.5vw',
497 + }}
498 + type="dashed"
499 + shape="round"
500 + icon={<DeleteOutlined />}
501 + onClick={(e)=>{
502 + console.log(selectItems);
503 + if(selectItems.length>0){
504 +
505 + removeItemsShowModal();
506 + }else{
507 + message.info("삭제할 데이터를 선택해 주세요.");
508 + }
509 + }}
510 + danger>
511 + 선택 삭제
512 + </Button>
513 +
514 + <Button
515 + style={{
516 + display: 'inline-block',
517 + top: '0.5vh',
518 + left: '50vw',
519 + }}className="orderWhat" type="default" onClick={onOrderWhat}>
520 + {orderWhatKor}
521 + </Button>
522 + <Button
523 + style={{
524 + display: 'inline-block',
525 + top: '0.5vh',
526 + left: '50.2vw',
527 + }}className="orderKind" type="default" onClick={onOrderKind}>
528 + {orderKindKor}
529 + </Button>
530 + <Table
531 + rowSelection={rowSelection}
532 + pagination={
533 + {
534 + total: total,
535 + current:currentPage,
536 + pageSize:pageSize,
537 + orderWhat:orderWhat ,
538 + orderKind:orderKind,
539 + onChange:async (page,pageSize)=>{
540 + console.log(page,pageSize);
541 + setCurrentPage(page);
542 + const user = sessionStorage.getItem('id');
543 + const result = await fetchGetData(user,pageSize,page,orderWhat,orderKind);
544 + console.log(pageSize);
545 + if(result){
546 + console.log(result.tikzs);
547 + setData(result.tikzs.map(x=>Object.assign({},x,{key: x.id})));
548 + setTotal(result.total);
549 + setStatus(null);
550 + }
551 + }
552 + }
553 + }
554 + columns={columns}
555 + dataSource={data}
556 + style={{ width: '80vw', marginTop: '1.5vh', marginLeft: '8vw' }}
557 + />
558 + <Modal
559 + title="미리보기"
560 + visible={visible}
561 + centered
562 + width="400px"
563 + height="400px"
564 + onOk={handleOk}
565 + onCancel={handleCancel}>
566 + {
567 + selectItem && <iframe scrolling='no' frameBorder="0" style={{overflow:'hidden' , overflowX:'hidden', overflowY:'hidden' , position:'relative', top:'0px',left:'0px', right:'0px', bottom:'0px' ,height:'300px', width:'350px' }} className="iframe" src={`${host}/htmlPreview/${selectItem.htmlFileName}`}/>
568 + }
569 + </Modal>
570 + <Modal
571 + title="다운로드"
572 + />
573 + <Modal
574 + title="삭제하시겠습니까?"
575 + visible={removeVisible}
576 + onOk={removeHandleOk}
577 + onCancel={removeHandleCancel}
578 + okText="확인"
579 + cancelText="취소"
580 + >
581 + <p>확인을 클릭하시면 삭제됩니다!</p>
582 + </Modal>
583 + <Html visible={html} onCancel={onCancelHtml} callback={callback}></Html>
584 + <Mathcha visible={mathcha} onCancel={onCancelMathCha} callback={callback}></Mathcha>
585 + <Tikz visible={tikz} onLeave={onLeave} callback={callback} selectItem={selectItem} mode={tikzmode}></Tikz>
586 + </div>
587 + </Content>
588 + </Layout>
589 + </Layout>
590 + );
591 +};
592 +
593 +export default withRouter(Home);
1 +import React, { useState, useEffect } from 'react';
2 +import { Modal, Upload, message, Form, InputNumber, Button , Select ,Row, Col} from 'antd';
3 +import { InboxOutlined, LockOutlined, SaveTwoTone } from '@ant-design/icons';
4 +import { saveFileAndQno } from 'lib/api/html';
5 +import { checkQno } from '../lib/api/html';
6 +
7 +const { Option} = Select;
8 +//파일 업로드
9 +//업로드 폼에서의 로직
10 +
11 +const fetchSaveData = async (data) => {
12 + try{
13 + console.log(data);
14 + const result = await saveFileAndQno(data);
15 + if(result.status===200){
16 + return result.data;
17 + }
18 + }catch(e){
19 + console.log(e);
20 + message.warn(e.message);
21 + }
22 +}
23 +
24 +const fetchCheckQno = async(qno) => {
25 + try{
26 + const result = await checkQno(qno);
27 + if(result.status===200){
28 + console.log(result);
29 + message.info("사용 가능한 문항 번호 입니다.");
30 + return true;
31 + }else{
32 + message.info("존재 하지 않는 문항 번호 입니다.");
33 + return false;
34 + }
35 + }catch(e){
36 + console.log(e);
37 + message.info("존재 하지 않는 문항 번호 입니다.");
38 + return false;
39 + }
40 +}
41 +
42 +const Html = ({ visible, onCancel, callback }) => {
43 + const [fields,setFields] =useState([]);
44 + const [qno, setQno] = useState(null);
45 + const [upload,setUpload]=useState(false);
46 + const [fileList, setFileList]=useState([]);
47 + const [qnoCheck,setQnoCheck] =useState(false);
48 +
49 +
50 + const changeNumber = (value) => {
51 + setQno(value);
52 + setFields([...fields, {name:['qno'],value:value}]);
53 + };
54 +
55 +
56 + useEffect(()=>{
57 + if(!visible){
58 + let initFields = [
59 + {name:['qno'],value:null},
60 + {name:['typeSol'],value:null},
61 + {name:['typeQue'],value:null},
62 + {name:['creator'],value:null},
63 + ];
64 + setQno(null);
65 + setFields(initFields);
66 + setFileList([]);
67 + }
68 + },[visible]);
69 +
70 + const props = {
71 + multiple:false,
72 + //data: { qno: qno },
73 + accept:'.html',
74 + onRemove: file => {
75 + const index = fileList.indexOf(file);
76 + const newFileList = fileList.slice();
77 + newFileList.splice(index, 1);
78 + return {
79 + fileList: newFileList,
80 + };
81 + },
82 +
83 + beforeUpload: file => {
84 + console.log(file);
85 + if(file.name.indexOf('.html')>0)
86 + {
87 + setFileList([file]);
88 + }else {
89 + setFileList([]);
90 + message.info("Html 형식의 파일이 아닙니다.");
91 + }
92 + return false;
93 +
94 + },
95 + };
96 +
97 + const onOk = () => {
98 + setUpload(true)
99 + };
100 +
101 +
102 + const normFile = e => {
103 + console.log('Upload event:', e);
104 + if (Array.isArray(e)) {
105 + return e;
106 + }
107 + return e && e.fileList;
108 + };
109 +
110 + const onClickQno = async(e)=>{
111 + e.preventDefault();
112 + //번호가 호출 성공시 setQnoCheck(true);
113 + if(qno){
114 + const _checkQno= await fetchCheckQno(qno);
115 + setQnoCheck(_checkQno);
116 + }
117 + };
118 +
119 + const onFinish = async values => {
120 + console.log(qnoCheck);
121 + if(!qnoCheck){
122 + message.warning("문제 번호를 확인해 주세요.")
123 + return;
124 + }else{
125 + const creator = sessionStorage.getItem('id');
126 + console.log('Received values of form: ', values);
127 + const formData = new FormData();
128 + formData.append('qno', values.qno);
129 + formData.append('typeSol', values.typeSol);
130 + formData.append('typeQue', values.typeQue);
131 + formData.append('html', values.html[0]);
132 + formData.append('creator', creator);
133 +
134 + const result = await fetchSaveData(formData);
135 + console.log(result);
136 + if(result){
137 + message.info(result.message);
138 + let initFields = [
139 + {name:['qno'],value:null},
140 + {name:['typeSol'],value:null},
141 + {name:['typeQue'],value:null},
142 + {name:['creator'],value:null},
143 + ];
144 + setQno(null);
145 + setFields(initFields);
146 + setFileList([]);
147 + onCancel();
148 + callback({status:'SAVE_OK'});
149 + }else{
150 + callback({status:'SAVE_FAIL'})
151 + }
152 + }
153 + };
154 +
155 + const onChangeTypeSol = (value) => {
156 + console.log(value);
157 + setFields([...fields, {name:['typeSol'],value:value}]);
158 + }
159 +
160 + const onChangeTypeQue = (value) => {
161 + console.log(value);
162 + setFields([...fields, {name:['typeQue'],value:value}])
163 + }
164 +
165 +
166 +
167 + const formItemLayout = {
168 + labelCol: { span: 6 },
169 + wrapperCol: { span: 14 },
170 + };
171 +
172 + return (
173 + <Modal
174 + placement={'bottom'}
175 + closable={true}
176 + height={'75%'}
177 + visible={visible}
178 + okText={'저장'}
179 + cancelText={'이전'}
180 + onCancel={onCancel}
181 + footer={null}
182 + >
183 + <Form name="validate_other"
184 + {...formItemLayout}
185 + onFinish={onFinish}
186 + fields={[{name:['html'],value:fileList},...fields]}
187 + >
188 + <Form.Item
189 + name="qno"
190 + label="문제 번호"
191 + rules={[
192 + {
193 + required: true,
194 + message: '저장할 html의 문항번호를 입력해 주세요.',
195 + },
196 + ]}>
197 + <Row>
198 + <Col>
199 + <InputNumber
200 + min={0}
201 + max={10000}
202 + value={qno}
203 + onChange={changeNumber}>
204 + </InputNumber>
205 + </Col>
206 + <Col>
207 + <Button onClick={onClickQno}>번호 확인</Button>
208 + </Col>
209 + </Row>
210 + </Form.Item>
211 + <Form.Item
212 + name="typeSol"
213 + label="문제 타입"
214 + rules={[
215 + {
216 + required: true,
217 + message: '저장할 html의 문제 타입을 선택해 주세요.',
218 + },
219 + ]}>
220 + <Select onChange={onChangeTypeSol}>
221 + <Option value="오지선다형">오지선다형</Option>
222 + <Option value="단답형">단답형</Option>
223 + <Option value="계산식">계산식</Option>
224 + </Select>
225 + </Form.Item>
226 + <Form.Item
227 + name="typeQue"
228 + label="문제/풀이 구분"
229 + rules={[
230 + {
231 + required: true,
232 + message: '저장할 html의 문제/풀이 구분을 선택해 주세요.',
233 + },
234 + ]}>
235 + <Select onChange={onChangeTypeQue}>
236 + <Option value="문제">문제</Option>
237 + <Option value="풀이">풀이</Option>
238 + </Select>
239 + </Form.Item>
240 + <Form.Item label="파일 업로드">
241 + <Form.Item
242 + name="html"
243 + valuePropName="fileList"
244 + getValueFromEvent={normFile}
245 +
246 + noStyle
247 + rules={[
248 + {
249 + required: true,
250 + message: '파일을 드래그하거나 선택해 주세요.',
251 + },
252 + ]}>
253 + <Upload.Dragger name="files" {...props} >
254 + <p className="ant-upload-drag-icon">
255 + <InboxOutlined />
256 + </p>
257 + <p className="ant-upload-text">Click or drag file to this area to upload</p>
258 + <p className="ant-upload-hint">Support for a single or bulk upload.</p>
259 + </Upload.Dragger>
260 + </Form.Item>
261 + </Form.Item>
262 +
263 + <Form.Item style={{alignContent:'middle'}} wrapperCol={{ span: 12, offset: 6 }}>
264 + <Button type="primary" htmlType="submit">
265 + 저장
266 + </Button>
267 + </Form.Item>
268 + </Form>
269 +
270 + </Modal>
271 + );
272 +};
273 +
274 +export default Html;
1 +import React,{useState} from 'react';
2 +import LoginForm from '../component/LoginForm';
3 +import { getLoginInfo } from '../lib/api/login';
4 +import {Redirect, withRouter} from "react-router-dom";
5 +
6 +const fetchLogInfo= async(data) =>{
7 + try{
8 + const result = await getLoginInfo(data);
9 + if(result.status ===200){
10 + console.log("서버 데이터와 일치: "+ result.data ); // result의 반환값 확인
11 + return true;
12 + }
13 + } catch(e){
14 + console.log(e);
15 + alert("id와 비밀번호를 확인해주세요!");
16 + return false;
17 + }
18 +}
19 +
20 +const Login = () => {
21 +
22 + const [authenticated,setAuthenticated] = useState(false);
23 + const onFinish = async (values)=> {
24 + console.log('Received values of form: ', values);
25 + const isAuth = await fetchLogInfo(values);
26 + sessionStorage.setItem("isAuth", isAuth); //세션 스토리지 저장
27 + sessionStorage.setItem("id",values.userid);
28 +
29 + setAuthenticated(isAuth);
30 + }
31 + if(authenticated){
32 + // history.push('/Home');
33 + return <Redirect to="/Home"/>
34 + }else{
35 + return <LoginForm onFinish={onFinish} >
36 + </LoginForm>
37 + }
38 +};
39 +
40 +export default withRouter(Login);
1 +import React, { useState, useEffect } from 'react';
2 +import { Upload, message,Form, InputNumber, Button, Select, Modal,Row,Col} from 'antd';
3 +import { InboxOutlined } from '@ant-design/icons';
4 +import {saveFileAndQno,getMathData} from 'lib/api/mathCha';
5 +import {checkQno} from '../lib/api/mathCha';
6 +
7 +const {Option} =Select;
8 +
9 +const fetchSaveData = async (data) => {
10 + try{
11 + const result = await saveFileAndQno(data);
12 + console.log(result);
13 + if(result.status===200){
14 + return result.data;
15 + }
16 + }catch(e){
17 + console.log(e);
18 + message.warning(e.message);
19 + }
20 +}
21 +
22 +const fetchCheckQno = async(qno) => {
23 + try{
24 + const result = await checkQno(qno);
25 + if(result.status===200){
26 + console.log(result);
27 + message.info("사용 가능한 문항 번호 입니다.");
28 + return true;
29 + }else{
30 + message.info("존재 하지 않는 문항 번호 입니다.");
31 + return false;
32 + }
33 + }catch(e){
34 + console.log(e);
35 + message.info("존재 하지 않는 문항 번호 입니다.");
36 + return false;
37 + }
38 +}
39 +const Mathcha = ({ visible, onCancel, callback }) => {
40 + const [fields,setFields] =useState([]);
41 + const [qno, setQno] = useState(null);
42 + const [upload,setUpload]=useState(false);
43 + const [fileList, setFileList]=useState([]);
44 + const [qnoCheck,setQnoCheck] = useState(false);
45 +
46 + const changeNumber = (value) => {
47 + setQno(value);
48 + setFields([...fields, {name:['qno'],value:value}]);
49 + };
50 +
51 + useEffect(()=>{
52 + if(!visible){
53 + let initFields = [
54 + {name:['qno'],value:null},
55 + {name:['typeSol'],value:null},
56 + {name:['typeQue'],value:null},
57 + {name:['creator'],value:null},
58 + ];
59 + setQno(null);
60 + setFields(initFields);
61 + setFileList([]);
62 + }
63 + },[visible]);
64 +
65 + const props = {
66 + multiple:false,
67 + //data: { qno: qno },
68 + accept:'.mathcha',
69 + onRemove: file => {
70 + const index = fileList.indexOf(file);
71 + const newFileList = fileList.slice();
72 + newFileList.splice(index, 1);
73 + return {
74 + fileList: newFileList,
75 + };
76 + },
77 +
78 + beforeUpload: file => {
79 + console.log(file);
80 + if(file.name.indexOf('.mathcha')>0)
81 + {
82 + setFileList([file]);
83 + }else {
84 + setFileList([]);
85 + message.info("MathCha 형식의 파일이 아닙니다.");
86 + }
87 + return false;
88 +
89 + },
90 + };
91 +
92 + const onOk = () => {
93 + setUpload(true)
94 + };
95 +
96 +
97 + const normFile = e => {
98 + console.log('Upload event:', e);
99 + if (Array.isArray(e)) {
100 + return e;
101 + }
102 + return e && e.fileList;
103 + };
104 +
105 + const onClickQno = async(e)=>{
106 + e.preventDefault();
107 + //번호가 호출 성공시 setQnoCheck(true);
108 + if(qno){
109 + const _checkQno= await fetchCheckQno(qno);
110 + setQnoCheck(_checkQno);
111 + }
112 + };
113 +
114 + const onFinish = async values => {
115 + console.log(qnoCheck);
116 + if(!qnoCheck){
117 + message.warning("문제 번호를 확인해 주세요.")
118 + return;
119 + }else{
120 + const creator = sessionStorage.getItem('id');
121 + console.log('Received values of form: ', values);
122 + const formData = new FormData();
123 + formData.append('qno', values.qno);
124 + formData.append('typeSol', values.typeSol);
125 + formData.append('typeQue', values.typeQue);
126 + formData.append('math', values.math[0]);
127 + formData.append('creator', creator);
128 +
129 + const result = await fetchSaveData(formData);
130 + console.log(result);
131 + if(result){
132 + message.info(result.message);
133 + let initFields = [
134 + {name:['qno'],value:null},
135 + {name:['typeSol'],value:null},
136 + {name:['typeQue'],value:null},
137 + {name:['creator'],value:null},
138 + ];
139 + setQno(null);
140 + setFields(initFields);
141 + setFileList([]);
142 + onCancel();
143 + callback({status:'SAVE_OK'});
144 + }else{
145 + callback({status:'SAVE_FAIL'})
146 + }
147 + }
148 + };
149 +
150 + const onChangeTypeSol = (value) => {
151 + console.log(value);
152 + setFields([...fields, {name:['typeSol'],value:value}]);
153 + }
154 +
155 + const onChangeTypeQue = (value) => {
156 + console.log(value);
157 + setFields([...fields, {name:['typeQue'],value:value}])
158 + }
159 +
160 +
161 +
162 + const formItemLayout = {
163 + labelCol: { span: 6 },
164 + wrapperCol: { span: 14 },
165 + };
166 +
167 + return (
168 + <Modal
169 + placement={'bottom'}
170 + closable={true}
171 + height={'75%'}
172 + visible={visible}
173 + okText={'저장'}
174 + cancelText={'이전'}
175 + onCancel={onCancel}
176 + footer={null}
177 + >
178 + <Form name="validate_other"
179 + {...formItemLayout}
180 + onFinish={onFinish}
181 + fields={[{name:['math'],value:fileList},...fields]}
182 + >
183 + <Form.Item
184 + name="qno"
185 + label="문제 번호"
186 + rules={[
187 + {
188 + required: true,
189 + message: '저장할 html의 파일의 문항번호를 입력해 주세요.',
190 + },
191 + ]}><Row>
192 + <Col>
193 + <InputNumber
194 + min={0}
195 + max={10000}
196 + value={qno}
197 + onChange={changeNumber}>
198 + </InputNumber>
199 + </Col>
200 + <Col>
201 + <Button onClick={onClickQno}>번호 확인</Button>
202 + </Col>
203 + </Row>
204 + </Form.Item>
205 + <Form.Item
206 + name="typeSol"
207 + label="문제 타입"
208 + rules={[
209 + {
210 + required: true,
211 + message: '저장할 html의 문제 타입을 선택해 주세요.',
212 + },
213 + ]}>
214 + <Select onChange={onChangeTypeSol}>
215 + <Option value="오지선다형">오지선다형</Option>
216 + <Option value="단답형">단답형</Option>
217 + <Option value="계산식">계산식</Option>
218 + </Select>
219 + </Form.Item>
220 + <Form.Item
221 + name="typeQue"
222 + label="문제/풀이 구분"
223 + rules={[
224 + {
225 + required: true,
226 + message: '저장할 html의 문제/풀이 구분을 선택해 주세요.',
227 + },
228 + ]}>
229 + <Select onChange={onChangeTypeQue}>
230 + <Option value="문제">문제</Option>
231 + <Option value="풀이">풀이</Option>
232 + </Select>
233 + </Form.Item>
234 + <Form.Item label="파일 업로드">
235 + <Form.Item
236 + name="math"
237 + valuePropName="fileList"
238 + getValueFromEvent={normFile}
239 +
240 + noStyle
241 + rules={[
242 + {
243 + required: true,
244 + message: '파일을 드래그하거나 선택해 주세요.',
245 + },
246 + ]}>
247 + <Upload.Dragger name="files" {...props} >
248 + <p className="ant-upload-drag-icon">
249 + <InboxOutlined />
250 + </p>
251 + <p className="ant-upload-text">Click or drag file to this area to upload</p>
252 + <p className="ant-upload-hint">Support for a single or bulk upload.</p>
253 + </Upload.Dragger>
254 + </Form.Item>
255 + </Form.Item>
256 +
257 + <Form.Item wrapperCol={{ span: 12, offset: 6 }}>
258 + <Button type="primary" htmlType="submit">
259 + 저장
260 + </Button>
261 + </Form.Item>
262 + </Form>
263 +
264 + </Modal>
265 + );
266 +};
267 +
268 +
269 +export default Mathcha;
1 +.trigger {
2 + font-size: 18px;
3 + line-height: 64px;
4 + padding: 0 24px;
5 + cursor: pointer;
6 + transition: color 0.3s;
7 +}
8 +
9 +.trigger:hover {
10 + color: #1890ff;
11 +}
12 +
13 +.logo {
14 + height: 32px;
15 + background: rgba(255, 255, 255, 0.2);
16 + margin: 16px;
17 +}
18 +
19 +.site-layout .site-layout-background {
20 + background: #fff;
21 +}
22 +
23 +
24 +div.demo-editor.rdw-editor-main {
25 + border: 1px solid #f1f1f1;
26 + height: 65vh;
27 +}
...\ No newline at end of file ...\ No newline at end of file
1 +import React, { useState, useEffect, useCallback } from 'react';
2 +import { Drawer, message } from 'antd';
3 +import { UploadOutlined, RetweetOutlined } from '@ant-design/icons';
4 +import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css';
5 +import { getTexToSvg, checkQno, saveFileAndQno } from '../lib/api/tikz'; // Request api
6 +import TikzForm from '../component/tikzForm';
7 +
8 +
9 +
10 +const fetchTexToSvg = async (data) => {
11 + // getTexToSvg api를 이용하기 위한 const
12 + try {
13 + const result = await getTexToSvg({ tex: data });
14 + if (result.status === 200) {
15 + console.log(result.status);
16 + console.log(result.data);
17 + return result.data;
18 + }
19 + } catch (e) {
20 + console.log(e);
21 + //Notification. 추가해서 변환상태 알려주기
22 + return null;
23 + }
24 +};
25 +
26 +
27 +const fetchSaveData = async (data) => {
28 + try{
29 + const result = await saveFileAndQno(data);
30 + console.log(result);
31 + if(result.status===200){
32 + return result.data;
33 + }
34 + }catch(e){
35 + console.log(e);
36 + message.warning(e.message);
37 + }
38 + }
39 +
40 +/* 문항번호 체크 */
41 +const fetchCheckQno = async(qno) => {
42 + try{
43 + const result = await checkQno(qno);
44 + if(result.status===200){
45 + console.log(result);
46 + message.info("사용 가능한 문항 번호 입니다.");
47 + return true;
48 + }else{
49 + message.info("존재 하지 않는 문항 번호 입니다.");
50 + return false;
51 + }
52 + }catch(e){
53 + console.log(e);
54 + message.info("존재 하지 않는 문항 번호 입니다.");
55 + return false;
56 + }
57 + }
58 +
59 +
60 + const _tikzcode= "% 예시 (x축, y축, 반지름이 1cm인 원의 그림) %\n\
61 +% 오른쪽의 변환 버튼을 눌러보세요! %\n\n\
62 + \\documentclass{article}\n\
63 + \\usepackage{tikz}\n\
64 + \\begin{document}\n\n\n\
65 + \\begin{tikzpicture}\n\
66 + \\draw (-1.5,0) -- (1.5,0);\n\
67 + \\draw (0,-1.5) -- (0,1.5);\n\
68 + \\draw (0,0) circle (1cm);\n\
69 + \\end{tikzpicture}\n\n\n\
70 + \\end{document}";
71 +
72 +
73 + const Tikz = ({ onLeave, visible, callback, selectItem, mode }) => {
74 + const [fields,setFields] =useState([]);
75 + const [qno, setQno] = useState(null);
76 + const [number, setNumber] = useState(null); //문항번호를 저장하는 state
77 + const [inputText, setinputText] = useState(_tikzcode); //tikz code를 저장하는 state
78 + const [svg, setSvg] = useState(null); //변환된 svg 데이터를 저장하는 state
79 + const [qnoCheck,setQnoCheck] = useState(false);
80 + const [tikzcode,setTikzCode] = useState(_tikzcode);
81 + //svg
82 + //onclickevent : Tikz 변환하기 Button의 onClick Event
83 + //onChangeTikz : TextArea 컴포넌트의 onChange event
84 + //onFinish : Form data를 제출하기 위한 event
85 +
86 + useEffect(()=> {
87 + if(mode==='preview'&&selectItem){
88 + console.log(selectItem);
89 +
90 + let initFields = [
91 + {name:['qno'],value:selectItem.qno},
92 + {name:['typeSol'],value:selectItem.typeSol},
93 + {name:['typeQue'],value:selectItem.typeQue},
94 + {name:['creator'],value:selectItem.creator},
95 +
96 + ];
97 + setQno(selectItem.qno);
98 + setTikzCode(selectItem.tex);
99 + setFields(initFields);
100 + setSvg(null);
101 + }
102 + },[mode, selectItem]);
103 +
104 + useEffect(()=>{
105 + if(mode === 'new'){
106 + let initFields = [
107 + {name:['qno'],value:null},
108 + {name:['typeSol'],value:null},
109 + {name:['typeQue'],value:null},
110 + {name:['creator'],value:null},
111 + ];
112 + setQno(null);
113 + setTikzCode(_tikzcode);
114 + setFields(initFields);
115 + setSvg(null);
116 + }
117 + },[mode]);
118 +
119 + const onClickEvent = (e) => {
120 + if(inputText){
121 + callbackSVG(inputText);
122 + }
123 +
124 + if (inputText === null) {
125 + console.log(inputText);
126 + alert(
127 + //data에 null이 입력된 경우
128 + 'Code 값을 입력해주세요!'
129 + );
130 + } else {
131 + console.log(inputText);
132 + callbackSVG(inputText);
133 + }
134 + };
135 + const onChangeQno = (value) => {
136 + console.log(value);
137 + setQno(value);
138 + setFields([...fields, {name:['qno'],value:value}]);
139 + };
140 +/*
141 + useEffect(()=>{
142 + if(!visible ){
143 + let initFields = [
144 + {name:['qno'],value:null},
145 + {name:['typeSol'],value:null},
146 + {name:['typeQue'],value:null},
147 + {name:['creator'],value:null},
148 + ];
149 + setQno(null);
150 + setTikzCode(tikzcode);
151 + setFields(initFields);
152 + }
153 + },[visible,mode]);
154 +*/
155 + const callbackSVG = useCallback(async () => {
156 + const result = await fetchTexToSvg(inputText);
157 + setSvg(result); //api로 받아온 result를 svg state에 저장
158 + }, [inputText]);
159 +
160 + const onChangeTikz = (e) => {
161 + if (e) {
162 + setinputText(e.target.value);
163 + } else setinputText(null);
164 + };
165 +
166 + const onSaveEvent = () => {
167 + try {
168 + //서버에 저장이 확인 됐을때 200, 500(오류) http status
169 + const result = alert('전송이 성공적으로 완료됐습니다.');
170 + } catch (e) {
171 + //서버에 저장 오류가 났을때
172 + console.log(e);
173 + alert(e);
174 + }
175 + };
176 + const onClickQno = async(e)=>{
177 + e.preventDefault();
178 + //번호가 호출 성공시 setQnoCheck(true);
179 + if(qno){
180 + const _checkQno= await fetchCheckQno(qno);
181 + setQnoCheck(_checkQno);
182 + }
183 + };
184 +
185 +
186 + const onFinish = async(values) => {
187 + console.log(values);
188 + console.log(qnoCheck);
189 + if(!qnoCheck){
190 + message.warning("문제 번호를 확인해 주세요.")
191 + return;
192 + }else{
193 + const creator = sessionStorage.getItem('id');
194 + console.log('Received values of form: ', values);
195 + const result = await fetchSaveData({...values, creator});
196 + console.log(result);
197 + if(result){
198 + message.info(result.message);
199 + let initFields = [
200 + {name:['qno'],value:null},
201 + {name:['typeSol'],value:null},
202 + {name:['typeQue'],value:null},
203 + {name:['creator'],value:null},
204 + ];
205 + setFields(initFields);
206 + onLeave();
207 + callback({status:'SAVE_OK'});
208 + setQno(null);
209 + }else{
210 + callback({status:'SAVE_FAIL'})
211 + }
212 + }
213 + };
214 +
215 +
216 + const onChangeTypeSol = (value) => {
217 + console.log(value);
218 + setFields([...fields, {name:['typeSol'],value:value}]);
219 + }
220 +
221 + const onChangeTypeQue = (value) => {
222 + console.log(value);
223 + setFields([...fields, {name:['typeQue'],value:value}])
224 + }
225 +
226 + return (
227 + <Drawer
228 + title={'Tikz Editor'}
229 + placement={'bottom'}
230 + closable={true}
231 + height={'90vh'}
232 + onClose={onLeave}
233 + visible={visible}>
234 + <TikzForm
235 + svg={svg}
236 + onClickEvent={onClickEvent}
237 + onChangeTikz={onChangeTikz}
238 + onSaveEvent={onSaveEvent}
239 + onFinish={onFinish}
240 + tikzcode={tikzcode}
241 + fields={fields}
242 + onClickQno={onClickQno}
243 + onChangeQno={onChangeQno}
244 + onChangeTypeSol={onChangeTypeSol}
245 + onChangeTypeQue={onChangeTypeQue}
246 + qno={qno}>
247 + </TikzForm>
248 + </Drawer>
249 + );
250 +};
251 +
252 +export default Tikz;
253 +
254 +//<Transform value={tikzHtml}></Transform>
1 +export { default as Home } from './Home';
2 +export { default as Html } from './Html';
3 +export { default as Mathcha } from './Mathcha';
4 +export { default as Tikz } from './Tikz';
5 +export { default as Login} from './Login';
1 +import React from 'react';
2 +import { Menu, Dropdown, Button } from 'antd';
3 +//import Scroll from '../component/Slider';
4 +// 화살표 함수에서 {} 가 들어가는 경우에는 처리해야 되는 루틴이 있을때 return 값만 있을때는 () or 생략도 가능하다.
5 +//
6 +
7 +//기본적인 도형들을 그리는 도형상수
8 +const draw = () => (
9 + <Menu>
10 + <Menu.Item>
11 + <button onclick="">Triangle</button>
12 + </Menu.Item>
13 + <Menu.Item>
14 + <a
15 + target="_blank"
16 + rel="noopener noreferrer"
17 + href="http://www.taobao.com/">
18 + Rectangle
19 + </a>
20 + </Menu.Item>
21 + <Menu.Item>
22 + <a target="_blank" rel="noopener noreferrer" href="http://www.tmall.com/">
23 + pentagon
24 + </a>
25 + </Menu.Item>
26 + <Menu.Item danger>도형 디자인</Menu.Item>
27 + </Menu>
28 +);
29 +
30 +//기본적인 그래프를 그리는 그래프 상수
31 +const graph = () => (
32 + <Menu>
33 + <Menu.Item>
34 + <a
35 + target="_blank"
36 + rel="noopener noreferrer"
37 + href="http://www.alipay.com/">
38 + 2차함수
39 + </a>
40 + </Menu.Item>
41 + <Menu.Item>
42 + <a
43 + target="_blank"
44 + rel="noopener noreferrer"
45 + href="http://www.taobao.com/">
46 + 3차함수
47 + </a>
48 + </Menu.Item>
49 +
50 + <Menu.Item danger>함수 디자인</Menu.Item>
51 + </Menu>
52 +);
53 +
54 +// x축 y축을 그리게 만드는 상수
55 +const grid = () => (
56 + <Menu>
57 + <Menu.Item>
58 + <a
59 + target="_blank"
60 + rel="noopener noreferrer"
61 + href="http://www.alipay.com/">
62 + 2차원
63 + </a>
64 + </Menu.Item>
65 + <Menu.Item>
66 + <a
67 + target="_blank"
68 + rel="noopener noreferrer"
69 + href="http://www.taobao.com/">
70 + 3차원
71 + </a>
72 + </Menu.Item>
73 + <Menu.Item>
74 + <a target="_blank" rel="noopener noreferrer" href="http://www.tmall.com/">
75 + 3rd menu item
76 + </a>
77 + </Menu.Item>
78 + <Menu.Item danger>좌표축 디자인</Menu.Item>
79 + </Menu>
80 +);
81 +
82 +// 수학 공식들을 선택하는 상수
83 +const MathFunction = () => (
84 + <Menu>
85 + <Menu.Item>
86 + <a
87 + target="_blank"
88 + rel="noopener noreferrer"
89 + href="http://www.alipay.com/"></a>
90 + </Menu.Item>
91 + <Menu.Item>
92 + <a
93 + target="_blank"
94 + rel="noopener noreferrer"
95 + href="http://www.taobao.com/">
96 + 2nd menu item
97 + </a>
98 + </Menu.Item>
99 + <Menu.Item>
100 + <a target="_blank" rel="noopener noreferrer" href="http://www.tmall.com/">
101 + 3rd menu item
102 + </a>
103 + </Menu.Item>
104 + <Menu.Item danger>a danger item</Menu.Item>
105 + </Menu>
106 +);
107 +
108 +//위의 상수 값들을 집어넣어 Dropdowm 메뉴 바들을 구성해준다.
109 +const DropMenu = () => (
110 + //위의 상수 값들을 집어넣어 Dropdowm 메뉴 바들을 구성해준다. const DropMenu
111 +
112 + <div style={{ display: 'inline-block' }}>
113 + <Dropdown overlay={draw} placement="bottomLeft" arrow>
114 + <Button>Draw</Button>
115 + </Dropdown>
116 + <Button>Graph</Button>
117 +
118 + <Dropdown overlay={grid} placement="bottomRight" arrow>
119 + <Button>Grid</Button>
120 + </Dropdown>
121 + <Dropdown overlay={MathFunction} arrow>
122 + <Button>Function</Button>
123 + </Dropdown>
124 + </div>
125 +);
126 +export default DropMenu;
127 +
128 +//<Scroll> </Scroll>
...\ No newline at end of file ...\ No newline at end of file
1 +import React from 'react';
2 +import { Form, Input, Button, Checkbox, Row, Col } from 'antd';
3 +import { UserOutlined, LockOutlined } from '@ant-design/icons';
4 +import {HeartOutlined} from '@ant-design/icons';
5 +
6 +const LoginForm = ({onFinish},) => {
7 +
8 + return (
9 + <Form name="normal_login" className="login-form" initialValues={{remember: true, }} onFinish={onFinish}>
10 + <Row justify="center" style={{marginTop:'80px'}}>
11 + <HeartOutlined />
12 + </Row>
13 +
14 + <Row justify="center" style={{marginTop:'20px'}}>
15 + <Col>
16 + <Form.Item name="userid" rules={[{required: true, message: 'id를 입력해주세요.', },]}>
17 + <Input prefix={<UserOutlined className="site-form-item-icon" />} placeholder="User id" />
18 + </Form.Item>
19 + </Col>
20 + </Row>
21 +
22 + <Row justify="center" style={{marginTop:'10px'}}>
23 + <Col>
24 + <Form.Item name="userpwd" rules={[{required: true, message: '비밀번호를 입력해주세요.'},]}>
25 + <Input prefix={<LockOutlined className="site-form-item-icon" />} type="password" placeholder="Password"/>
26 + </Form.Item>
27 + </Col>
28 + </Row>
29 +
30 + <Row justify="center" style={{marginTop:'10px'}}>
31 + <Col>
32 + <Form.Item name="remember" valuePropName="checked" noStyle>
33 + <Checkbox>Remember me</Checkbox>
34 + </Form.Item>
35 + </Col>
36 + </Row>
37 +
38 + <Row justify="center" style={{marginTop:'10px'}}>
39 + <Col>
40 + <Form.Item>
41 + <Button type="primary" htmlType="submit" className="login-form-button">
42 + 로그인하기
43 + </Button>
44 + </Form.Item>
45 + </Col>
46 + </Row>
47 +
48 + </Form>
49 + );
50 +}
51 +
52 +export default LoginForm;
...\ No newline at end of file ...\ No newline at end of file
1 +import React, { useState } from 'react';
2 +import tikz from '../lib/api/tikz';
3 +
4 +function Transform({ value }) {
5 + const [transData,settransData]=useState(value);
6 + return (
7 + <tikz value={value}/>
8 + );
9 +}
10 +//side effect를 사용하기 위해서 useState 함수들을 선언하고 useEffect를 선언해서
11 +// Clean Up을 한다.
12 +export default Transform;
13 +
14 +
15 +//iframe 부분
16 + /* <iframe
17 + id="iframe"
18 + scrolling="yes"
19 + srcDoc={value}
20 + style={{
21 + width: '100%',
22 + height: '100%',
23 + border: 'none'
24 + }}>
25 +
26 + </iframe>
27 + */
28 +
29 +//useEffect 부분
30 + {/*}
31 + useEffect(() => {
32 + if (value) {
33 + setData(value);
34 + console.log({value});
35 + }
36 + return () => {
37 + setData(null);
38 + };
39 + }, [value]);
40 +{*/}
41 +
42 +
43 +//iframe 부분
44 +{/*}
45 + return (
46 + <iframe
47 + id="iframe"
48 + scrolling="no"
49 + srcDoc={data}
50 + style={{
51 + width: '100%',
52 + height: '100%',
53 + border: 'none',
54 + pointerEvents: 'none',
55 + }}
56 + />
57 + );
58 +}
59 +{*/}
60 +//side effect를 사용하기 위해서 useState 함수들을 선언하고 useEffect를 선언해서
61 +// Clean Up을 한다.
1 +import React, { Children, Component } from 'react';
2 +import { createPortal } from 'react-dom';
3 +
4 +export class IFrame extends Component {
5 + constructor(props) {
6 + super(props);
7 + this.setContentRef = (node) => {
8 + this.contentRef = node?.contentWindow?.document.body;
9 + };
10 + }
11 +
12 + bindIFrameMousemove(iframe) {
13 + iframe.contentWindow.addEventListener('mousemove', function (event) {
14 + var clRect = iframe.getBoundingClientRect();
15 + var evt = new CustomEvent('mousemove', { bubbles: true, cancelable: false });
16 + evt.clientX = event.clientX;
17 + evt.clientY = event.clientY;
18 + iframe.dispatchEvent(evt);
19 + });
20 +
21 + // iframe 안을 클릭했을 때, 해당 popup 창을 Click 한 것과 같은 효과를 준다.
22 + iframe.contentWindow.addEventListener('click', function (event) {
23 + var evt = new CustomEvent('click', { bubbles: true, cancelable: false });
24 + iframe.dispatchEvent(evt);
25 + });
26 +
27 + // dragging 하다가 mouse button을 up 하는 이벤트를 iframe 밖으로 전달.
28 + iframe.contentWindow.addEventListener('mouseup', function (event) {
29 + var clRect = iframe.getBoundingClientRect();
30 + var evt = new CustomEvent('mouseup', { bubbles: true, cancelable: false });
31 + evt.clientX = event.clientX;
32 + evt.clientY = event.clientY;
33 + iframe.dispatchEvent(evt);
34 + });
35 + }
36 +
37 + componentDidMount() {
38 + this.bindIFrameMousemove(document.getElementById('iFrame'));
39 + }
40 +
41 + render() {
42 + const { children, ...props } = this.props;
43 + return (
44 + <iframe id="iFrame" {...props} ref={this.setContentRef}>
45 + {this.contentRef && createPortal(Children.only(children), this.contentRef)}
46 + </iframe>
47 + );
48 + }
49 +}
1 +.transfer_tiks {
2 + position: relative;
3 + display: inline-block;
4 + border-bottom: 1px dotted black;
5 + }
6 +
7 + .transfer_tiks .transfer_tiks_text {
8 + visibility: hidden;
9 + width: 120px;
10 + background-color: black;
11 + color: #fff;
12 + text-align: center;
13 + border-radius: 6px;
14 + padding: 5px 0;
15 + position: absolute;
16 + z-index: 1;
17 + top: 150%;
18 + left: 50%;
19 + margin-left: -60px;
20 + }
21 +
22 + .transfer_tiks .transfer_tiks_text::after {
23 + content: "";
24 + position: absolute;
25 + bottom: 100%;
26 + left: 50%;
27 + margin-left: -5px;
28 + border-width: 5px;
29 + border-style: solid;
30 + border-color: transparent transparent black transparent;
31 + }
32 +
33 + .transfer_tiks:hover .transfer_tiks_text {
34 + visibility: visible;
35 + }
...\ No newline at end of file ...\ No newline at end of file
1 +import React,{Flagment} from 'react';
2 +import { Drawer, Input, Button, Menu, Form, Col, Row, AutoComplete, Tooltip, Select } from 'antd';
3 +import { UploadOutlined, RetweetOutlined } from '@ant-design/icons';
4 +import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css';
5 +import { PanZoom } from 'react-easy-panzoom';
6 +import { InputNumber } from 'antd';
7 +import { IFrame } from './iframe';
8 +import './tikzForm.css';
9 +const { TextArea } = Input;
10 +const {Option} = Select;
11 +
12 +const TikzForm = ({ svg, onClickEvent, onChangeTikz, onFinish, onChangeQno, onClickQno, tikzcode, fields, qno, onChangeTypeSol,onChangeTypeQue}) => {
13 + //svg
14 + //onclickevent : Tikz 변환하기 Button의 onClick Event
15 + //onChangeTikz : TextArea 컴포넌트의 onChange event
16 + //onFinish : Form data를 제출하기 위한 event
17 + //onSaveEvent : Tikz 등록하기의 버튼 event
18 +
19 +console.log(fields);
20 +
21 + return (
22 +
23 + <Form onFinish={onFinish} fields={[...fields]}>
24 +
25 +<Form.Item
26 + name="qno"
27 + label="문제 번호"
28 + rules={[
29 + {
30 + required: true,
31 + message: '문항번호를 입력해 주세요.',
32 + },
33 + ]}><Row>
34 + <Col>
35 + <InputNumber
36 + min={0}
37 + max={10000}
38 + value={qno}
39 + onChange={onChangeQno}>
40 + </InputNumber>
41 + </Col>
42 + <Col>
43 + <Button onClick={onClickQno}>번호 확인</Button>
44 + </Col>
45 + </Row>
46 + </Form.Item>
47 +
48 + <Form.Item
49 + name="typeSol"
50 + label="문제 타입"
51 + wrapperCol={{span: 2 }}
52 + rules={[
53 + {
54 + required: true,
55 + message: '문제 타입을 선택해 주세요.',
56 + },
57 + ]}>
58 + <Select onChange={onChangeTypeSol}>
59 + <Option value="오지선다형">오지선다형</Option>
60 + <Option value="단답형">단답형</Option>
61 + <Option value="계산식">계산식</Option>
62 + </Select>
63 + </Form.Item>
64 +
65 + <Form.Item
66 + name="typeQue"
67 + label="문제/풀이 구분"
68 + rules={[
69 + {
70 + required: true,
71 + message: '문제/풀이 구분을 선택해 주세요.',
72 + },
73 + ]}
74 + wrapperCol={{span: 2 }}
75 + >
76 + <Select onChange={onChangeTypeQue}>
77 + <Option value="문제">문제</Option>
78 + <Option value="풀이">풀이</Option>
79 + </Select>
80 + </Form.Item>
81 +
82 +
83 +
84 + <Row justify="space-between" align="middle">
85 + <Col span={11}>
86 + <Form.Item name="tikzCode" rules={[{ required: true, message: 'tikz 코드를 입력해 주세요.' }]} initialValue={tikzcode}>
87 + <TextArea
88 + style={{ width: '44vw', height: '70vh' }}
89 + onChange={onChangeTikz}
90 + />
91 + </Form.Item>
92 + </Col>
93 +
94 + <Col span={2} style={{textAlign:'center'}} >
95 + <Tooltip title={'tikz 미리보기'}>
96 + <Button type="ghost" icon={<RetweetOutlined />} onClick={onClickEvent}></Button>
97 + </Tooltip>
98 + </Col>
99 +
100 + <Col span={11} >
101 + <IFrame
102 + style={{
103 + width: '44vw',
104 + height: '70vh',
105 + marginTop: '-15px',
106 + border: '1px solid #d9d9d9',
107 + }}>
108 + <PanZoom
109 + style={{
110 + display: 'block',
111 + outline: 'none',
112 + width: '44vw',
113 + height: '70vh',
114 + margin: '0px',
115 + }}>
116 + <div dangerouslySetInnerHTML={{ __html: svg }} />
117 + </PanZoom>
118 + </IFrame>
119 + </Col>
120 + </Row>
121 + <Form.Item>
122 + <Button type="primary" htmlType="submit">
123 + 저장하기
124 + </Button>
125 + </Form.Item>
126 + </Form>
127 + );
128 +};
129 +
130 +export default TikzForm;
1 +import { Upload, Button, message } from 'antd';
2 +import { UploadOutlined } from '@ant-design/icons';
3 +import reqwest from 'reqwest';
4 +
5 +class Demo extends React.Component {
6 + state = {
7 + fileList: [],
8 + uploading: false,
9 + };
10 +
11 + handleUpload = () => {
12 + const { fileList } = this.state;
13 + const formData = new FormData();
14 + fileList.forEach((file) => {
15 + formData.append('files[]', file);
16 + });
17 +
18 + this.setState({
19 + uploading: true,
20 + });
21 +
22 + // You can use any AJAX library you like
23 + reqwest({
24 + url: 'https://localhost:5000/user',
25 + method: 'post',
26 + processData: false,
27 + data: formData,
28 + success: () => {
29 + this.setState({
30 + fileList: [],
31 + uploading: false,
32 + });
33 + message.success('upload successfully.');
34 + },
35 + error: () => {
36 + this.setState({
37 + uploading: false,
38 + });
39 + message.error('upload failed.');
40 + },
41 + });
42 + };
43 +
44 + render() {
45 + const { uploading, fileList } = this.state;
46 + const props = {
47 + onRemove: (file) => {
48 + this.setState((state) => {
49 + const index = state.fileList.indexOf(file);
50 + const newFileList = state.fileList.slice();
51 + newFileList.splice(index, 1);
52 + return {
53 + fileList: newFileList,
54 + };
55 + });
56 + },
57 + beforeUpload: (file) => {
58 + this.setState((state) => ({
59 + fileList: [...state.fileList, file],
60 + }));
61 + return false;
62 + },
63 + fileList,
64 + };
65 +
66 + return (
67 + <>
68 + <Upload {...props}>
69 + <Button>
70 + <UploadOutlined /> Select File
71 + </Button>
72 + </Upload>
73 + <Button
74 + type="primary"
75 + onClick={this.handleUpload}
76 + disabled={fileList.length === 0}
77 + loading={uploading}
78 + style={{ marginTop: 16 }}>
79 + {uploading ? 'Uploading' : 'Start Upload'}
80 + </Button>
81 + </>
82 + );
83 + }
84 +}
1 +body {
2 + margin: 0;
3 + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4 + 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5 + sans-serif;
6 + -webkit-font-smoothing: antialiased;
7 + -moz-osx-font-smoothing: grayscale;
8 +}
9 +
10 +code {
11 + font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12 + monospace;
13 +}
1 +import React from 'react';
2 +import ReactDOM from 'react-dom';
3 +import './index.css';
4 +import App from './App';
5 +import * as serviceWorker from './serviceWorker';
6 +import { createBrowserHistory } from 'history';
7 +import { BrowserRouter,Router } from 'react-router-dom';
8 +
9 +const history = createBrowserHistory();
10 +//<BrowserRouter history={history}></BrowserRouter>
11 +ReactDOM.render(
12 + <BrowserRouter history={history}>
13 + <App />
14 + </BrowserRouter>
15 + ,
16 + document.getElementById('root')
17 +);
18 +
19 +// If you want your app to work offline and load faster, you can change
20 +// unregister() to register() below. Note this comes with some pitfalls.
21 +// Learn more about service workers: https://bit.ly/CRA-PWA
22 +serviceWorker.unregister();
1 +import axios from 'axios';
2 +import qs from 'qs';
3 +export const checkFiles = (data, whatUpload) => {
4 + const options = {
5 + method: 'POST',
6 + headers: { 'content-type': 'application/x-www-form-urlencoded' },
7 + data: qs.stringify(data),
8 + url: 'http://localhost:5000/{whatUpload}',
9 + };
10 + return axios(options);
11 +};
12 +
13 +//export const tikz = (id) => tikz.post(`/users?id=${id != null ? id : ''}`);
14 +//export const testAdd = (name, tel) => client.post('/users/add', { name, tel });
1 +import axios from 'axios';
2 +
3 +const client = axios.create();
4 +
5 +client.defaults.baseURL = '';
6 +client.defaults.withCredentials = true;
7 +
8 +export default client;
1 +import client from './client';
2 +
3 +export const feedbackFind = () => client.get('/commenter');
4 +export const feedbackAdd = (nickname, comment) =>
5 + client.post('/commenter/add', { nickname, comment });
1 +import axios from 'axios';
2 +const hostMath = "http://ai.natmal.com:7070";
3 +
4 +export const checkQno = (qno) => axios.get(`${hostMath}/checkQno?qno=${qno}`);
5 +
6 +export const saveFileAndQno = (formData) =>
7 +{
8 + return axios({
9 + method: 'post',
10 + url: '/upload/html',
11 + data: formData,
12 + headers: {
13 + 'Content-Type': 'multipart/form-data',
14 + },
15 + });
16 +}
17 +
18 +export const getData = (user, pageSize, currentPage,orderWhat,orderKind) => axios.post('/tikzs',{user, pageSize, currentPage,orderWhat,orderKind});
19 +
1 +import axios from 'axios';
2 +import qs from 'qs';
3 +export const getLoginInfo = (data) =>
4 +{
5 + const options = {
6 + method: 'POST',
7 + headers: { 'content-type': 'application/x-www-form-urlencoded' },
8 + data: qs.stringify(data),
9 + url:'http://ai.natmal.com:7070/checkUser',
10 + };
11 + return axios(options);
12 +
13 +
14 +}
15 +
16 +
17 +//export const tikz = (id) => tikz.post(`/users?id=${id != null ? id : ''}`);
18 +//export const testAdd = (name, tel) => client.post('/users/add', { name, tel });
1 +import axios from 'axios';
2 +import qs from 'qs';
3 +export const matchInfo = (data) =>
4 +{
5 + const options = {
6 + method: 'GET',
7 + headers: { 'content-type': 'application/x-www-form-urlencoded' },
8 + data: qs.stringify(data),
9 + url:'http://localhost:5000/users',
10 + };
11 + return axios(options);
12 +
13 +
14 +}
15 +
16 +
17 +//export const tikz = (id) => tikz.post(`/users?id=${id != null ? id : ''}`);
18 +//export const testAdd = (name, tel) => client.post('/users/add', { name, tel });
1 +import axios from 'axios';
2 +const hostMath = 'http://ai.natmal.com:7070';
3 +
4 +export const checkQno = (qno) => axios.get(`${hostMath}/checkQno?qno=${qno}`);
5 +export const saveFileAndQno = (formData) =>
6 +{
7 + console.log(formData);
8 + return axios({
9 + method: 'post',
10 + url: '/upload/math',
11 + data: formData,
12 + headers: {
13 + 'Content-Type': 'multipart/form-data',
14 + },
15 + });
16 +}
17 +
18 +//export const getMathData = (user, pageSize, currentPage,orderWhat) => axios.post('/tikzs',{user, pageSize, currentPage,ordeWhat});
19 +
20 +
1 +import client from './client';
2 +
3 +export const testFind = (id) => client.get(`/users?id=${id != null ? id : ''}`);
4 +export const testAdd = (name, tel) => client.post('/users/add', { name, tel });
5 +export const testEdit = (id, name, tel) =>
6 + client.post('/users/edit', { id, name, tel });
7 +export const testDelete = (id) => client.get('/users/delete?id=' + id);
1 +import axios from 'axios';
2 +import qs from 'qs';
3 +export const getTexToSvg = (data) =>
4 +{
5 + const options = {
6 + method: 'POST',
7 + headers: { 'content-type': 'application/x-www-form-urlencoded' },
8 + data: qs.stringify(data),
9 + url:'http://ai.natmal.com:9292',
10 + };
11 + return axios(options);
12 +
13 +}
14 +
15 +const hostMath = "http://ai.natmal.com:7070";
16 +
17 +export const checkQno = (qno) => axios.get(`${hostMath}/checkQno?qno=${qno}`);
18 +
19 +export const saveFileAndQno = (data) => axios.post('/upload/tikz',{...data});
20 +
21 +export const removeItem = (id) => axios.get(`/tikzs/removeItem?id=${id}`);
22 +
23 +export const removeItems = (ids) => axios.post("/tikzs/removeItems",{ids});
24 +
25 +
26 +//export const getData = (user, pageSize, currentPage,orderWhat) => axios.post('/tikzs',{user, pageSize, currentPage,ordeWhat});
27 +
28 +
29 +
30 +
31 +//export const tikz = (id) => tikz.post(`/users?id=${id != null ? id : ''}`);
32 +//export const testAdd = (name, tel) => client.post('/users/add', { name, tel });
1 +// This optional code is used to register a service worker.
2 +// register() is not called by default.
3 +
4 +// This lets the app load faster on subsequent visits in production, and gives
5 +// it offline capabilities. However, it also means that developers (and users)
6 +// will only see deployed updates on subsequent visits to a page, after all the
7 +// existing tabs open on the page have been closed, since previously cached
8 +// resources are updated in the background.
9 +
10 +// To learn more about the benefits of this model and instructions on how to
11 +// opt-in, read https://bit.ly/CRA-PWA
12 +
13 +const isLocalhost = Boolean(
14 + window.location.hostname === 'localhost' ||
15 + // [::1] is the IPv6 localhost address.
16 + window.location.hostname === '[::1]' ||
17 + // 127.0.0.0/8 are considered localhost for IPv4.
18 + window.location.hostname.match(
19 + /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
20 + )
21 +);
22 +
23 +export function register(config) {
24 + if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
25 + // The URL constructor is available in all browsers that support SW.
26 + const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
27 + if (publicUrl.origin !== window.location.origin) {
28 + // Our service worker won't work if PUBLIC_URL is on a different origin
29 + // from what our page is served on. This might happen if a CDN is used to
30 + // serve assets; see https://github.com/facebook/create-react-app/issues/2374
31 + return;
32 + }
33 +
34 + window.addEventListener('load', () => {
35 + const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
36 +
37 + if (isLocalhost) {
38 + // This is running on localhost. Let's check if a service worker still exists or not.
39 + checkValidServiceWorker(swUrl, config);
40 +
41 + // Add some additional logging to localhost, pointing developers to the
42 + // service worker/PWA documentation.
43 + navigator.serviceWorker.ready.then(() => {
44 + console.log(
45 + 'This web app is being served cache-first by a service ' +
46 + 'worker. To learn more, visit https://bit.ly/CRA-PWA'
47 + );
48 + });
49 + } else {
50 + // Is not localhost. Just register service worker
51 + registerValidSW(swUrl, config);
52 + }
53 + });
54 + }
55 +}
56 +
57 +function registerValidSW(swUrl, config) {
58 + navigator.serviceWorker
59 + .register(swUrl)
60 + .then(registration => {
61 + registration.onupdatefound = () => {
62 + const installingWorker = registration.installing;
63 + if (installingWorker == null) {
64 + return;
65 + }
66 + installingWorker.onstatechange = () => {
67 + if (installingWorker.state === 'installed') {
68 + if (navigator.serviceWorker.controller) {
69 + // At this point, the updated precached content has been fetched,
70 + // but the previous service worker will still serve the older
71 + // content until all client tabs are closed.
72 + console.log(
73 + 'New content is available and will be used when all ' +
74 + 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
75 + );
76 +
77 + // Execute callback
78 + if (config && config.onUpdate) {
79 + config.onUpdate(registration);
80 + }
81 + } else {
82 + // At this point, everything has been precached.
83 + // It's the perfect time to display a
84 + // "Content is cached for offline use." message.
85 + console.log('Content is cached for offline use.');
86 +
87 + // Execute callback
88 + if (config && config.onSuccess) {
89 + config.onSuccess(registration);
90 + }
91 + }
92 + }
93 + };
94 + };
95 + })
96 + .catch(error => {
97 + console.error('Error during service worker registration:', error);
98 + });
99 +}
100 +
101 +function checkValidServiceWorker(swUrl, config) {
102 + // Check if the service worker can be found. If it can't reload the page.
103 + fetch(swUrl, {
104 + headers: { 'Service-Worker': 'script' },
105 + })
106 + .then(response => {
107 + // Ensure service worker exists, and that we really are getting a JS file.
108 + const contentType = response.headers.get('content-type');
109 + if (
110 + response.status === 404 ||
111 + (contentType != null && contentType.indexOf('javascript') === -1)
112 + ) {
113 + // No service worker found. Probably a different app. Reload the page.
114 + navigator.serviceWorker.ready.then(registration => {
115 + registration.unregister().then(() => {
116 + window.location.reload();
117 + });
118 + });
119 + } else {
120 + // Service worker found. Proceed as normal.
121 + registerValidSW(swUrl, config);
122 + }
123 + })
124 + .catch(() => {
125 + console.log(
126 + 'No internet connection found. App is running in offline mode.'
127 + );
128 + });
129 +}
130 +
131 +export function unregister() {
132 + if ('serviceWorker' in navigator) {
133 + navigator.serviceWorker.ready
134 + .then(registration => {
135 + registration.unregister();
136 + })
137 + .catch(error => {
138 + console.error(error.message);
139 + });
140 + }
141 +}
1 +// jest-dom adds custom jest matchers for asserting on DOM nodes.
2 +// allows you to do things like:
3 +// expect(element).toHaveTextContent(/react/i)
4 +// learn more: https://github.com/testing-library/jest-dom
5 +import '@testing-library/jest-dom/extend-expect';
1 +# Changelog
2 +
3 +### 0.21.0 (October 23, 2020)
4 +
5 +Fixes and Functionality:
6 +
7 +- Fixing requestHeaders.Authorization ([#3287](https://github.com/axios/axios/pull/3287))
8 +- Fixing node types ([#3237](https://github.com/axios/axios/pull/3237))
9 +- Fixing axios.delete ignores config.data ([#3282](https://github.com/axios/axios/pull/3282))
10 +- Revert "Fixing overwrite Blob/File type as Content-Type in browser. (#1773)" ([#3289](https://github.com/axios/axios/pull/3289))
11 +- Fixing an issue that type 'null' and 'undefined' is not assignable to validateStatus when typescript strict option is enabled ([#3200](https://github.com/axios/axios/pull/3200))
12 +
13 +Internal and Tests:
14 +
15 +- Lock travis to not use node v15 ([#3361](https://github.com/axios/axios/pull/3361))
16 +
17 +Documentation:
18 +
19 +- Fixing simple typo, existant -> existent ([#3252](https://github.com/axios/axios/pull/3252))
20 +- Fixing typos ([#3309](https://github.com/axios/axios/pull/3309))
21 +
22 +Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub:
23 +
24 +- Allan Cruz <57270969+Allanbcruz@users.noreply.github.com>
25 +- George Cheng <Gerhut@GMail.com>
26 +- Jay <jasonsaayman@gmail.com>
27 +- Kevin Kirsche <Kev.Kirsche+GitHub@gmail.com>
28 +- Remco Haszing <remcohaszing@gmail.com>
29 +- Taemin Shin <cprayer13@gmail.com>
30 +- Tim Gates <tim.gates@iress.com>
31 +- Xianming Zhong <chinesedfan@qq.com>
32 +
33 +### 0.20.0 (August 20, 2020)
34 +
35 +Release of 0.20.0-pre as a full release with no other changes.
36 +
37 +### 0.20.0-pre (July 15, 2020)
38 +
39 +Fixes and Functionality:
40 +
41 +- Fixing response with utf-8 BOM can not parse to json ([#2419](https://github.com/axios/axios/pull/2419))
42 + - fix: remove byte order marker (UTF-8 BOM) when transform response
43 + - fix: remove BOM only utf-8
44 + - test: utf-8 BOM
45 + - fix: incorrect param name
46 +- Refactor mergeConfig without utils.deepMerge ([#2844](https://github.com/axios/axios/pull/2844))
47 + - Adding failing test
48 + - Fixing #2587 default custom config persisting
49 + - Adding Concat keys and filter duplicates
50 + - Fixed value from CPE
51 + - update for review feedbacks
52 + - no deepMerge
53 + - only merge between plain objects
54 + - fix rename
55 + - always merge config by mergeConfig
56 + - extract function mergeDeepProperties
57 + - refactor mergeConfig with all keys, and add special logic for validateStatus
58 + - add test for resetting headers
59 + - add lots of tests and fix a bug
60 + - should not inherit `data`
61 + - use simple toString
62 +- Fixing overwrite Blob/File type as Content-Type in browser. ([#1773](https://github.com/axios/axios/pull/1773))
63 +- Fixing an issue that type 'null' is not assignable to validateStatus ([#2773](https://github.com/axios/axios/pull/2773))
64 +- Fixing special char encoding ([#1671](https://github.com/axios/axios/pull/1671))
65 + - removing @ character from replacement list since it is a reserved character
66 + - Updating buildURL test to not include the @ character
67 + - Removing console logs
68 +- Fixing password encoding with special characters in basic authentication ([#1492](https://github.com/axios/axios/pull/1492))
69 + - Fixing password encoding with special characters in basic authentication
70 + - Adding test to check if password with non-Latin1 characters pass
71 +- Fixing 'Network Error' in react native android ([#1487](https://github.com/axios/axios/pull/1487))
72 + There is a bug in react native Android platform when using get method. It will trigger a 'Network Error' when passing the requestData which is an empty string to request.send function. So if the requestData is an empty string we can set it to null as well to fix the bug.
73 +- Fixing Cookie Helper with Asyc Components ([#1105](https://github.com/axios/axios/pull/1105)) ([#1107](https://github.com/axios/axios/pull/1107))
74 +- Fixing 'progressEvent' type ([#2851](https://github.com/axios/axios/pull/2851))
75 + - Fix 'progressEvent' type
76 + - Update axios.ts
77 +- Fixing getting local files (file://) failed ([#2470](https://github.com/axios/axios/pull/2470))
78 + - fix issue #2416, #2396
79 + - fix Eslint warn
80 + - Modify judgment conditions
81 + - add unit test
82 + - update unit test
83 + - update unit test
84 +- Allow PURGE method in typings ([#2191](https://github.com/axios/axios/pull/2191))
85 +- Adding option to disable automatic decompression ([#2661](https://github.com/axios/axios/pull/2661))
86 + - Adding ability to disable auto decompression
87 + - Updating decompress documentation in README
88 + - Fixing test\unit\adapters\http.js lint errors
89 + - Adding test for disabling auto decompression
90 + - Removing changes that fixed lint errors in tests
91 + - Removing formatting change to unit test
92 +- Add independent `maxBodyLength` option ([#2781](https://github.com/axios/axios/pull/2781))
93 + - Add independent option to set the maximum size of the request body
94 + - Remove maxBodyLength check
95 + - Update README
96 + - Assert for error code and message
97 +- Adding responseEncoding to mergeConfig ([#1745](https://github.com/axios/axios/pull/1745))
98 +- Compatible with follow-redirect aborts the request ([#2689](https://github.com/axios/axios/pull/2689))
99 + - Compatible with follow-redirect aborts the request
100 + - Use the error code
101 +- Fix merging of params ([#2656](https://github.com/axios/axios/pull/2656))
102 + - Name function to avoid ESLint func-names warning
103 + - Switch params config to merge list and update tests
104 + - Restore testing of both false and null
105 + - Restore test cases for keys without defaults
106 + - Include test for non-object values that aren't false-y.
107 +- Revert `finally` as `then` ([#2683](https://github.com/axios/axios/pull/2683))
108 +
109 +Internal and Tests:
110 +
111 +- Fix stale bot config ([#3049](https://github.com/axios/axios/pull/3049))
112 + - fix stale bot config
113 + - fix multiple lines
114 +- Add days and change name to work ([#3035](https://github.com/axios/axios/pull/3035))
115 +- Update close-issues.yml ([#3031](https://github.com/axios/axios/pull/3031))
116 + - Update close-issues.yml
117 + Update close message to read better 😄
118 + - Fix use of quotations
119 + Use single quotes as per other .yml files
120 + - Remove user name form message
121 +- Add GitHub actions to close stale issues/prs ([#3029](https://github.com/axios/axios/pull/3029))
122 + - prepare stale actions
123 + - update messages
124 + - Add exempt labels and lighten up comments
125 +- Add GitHub actions to close invalid issues ([#3022](https://github.com/axios/axios/pull/3022))
126 + - add close actions
127 + - fix with checkout
128 + - update issue templates
129 + - add reminder
130 + - update close message
131 +- Add test with Node.js 12 ([#2860](https://github.com/axios/axios/pull/2860))
132 + - test with Node.js 12
133 + - test with latest
134 +- Adding console log on sandbox server startup ([#2210](https://github.com/axios/axios/pull/2210))
135 + - Adding console log on sandbox server startup
136 + - Update server.js
137 + Add server error handling
138 + - Update server.js
139 + Better error message, remove retry.
140 +- Adding tests for method `options` type definitions ([#1996](https://github.com/axios/axios/pull/1996))
141 + Update tests.
142 +- Add test for redirecting with too large response ([#2695](https://github.com/axios/axios/pull/2695))
143 +- Fixing unit test failure in Windows OS ([#2601](https://github.com/axios/axios/pull/2601))
144 +- Fixing issue for HEAD method and gzipped response ([#2666](https://github.com/axios/axios/pull/2666))
145 +- Fix tests in browsers ([#2748](https://github.com/axios/axios/pull/2748))
146 +- chore: add `jsdelivr` and `unpkg` support ([#2443](https://github.com/axios/axios/pull/2443))
147 +
148 +Documentation:
149 +
150 +- Adding support for URLSearchParams in node ([#1900](https://github.com/axios/axios/pull/1900))
151 + - Adding support for URLSearchParams in node
152 + - Remove un-needed code
153 + - Update utils.js
154 + - Make changes as suggested
155 +- Adding table of content (preview) ([#3050](https://github.com/axios/axios/pull/3050))
156 + - add toc (preview)
157 + - remove toc in toc
158 + Signed-off-by: Moni <usmoni@gmail.com>
159 + - fix sublinks
160 + - fix indentation
161 + - remove redundant table links
162 + - update caps and indent
163 + - remove axios
164 +- Replace 'blacklist' with 'blocklist' ([#3006](https://github.com/axios/axios/pull/3006))
165 +- docs(): Detailed config options environment. ([#2088](https://github.com/axios/axios/pull/2088))
166 + - docs(): Detailed config options environment.
167 + - Update README.md
168 +- Include axios-data-unpacker in ECOSYSTEM.md ([#2080](https://github.com/axios/axios/pull/2080))
169 +- Allow opening examples in Gitpod ([#1958](https://github.com/axios/axios/pull/1958))
170 +- Remove axios.all() and axios.spread() from Readme.md ([#2727](https://github.com/axios/axios/pull/2727))
171 + - remove axios.all(), axios.spread()
172 + - replace example
173 + - axios.all() -> Promise.all()
174 + - axios.spread(function (acct, perms)) -> function (acct, perms)
175 + - add deprecated mark
176 +- Update README.md ([#2887](https://github.com/axios/axios/pull/2887))
177 + Small change to the data attribute doc of the config. A request body can also be set for DELETE methods but this wasn't mentioned in the documentation (it only mentioned POST, PUT and PATCH). Took my some 10-20 minutes until I realized that I don't need to manipulate the request body with transformRequest in the case of DELETE.
178 +- Include swagger-taxos-codegen in ECOSYSTEM.md ([#2162](https://github.com/axios/axios/pull/2162))
179 +- Add CDNJS version badge in README.md ([#878](https://github.com/axios/axios/pull/878))
180 + This badge will show the version on CDNJS!
181 +- Documentation update to clear up ambiguity in code examples ([#2928](https://github.com/axios/axios/pull/2928))
182 + - Made an adjustment to the documentation to clear up any ambiguity around the use of "fs". This should help clear up that the code examples with "fs" cannot be used on the client side.
183 +- Update README.md about validateStatus ([#2912](https://github.com/axios/axios/pull/2912))
184 + Rewrote the comment from "Reject only if the status code is greater than or equal to 500" to "Resolve only if the status code is less than 500"
185 +- Updating documentation for usage form-data ([#2805](https://github.com/axios/axios/pull/2805))
186 + Closes #2049
187 +- Fixing CHANGELOG.md issue link ([#2784](https://github.com/axios/axios/pull/2784))
188 +- Include axios-hooks in ECOSYSTEM.md ([#2003](https://github.com/axios/axios/pull/2003))
189 +- Added Response header access instructions ([#1901](https://github.com/axios/axios/pull/1901))
190 + - Added Response header access instructions
191 + - Added note about using bracket notation
192 +- Add `onUploadProgress` and `onDownloadProgress` are browser only ([#2763](https://github.com/axios/axios/pull/2763))
193 + Saw in #928 and #1966 that `onUploadProgress` and `onDownloadProgress` only work in the browser and was missing that from the README.
194 +- Update ' sign to ` in proxy spec ([#2778](https://github.com/axios/axios/pull/2778))
195 +- Adding jsDelivr link in README ([#1110](https://github.com/axios/axios/pull/1110))
196 + - Adding jsDelivr link
197 + - Add SRI
198 + - Remove SRI
199 +
200 +Huge thanks to everyone who contributed to this release via code (authors listed
201 +below) or via reviews and triaging on GitHub:
202 +
203 +- Alan Wang <wp_scut@163.com>
204 +- Alexandru Ungureanu <khakcarot@gmail.com>
205 +- Anubhav Srivastava <anubhav.srivastava00@gmail.com>
206 +- Benny Neugebauer <bn@bennyn.de>
207 +- Cr <631807682@qq.com>
208 +- David <cygnidavid@gmail.com>
209 +- David Ko <david.ko@pvtmethod.com>
210 +- David Tanner <david.tanner@lifeomic.com>
211 +- Emily Morehouse <emilyemorehouse@gmail.com>
212 +- Felipe Martins <felipewmartins@gmail.com>
213 +- Fonger <5862369+Fonger@users.noreply.github.com>
214 +- Frostack <soulburn007@gmail.com>
215 +- George Cheng <Gerhut@GMail.com>
216 +- grumblerchester <grumblerchester@users.noreply.github.com>
217 +- Gustavo López <gualopezb@gmail.com>
218 +- hexaez <45806662+hexaez@users.noreply.github.com>
219 +- huangzuizui <huangzuizui@gmail.com>
220 +- Ian Wijma <ian@wij.ma>
221 +- Jay <jasonsaayman@gmail.com>
222 +- jeffjing <zgayjjf@qq.com>
223 +- jennynju <46782518+jennynju@users.noreply.github.com>
224 +- Jimmy Liao <52391190+jimmy-liao-gogoro@users.noreply.github.com>
225 +- Jonathan Sharpe <j.r.sharpe@gmail.com>
226 +- JounQin <admin@1stg.me>
227 +- Justin Beckwith <justin.beckwith@gmail.com>
228 +- Kamil Posiadała <3dcreator.pl@gmail.com>
229 +- Lukas Drgon <lukas.drgon@gmail.com>
230 +- marcinx <mail@marcinx.com>
231 +- Martti Laine <martti@codeclown.net>
232 +- Michał Zarach <michal.m.zarach@gmail.com>
233 +- Moni <usmoni@gmail.com>
234 +- Motonori Iwata <121048+iwata@users.noreply.github.com>
235 +- Nikita Galkin <nikita@galk.in>
236 +- Petr Mares <petr@mares.tw>
237 +- Philippe Recto <precto1285@gmal.com>
238 +- Remco Haszing <remcohaszing@gmail.com>
239 +- rockcs1992 <chengshi1219@gmail.com>
240 +- Ryan Bown <rbown@niftee.com.au>
241 +- Samina Fu <sufuf3@gmail.com>
242 +- Simone Busoli <simone.busoli@gmail.com>
243 +- Spencer von der Ohe <s.vonderohe40@gmail.com>
244 +- Sven Efftinge <sven.efftinge@typefox.io>
245 +- Taegyeoung Oh <otk1090@naver.com>
246 +- Taemin Shin <cprayer13@gmail.com>
247 +- Thibault Ehrhart <1208424+ehrhart@users.noreply.github.com>
248 +- Xianming Zhong <chinesedfan@qq.com>
249 +- Yasu Flores <carlosyasu91@gmail.com>
250 +- Zac Delventhal <delventhalz@gmail.com>
251 +
252 +### 0.19.2 (Jan 20, 2020)
253 +
254 +- Remove unnecessary XSS check ([#2679](https://github.com/axios/axios/pull/2679)) (see ([#2646](https://github.com/axios/axios/issues/2646)) for discussion)
255 +
256 +### 0.19.1 (Jan 7, 2020)
257 +
258 +Fixes and Functionality:
259 +
260 +- Fixing invalid agent issue ([#1904](https://github.com/axios/axios/pull/1904))
261 +- Fix ignore set withCredentials false ([#2582](https://github.com/axios/axios/pull/2582))
262 +- Delete useless default to hash ([#2458](https://github.com/axios/axios/pull/2458))
263 +- Fix HTTP/HTTPs agents passing to follow-redirect ([#1904](https://github.com/axios/axios/pull/1904))
264 +- Fix ignore set withCredentials false ([#2582](https://github.com/axios/axios/pull/2582))
265 +- Fix CI build failure ([#2570](https://github.com/axios/axios/pull/2570))
266 +- Remove dependency on is-buffer from package.json ([#1816](https://github.com/axios/axios/pull/1816))
267 +- Adding options typings ([#2341](https://github.com/axios/axios/pull/2341))
268 +- Adding Typescript HTTP method definition for LINK and UNLINK. ([#2444](https://github.com/axios/axios/pull/2444))
269 +- Update dist with newest changes, fixes Custom Attributes issue
270 +- Change syntax to see if build passes ([#2488](https://github.com/axios/axios/pull/2488))
271 +- Update Webpack + deps, remove now unnecessary polyfills ([#2410](https://github.com/axios/axios/pull/2410))
272 +- Fix to prevent XSS, throw an error when the URL contains a JS script ([#2464](https://github.com/axios/axios/pull/2464))
273 +- Add custom timeout error copy in config ([#2275](https://github.com/axios/axios/pull/2275))
274 +- Add error toJSON example ([#2466](https://github.com/axios/axios/pull/2466))
275 +- Fixing Vulnerability A Fortify Scan finds a critical Cross-Site Scrip… ([#2451](https://github.com/axios/axios/pull/2451))
276 +- Fixing subdomain handling on no_proxy ([#2442](https://github.com/axios/axios/pull/2442))
277 +- Make redirection from HTTP to HTTPS work ([#2426](https://github.com/axios/axios/pull/2426)) and ([#2547](https://github.com/axios/axios/pull/2547))
278 +- Add toJSON property to AxiosError type ([#2427](https://github.com/axios/axios/pull/2427))
279 +- Fixing socket hang up error on node side for slow response. ([#1752](https://github.com/axios/axios/pull/1752))
280 +- Alternative syntax to send data into the body ([#2317](https://github.com/axios/axios/pull/2317))
281 +- Fixing custom config options ([#2207](https://github.com/axios/axios/pull/2207))
282 +- Fixing set `config.method` after mergeConfig for Axios.prototype.request ([#2383](https://github.com/axios/axios/pull/2383))
283 +- Axios create url bug ([#2290](https://github.com/axios/axios/pull/2290))
284 +- Do not modify config.url when using a relative baseURL (resolves [#1628](https://github.com/axios/axios/issues/1098)) ([#2391](https://github.com/axios/axios/pull/2391))
285 +- Add typescript HTTP method definition for LINK and UNLINK ([#2444](https://github.com/axios/axios/pull/2444))
286 +
287 +Internal:
288 +
289 +- Revert "Update Webpack + deps, remove now unnecessary polyfills" ([#2479](https://github.com/axios/axios/pull/2479))
290 +- Order of if/else blocks is causing unit tests mocking XHR. ([#2201](https://github.com/axios/axios/pull/2201))
291 +- Add license badge ([#2446](https://github.com/axios/axios/pull/2446))
292 +- Fix travis CI build [#2386](https://github.com/axios/axios/pull/2386)
293 +- Fix cancellation error on build master. #2290 #2207 ([#2407](https://github.com/axios/axios/pull/2407))
294 +
295 +Documentation:
296 +
297 +- Fixing typo in CHANGELOG.md: s/Functionallity/Functionality ([#2639](https://github.com/axios/axios/pull/2639))
298 +- Fix badge, use master branch ([#2538](https://github.com/axios/axios/pull/2538))
299 +- Fix typo in changelog [#2193](https://github.com/axios/axios/pull/2193)
300 +- Document fix ([#2514](https://github.com/axios/axios/pull/2514))
301 +- Update docs with no_proxy change, issue #2484 ([#2513](https://github.com/axios/axios/pull/2513))
302 +- Fixing missing words in docs template ([#2259](https://github.com/axios/axios/pull/2259))
303 +- 🐛Fix request finally documentation in README ([#2189](https://github.com/axios/axios/pull/2189))
304 +- updating spelling and adding link to docs ([#2212](https://github.com/axios/axios/pull/2212))
305 +- docs: minor tweak ([#2404](https://github.com/axios/axios/pull/2404))
306 +- Update response interceptor docs ([#2399](https://github.com/axios/axios/pull/2399))
307 +- Update README.md ([#2504](https://github.com/axios/axios/pull/2504))
308 +- Fix word 'sintaxe' to 'syntax' in README.md ([#2432](https://github.com/axios/axios/pull/2432))
309 +- updating README: notes on CommonJS autocomplete ([#2256](https://github.com/axios/axios/pull/2256))
310 +- Fix grammar in README.md ([#2271](https://github.com/axios/axios/pull/2271))
311 +- Doc fixes, minor examples cleanup ([#2198](https://github.com/axios/axios/pull/2198))
312 +
313 +### 0.19.0 (May 30, 2019)
314 +
315 +Fixes and Functionality:
316 +
317 +- Added support for no_proxy env variable ([#1693](https://github.com/axios/axios/pull/1693/files)) - Chance Dickson
318 +- Unzip response body only for statuses != 204 ([#1129](https://github.com/axios/axios/pull/1129)) - drawski
319 +- Destroy stream on exceeding maxContentLength (fixes [#1098](https://github.com/axios/axios/issues/1098)) ([#1485](https://github.com/axios/axios/pull/1485)) - Gadzhi Gadzhiev
320 +- Makes Axios error generic to use AxiosResponse ([#1738](https://github.com/axios/axios/pull/1738)) - Suman Lama
321 +- Fixing Mocha tests by locking follow-redirects version to 1.5.10 ([#1993](https://github.com/axios/axios/pull/1993)) - grumblerchester
322 +- Allow uppercase methods in typings. ([#1781](https://github.com/axios/axios/pull/1781)) - Ken Powers
323 +- Fixing building url with hash mark ([#1771](https://github.com/axios/axios/pull/1771)) - Anatoly Ryabov
324 +- This commit fix building url with hash map (fragment identifier) when parameters are present: they must not be added after `#`, because client cut everything after `#`
325 +- Preserve HTTP method when following redirect ([#1758](https://github.com/axios/axios/pull/1758)) - Rikki Gibson
326 +- Add `getUri` signature to TypeScript definition. ([#1736](https://github.com/axios/axios/pull/1736)) - Alexander Trauzzi
327 +- Adding isAxiosError flag to errors thrown by axios ([#1419](https://github.com/axios/axios/pull/1419)) - Ayush Gupta
328 +
329 +Internal:
330 +
331 +- Fixing .eslintrc without extension ([#1789](https://github.com/axios/axios/pull/1789)) - Manoel
332 +- Fix failing SauceLabs tests by updating configuration - Emily Morehouse
333 +- Add issue templates - Emily Morehouse
334 +
335 +Documentation:
336 +
337 +- Consistent coding style in README ([#1787](https://github.com/axios/axios/pull/1787)) - Ali Servet Donmez
338 +- Add information about auth parameter to README ([#2166](https://github.com/axios/axios/pull/2166)) - xlaguna
339 +- Add DELETE to list of methods that allow data as a config option ([#2169](https://github.com/axios/axios/pull/2169)) - Daniela Borges Matos de Carvalho
340 +- Update ECOSYSTEM.md - Add Axios Endpoints ([#2176](https://github.com/axios/axios/pull/2176)) - Renan
341 +- Add r2curl in ECOSYSTEM ([#2141](https://github.com/axios/axios/pull/2141)) - 유용우 / CX
342 +- Update README.md - Add instructions for installing with yarn ([#2036](https://github.com/axios/axios/pull/2036)) - Victor Hermes
343 +- Fixing spacing for README.md ([#2066](https://github.com/axios/axios/pull/2066)) - Josh McCarty
344 +- Update README.md. - Change `.then` to `.finally` in example code ([#2090](https://github.com/axios/axios/pull/2090)) - Omar Cai
345 +- Clarify what values responseType can have in Node ([#2121](https://github.com/axios/axios/pull/2121)) - Tyler Breisacher
346 +- docs(ECOSYSTEM): add axios-api-versioning ([#2020](https://github.com/axios/axios/pull/2020)) - Weffe
347 +- It seems that `responseType: 'blob'` doesn't actually work in Node (when I tried using it, response.data was a string, not a Blob, since Node doesn't have Blobs), so this clarifies that this option should only be used in the browser
348 +- Update README.md. - Add Querystring library note ([#1896](https://github.com/axios/axios/pull/1896)) - Dmitriy Eroshenko
349 +- Add react-hooks-axios to Libraries section of ECOSYSTEM.md ([#1925](https://github.com/axios/axios/pull/1925)) - Cody Chan
350 +- Clarify in README that default timeout is 0 (no timeout) ([#1750](https://github.com/axios/axios/pull/1750)) - Ben Standefer
351 +
352 +### 0.19.0-beta.1 (Aug 9, 2018)
353 +
354 +**NOTE:** This is a beta version of this release. There may be functionality that is broken in
355 +certain browsers, though we suspect that builds are hanging and not erroring. See
356 +https://saucelabs.com/u/axios for the most up-to-date information.
357 +
358 +New Functionality:
359 +
360 +- Add getUri method ([#1712](https://github.com/axios/axios/issues/1712))
361 +- Add support for no_proxy env variable ([#1693](https://github.com/axios/axios/issues/1693))
362 +- Add toJSON to decorated Axios errors to facilitate serialization ([#1625](https://github.com/axios/axios/issues/1625))
363 +- Add second then on axios call ([#1623](https://github.com/axios/axios/issues/1623))
364 +- Typings: allow custom return types
365 +- Add option to specify character set in responses (with http adapter)
366 +
367 +Fixes:
368 +
369 +- Fix Keep defaults local to instance ([#385](https://github.com/axios/axios/issues/385))
370 +- Correctly catch exception in http test ([#1475](https://github.com/axios/axios/issues/1475))
371 +- Fix accept header normalization ([#1698](https://github.com/axios/axios/issues/1698))
372 +- Fix http adapter to allow HTTPS connections via HTTP ([#959](https://github.com/axios/axios/issues/959))
373 +- Fix Removes usage of deprecated Buffer constructor. ([#1555](https://github.com/axios/axios/issues/1555), [#1622](https://github.com/axios/axios/issues/1622))
374 +- Fix defaults to use httpAdapter if available ([#1285](https://github.com/axios/axios/issues/1285))
375 + - Fixing defaults to use httpAdapter if available
376 + - Use a safer, cross-platform method to detect the Node environment
377 +- Fix Reject promise if request is cancelled by the browser ([#537](https://github.com/axios/axios/issues/537))
378 +- [Typescript] Fix missing type parameters on delete/head methods
379 +- [NS]: Send `false` flag isStandardBrowserEnv for Nativescript
380 +- Fix missing type parameters on delete/head
381 +- Fix Default method for an instance always overwritten by get
382 +- Fix type error when socketPath option in AxiosRequestConfig
383 +- Capture errors on request data streams
384 +- Decorate resolve and reject to clear timeout in all cases
385 +
386 +Huge thanks to everyone who contributed to this release via code (authors listed
387 +below) or via reviews and triaging on GitHub:
388 +
389 +- Andrew Scott <ascott18@gmail.com>
390 +- Anthony Gauthier <antho325@hotmail.com>
391 +- arpit <arpit2438735@gmail.com>
392 +- ascott18
393 +- Benedikt Rötsch <axe312ger@users.noreply.github.com>
394 +- Chance Dickson <me@chancedickson.com>
395 +- Dave Stewart <info@davestewart.co.uk>
396 +- Deric Cain <deric.cain@gmail.com>
397 +- Guillaume Briday <guillaumebriday@gmail.com>
398 +- Jacob Wejendorp <jacob@wejendorp.dk>
399 +- Jim Lynch <mrdotjim@gmail.com>
400 +- johntron
401 +- Justin Beckwith <beckwith@google.com>
402 +- Justin Beckwith <justin.beckwith@gmail.com>
403 +- Khaled Garbaya <khaledgarbaya@gmail.com>
404 +- Lim Jing Rong <jjingrong@users.noreply.github.com>
405 +- Mark van den Broek <mvdnbrk@gmail.com>
406 +- Martti Laine <martti@codeclown.net>
407 +- mattridley
408 +- mattridley <matt.r@joinblink.com>
409 +- Nicolas Del Valle <nicolas.delvalle@gmail.com>
410 +- Nilegfx
411 +- pbarbiero
412 +- Rikki Gibson <rikkigibson@gmail.com>
413 +- Sako Hartounian <sakohartounian@yahoo.com>
414 +- Shane Fitzpatrick <fitzpasd@gmail.com>
415 +- Stephan Schneider <stephanschndr@gmail.com>
416 +- Steven <steven@ceriously.com>
417 +- Tim Garthwaite <tim.garthwaite@jibo.com>
418 +- Tim Johns <timjohns@yahoo.com>
419 +- Yutaro Miyazaki <yutaro@studio-rubbish.com>
420 +
421 +### 0.18.0 (Feb 19, 2018)
422 +
423 +- Adding support for UNIX Sockets when running with Node.js ([#1070](https://github.com/axios/axios/pull/1070))
424 +- Fixing typings ([#1177](https://github.com/axios/axios/pull/1177)):
425 + - AxiosRequestConfig.proxy: allows type false
426 + - AxiosProxyConfig: added auth field
427 +- Adding function signature in AxiosInstance interface so AxiosInstance can be invoked ([#1192](https://github.com/axios/axios/pull/1192), [#1254](https://github.com/axios/axios/pull/1254))
428 +- Allowing maxContentLength to pass through to redirected calls as maxBodyLength in follow-redirects config ([#1287](https://github.com/axios/axios/pull/1287))
429 +- Fixing configuration when using an instance - method can now be set ([#1342](https://github.com/axios/axios/pull/1342))
430 +
431 +### 0.17.1 (Nov 11, 2017)
432 +
433 +- Fixing issue with web workers ([#1160](https://github.com/axios/axios/pull/1160))
434 +- Allowing overriding transport ([#1080](https://github.com/axios/axios/pull/1080))
435 +- Updating TypeScript typings ([#1165](https://github.com/axios/axios/pull/1165), [#1125](https://github.com/axios/axios/pull/1125), [#1131](https://github.com/axios/axios/pull/1131))
436 +
437 +### 0.17.0 (Oct 21, 2017)
438 +
439 +- **BREAKING** Fixing issue with `baseURL` and interceptors ([#950](https://github.com/axios/axios/pull/950))
440 +- **BREAKING** Improving handing of duplicate headers ([#874](https://github.com/axios/axios/pull/874))
441 +- Adding support for disabling proxies ([#691](https://github.com/axios/axios/pull/691))
442 +- Updating TypeScript typings with generic type parameters ([#1061](https://github.com/axios/axios/pull/1061))
443 +
444 +### 0.16.2 (Jun 3, 2017)
445 +
446 +- Fixing issue with including `buffer` in bundle ([#887](https://github.com/axios/axios/pull/887))
447 +- Including underlying request in errors ([#830](https://github.com/axios/axios/pull/830))
448 +- Convert `method` to lowercase ([#930](https://github.com/axios/axios/pull/930))
449 +
450 +### 0.16.1 (Apr 8, 2017)
451 +
452 +- Improving HTTP adapter to return last request in case of redirects ([#828](https://github.com/axios/axios/pull/828))
453 +- Updating `follow-redirects` dependency ([#829](https://github.com/axios/axios/pull/829))
454 +- Adding support for passing `Buffer` in node ([#773](https://github.com/axios/axios/pull/773))
455 +
456 +### 0.16.0 (Mar 31, 2017)
457 +
458 +- **BREAKING** Removing `Promise` from axios typings in favor of built-in type declarations ([#480](https://github.com/axios/axios/issues/480))
459 +- Adding `options` shortcut method ([#461](https://github.com/axios/axios/pull/461))
460 +- Fixing issue with using `responseType: 'json'` in browsers incompatible with XHR Level 2 ([#654](https://github.com/axios/axios/pull/654))
461 +- Improving React Native detection ([#731](https://github.com/axios/axios/pull/731))
462 +- Fixing `combineURLs` to support empty `relativeURL` ([#581](https://github.com/axios/axios/pull/581))
463 +- Removing `PROTECTION_PREFIX` support ([#561](https://github.com/axios/axios/pull/561))
464 +
465 +### 0.15.3 (Nov 27, 2016)
466 +
467 +- Fixing issue with custom instances and global defaults ([#443](https://github.com/axios/axios/issues/443))
468 +- Renaming `axios.d.ts` to `index.d.ts` ([#519](https://github.com/axios/axios/issues/519))
469 +- Adding `get`, `head`, and `delete` to `defaults.headers` ([#509](https://github.com/axios/axios/issues/509))
470 +- Fixing issue with `btoa` and IE ([#507](https://github.com/axios/axios/issues/507))
471 +- Adding support for proxy authentication ([#483](https://github.com/axios/axios/pull/483))
472 +- Improving HTTP adapter to use `http` protocol by default ([#493](https://github.com/axios/axios/pull/493))
473 +- Fixing proxy issues ([#491](https://github.com/axios/axios/pull/491))
474 +
475 +### 0.15.2 (Oct 17, 2016)
476 +
477 +- Fixing issue with calling `cancel` after response has been received ([#482](https://github.com/axios/axios/issues/482))
478 +
479 +### 0.15.1 (Oct 14, 2016)
480 +
481 +- Fixing issue with UMD ([#485](https://github.com/axios/axios/issues/485))
482 +
483 +### 0.15.0 (Oct 10, 2016)
484 +
485 +- Adding cancellation support ([#452](https://github.com/axios/axios/pull/452))
486 +- Moving default adapter to global defaults ([#437](https://github.com/axios/axios/pull/437))
487 +- Fixing issue with `file` URI scheme ([#440](https://github.com/axios/axios/pull/440))
488 +- Fixing issue with `params` objects that have no prototype ([#445](https://github.com/axios/axios/pull/445))
489 +
490 +### 0.14.0 (Aug 27, 2016)
491 +
492 +- **BREAKING** Updating TypeScript definitions ([#419](https://github.com/axios/axios/pull/419))
493 +- **BREAKING** Replacing `agent` option with `httpAgent` and `httpsAgent` ([#387](https://github.com/axios/axios/pull/387))
494 +- **BREAKING** Splitting `progress` event handlers into `onUploadProgress` and `onDownloadProgress` ([#423](https://github.com/axios/axios/pull/423))
495 +- Adding support for `http_proxy` and `https_proxy` environment variables ([#366](https://github.com/axios/axios/pull/366))
496 +- Fixing issue with `auth` config option and `Authorization` header ([#397](https://github.com/axios/axios/pull/397))
497 +- Don't set XSRF header if `xsrfCookieName` is `null` ([#406](https://github.com/axios/axios/pull/406))
498 +
499 +### 0.13.1 (Jul 16, 2016)
500 +
501 +- Fixing issue with response data not being transformed on error ([#378](https://github.com/axios/axios/issues/378))
502 +
503 +### 0.13.0 (Jul 13, 2016)
504 +
505 +- **BREAKING** Improved error handling ([#345](https://github.com/axios/axios/pull/345))
506 +- **BREAKING** Response transformer now invoked in dispatcher not adapter ([10eb238](https://github.com/axios/axios/commit/10eb23865101f9347570552c04e9d6211376e25e))
507 +- **BREAKING** Request adapters now return a `Promise` ([157efd5](https://github.com/axios/axios/commit/157efd5615890301824e3121cc6c9d2f9b21f94a))
508 +- Fixing issue with `withCredentials` not being overwritten ([#343](https://github.com/axios/axios/issues/343))
509 +- Fixing regression with request transformer being called before request interceptor ([#352](https://github.com/axios/axios/issues/352))
510 +- Fixing custom instance defaults ([#341](https://github.com/axios/axios/issues/341))
511 +- Fixing instances created from `axios.create` to have same API as default axios ([#217](https://github.com/axios/axios/issues/217))
512 +
513 +### 0.12.0 (May 31, 2016)
514 +
515 +- Adding support for `URLSearchParams` ([#317](https://github.com/axios/axios/pull/317))
516 +- Adding `maxRedirects` option ([#307](https://github.com/axios/axios/pull/307))
517 +
518 +### 0.11.1 (May 17, 2016)
519 +
520 +- Fixing IE CORS support ([#313](https://github.com/axios/axios/pull/313))
521 +- Fixing detection of `FormData` ([#325](https://github.com/axios/axios/pull/325))
522 +- Adding `Axios` class to exports ([#321](https://github.com/axios/axios/pull/321))
523 +
524 +### 0.11.0 (Apr 26, 2016)
525 +
526 +- Adding support for Stream with HTTP adapter ([#296](https://github.com/axios/axios/pull/296))
527 +- Adding support for custom HTTP status code error ranges ([#308](https://github.com/axios/axios/pull/308))
528 +- Fixing issue with ArrayBuffer ([#299](https://github.com/axios/axios/pull/299))
529 +
530 +### 0.10.0 (Apr 20, 2016)
531 +
532 +- Fixing issue with some requests sending `undefined` instead of `null` ([#250](https://github.com/axios/axios/pull/250))
533 +- Fixing basic auth for HTTP adapter ([#252](https://github.com/axios/axios/pull/252))
534 +- Fixing request timeout for XHR adapter ([#227](https://github.com/axios/axios/pull/227))
535 +- Fixing IE8 support by using `onreadystatechange` instead of `onload` ([#249](https://github.com/axios/axios/pull/249))
536 +- Fixing IE9 cross domain requests ([#251](https://github.com/axios/axios/pull/251))
537 +- Adding `maxContentLength` option ([#275](https://github.com/axios/axios/pull/275))
538 +- Fixing XHR support for WebWorker environment ([#279](https://github.com/axios/axios/pull/279))
539 +- Adding request instance to response ([#200](https://github.com/axios/axios/pull/200))
540 +
541 +### 0.9.1 (Jan 24, 2016)
542 +
543 +- Improving handling of request timeout in node ([#124](https://github.com/axios/axios/issues/124))
544 +- Fixing network errors not rejecting ([#205](https://github.com/axios/axios/pull/205))
545 +- Fixing issue with IE rejecting on HTTP 204 ([#201](https://github.com/axios/axios/issues/201))
546 +- Fixing host/port when following redirects ([#198](https://github.com/axios/axios/pull/198))
547 +
548 +### 0.9.0 (Jan 18, 2016)
549 +
550 +- Adding support for custom adapters
551 +- Fixing Content-Type header being removed when data is false ([#195](https://github.com/axios/axios/pull/195))
552 +- Improving XDomainRequest implementation ([#185](https://github.com/axios/axios/pull/185))
553 +- Improving config merging and order of precedence ([#183](https://github.com/axios/axios/pull/183))
554 +- Fixing XDomainRequest support for only <= IE9 ([#182](https://github.com/axios/axios/pull/182))
555 +
556 +### 0.8.1 (Dec 14, 2015)
557 +
558 +- Adding support for passing XSRF token for cross domain requests when using `withCredentials` ([#168](https://github.com/axios/axios/pull/168))
559 +- Fixing error with format of basic auth header ([#178](https://github.com/axios/axios/pull/173))
560 +- Fixing error with JSON payloads throwing `InvalidStateError` in some cases ([#174](https://github.com/axios/axios/pull/174))
561 +
562 +### 0.8.0 (Dec 11, 2015)
563 +
564 +- Adding support for creating instances of axios ([#123](https://github.com/axios/axios/pull/123))
565 +- Fixing http adapter to use `Buffer` instead of `String` in case of `responseType === 'arraybuffer'` ([#128](https://github.com/axios/axios/pull/128))
566 +- Adding support for using custom parameter serializer with `paramsSerializer` option ([#121](https://github.com/axios/axios/pull/121))
567 +- Fixing issue in IE8 caused by `forEach` on `arguments` ([#127](https://github.com/axios/axios/pull/127))
568 +- Adding support for following redirects in node ([#146](https://github.com/axios/axios/pull/146))
569 +- Adding support for transparent decompression if `content-encoding` is set ([#149](https://github.com/axios/axios/pull/149))
570 +- Adding support for transparent XDomainRequest to handle cross domain requests in IE9 ([#140](https://github.com/axios/axios/pull/140))
571 +- Adding support for HTTP basic auth via Authorization header ([#167](https://github.com/axios/axios/pull/167))
572 +- Adding support for baseURL option ([#160](https://github.com/axios/axios/pull/160))
573 +
574 +### 0.7.0 (Sep 29, 2015)
575 +
576 +- Fixing issue with minified bundle in IE8 ([#87](https://github.com/axios/axios/pull/87))
577 +- Adding support for passing agent in node ([#102](https://github.com/axios/axios/pull/102))
578 +- Adding support for returning result from `axios.spread` for chaining ([#106](https://github.com/axios/axios/pull/106))
579 +- Fixing typescript definition ([#105](https://github.com/axios/axios/pull/105))
580 +- Fixing default timeout config for node ([#112](https://github.com/axios/axios/pull/112))
581 +- Adding support for use in web workers, and react-native ([#70](https://github.com/axios/axios/issue/70)), ([#98](https://github.com/axios/axios/pull/98))
582 +- Adding support for fetch like API `axios(url[, config])` ([#116](https://github.com/axios/axios/issues/116))
583 +
584 +### 0.6.0 (Sep 21, 2015)
585 +
586 +- Removing deprecated success/error aliases
587 +- Fixing issue with array params not being properly encoded ([#49](https://github.com/axios/axios/pull/49))
588 +- Fixing issue with User-Agent getting overridden ([#69](https://github.com/axios/axios/issues/69))
589 +- Adding support for timeout config ([#56](https://github.com/axios/axios/issues/56))
590 +- Removing es6-promise dependency
591 +- Fixing issue preventing `length` to be used as a parameter ([#91](https://github.com/axios/axios/pull/91))
592 +- Fixing issue with IE8 ([#85](https://github.com/axios/axios/pull/85))
593 +- Converting build to UMD
594 +
595 +### 0.5.4 (Apr 08, 2015)
596 +
597 +- Fixing issue with FormData not being sent ([#53](https://github.com/axios/axios/issues/53))
598 +
599 +### 0.5.3 (Apr 07, 2015)
600 +
601 +- Using JSON.parse unconditionally when transforming response string ([#55](https://github.com/axios/axios/issues/55))
602 +
603 +### 0.5.2 (Mar 13, 2015)
604 +
605 +- Adding support for `statusText` in response ([#46](https://github.com/axios/axios/issues/46))
606 +
607 +### 0.5.1 (Mar 10, 2015)
608 +
609 +- Fixing issue using strict mode ([#45](https://github.com/axios/axios/issues/45))
610 +- Fixing issue with standalone build ([#47](https://github.com/axios/axios/issues/47))
611 +
612 +### 0.5.0 (Jan 23, 2015)
613 +
614 +- Adding support for intercepetors ([#14](https://github.com/axios/axios/issues/14))
615 +- Updating es6-promise dependency
616 +
617 +### 0.4.2 (Dec 10, 2014)
618 +
619 +- Fixing issue with `Content-Type` when using `FormData` ([#22](https://github.com/axios/axios/issues/22))
620 +- Adding support for TypeScript ([#25](https://github.com/axios/axios/issues/25))
621 +- Fixing issue with standalone build ([#29](https://github.com/axios/axios/issues/29))
622 +- Fixing issue with verbs needing to be capitalized in some browsers ([#30](https://github.com/axios/axios/issues/30))
623 +
624 +### 0.4.1 (Oct 15, 2014)
625 +
626 +- Adding error handling to request for node.js ([#18](https://github.com/axios/axios/issues/18))
627 +
628 +### 0.4.0 (Oct 03, 2014)
629 +
630 +- Adding support for `ArrayBuffer` and `ArrayBufferView` ([#10](https://github.com/axios/axios/issues/10))
631 +- Adding support for utf-8 for node.js ([#13](https://github.com/axios/axios/issues/13))
632 +- Adding support for SSL for node.js ([#12](https://github.com/axios/axios/issues/12))
633 +- Fixing incorrect `Content-Type` header ([#9](https://github.com/axios/axios/issues/9))
634 +- Adding standalone build without bundled es6-promise ([#11](https://github.com/axios/axios/issues/11))
635 +- Deprecating `success`/`error` in favor of `then`/`catch`
636 +
637 +### 0.3.1 (Sep 16, 2014)
638 +
639 +- Fixing missing post body when using node.js ([#3](https://github.com/axios/axios/issues/3))
640 +
641 +### 0.3.0 (Sep 16, 2014)
642 +
643 +- Fixing `success` and `error` to properly receive response data as individual arguments ([#8](https://github.com/axios/axios/issues/8))
644 +- Updating `then` and `catch` to receive response data as a single object ([#6](https://github.com/axios/axios/issues/6))
645 +- Fixing issue with `all` not working ([#7](https://github.com/axios/axios/issues/7))
646 +
647 +### 0.2.2 (Sep 14, 2014)
648 +
649 +- Fixing bundling with browserify ([#4](https://github.com/axios/axios/issues/4))
650 +
651 +### 0.2.1 (Sep 12, 2014)
652 +
653 +- Fixing build problem causing ridiculous file sizes
654 +
655 +### 0.2.0 (Sep 12, 2014)
656 +
657 +- Adding support for `all` and `spread`
658 +- Adding support for node.js ([#1](https://github.com/axios/axios/issues/1))
659 +
660 +### 0.1.0 (Aug 29, 2014)
661 +
662 +- Initial release
1 +Copyright (c) 2014-present Matt Zabriskie
2 +
3 +Permission is hereby granted, free of charge, to any person obtaining a copy
4 +of this software and associated documentation files (the "Software"), to deal
5 +in the Software without restriction, including without limitation the rights
6 +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 +copies of the Software, and to permit persons to whom the Software is
8 +furnished to do so, subject to the following conditions:
9 +
10 +The above copyright notice and this permission notice shall be included in
11 +all copies or substantial portions of the Software.
12 +
13 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 +THE SOFTWARE.
1 +# axios
2 +
3 +[![npm version](https://img.shields.io/npm/v/axios.svg?style=flat-square)](https://www.npmjs.org/package/axios)
4 +[![CDNJS](https://img.shields.io/cdnjs/v/axios.svg?style=flat-square)](https://cdnjs.com/libraries/axios)
5 +[![build status](https://img.shields.io/travis/axios/axios/master.svg?style=flat-square)](https://travis-ci.org/axios/axios)
6 +[![code coverage](https://img.shields.io/coveralls/mzabriskie/axios.svg?style=flat-square)](https://coveralls.io/r/mzabriskie/axios)
7 +[![install size](https://packagephobia.now.sh/badge?p=axios)](https://packagephobia.now.sh/result?p=axios)
8 +[![npm downloads](https://img.shields.io/npm/dm/axios.svg?style=flat-square)](http://npm-stat.com/charts.html?package=axios)
9 +[![gitter chat](https://img.shields.io/gitter/room/mzabriskie/axios.svg?style=flat-square)](https://gitter.im/mzabriskie/axios)
10 +[![code helpers](https://www.codetriage.com/axios/axios/badges/users.svg)](https://www.codetriage.com/axios/axios)
11 +
12 +Promise based HTTP client for the browser and node.js
13 +## Table of Contents
14 +
15 + - [Features](#features)
16 + - [Browser Support](#browser-support)
17 + - [Installing](#installing)
18 + - [Example](#example)
19 + - [Axios API](#axios-api)
20 + - [Request method aliases](#request-method-aliases)
21 + - [Concurrency (Deprecated)](#concurrency-deprecated)
22 + - [Creating an instance](#creating-an-instance)
23 + - [Instance methods](#instance-methods)
24 + - [Request Config](#request-config)
25 + - [Response Schema](#response-schema)
26 + - [Config Defaults](#config-defaults)
27 + - [Global axios defaults](#global-axios-defaults)
28 + - [Custom instance defaults](#custom-instance-defaults)
29 + - [Config order of precedence](#config-order-of-precedence)
30 + - [Interceptors](#interceptors)
31 + - [Handling Errors](#handling-errors)
32 + - [Cancellation](#cancellation)
33 + - [Using application/x-www-form-urlencoded format](#using-applicationx-www-form-urlencoded-format)
34 + - [Browser](#browser)
35 + - [Node.js](#nodejs)
36 + - [Query string](#query-string)
37 + - [Form data](#form-data)
38 + - [Semver](#semver)
39 + - [Promises](#promises)
40 + - [TypeScript](#typescript)
41 + - [Resources](#resources)
42 + - [Credits](#credits)
43 + - [License](#license)
44 +
45 +## Features
46 +
47 +- Make [XMLHttpRequests](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) from the browser
48 +- Make [http](http://nodejs.org/api/http.html) requests from node.js
49 +- Supports the [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) API
50 +- Intercept request and response
51 +- Transform request and response data
52 +- Cancel requests
53 +- Automatic transforms for JSON data
54 +- Client side support for protecting against [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)
55 +
56 +## Browser Support
57 +
58 +![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png) |
59 +--- | --- | --- | --- | --- | --- |
60 +Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |
61 +
62 +[![Browser Matrix](https://saucelabs.com/open_sauce/build_matrix/axios.svg)](https://saucelabs.com/u/axios)
63 +
64 +## Installing
65 +
66 +Using npm:
67 +
68 +```bash
69 +$ npm install axios
70 +```
71 +
72 +Using bower:
73 +
74 +```bash
75 +$ bower install axios
76 +```
77 +
78 +Using yarn:
79 +
80 +```bash
81 +$ yarn add axios
82 +```
83 +
84 +Using jsDelivr CDN:
85 +
86 +```html
87 +<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
88 +```
89 +
90 +Using unpkg CDN:
91 +
92 +```html
93 +<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
94 +```
95 +
96 +## Example
97 +
98 +### note: CommonJS usage
99 +In order to gain the TypeScript typings (for intellisense / autocomplete) while using CommonJS imports with `require()` use the following approach:
100 +
101 +```js
102 +const axios = require('axios').default;
103 +
104 +// axios.<method> will now provide autocomplete and parameter typings
105 +```
106 +
107 +Performing a `GET` request
108 +
109 +```js
110 +const axios = require('axios');
111 +
112 +// Make a request for a user with a given ID
113 +axios.get('/user?ID=12345')
114 + .then(function (response) {
115 + // handle success
116 + console.log(response);
117 + })
118 + .catch(function (error) {
119 + // handle error
120 + console.log(error);
121 + })
122 + .then(function () {
123 + // always executed
124 + });
125 +
126 +// Optionally the request above could also be done as
127 +axios.get('/user', {
128 + params: {
129 + ID: 12345
130 + }
131 + })
132 + .then(function (response) {
133 + console.log(response);
134 + })
135 + .catch(function (error) {
136 + console.log(error);
137 + })
138 + .then(function () {
139 + // always executed
140 + });
141 +
142 +// Want to use async/await? Add the `async` keyword to your outer function/method.
143 +async function getUser() {
144 + try {
145 + const response = await axios.get('/user?ID=12345');
146 + console.log(response);
147 + } catch (error) {
148 + console.error(error);
149 + }
150 +}
151 +```
152 +
153 +> **NOTE:** `async/await` is part of ECMAScript 2017 and is not supported in Internet
154 +> Explorer and older browsers, so use with caution.
155 +
156 +Performing a `POST` request
157 +
158 +```js
159 +axios.post('/user', {
160 + firstName: 'Fred',
161 + lastName: 'Flintstone'
162 + })
163 + .then(function (response) {
164 + console.log(response);
165 + })
166 + .catch(function (error) {
167 + console.log(error);
168 + });
169 +```
170 +
171 +Performing multiple concurrent requests
172 +
173 +```js
174 +function getUserAccount() {
175 + return axios.get('/user/12345');
176 +}
177 +
178 +function getUserPermissions() {
179 + return axios.get('/user/12345/permissions');
180 +}
181 +
182 +Promise.all([getUserAccount(), getUserPermissions()])
183 + .then(function (results) {
184 + const acct = results[0];
185 + const perm = results[1];
186 + });
187 +```
188 +
189 +## axios API
190 +
191 +Requests can be made by passing the relevant config to `axios`.
192 +
193 +##### axios(config)
194 +
195 +```js
196 +// Send a POST request
197 +axios({
198 + method: 'post',
199 + url: '/user/12345',
200 + data: {
201 + firstName: 'Fred',
202 + lastName: 'Flintstone'
203 + }
204 +});
205 +```
206 +
207 +```js
208 +// GET request for remote image in node.js
209 +axios({
210 + method: 'get',
211 + url: 'http://bit.ly/2mTM3nY',
212 + responseType: 'stream'
213 +})
214 + .then(function (response) {
215 + response.data.pipe(fs.createWriteStream('ada_lovelace.jpg'))
216 + });
217 +```
218 +
219 +##### axios(url[, config])
220 +
221 +```js
222 +// Send a GET request (default method)
223 +axios('/user/12345');
224 +```
225 +
226 +### Request method aliases
227 +
228 +For convenience aliases have been provided for all supported request methods.
229 +
230 +##### axios.request(config)
231 +##### axios.get(url[, config])
232 +##### axios.delete(url[, config])
233 +##### axios.head(url[, config])
234 +##### axios.options(url[, config])
235 +##### axios.post(url[, data[, config]])
236 +##### axios.put(url[, data[, config]])
237 +##### axios.patch(url[, data[, config]])
238 +
239 +###### NOTE
240 +When using the alias methods `url`, `method`, and `data` properties don't need to be specified in config.
241 +
242 +### Concurrency (Deprecated)
243 +Please use `Promise.all` to replace the below functions.
244 +
245 +Helper functions for dealing with concurrent requests.
246 +
247 +axios.all(iterable)
248 +axios.spread(callback)
249 +
250 +### Creating an instance
251 +
252 +You can create a new instance of axios with a custom config.
253 +
254 +##### axios.create([config])
255 +
256 +```js
257 +const instance = axios.create({
258 + baseURL: 'https://some-domain.com/api/',
259 + timeout: 1000,
260 + headers: {'X-Custom-Header': 'foobar'}
261 +});
262 +```
263 +
264 +### Instance methods
265 +
266 +The available instance methods are listed below. The specified config will be merged with the instance config.
267 +
268 +##### axios#request(config)
269 +##### axios#get(url[, config])
270 +##### axios#delete(url[, config])
271 +##### axios#head(url[, config])
272 +##### axios#options(url[, config])
273 +##### axios#post(url[, data[, config]])
274 +##### axios#put(url[, data[, config]])
275 +##### axios#patch(url[, data[, config]])
276 +##### axios#getUri([config])
277 +
278 +## Request Config
279 +
280 +These are the available config options for making requests. Only the `url` is required. Requests will default to `GET` if `method` is not specified.
281 +
282 +```js
283 +{
284 + // `url` is the server URL that will be used for the request
285 + url: '/user',
286 +
287 + // `method` is the request method to be used when making the request
288 + method: 'get', // default
289 +
290 + // `baseURL` will be prepended to `url` unless `url` is absolute.
291 + // It can be convenient to set `baseURL` for an instance of axios to pass relative URLs
292 + // to methods of that instance.
293 + baseURL: 'https://some-domain.com/api/',
294 +
295 + // `transformRequest` allows changes to the request data before it is sent to the server
296 + // This is only applicable for request methods 'PUT', 'POST', 'PATCH' and 'DELETE'
297 + // The last function in the array must return a string or an instance of Buffer, ArrayBuffer,
298 + // FormData or Stream
299 + // You may modify the headers object.
300 + transformRequest: [function (data, headers) {
301 + // Do whatever you want to transform the data
302 +
303 + return data;
304 + }],
305 +
306 + // `transformResponse` allows changes to the response data to be made before
307 + // it is passed to then/catch
308 + transformResponse: [function (data) {
309 + // Do whatever you want to transform the data
310 +
311 + return data;
312 + }],
313 +
314 + // `headers` are custom headers to be sent
315 + headers: {'X-Requested-With': 'XMLHttpRequest'},
316 +
317 + // `params` are the URL parameters to be sent with the request
318 + // Must be a plain object or a URLSearchParams object
319 + params: {
320 + ID: 12345
321 + },
322 +
323 + // `paramsSerializer` is an optional function in charge of serializing `params`
324 + // (e.g. https://www.npmjs.com/package/qs, http://api.jquery.com/jquery.param/)
325 + paramsSerializer: function (params) {
326 + return Qs.stringify(params, {arrayFormat: 'brackets'})
327 + },
328 +
329 + // `data` is the data to be sent as the request body
330 + // Only applicable for request methods 'PUT', 'POST', 'DELETE , and 'PATCH'
331 + // When no `transformRequest` is set, must be of one of the following types:
332 + // - string, plain object, ArrayBuffer, ArrayBufferView, URLSearchParams
333 + // - Browser only: FormData, File, Blob
334 + // - Node only: Stream, Buffer
335 + data: {
336 + firstName: 'Fred'
337 + },
338 +
339 + // syntax alternative to send data into the body
340 + // method post
341 + // only the value is sent, not the key
342 + data: 'Country=Brasil&City=Belo Horizonte',
343 +
344 + // `timeout` specifies the number of milliseconds before the request times out.
345 + // If the request takes longer than `timeout`, the request will be aborted.
346 + timeout: 1000, // default is `0` (no timeout)
347 +
348 + // `withCredentials` indicates whether or not cross-site Access-Control requests
349 + // should be made using credentials
350 + withCredentials: false, // default
351 +
352 + // `adapter` allows custom handling of requests which makes testing easier.
353 + // Return a promise and supply a valid response (see lib/adapters/README.md).
354 + adapter: function (config) {
355 + /* ... */
356 + },
357 +
358 + // `auth` indicates that HTTP Basic auth should be used, and supplies credentials.
359 + // This will set an `Authorization` header, overwriting any existing
360 + // `Authorization` custom headers you have set using `headers`.
361 + // Please note that only HTTP Basic auth is configurable through this parameter.
362 + // For Bearer tokens and such, use `Authorization` custom headers instead.
363 + auth: {
364 + username: 'janedoe',
365 + password: 's00pers3cret'
366 + },
367 +
368 + // `responseType` indicates the type of data that the server will respond with
369 + // options are: 'arraybuffer', 'document', 'json', 'text', 'stream'
370 + // browser only: 'blob'
371 + responseType: 'json', // default
372 +
373 + // `responseEncoding` indicates encoding to use for decoding responses (Node.js only)
374 + // Note: Ignored for `responseType` of 'stream' or client-side requests
375 + responseEncoding: 'utf8', // default
376 +
377 + // `xsrfCookieName` is the name of the cookie to use as a value for xsrf token
378 + xsrfCookieName: 'XSRF-TOKEN', // default
379 +
380 + // `xsrfHeaderName` is the name of the http header that carries the xsrf token value
381 + xsrfHeaderName: 'X-XSRF-TOKEN', // default
382 +
383 + // `onUploadProgress` allows handling of progress events for uploads
384 + // browser only
385 + onUploadProgress: function (progressEvent) {
386 + // Do whatever you want with the native progress event
387 + },
388 +
389 + // `onDownloadProgress` allows handling of progress events for downloads
390 + // browser only
391 + onDownloadProgress: function (progressEvent) {
392 + // Do whatever you want with the native progress event
393 + },
394 +
395 + // `maxContentLength` defines the max size of the http response content in bytes allowed in node.js
396 + maxContentLength: 2000,
397 +
398 + // `maxBodyLength` (Node only option) defines the max size of the http request content in bytes allowed
399 + maxBodyLength: 2000,
400 +
401 + // `validateStatus` defines whether to resolve or reject the promise for a given
402 + // HTTP response status code. If `validateStatus` returns `true` (or is set to `null`
403 + // or `undefined`), the promise will be resolved; otherwise, the promise will be
404 + // rejected.
405 + validateStatus: function (status) {
406 + return status >= 200 && status < 300; // default
407 + },
408 +
409 + // `maxRedirects` defines the maximum number of redirects to follow in node.js.
410 + // If set to 0, no redirects will be followed.
411 + maxRedirects: 5, // default
412 +
413 + // `socketPath` defines a UNIX Socket to be used in node.js.
414 + // e.g. '/var/run/docker.sock' to send requests to the docker daemon.
415 + // Only either `socketPath` or `proxy` can be specified.
416 + // If both are specified, `socketPath` is used.
417 + socketPath: null, // default
418 +
419 + // `httpAgent` and `httpsAgent` define a custom agent to be used when performing http
420 + // and https requests, respectively, in node.js. This allows options to be added like
421 + // `keepAlive` that are not enabled by default.
422 + httpAgent: new http.Agent({ keepAlive: true }),
423 + httpsAgent: new https.Agent({ keepAlive: true }),
424 +
425 + // `proxy` defines the hostname and port of the proxy server.
426 + // You can also define your proxy using the conventional `http_proxy` and
427 + // `https_proxy` environment variables. If you are using environment variables
428 + // for your proxy configuration, you can also define a `no_proxy` environment
429 + // variable as a comma-separated list of domains that should not be proxied.
430 + // Use `false` to disable proxies, ignoring environment variables.
431 + // `auth` indicates that HTTP Basic auth should be used to connect to the proxy, and
432 + // supplies credentials.
433 + // This will set an `Proxy-Authorization` header, overwriting any existing
434 + // `Proxy-Authorization` custom headers you have set using `headers`.
435 + proxy: {
436 + host: '127.0.0.1',
437 + port: 9000,
438 + auth: {
439 + username: 'mikeymike',
440 + password: 'rapunz3l'
441 + }
442 + },
443 +
444 + // `cancelToken` specifies a cancel token that can be used to cancel the request
445 + // (see Cancellation section below for details)
446 + cancelToken: new CancelToken(function (cancel) {
447 + }),
448 +
449 + // `decompress` indicates whether or not the response body should be decompressed
450 + // automatically. If set to `true` will also remove the 'content-encoding' header
451 + // from the responses objects of all decompressed responses
452 + // - Node only (XHR cannot turn off decompression)
453 + decompress: true // default
454 +
455 +}
456 +```
457 +
458 +## Response Schema
459 +
460 +The response for a request contains the following information.
461 +
462 +```js
463 +{
464 + // `data` is the response that was provided by the server
465 + data: {},
466 +
467 + // `status` is the HTTP status code from the server response
468 + status: 200,
469 +
470 + // `statusText` is the HTTP status message from the server response
471 + statusText: 'OK',
472 +
473 + // `headers` the HTTP headers that the server responded with
474 + // All header names are lower cased and can be accessed using the bracket notation.
475 + // Example: `response.headers['content-type']`
476 + headers: {},
477 +
478 + // `config` is the config that was provided to `axios` for the request
479 + config: {},
480 +
481 + // `request` is the request that generated this response
482 + // It is the last ClientRequest instance in node.js (in redirects)
483 + // and an XMLHttpRequest instance in the browser
484 + request: {}
485 +}
486 +```
487 +
488 +When using `then`, you will receive the response as follows:
489 +
490 +```js
491 +axios.get('/user/12345')
492 + .then(function (response) {
493 + console.log(response.data);
494 + console.log(response.status);
495 + console.log(response.statusText);
496 + console.log(response.headers);
497 + console.log(response.config);
498 + });
499 +```
500 +
501 +When using `catch`, or passing a [rejection callback](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then) as second parameter of `then`, the response will be available through the `error` object as explained in the [Handling Errors](#handling-errors) section.
502 +
503 +## Config Defaults
504 +
505 +You can specify config defaults that will be applied to every request.
506 +
507 +### Global axios defaults
508 +
509 +```js
510 +axios.defaults.baseURL = 'https://api.example.com';
511 +axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
512 +axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
513 +```
514 +
515 +### Custom instance defaults
516 +
517 +```js
518 +// Set config defaults when creating the instance
519 +const instance = axios.create({
520 + baseURL: 'https://api.example.com'
521 +});
522 +
523 +// Alter defaults after instance has been created
524 +instance.defaults.headers.common['Authorization'] = AUTH_TOKEN;
525 +```
526 +
527 +### Config order of precedence
528 +
529 +Config will be merged with an order of precedence. The order is library defaults found in [lib/defaults.js](https://github.com/axios/axios/blob/master/lib/defaults.js#L28), then `defaults` property of the instance, and finally `config` argument for the request. The latter will take precedence over the former. Here's an example.
530 +
531 +```js
532 +// Create an instance using the config defaults provided by the library
533 +// At this point the timeout config value is `0` as is the default for the library
534 +const instance = axios.create();
535 +
536 +// Override timeout default for the library
537 +// Now all requests using this instance will wait 2.5 seconds before timing out
538 +instance.defaults.timeout = 2500;
539 +
540 +// Override timeout for this request as it's known to take a long time
541 +instance.get('/longRequest', {
542 + timeout: 5000
543 +});
544 +```
545 +
546 +## Interceptors
547 +
548 +You can intercept requests or responses before they are handled by `then` or `catch`.
549 +
550 +```js
551 +// Add a request interceptor
552 +axios.interceptors.request.use(function (config) {
553 + // Do something before request is sent
554 + return config;
555 + }, function (error) {
556 + // Do something with request error
557 + return Promise.reject(error);
558 + });
559 +
560 +// Add a response interceptor
561 +axios.interceptors.response.use(function (response) {
562 + // Any status code that lie within the range of 2xx cause this function to trigger
563 + // Do something with response data
564 + return response;
565 + }, function (error) {
566 + // Any status codes that falls outside the range of 2xx cause this function to trigger
567 + // Do something with response error
568 + return Promise.reject(error);
569 + });
570 +```
571 +
572 +If you need to remove an interceptor later you can.
573 +
574 +```js
575 +const myInterceptor = axios.interceptors.request.use(function () {/*...*/});
576 +axios.interceptors.request.eject(myInterceptor);
577 +```
578 +
579 +You can add interceptors to a custom instance of axios.
580 +
581 +```js
582 +const instance = axios.create();
583 +instance.interceptors.request.use(function () {/*...*/});
584 +```
585 +
586 +## Handling Errors
587 +
588 +```js
589 +axios.get('/user/12345')
590 + .catch(function (error) {
591 + if (error.response) {
592 + // The request was made and the server responded with a status code
593 + // that falls out of the range of 2xx
594 + console.log(error.response.data);
595 + console.log(error.response.status);
596 + console.log(error.response.headers);
597 + } else if (error.request) {
598 + // The request was made but no response was received
599 + // `error.request` is an instance of XMLHttpRequest in the browser and an instance of
600 + // http.ClientRequest in node.js
601 + console.log(error.request);
602 + } else {
603 + // Something happened in setting up the request that triggered an Error
604 + console.log('Error', error.message);
605 + }
606 + console.log(error.config);
607 + });
608 +```
609 +
610 +Using the `validateStatus` config option, you can define HTTP code(s) that should throw an error.
611 +
612 +```js
613 +axios.get('/user/12345', {
614 + validateStatus: function (status) {
615 + return status < 500; // Resolve only if the status code is less than 500
616 + }
617 +})
618 +```
619 +
620 +Using `toJSON` you get an object with more information about the HTTP error.
621 +
622 +```js
623 +axios.get('/user/12345')
624 + .catch(function (error) {
625 + console.log(error.toJSON());
626 + });
627 +```
628 +
629 +## Cancellation
630 +
631 +You can cancel a request using a *cancel token*.
632 +
633 +> The axios cancel token API is based on the withdrawn [cancelable promises proposal](https://github.com/tc39/proposal-cancelable-promises).
634 +
635 +You can create a cancel token using the `CancelToken.source` factory as shown below:
636 +
637 +```js
638 +const CancelToken = axios.CancelToken;
639 +const source = CancelToken.source();
640 +
641 +axios.get('/user/12345', {
642 + cancelToken: source.token
643 +}).catch(function (thrown) {
644 + if (axios.isCancel(thrown)) {
645 + console.log('Request canceled', thrown.message);
646 + } else {
647 + // handle error
648 + }
649 +});
650 +
651 +axios.post('/user/12345', {
652 + name: 'new name'
653 +}, {
654 + cancelToken: source.token
655 +})
656 +
657 +// cancel the request (the message parameter is optional)
658 +source.cancel('Operation canceled by the user.');
659 +```
660 +
661 +You can also create a cancel token by passing an executor function to the `CancelToken` constructor:
662 +
663 +```js
664 +const CancelToken = axios.CancelToken;
665 +let cancel;
666 +
667 +axios.get('/user/12345', {
668 + cancelToken: new CancelToken(function executor(c) {
669 + // An executor function receives a cancel function as a parameter
670 + cancel = c;
671 + })
672 +});
673 +
674 +// cancel the request
675 +cancel();
676 +```
677 +
678 +> Note: you can cancel several requests with the same cancel token.
679 +
680 +## Using application/x-www-form-urlencoded format
681 +
682 +By default, axios serializes JavaScript objects to `JSON`. To send data in the `application/x-www-form-urlencoded` format instead, you can use one of the following options.
683 +
684 +### Browser
685 +
686 +In a browser, you can use the [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) API as follows:
687 +
688 +```js
689 +const params = new URLSearchParams();
690 +params.append('param1', 'value1');
691 +params.append('param2', 'value2');
692 +axios.post('/foo', params);
693 +```
694 +
695 +> Note that `URLSearchParams` is not supported by all browsers (see [caniuse.com](http://www.caniuse.com/#feat=urlsearchparams)), but there is a [polyfill](https://github.com/WebReflection/url-search-params) available (make sure to polyfill the global environment).
696 +
697 +Alternatively, you can encode data using the [`qs`](https://github.com/ljharb/qs) library:
698 +
699 +```js
700 +const qs = require('qs');
701 +axios.post('/foo', qs.stringify({ 'bar': 123 }));
702 +```
703 +
704 +Or in another way (ES6),
705 +
706 +```js
707 +import qs from 'qs';
708 +const data = { 'bar': 123 };
709 +const options = {
710 + method: 'POST',
711 + headers: { 'content-type': 'application/x-www-form-urlencoded' },
712 + data: qs.stringify(data),
713 + url,
714 +};
715 +axios(options);
716 +```
717 +
718 +### Node.js
719 +
720 +#### Query string
721 +
722 +In node.js, you can use the [`querystring`](https://nodejs.org/api/querystring.html) module as follows:
723 +
724 +```js
725 +const querystring = require('querystring');
726 +axios.post('http://something.com/', querystring.stringify({ foo: 'bar' }));
727 +```
728 +
729 +or ['URLSearchParams'](https://nodejs.org/api/url.html#url_class_urlsearchparams) from ['url module'](https://nodejs.org/api/url.html) as follows:
730 +
731 +```js
732 +const url = require('url');
733 +const params = new url.URLSearchParams({ foo: 'bar' });
734 +axios.post('http://something.com/', params.toString());
735 +```
736 +
737 +You can also use the [`qs`](https://github.com/ljharb/qs) library.
738 +
739 +###### NOTE
740 +The `qs` library is preferable if you need to stringify nested objects, as the `querystring` method has known issues with that use case (https://github.com/nodejs/node-v0.x-archive/issues/1665).
741 +
742 +#### Form data
743 +
744 +In node.js, you can use the [`form-data`](https://github.com/form-data/form-data) library as follows:
745 +
746 +```js
747 +const FormData = require('form-data');
748 +
749 +const form = new FormData();
750 +form.append('my_field', 'my value');
751 +form.append('my_buffer', new Buffer(10));
752 +form.append('my_file', fs.createReadStream('/foo/bar.jpg'));
753 +
754 +axios.post('https://example.com', form, { headers: form.getHeaders() })
755 +```
756 +
757 +Alternatively, use an interceptor:
758 +
759 +```js
760 +axios.interceptors.request.use(config => {
761 + if (config.data instanceof FormData) {
762 + Object.assign(config.headers, config.data.getHeaders());
763 + }
764 + return config;
765 +});
766 +```
767 +
768 +## Semver
769 +
770 +Until axios reaches a `1.0` release, breaking changes will be released with a new minor version. For example `0.5.1`, and `0.5.4` will have the same API, but `0.6.0` will have breaking changes.
771 +
772 +## Promises
773 +
774 +axios depends on a native ES6 Promise implementation to be [supported](http://caniuse.com/promises).
775 +If your environment doesn't support ES6 Promises, you can [polyfill](https://github.com/jakearchibald/es6-promise).
776 +
777 +## TypeScript
778 +axios includes [TypeScript](http://typescriptlang.org) definitions.
779 +```typescript
780 +import axios from 'axios';
781 +axios.get('/user?ID=12345');
782 +```
783 +
784 +## Resources
785 +
786 +* [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md)
787 +* [Upgrade Guide](https://github.com/axios/axios/blob/master/UPGRADE_GUIDE.md)
788 +* [Ecosystem](https://github.com/axios/axios/blob/master/ECOSYSTEM.md)
789 +* [Contributing Guide](https://github.com/axios/axios/blob/master/CONTRIBUTING.md)
790 +* [Code of Conduct](https://github.com/axios/axios/blob/master/CODE_OF_CONDUCT.md)
791 +
792 +## Credits
793 +
794 +axios is heavily inspired by the [$http service](https://docs.angularjs.org/api/ng/service/$http) provided in [Angular](https://angularjs.org/). Ultimately axios is an effort to provide a standalone `$http`-like service for use outside of Angular.
795 +
796 +## License
797 +
798 +[MIT](LICENSE)
1 +# Upgrade Guide
2 +
3 +### 0.15.x -> 0.16.0
4 +
5 +#### `Promise` Type Declarations
6 +
7 +The `Promise` type declarations have been removed from the axios typings in favor of the built-in type declarations. If you use axios in a TypeScript project that targets `ES5`, please make sure to include the `es2015.promise` lib. Please see [this post](https://blog.mariusschulz.com/2016/11/25/typescript-2-0-built-in-type-declarations) for details.
8 +
9 +### 0.13.x -> 0.14.0
10 +
11 +#### TypeScript Definitions
12 +
13 +The axios TypeScript definitions have been updated to match the axios API and use the ES2015 module syntax.
14 +
15 +Please use the following `import` statement to import axios in TypeScript:
16 +
17 +```typescript
18 +import axios from 'axios';
19 +
20 +axios.get('/foo')
21 + .then(response => console.log(response))
22 + .catch(error => console.log(error));
23 +```
24 +
25 +#### `agent` Config Option
26 +
27 +The `agent` config option has been replaced with two new options: `httpAgent` and `httpsAgent`. Please use them instead.
28 +
29 +```js
30 +{
31 + // Define a custom agent for HTTP
32 + httpAgent: new http.Agent({ keepAlive: true }),
33 + // Define a custom agent for HTTPS
34 + httpsAgent: new https.Agent({ keepAlive: true })
35 +}
36 +```
37 +
38 +#### `progress` Config Option
39 +
40 +The `progress` config option has been replaced with the `onUploadProgress` and `onDownloadProgress` options.
41 +
42 +```js
43 +{
44 + // Define a handler for upload progress events
45 + onUploadProgress: function (progressEvent) {
46 + // ...
47 + },
48 +
49 + // Define a handler for download progress events
50 + onDownloadProgress: function (progressEvent) {
51 + // ...
52 + }
53 +}
54 +```
55 +
56 +### 0.12.x -> 0.13.0
57 +
58 +The `0.13.0` release contains several changes to custom adapters and error handling.
59 +
60 +#### Error Handling
61 +
62 +Previous to this release an error could either be a server response with bad status code or an actual `Error`. With this release Promise will always reject with an `Error`. In the case that a response was received, the `Error` will also include the response.
63 +
64 +```js
65 +axios.get('/user/12345')
66 + .catch((error) => {
67 + console.log(error.message);
68 + console.log(error.code); // Not always specified
69 + console.log(error.config); // The config that was used to make the request
70 + console.log(error.response); // Only available if response was received from the server
71 + });
72 +```
73 +
74 +#### Request Adapters
75 +
76 +This release changes a few things about how request adapters work. Please take note if you are using your own custom adapter.
77 +
78 +1. Response transformer is now called outside of adapter.
79 +2. Request adapter returns a `Promise`.
80 +
81 +This means that you no longer need to invoke `transformData` on response data. You will also no longer receive `resolve` and `reject` as arguments in your adapter.
82 +
83 +Previous code:
84 +
85 +```js
86 +function myAdapter(resolve, reject, config) {
87 + var response = {
88 + data: transformData(
89 + responseData,
90 + responseHeaders,
91 + config.transformResponse
92 + ),
93 + status: request.status,
94 + statusText: request.statusText,
95 + headers: responseHeaders
96 + };
97 + settle(resolve, reject, response);
98 +}
99 +```
100 +
101 +New code:
102 +
103 +```js
104 +function myAdapter(config) {
105 + return new Promise(function (resolve, reject) {
106 + var response = {
107 + data: responseData,
108 + status: request.status,
109 + statusText: request.statusText,
110 + headers: responseHeaders
111 + };
112 + settle(resolve, reject, response);
113 + });
114 +}
115 +```
116 +
117 +See the related commits for more details:
118 +- [Response transformers](https://github.com/axios/axios/commit/10eb23865101f9347570552c04e9d6211376e25e)
119 +- [Request adapter Promise](https://github.com/axios/axios/commit/157efd5615890301824e3121cc6c9d2f9b21f94a)
120 +
121 +### 0.5.x -> 0.6.0
122 +
123 +The `0.6.0` release contains mostly bug fixes, but there are a couple things to be aware of when upgrading.
124 +
125 +#### ES6 Promise Polyfill
126 +
127 +Up until the `0.6.0` release ES6 `Promise` was being polyfilled using [es6-promise](https://github.com/jakearchibald/es6-promise). With this release, the polyfill has been removed, and you will need to supply it yourself if your environment needs it.
128 +
129 +```js
130 +require('es6-promise').polyfill();
131 +var axios = require('axios');
132 +```
133 +
134 +This will polyfill the global environment, and only needs to be done once.
135 +
136 +#### `axios.success`/`axios.error`
137 +
138 +The `success`, and `error` aliases were deprecated in [0.4.0](https://github.com/axios/axios/blob/master/CHANGELOG.md#040-oct-03-2014). As of this release they have been removed entirely. Instead please use `axios.then`, and `axios.catch` respectively.
139 +
140 +```js
141 +axios.get('some/url')
142 + .then(function (res) {
143 + /* ... */
144 + })
145 + .catch(function (err) {
146 + /* ... */
147 + });
148 +```
149 +
150 +#### UMD
151 +
152 +Previous versions of axios shipped with an AMD, CommonJS, and Global build. This has all been rolled into a single UMD build.
153 +
154 +```js
155 +// AMD
156 +require(['bower_components/axios/dist/axios'], function (axios) {
157 + /* ... */
158 +});
159 +
160 +// CommonJS
161 +var axios = require('axios/dist/axios');
162 +```
1 +/* axios v0.21.0 | (c) 2020 by Matt Zabriskie */
2 +(function webpackUniversalModuleDefinition(root, factory) {
3 + if(typeof exports === 'object' && typeof module === 'object')
4 + module.exports = factory();
5 + else if(typeof define === 'function' && define.amd)
6 + define([], factory);
7 + else if(typeof exports === 'object')
8 + exports["axios"] = factory();
9 + else
10 + root["axios"] = factory();
11 +})(this, function() {
12 +return /******/ (function(modules) { // webpackBootstrap
13 +/******/ // The module cache
14 +/******/ var installedModules = {};
15 +/******/
16 +/******/ // The require function
17 +/******/ function __webpack_require__(moduleId) {
18 +/******/
19 +/******/ // Check if module is in cache
20 +/******/ if(installedModules[moduleId])
21 +/******/ return installedModules[moduleId].exports;
22 +/******/
23 +/******/ // Create a new module (and put it into the cache)
24 +/******/ var module = installedModules[moduleId] = {
25 +/******/ exports: {},
26 +/******/ id: moduleId,
27 +/******/ loaded: false
28 +/******/ };
29 +/******/
30 +/******/ // Execute the module function
31 +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
32 +/******/
33 +/******/ // Flag the module as loaded
34 +/******/ module.loaded = true;
35 +/******/
36 +/******/ // Return the exports of the module
37 +/******/ return module.exports;
38 +/******/ }
39 +/******/
40 +/******/
41 +/******/ // expose the modules object (__webpack_modules__)
42 +/******/ __webpack_require__.m = modules;
43 +/******/
44 +/******/ // expose the module cache
45 +/******/ __webpack_require__.c = installedModules;
46 +/******/
47 +/******/ // __webpack_public_path__
48 +/******/ __webpack_require__.p = "";
49 +/******/
50 +/******/ // Load entry module and return exports
51 +/******/ return __webpack_require__(0);
52 +/******/ })
53 +/************************************************************************/
54 +/******/ ([
55 +/* 0 */
56 +/***/ (function(module, exports, __webpack_require__) {
57 +
58 + module.exports = __webpack_require__(1);
59 +
60 +/***/ }),
61 +/* 1 */
62 +/***/ (function(module, exports, __webpack_require__) {
63 +
64 + 'use strict';
65 +
66 + var utils = __webpack_require__(2);
67 + var bind = __webpack_require__(3);
68 + var Axios = __webpack_require__(4);
69 + var mergeConfig = __webpack_require__(22);
70 + var defaults = __webpack_require__(10);
71 +
72 + /**
73 + * Create an instance of Axios
74 + *
75 + * @param {Object} defaultConfig The default config for the instance
76 + * @return {Axios} A new instance of Axios
77 + */
78 + function createInstance(defaultConfig) {
79 + var context = new Axios(defaultConfig);
80 + var instance = bind(Axios.prototype.request, context);
81 +
82 + // Copy axios.prototype to instance
83 + utils.extend(instance, Axios.prototype, context);
84 +
85 + // Copy context to instance
86 + utils.extend(instance, context);
87 +
88 + return instance;
89 + }
90 +
91 + // Create the default instance to be exported
92 + var axios = createInstance(defaults);
93 +
94 + // Expose Axios class to allow class inheritance
95 + axios.Axios = Axios;
96 +
97 + // Factory for creating new instances
98 + axios.create = function create(instanceConfig) {
99 + return createInstance(mergeConfig(axios.defaults, instanceConfig));
100 + };
101 +
102 + // Expose Cancel & CancelToken
103 + axios.Cancel = __webpack_require__(23);
104 + axios.CancelToken = __webpack_require__(24);
105 + axios.isCancel = __webpack_require__(9);
106 +
107 + // Expose all/spread
108 + axios.all = function all(promises) {
109 + return Promise.all(promises);
110 + };
111 + axios.spread = __webpack_require__(25);
112 +
113 + module.exports = axios;
114 +
115 + // Allow use of default import syntax in TypeScript
116 + module.exports.default = axios;
117 +
118 +
119 +/***/ }),
120 +/* 2 */
121 +/***/ (function(module, exports, __webpack_require__) {
122 +
123 + 'use strict';
124 +
125 + var bind = __webpack_require__(3);
126 +
127 + /*global toString:true*/
128 +
129 + // utils is a library of generic helper functions non-specific to axios
130 +
131 + var toString = Object.prototype.toString;
132 +
133 + /**
134 + * Determine if a value is an Array
135 + *
136 + * @param {Object} val The value to test
137 + * @returns {boolean} True if value is an Array, otherwise false
138 + */
139 + function isArray(val) {
140 + return toString.call(val) === '[object Array]';
141 + }
142 +
143 + /**
144 + * Determine if a value is undefined
145 + *
146 + * @param {Object} val The value to test
147 + * @returns {boolean} True if the value is undefined, otherwise false
148 + */
149 + function isUndefined(val) {
150 + return typeof val === 'undefined';
151 + }
152 +
153 + /**
154 + * Determine if a value is a Buffer
155 + *
156 + * @param {Object} val The value to test
157 + * @returns {boolean} True if value is a Buffer, otherwise false
158 + */
159 + function isBuffer(val) {
160 + return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
161 + && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
162 + }
163 +
164 + /**
165 + * Determine if a value is an ArrayBuffer
166 + *
167 + * @param {Object} val The value to test
168 + * @returns {boolean} True if value is an ArrayBuffer, otherwise false
169 + */
170 + function isArrayBuffer(val) {
171 + return toString.call(val) === '[object ArrayBuffer]';
172 + }
173 +
174 + /**
175 + * Determine if a value is a FormData
176 + *
177 + * @param {Object} val The value to test
178 + * @returns {boolean} True if value is an FormData, otherwise false
179 + */
180 + function isFormData(val) {
181 + return (typeof FormData !== 'undefined') && (val instanceof FormData);
182 + }
183 +
184 + /**
185 + * Determine if a value is a view on an ArrayBuffer
186 + *
187 + * @param {Object} val The value to test
188 + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
189 + */
190 + function isArrayBufferView(val) {
191 + var result;
192 + if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
193 + result = ArrayBuffer.isView(val);
194 + } else {
195 + result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
196 + }
197 + return result;
198 + }
199 +
200 + /**
201 + * Determine if a value is a String
202 + *
203 + * @param {Object} val The value to test
204 + * @returns {boolean} True if value is a String, otherwise false
205 + */
206 + function isString(val) {
207 + return typeof val === 'string';
208 + }
209 +
210 + /**
211 + * Determine if a value is a Number
212 + *
213 + * @param {Object} val The value to test
214 + * @returns {boolean} True if value is a Number, otherwise false
215 + */
216 + function isNumber(val) {
217 + return typeof val === 'number';
218 + }
219 +
220 + /**
221 + * Determine if a value is an Object
222 + *
223 + * @param {Object} val The value to test
224 + * @returns {boolean} True if value is an Object, otherwise false
225 + */
226 + function isObject(val) {
227 + return val !== null && typeof val === 'object';
228 + }
229 +
230 + /**
231 + * Determine if a value is a plain Object
232 + *
233 + * @param {Object} val The value to test
234 + * @return {boolean} True if value is a plain Object, otherwise false
235 + */
236 + function isPlainObject(val) {
237 + if (toString.call(val) !== '[object Object]') {
238 + return false;
239 + }
240 +
241 + var prototype = Object.getPrototypeOf(val);
242 + return prototype === null || prototype === Object.prototype;
243 + }
244 +
245 + /**
246 + * Determine if a value is a Date
247 + *
248 + * @param {Object} val The value to test
249 + * @returns {boolean} True if value is a Date, otherwise false
250 + */
251 + function isDate(val) {
252 + return toString.call(val) === '[object Date]';
253 + }
254 +
255 + /**
256 + * Determine if a value is a File
257 + *
258 + * @param {Object} val The value to test
259 + * @returns {boolean} True if value is a File, otherwise false
260 + */
261 + function isFile(val) {
262 + return toString.call(val) === '[object File]';
263 + }
264 +
265 + /**
266 + * Determine if a value is a Blob
267 + *
268 + * @param {Object} val The value to test
269 + * @returns {boolean} True if value is a Blob, otherwise false
270 + */
271 + function isBlob(val) {
272 + return toString.call(val) === '[object Blob]';
273 + }
274 +
275 + /**
276 + * Determine if a value is a Function
277 + *
278 + * @param {Object} val The value to test
279 + * @returns {boolean} True if value is a Function, otherwise false
280 + */
281 + function isFunction(val) {
282 + return toString.call(val) === '[object Function]';
283 + }
284 +
285 + /**
286 + * Determine if a value is a Stream
287 + *
288 + * @param {Object} val The value to test
289 + * @returns {boolean} True if value is a Stream, otherwise false
290 + */
291 + function isStream(val) {
292 + return isObject(val) && isFunction(val.pipe);
293 + }
294 +
295 + /**
296 + * Determine if a value is a URLSearchParams object
297 + *
298 + * @param {Object} val The value to test
299 + * @returns {boolean} True if value is a URLSearchParams object, otherwise false
300 + */
301 + function isURLSearchParams(val) {
302 + return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
303 + }
304 +
305 + /**
306 + * Trim excess whitespace off the beginning and end of a string
307 + *
308 + * @param {String} str The String to trim
309 + * @returns {String} The String freed of excess whitespace
310 + */
311 + function trim(str) {
312 + return str.replace(/^\s*/, '').replace(/\s*$/, '');
313 + }
314 +
315 + /**
316 + * Determine if we're running in a standard browser environment
317 + *
318 + * This allows axios to run in a web worker, and react-native.
319 + * Both environments support XMLHttpRequest, but not fully standard globals.
320 + *
321 + * web workers:
322 + * typeof window -> undefined
323 + * typeof document -> undefined
324 + *
325 + * react-native:
326 + * navigator.product -> 'ReactNative'
327 + * nativescript
328 + * navigator.product -> 'NativeScript' or 'NS'
329 + */
330 + function isStandardBrowserEnv() {
331 + if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
332 + navigator.product === 'NativeScript' ||
333 + navigator.product === 'NS')) {
334 + return false;
335 + }
336 + return (
337 + typeof window !== 'undefined' &&
338 + typeof document !== 'undefined'
339 + );
340 + }
341 +
342 + /**
343 + * Iterate over an Array or an Object invoking a function for each item.
344 + *
345 + * If `obj` is an Array callback will be called passing
346 + * the value, index, and complete array for each item.
347 + *
348 + * If 'obj' is an Object callback will be called passing
349 + * the value, key, and complete object for each property.
350 + *
351 + * @param {Object|Array} obj The object to iterate
352 + * @param {Function} fn The callback to invoke for each item
353 + */
354 + function forEach(obj, fn) {
355 + // Don't bother if no value provided
356 + if (obj === null || typeof obj === 'undefined') {
357 + return;
358 + }
359 +
360 + // Force an array if not already something iterable
361 + if (typeof obj !== 'object') {
362 + /*eslint no-param-reassign:0*/
363 + obj = [obj];
364 + }
365 +
366 + if (isArray(obj)) {
367 + // Iterate over array values
368 + for (var i = 0, l = obj.length; i < l; i++) {
369 + fn.call(null, obj[i], i, obj);
370 + }
371 + } else {
372 + // Iterate over object keys
373 + for (var key in obj) {
374 + if (Object.prototype.hasOwnProperty.call(obj, key)) {
375 + fn.call(null, obj[key], key, obj);
376 + }
377 + }
378 + }
379 + }
380 +
381 + /**
382 + * Accepts varargs expecting each argument to be an object, then
383 + * immutably merges the properties of each object and returns result.
384 + *
385 + * When multiple objects contain the same key the later object in
386 + * the arguments list will take precedence.
387 + *
388 + * Example:
389 + *
390 + * ```js
391 + * var result = merge({foo: 123}, {foo: 456});
392 + * console.log(result.foo); // outputs 456
393 + * ```
394 + *
395 + * @param {Object} obj1 Object to merge
396 + * @returns {Object} Result of all merge properties
397 + */
398 + function merge(/* obj1, obj2, obj3, ... */) {
399 + var result = {};
400 + function assignValue(val, key) {
401 + if (isPlainObject(result[key]) && isPlainObject(val)) {
402 + result[key] = merge(result[key], val);
403 + } else if (isPlainObject(val)) {
404 + result[key] = merge({}, val);
405 + } else if (isArray(val)) {
406 + result[key] = val.slice();
407 + } else {
408 + result[key] = val;
409 + }
410 + }
411 +
412 + for (var i = 0, l = arguments.length; i < l; i++) {
413 + forEach(arguments[i], assignValue);
414 + }
415 + return result;
416 + }
417 +
418 + /**
419 + * Extends object a by mutably adding to it the properties of object b.
420 + *
421 + * @param {Object} a The object to be extended
422 + * @param {Object} b The object to copy properties from
423 + * @param {Object} thisArg The object to bind function to
424 + * @return {Object} The resulting value of object a
425 + */
426 + function extend(a, b, thisArg) {
427 + forEach(b, function assignValue(val, key) {
428 + if (thisArg && typeof val === 'function') {
429 + a[key] = bind(val, thisArg);
430 + } else {
431 + a[key] = val;
432 + }
433 + });
434 + return a;
435 + }
436 +
437 + /**
438 + * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
439 + *
440 + * @param {string} content with BOM
441 + * @return {string} content value without BOM
442 + */
443 + function stripBOM(content) {
444 + if (content.charCodeAt(0) === 0xFEFF) {
445 + content = content.slice(1);
446 + }
447 + return content;
448 + }
449 +
450 + module.exports = {
451 + isArray: isArray,
452 + isArrayBuffer: isArrayBuffer,
453 + isBuffer: isBuffer,
454 + isFormData: isFormData,
455 + isArrayBufferView: isArrayBufferView,
456 + isString: isString,
457 + isNumber: isNumber,
458 + isObject: isObject,
459 + isPlainObject: isPlainObject,
460 + isUndefined: isUndefined,
461 + isDate: isDate,
462 + isFile: isFile,
463 + isBlob: isBlob,
464 + isFunction: isFunction,
465 + isStream: isStream,
466 + isURLSearchParams: isURLSearchParams,
467 + isStandardBrowserEnv: isStandardBrowserEnv,
468 + forEach: forEach,
469 + merge: merge,
470 + extend: extend,
471 + trim: trim,
472 + stripBOM: stripBOM
473 + };
474 +
475 +
476 +/***/ }),
477 +/* 3 */
478 +/***/ (function(module, exports) {
479 +
480 + 'use strict';
481 +
482 + module.exports = function bind(fn, thisArg) {
483 + return function wrap() {
484 + var args = new Array(arguments.length);
485 + for (var i = 0; i < args.length; i++) {
486 + args[i] = arguments[i];
487 + }
488 + return fn.apply(thisArg, args);
489 + };
490 + };
491 +
492 +
493 +/***/ }),
494 +/* 4 */
495 +/***/ (function(module, exports, __webpack_require__) {
496 +
497 + 'use strict';
498 +
499 + var utils = __webpack_require__(2);
500 + var buildURL = __webpack_require__(5);
501 + var InterceptorManager = __webpack_require__(6);
502 + var dispatchRequest = __webpack_require__(7);
503 + var mergeConfig = __webpack_require__(22);
504 +
505 + /**
506 + * Create a new instance of Axios
507 + *
508 + * @param {Object} instanceConfig The default config for the instance
509 + */
510 + function Axios(instanceConfig) {
511 + this.defaults = instanceConfig;
512 + this.interceptors = {
513 + request: new InterceptorManager(),
514 + response: new InterceptorManager()
515 + };
516 + }
517 +
518 + /**
519 + * Dispatch a request
520 + *
521 + * @param {Object} config The config specific for this request (merged with this.defaults)
522 + */
523 + Axios.prototype.request = function request(config) {
524 + /*eslint no-param-reassign:0*/
525 + // Allow for axios('example/url'[, config]) a la fetch API
526 + if (typeof config === 'string') {
527 + config = arguments[1] || {};
528 + config.url = arguments[0];
529 + } else {
530 + config = config || {};
531 + }
532 +
533 + config = mergeConfig(this.defaults, config);
534 +
535 + // Set config.method
536 + if (config.method) {
537 + config.method = config.method.toLowerCase();
538 + } else if (this.defaults.method) {
539 + config.method = this.defaults.method.toLowerCase();
540 + } else {
541 + config.method = 'get';
542 + }
543 +
544 + // Hook up interceptors middleware
545 + var chain = [dispatchRequest, undefined];
546 + var promise = Promise.resolve(config);
547 +
548 + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
549 + chain.unshift(interceptor.fulfilled, interceptor.rejected);
550 + });
551 +
552 + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
553 + chain.push(interceptor.fulfilled, interceptor.rejected);
554 + });
555 +
556 + while (chain.length) {
557 + promise = promise.then(chain.shift(), chain.shift());
558 + }
559 +
560 + return promise;
561 + };
562 +
563 + Axios.prototype.getUri = function getUri(config) {
564 + config = mergeConfig(this.defaults, config);
565 + return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
566 + };
567 +
568 + // Provide aliases for supported request methods
569 + utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
570 + /*eslint func-names:0*/
571 + Axios.prototype[method] = function(url, config) {
572 + return this.request(mergeConfig(config || {}, {
573 + method: method,
574 + url: url,
575 + data: (config || {}).data
576 + }));
577 + };
578 + });
579 +
580 + utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
581 + /*eslint func-names:0*/
582 + Axios.prototype[method] = function(url, data, config) {
583 + return this.request(mergeConfig(config || {}, {
584 + method: method,
585 + url: url,
586 + data: data
587 + }));
588 + };
589 + });
590 +
591 + module.exports = Axios;
592 +
593 +
594 +/***/ }),
595 +/* 5 */
596 +/***/ (function(module, exports, __webpack_require__) {
597 +
598 + 'use strict';
599 +
600 + var utils = __webpack_require__(2);
601 +
602 + function encode(val) {
603 + return encodeURIComponent(val).
604 + replace(/%3A/gi, ':').
605 + replace(/%24/g, '$').
606 + replace(/%2C/gi, ',').
607 + replace(/%20/g, '+').
608 + replace(/%5B/gi, '[').
609 + replace(/%5D/gi, ']');
610 + }
611 +
612 + /**
613 + * Build a URL by appending params to the end
614 + *
615 + * @param {string} url The base of the url (e.g., http://www.google.com)
616 + * @param {object} [params] The params to be appended
617 + * @returns {string} The formatted url
618 + */
619 + module.exports = function buildURL(url, params, paramsSerializer) {
620 + /*eslint no-param-reassign:0*/
621 + if (!params) {
622 + return url;
623 + }
624 +
625 + var serializedParams;
626 + if (paramsSerializer) {
627 + serializedParams = paramsSerializer(params);
628 + } else if (utils.isURLSearchParams(params)) {
629 + serializedParams = params.toString();
630 + } else {
631 + var parts = [];
632 +
633 + utils.forEach(params, function serialize(val, key) {
634 + if (val === null || typeof val === 'undefined') {
635 + return;
636 + }
637 +
638 + if (utils.isArray(val)) {
639 + key = key + '[]';
640 + } else {
641 + val = [val];
642 + }
643 +
644 + utils.forEach(val, function parseValue(v) {
645 + if (utils.isDate(v)) {
646 + v = v.toISOString();
647 + } else if (utils.isObject(v)) {
648 + v = JSON.stringify(v);
649 + }
650 + parts.push(encode(key) + '=' + encode(v));
651 + });
652 + });
653 +
654 + serializedParams = parts.join('&');
655 + }
656 +
657 + if (serializedParams) {
658 + var hashmarkIndex = url.indexOf('#');
659 + if (hashmarkIndex !== -1) {
660 + url = url.slice(0, hashmarkIndex);
661 + }
662 +
663 + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
664 + }
665 +
666 + return url;
667 + };
668 +
669 +
670 +/***/ }),
671 +/* 6 */
672 +/***/ (function(module, exports, __webpack_require__) {
673 +
674 + 'use strict';
675 +
676 + var utils = __webpack_require__(2);
677 +
678 + function InterceptorManager() {
679 + this.handlers = [];
680 + }
681 +
682 + /**
683 + * Add a new interceptor to the stack
684 + *
685 + * @param {Function} fulfilled The function to handle `then` for a `Promise`
686 + * @param {Function} rejected The function to handle `reject` for a `Promise`
687 + *
688 + * @return {Number} An ID used to remove interceptor later
689 + */
690 + InterceptorManager.prototype.use = function use(fulfilled, rejected) {
691 + this.handlers.push({
692 + fulfilled: fulfilled,
693 + rejected: rejected
694 + });
695 + return this.handlers.length - 1;
696 + };
697 +
698 + /**
699 + * Remove an interceptor from the stack
700 + *
701 + * @param {Number} id The ID that was returned by `use`
702 + */
703 + InterceptorManager.prototype.eject = function eject(id) {
704 + if (this.handlers[id]) {
705 + this.handlers[id] = null;
706 + }
707 + };
708 +
709 + /**
710 + * Iterate over all the registered interceptors
711 + *
712 + * This method is particularly useful for skipping over any
713 + * interceptors that may have become `null` calling `eject`.
714 + *
715 + * @param {Function} fn The function to call for each interceptor
716 + */
717 + InterceptorManager.prototype.forEach = function forEach(fn) {
718 + utils.forEach(this.handlers, function forEachHandler(h) {
719 + if (h !== null) {
720 + fn(h);
721 + }
722 + });
723 + };
724 +
725 + module.exports = InterceptorManager;
726 +
727 +
728 +/***/ }),
729 +/* 7 */
730 +/***/ (function(module, exports, __webpack_require__) {
731 +
732 + 'use strict';
733 +
734 + var utils = __webpack_require__(2);
735 + var transformData = __webpack_require__(8);
736 + var isCancel = __webpack_require__(9);
737 + var defaults = __webpack_require__(10);
738 +
739 + /**
740 + * Throws a `Cancel` if cancellation has been requested.
741 + */
742 + function throwIfCancellationRequested(config) {
743 + if (config.cancelToken) {
744 + config.cancelToken.throwIfRequested();
745 + }
746 + }
747 +
748 + /**
749 + * Dispatch a request to the server using the configured adapter.
750 + *
751 + * @param {object} config The config that is to be used for the request
752 + * @returns {Promise} The Promise to be fulfilled
753 + */
754 + module.exports = function dispatchRequest(config) {
755 + throwIfCancellationRequested(config);
756 +
757 + // Ensure headers exist
758 + config.headers = config.headers || {};
759 +
760 + // Transform request data
761 + config.data = transformData(
762 + config.data,
763 + config.headers,
764 + config.transformRequest
765 + );
766 +
767 + // Flatten headers
768 + config.headers = utils.merge(
769 + config.headers.common || {},
770 + config.headers[config.method] || {},
771 + config.headers
772 + );
773 +
774 + utils.forEach(
775 + ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
776 + function cleanHeaderConfig(method) {
777 + delete config.headers[method];
778 + }
779 + );
780 +
781 + var adapter = config.adapter || defaults.adapter;
782 +
783 + return adapter(config).then(function onAdapterResolution(response) {
784 + throwIfCancellationRequested(config);
785 +
786 + // Transform response data
787 + response.data = transformData(
788 + response.data,
789 + response.headers,
790 + config.transformResponse
791 + );
792 +
793 + return response;
794 + }, function onAdapterRejection(reason) {
795 + if (!isCancel(reason)) {
796 + throwIfCancellationRequested(config);
797 +
798 + // Transform response data
799 + if (reason && reason.response) {
800 + reason.response.data = transformData(
801 + reason.response.data,
802 + reason.response.headers,
803 + config.transformResponse
804 + );
805 + }
806 + }
807 +
808 + return Promise.reject(reason);
809 + });
810 + };
811 +
812 +
813 +/***/ }),
814 +/* 8 */
815 +/***/ (function(module, exports, __webpack_require__) {
816 +
817 + 'use strict';
818 +
819 + var utils = __webpack_require__(2);
820 +
821 + /**
822 + * Transform the data for a request or a response
823 + *
824 + * @param {Object|String} data The data to be transformed
825 + * @param {Array} headers The headers for the request or response
826 + * @param {Array|Function} fns A single function or Array of functions
827 + * @returns {*} The resulting transformed data
828 + */
829 + module.exports = function transformData(data, headers, fns) {
830 + /*eslint no-param-reassign:0*/
831 + utils.forEach(fns, function transform(fn) {
832 + data = fn(data, headers);
833 + });
834 +
835 + return data;
836 + };
837 +
838 +
839 +/***/ }),
840 +/* 9 */
841 +/***/ (function(module, exports) {
842 +
843 + 'use strict';
844 +
845 + module.exports = function isCancel(value) {
846 + return !!(value && value.__CANCEL__);
847 + };
848 +
849 +
850 +/***/ }),
851 +/* 10 */
852 +/***/ (function(module, exports, __webpack_require__) {
853 +
854 + 'use strict';
855 +
856 + var utils = __webpack_require__(2);
857 + var normalizeHeaderName = __webpack_require__(11);
858 +
859 + var DEFAULT_CONTENT_TYPE = {
860 + 'Content-Type': 'application/x-www-form-urlencoded'
861 + };
862 +
863 + function setContentTypeIfUnset(headers, value) {
864 + if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
865 + headers['Content-Type'] = value;
866 + }
867 + }
868 +
869 + function getDefaultAdapter() {
870 + var adapter;
871 + if (typeof XMLHttpRequest !== 'undefined') {
872 + // For browsers use XHR adapter
873 + adapter = __webpack_require__(12);
874 + } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
875 + // For node use HTTP adapter
876 + adapter = __webpack_require__(12);
877 + }
878 + return adapter;
879 + }
880 +
881 + var defaults = {
882 + adapter: getDefaultAdapter(),
883 +
884 + transformRequest: [function transformRequest(data, headers) {
885 + normalizeHeaderName(headers, 'Accept');
886 + normalizeHeaderName(headers, 'Content-Type');
887 + if (utils.isFormData(data) ||
888 + utils.isArrayBuffer(data) ||
889 + utils.isBuffer(data) ||
890 + utils.isStream(data) ||
891 + utils.isFile(data) ||
892 + utils.isBlob(data)
893 + ) {
894 + return data;
895 + }
896 + if (utils.isArrayBufferView(data)) {
897 + return data.buffer;
898 + }
899 + if (utils.isURLSearchParams(data)) {
900 + setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
901 + return data.toString();
902 + }
903 + if (utils.isObject(data)) {
904 + setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
905 + return JSON.stringify(data);
906 + }
907 + return data;
908 + }],
909 +
910 + transformResponse: [function transformResponse(data) {
911 + /*eslint no-param-reassign:0*/
912 + if (typeof data === 'string') {
913 + try {
914 + data = JSON.parse(data);
915 + } catch (e) { /* Ignore */ }
916 + }
917 + return data;
918 + }],
919 +
920 + /**
921 + * A timeout in milliseconds to abort a request. If set to 0 (default) a
922 + * timeout is not created.
923 + */
924 + timeout: 0,
925 +
926 + xsrfCookieName: 'XSRF-TOKEN',
927 + xsrfHeaderName: 'X-XSRF-TOKEN',
928 +
929 + maxContentLength: -1,
930 + maxBodyLength: -1,
931 +
932 + validateStatus: function validateStatus(status) {
933 + return status >= 200 && status < 300;
934 + }
935 + };
936 +
937 + defaults.headers = {
938 + common: {
939 + 'Accept': 'application/json, text/plain, */*'
940 + }
941 + };
942 +
943 + utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
944 + defaults.headers[method] = {};
945 + });
946 +
947 + utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
948 + defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
949 + });
950 +
951 + module.exports = defaults;
952 +
953 +
954 +/***/ }),
955 +/* 11 */
956 +/***/ (function(module, exports, __webpack_require__) {
957 +
958 + 'use strict';
959 +
960 + var utils = __webpack_require__(2);
961 +
962 + module.exports = function normalizeHeaderName(headers, normalizedName) {
963 + utils.forEach(headers, function processHeader(value, name) {
964 + if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
965 + headers[normalizedName] = value;
966 + delete headers[name];
967 + }
968 + });
969 + };
970 +
971 +
972 +/***/ }),
973 +/* 12 */
974 +/***/ (function(module, exports, __webpack_require__) {
975 +
976 + 'use strict';
977 +
978 + var utils = __webpack_require__(2);
979 + var settle = __webpack_require__(13);
980 + var cookies = __webpack_require__(16);
981 + var buildURL = __webpack_require__(5);
982 + var buildFullPath = __webpack_require__(17);
983 + var parseHeaders = __webpack_require__(20);
984 + var isURLSameOrigin = __webpack_require__(21);
985 + var createError = __webpack_require__(14);
986 +
987 + module.exports = function xhrAdapter(config) {
988 + return new Promise(function dispatchXhrRequest(resolve, reject) {
989 + var requestData = config.data;
990 + var requestHeaders = config.headers;
991 +
992 + if (utils.isFormData(requestData)) {
993 + delete requestHeaders['Content-Type']; // Let the browser set it
994 + }
995 +
996 + var request = new XMLHttpRequest();
997 +
998 + // HTTP basic authentication
999 + if (config.auth) {
1000 + var username = config.auth.username || '';
1001 + var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
1002 + requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
1003 + }
1004 +
1005 + var fullPath = buildFullPath(config.baseURL, config.url);
1006 + request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
1007 +
1008 + // Set the request timeout in MS
1009 + request.timeout = config.timeout;
1010 +
1011 + // Listen for ready state
1012 + request.onreadystatechange = function handleLoad() {
1013 + if (!request || request.readyState !== 4) {
1014 + return;
1015 + }
1016 +
1017 + // The request errored out and we didn't get a response, this will be
1018 + // handled by onerror instead
1019 + // With one exception: request that using file: protocol, most browsers
1020 + // will return status as 0 even though it's a successful request
1021 + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
1022 + return;
1023 + }
1024 +
1025 + // Prepare the response
1026 + var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
1027 + var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
1028 + var response = {
1029 + data: responseData,
1030 + status: request.status,
1031 + statusText: request.statusText,
1032 + headers: responseHeaders,
1033 + config: config,
1034 + request: request
1035 + };
1036 +
1037 + settle(resolve, reject, response);
1038 +
1039 + // Clean up request
1040 + request = null;
1041 + };
1042 +
1043 + // Handle browser request cancellation (as opposed to a manual cancellation)
1044 + request.onabort = function handleAbort() {
1045 + if (!request) {
1046 + return;
1047 + }
1048 +
1049 + reject(createError('Request aborted', config, 'ECONNABORTED', request));
1050 +
1051 + // Clean up request
1052 + request = null;
1053 + };
1054 +
1055 + // Handle low level network errors
1056 + request.onerror = function handleError() {
1057 + // Real errors are hidden from us by the browser
1058 + // onerror should only fire if it's a network error
1059 + reject(createError('Network Error', config, null, request));
1060 +
1061 + // Clean up request
1062 + request = null;
1063 + };
1064 +
1065 + // Handle timeout
1066 + request.ontimeout = function handleTimeout() {
1067 + var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
1068 + if (config.timeoutErrorMessage) {
1069 + timeoutErrorMessage = config.timeoutErrorMessage;
1070 + }
1071 + reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',
1072 + request));
1073 +
1074 + // Clean up request
1075 + request = null;
1076 + };
1077 +
1078 + // Add xsrf header
1079 + // This is only done if running in a standard browser environment.
1080 + // Specifically not if we're in a web worker, or react-native.
1081 + if (utils.isStandardBrowserEnv()) {
1082 + // Add xsrf header
1083 + var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
1084 + cookies.read(config.xsrfCookieName) :
1085 + undefined;
1086 +
1087 + if (xsrfValue) {
1088 + requestHeaders[config.xsrfHeaderName] = xsrfValue;
1089 + }
1090 + }
1091 +
1092 + // Add headers to the request
1093 + if ('setRequestHeader' in request) {
1094 + utils.forEach(requestHeaders, function setRequestHeader(val, key) {
1095 + if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
1096 + // Remove Content-Type if data is undefined
1097 + delete requestHeaders[key];
1098 + } else {
1099 + // Otherwise add header to the request
1100 + request.setRequestHeader(key, val);
1101 + }
1102 + });
1103 + }
1104 +
1105 + // Add withCredentials to request if needed
1106 + if (!utils.isUndefined(config.withCredentials)) {
1107 + request.withCredentials = !!config.withCredentials;
1108 + }
1109 +
1110 + // Add responseType to request if needed
1111 + if (config.responseType) {
1112 + try {
1113 + request.responseType = config.responseType;
1114 + } catch (e) {
1115 + // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.
1116 + // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.
1117 + if (config.responseType !== 'json') {
1118 + throw e;
1119 + }
1120 + }
1121 + }
1122 +
1123 + // Handle progress if needed
1124 + if (typeof config.onDownloadProgress === 'function') {
1125 + request.addEventListener('progress', config.onDownloadProgress);
1126 + }
1127 +
1128 + // Not all browsers support upload events
1129 + if (typeof config.onUploadProgress === 'function' && request.upload) {
1130 + request.upload.addEventListener('progress', config.onUploadProgress);
1131 + }
1132 +
1133 + if (config.cancelToken) {
1134 + // Handle cancellation
1135 + config.cancelToken.promise.then(function onCanceled(cancel) {
1136 + if (!request) {
1137 + return;
1138 + }
1139 +
1140 + request.abort();
1141 + reject(cancel);
1142 + // Clean up request
1143 + request = null;
1144 + });
1145 + }
1146 +
1147 + if (!requestData) {
1148 + requestData = null;
1149 + }
1150 +
1151 + // Send the request
1152 + request.send(requestData);
1153 + });
1154 + };
1155 +
1156 +
1157 +/***/ }),
1158 +/* 13 */
1159 +/***/ (function(module, exports, __webpack_require__) {
1160 +
1161 + 'use strict';
1162 +
1163 + var createError = __webpack_require__(14);
1164 +
1165 + /**
1166 + * Resolve or reject a Promise based on response status.
1167 + *
1168 + * @param {Function} resolve A function that resolves the promise.
1169 + * @param {Function} reject A function that rejects the promise.
1170 + * @param {object} response The response.
1171 + */
1172 + module.exports = function settle(resolve, reject, response) {
1173 + var validateStatus = response.config.validateStatus;
1174 + if (!response.status || !validateStatus || validateStatus(response.status)) {
1175 + resolve(response);
1176 + } else {
1177 + reject(createError(
1178 + 'Request failed with status code ' + response.status,
1179 + response.config,
1180 + null,
1181 + response.request,
1182 + response
1183 + ));
1184 + }
1185 + };
1186 +
1187 +
1188 +/***/ }),
1189 +/* 14 */
1190 +/***/ (function(module, exports, __webpack_require__) {
1191 +
1192 + 'use strict';
1193 +
1194 + var enhanceError = __webpack_require__(15);
1195 +
1196 + /**
1197 + * Create an Error with the specified message, config, error code, request and response.
1198 + *
1199 + * @param {string} message The error message.
1200 + * @param {Object} config The config.
1201 + * @param {string} [code] The error code (for example, 'ECONNABORTED').
1202 + * @param {Object} [request] The request.
1203 + * @param {Object} [response] The response.
1204 + * @returns {Error} The created error.
1205 + */
1206 + module.exports = function createError(message, config, code, request, response) {
1207 + var error = new Error(message);
1208 + return enhanceError(error, config, code, request, response);
1209 + };
1210 +
1211 +
1212 +/***/ }),
1213 +/* 15 */
1214 +/***/ (function(module, exports) {
1215 +
1216 + 'use strict';
1217 +
1218 + /**
1219 + * Update an Error with the specified config, error code, and response.
1220 + *
1221 + * @param {Error} error The error to update.
1222 + * @param {Object} config The config.
1223 + * @param {string} [code] The error code (for example, 'ECONNABORTED').
1224 + * @param {Object} [request] The request.
1225 + * @param {Object} [response] The response.
1226 + * @returns {Error} The error.
1227 + */
1228 + module.exports = function enhanceError(error, config, code, request, response) {
1229 + error.config = config;
1230 + if (code) {
1231 + error.code = code;
1232 + }
1233 +
1234 + error.request = request;
1235 + error.response = response;
1236 + error.isAxiosError = true;
1237 +
1238 + error.toJSON = function toJSON() {
1239 + return {
1240 + // Standard
1241 + message: this.message,
1242 + name: this.name,
1243 + // Microsoft
1244 + description: this.description,
1245 + number: this.number,
1246 + // Mozilla
1247 + fileName: this.fileName,
1248 + lineNumber: this.lineNumber,
1249 + columnNumber: this.columnNumber,
1250 + stack: this.stack,
1251 + // Axios
1252 + config: this.config,
1253 + code: this.code
1254 + };
1255 + };
1256 + return error;
1257 + };
1258 +
1259 +
1260 +/***/ }),
1261 +/* 16 */
1262 +/***/ (function(module, exports, __webpack_require__) {
1263 +
1264 + 'use strict';
1265 +
1266 + var utils = __webpack_require__(2);
1267 +
1268 + module.exports = (
1269 + utils.isStandardBrowserEnv() ?
1270 +
1271 + // Standard browser envs support document.cookie
1272 + (function standardBrowserEnv() {
1273 + return {
1274 + write: function write(name, value, expires, path, domain, secure) {
1275 + var cookie = [];
1276 + cookie.push(name + '=' + encodeURIComponent(value));
1277 +
1278 + if (utils.isNumber(expires)) {
1279 + cookie.push('expires=' + new Date(expires).toGMTString());
1280 + }
1281 +
1282 + if (utils.isString(path)) {
1283 + cookie.push('path=' + path);
1284 + }
1285 +
1286 + if (utils.isString(domain)) {
1287 + cookie.push('domain=' + domain);
1288 + }
1289 +
1290 + if (secure === true) {
1291 + cookie.push('secure');
1292 + }
1293 +
1294 + document.cookie = cookie.join('; ');
1295 + },
1296 +
1297 + read: function read(name) {
1298 + var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
1299 + return (match ? decodeURIComponent(match[3]) : null);
1300 + },
1301 +
1302 + remove: function remove(name) {
1303 + this.write(name, '', Date.now() - 86400000);
1304 + }
1305 + };
1306 + })() :
1307 +
1308 + // Non standard browser env (web workers, react-native) lack needed support.
1309 + (function nonStandardBrowserEnv() {
1310 + return {
1311 + write: function write() {},
1312 + read: function read() { return null; },
1313 + remove: function remove() {}
1314 + };
1315 + })()
1316 + );
1317 +
1318 +
1319 +/***/ }),
1320 +/* 17 */
1321 +/***/ (function(module, exports, __webpack_require__) {
1322 +
1323 + 'use strict';
1324 +
1325 + var isAbsoluteURL = __webpack_require__(18);
1326 + var combineURLs = __webpack_require__(19);
1327 +
1328 + /**
1329 + * Creates a new URL by combining the baseURL with the requestedURL,
1330 + * only when the requestedURL is not already an absolute URL.
1331 + * If the requestURL is absolute, this function returns the requestedURL untouched.
1332 + *
1333 + * @param {string} baseURL The base URL
1334 + * @param {string} requestedURL Absolute or relative URL to combine
1335 + * @returns {string} The combined full path
1336 + */
1337 + module.exports = function buildFullPath(baseURL, requestedURL) {
1338 + if (baseURL && !isAbsoluteURL(requestedURL)) {
1339 + return combineURLs(baseURL, requestedURL);
1340 + }
1341 + return requestedURL;
1342 + };
1343 +
1344 +
1345 +/***/ }),
1346 +/* 18 */
1347 +/***/ (function(module, exports) {
1348 +
1349 + 'use strict';
1350 +
1351 + /**
1352 + * Determines whether the specified URL is absolute
1353 + *
1354 + * @param {string} url The URL to test
1355 + * @returns {boolean} True if the specified URL is absolute, otherwise false
1356 + */
1357 + module.exports = function isAbsoluteURL(url) {
1358 + // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
1359 + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
1360 + // by any combination of letters, digits, plus, period, or hyphen.
1361 + return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
1362 + };
1363 +
1364 +
1365 +/***/ }),
1366 +/* 19 */
1367 +/***/ (function(module, exports) {
1368 +
1369 + 'use strict';
1370 +
1371 + /**
1372 + * Creates a new URL by combining the specified URLs
1373 + *
1374 + * @param {string} baseURL The base URL
1375 + * @param {string} relativeURL The relative URL
1376 + * @returns {string} The combined URL
1377 + */
1378 + module.exports = function combineURLs(baseURL, relativeURL) {
1379 + return relativeURL
1380 + ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
1381 + : baseURL;
1382 + };
1383 +
1384 +
1385 +/***/ }),
1386 +/* 20 */
1387 +/***/ (function(module, exports, __webpack_require__) {
1388 +
1389 + 'use strict';
1390 +
1391 + var utils = __webpack_require__(2);
1392 +
1393 + // Headers whose duplicates are ignored by node
1394 + // c.f. https://nodejs.org/api/http.html#http_message_headers
1395 + var ignoreDuplicateOf = [
1396 + 'age', 'authorization', 'content-length', 'content-type', 'etag',
1397 + 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
1398 + 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
1399 + 'referer', 'retry-after', 'user-agent'
1400 + ];
1401 +
1402 + /**
1403 + * Parse headers into an object
1404 + *
1405 + * ```
1406 + * Date: Wed, 27 Aug 2014 08:58:49 GMT
1407 + * Content-Type: application/json
1408 + * Connection: keep-alive
1409 + * Transfer-Encoding: chunked
1410 + * ```
1411 + *
1412 + * @param {String} headers Headers needing to be parsed
1413 + * @returns {Object} Headers parsed into an object
1414 + */
1415 + module.exports = function parseHeaders(headers) {
1416 + var parsed = {};
1417 + var key;
1418 + var val;
1419 + var i;
1420 +
1421 + if (!headers) { return parsed; }
1422 +
1423 + utils.forEach(headers.split('\n'), function parser(line) {
1424 + i = line.indexOf(':');
1425 + key = utils.trim(line.substr(0, i)).toLowerCase();
1426 + val = utils.trim(line.substr(i + 1));
1427 +
1428 + if (key) {
1429 + if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
1430 + return;
1431 + }
1432 + if (key === 'set-cookie') {
1433 + parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
1434 + } else {
1435 + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
1436 + }
1437 + }
1438 + });
1439 +
1440 + return parsed;
1441 + };
1442 +
1443 +
1444 +/***/ }),
1445 +/* 21 */
1446 +/***/ (function(module, exports, __webpack_require__) {
1447 +
1448 + 'use strict';
1449 +
1450 + var utils = __webpack_require__(2);
1451 +
1452 + module.exports = (
1453 + utils.isStandardBrowserEnv() ?
1454 +
1455 + // Standard browser envs have full support of the APIs needed to test
1456 + // whether the request URL is of the same origin as current location.
1457 + (function standardBrowserEnv() {
1458 + var msie = /(msie|trident)/i.test(navigator.userAgent);
1459 + var urlParsingNode = document.createElement('a');
1460 + var originURL;
1461 +
1462 + /**
1463 + * Parse a URL to discover it's components
1464 + *
1465 + * @param {String} url The URL to be parsed
1466 + * @returns {Object}
1467 + */
1468 + function resolveURL(url) {
1469 + var href = url;
1470 +
1471 + if (msie) {
1472 + // IE needs attribute set twice to normalize properties
1473 + urlParsingNode.setAttribute('href', href);
1474 + href = urlParsingNode.href;
1475 + }
1476 +
1477 + urlParsingNode.setAttribute('href', href);
1478 +
1479 + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
1480 + return {
1481 + href: urlParsingNode.href,
1482 + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
1483 + host: urlParsingNode.host,
1484 + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
1485 + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
1486 + hostname: urlParsingNode.hostname,
1487 + port: urlParsingNode.port,
1488 + pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
1489 + urlParsingNode.pathname :
1490 + '/' + urlParsingNode.pathname
1491 + };
1492 + }
1493 +
1494 + originURL = resolveURL(window.location.href);
1495 +
1496 + /**
1497 + * Determine if a URL shares the same origin as the current location
1498 + *
1499 + * @param {String} requestURL The URL to test
1500 + * @returns {boolean} True if URL shares the same origin, otherwise false
1501 + */
1502 + return function isURLSameOrigin(requestURL) {
1503 + var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
1504 + return (parsed.protocol === originURL.protocol &&
1505 + parsed.host === originURL.host);
1506 + };
1507 + })() :
1508 +
1509 + // Non standard browser envs (web workers, react-native) lack needed support.
1510 + (function nonStandardBrowserEnv() {
1511 + return function isURLSameOrigin() {
1512 + return true;
1513 + };
1514 + })()
1515 + );
1516 +
1517 +
1518 +/***/ }),
1519 +/* 22 */
1520 +/***/ (function(module, exports, __webpack_require__) {
1521 +
1522 + 'use strict';
1523 +
1524 + var utils = __webpack_require__(2);
1525 +
1526 + /**
1527 + * Config-specific merge-function which creates a new config-object
1528 + * by merging two configuration objects together.
1529 + *
1530 + * @param {Object} config1
1531 + * @param {Object} config2
1532 + * @returns {Object} New object resulting from merging config2 to config1
1533 + */
1534 + module.exports = function mergeConfig(config1, config2) {
1535 + // eslint-disable-next-line no-param-reassign
1536 + config2 = config2 || {};
1537 + var config = {};
1538 +
1539 + var valueFromConfig2Keys = ['url', 'method', 'data'];
1540 + var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
1541 + var defaultToConfig2Keys = [
1542 + 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
1543 + 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
1544 + 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
1545 + 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
1546 + 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
1547 + ];
1548 + var directMergeKeys = ['validateStatus'];
1549 +
1550 + function getMergedValue(target, source) {
1551 + if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
1552 + return utils.merge(target, source);
1553 + } else if (utils.isPlainObject(source)) {
1554 + return utils.merge({}, source);
1555 + } else if (utils.isArray(source)) {
1556 + return source.slice();
1557 + }
1558 + return source;
1559 + }
1560 +
1561 + function mergeDeepProperties(prop) {
1562 + if (!utils.isUndefined(config2[prop])) {
1563 + config[prop] = getMergedValue(config1[prop], config2[prop]);
1564 + } else if (!utils.isUndefined(config1[prop])) {
1565 + config[prop] = getMergedValue(undefined, config1[prop]);
1566 + }
1567 + }
1568 +
1569 + utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
1570 + if (!utils.isUndefined(config2[prop])) {
1571 + config[prop] = getMergedValue(undefined, config2[prop]);
1572 + }
1573 + });
1574 +
1575 + utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
1576 +
1577 + utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
1578 + if (!utils.isUndefined(config2[prop])) {
1579 + config[prop] = getMergedValue(undefined, config2[prop]);
1580 + } else if (!utils.isUndefined(config1[prop])) {
1581 + config[prop] = getMergedValue(undefined, config1[prop]);
1582 + }
1583 + });
1584 +
1585 + utils.forEach(directMergeKeys, function merge(prop) {
1586 + if (prop in config2) {
1587 + config[prop] = getMergedValue(config1[prop], config2[prop]);
1588 + } else if (prop in config1) {
1589 + config[prop] = getMergedValue(undefined, config1[prop]);
1590 + }
1591 + });
1592 +
1593 + var axiosKeys = valueFromConfig2Keys
1594 + .concat(mergeDeepPropertiesKeys)
1595 + .concat(defaultToConfig2Keys)
1596 + .concat(directMergeKeys);
1597 +
1598 + var otherKeys = Object
1599 + .keys(config1)
1600 + .concat(Object.keys(config2))
1601 + .filter(function filterAxiosKeys(key) {
1602 + return axiosKeys.indexOf(key) === -1;
1603 + });
1604 +
1605 + utils.forEach(otherKeys, mergeDeepProperties);
1606 +
1607 + return config;
1608 + };
1609 +
1610 +
1611 +/***/ }),
1612 +/* 23 */
1613 +/***/ (function(module, exports) {
1614 +
1615 + 'use strict';
1616 +
1617 + /**
1618 + * A `Cancel` is an object that is thrown when an operation is canceled.
1619 + *
1620 + * @class
1621 + * @param {string=} message The message.
1622 + */
1623 + function Cancel(message) {
1624 + this.message = message;
1625 + }
1626 +
1627 + Cancel.prototype.toString = function toString() {
1628 + return 'Cancel' + (this.message ? ': ' + this.message : '');
1629 + };
1630 +
1631 + Cancel.prototype.__CANCEL__ = true;
1632 +
1633 + module.exports = Cancel;
1634 +
1635 +
1636 +/***/ }),
1637 +/* 24 */
1638 +/***/ (function(module, exports, __webpack_require__) {
1639 +
1640 + 'use strict';
1641 +
1642 + var Cancel = __webpack_require__(23);
1643 +
1644 + /**
1645 + * A `CancelToken` is an object that can be used to request cancellation of an operation.
1646 + *
1647 + * @class
1648 + * @param {Function} executor The executor function.
1649 + */
1650 + function CancelToken(executor) {
1651 + if (typeof executor !== 'function') {
1652 + throw new TypeError('executor must be a function.');
1653 + }
1654 +
1655 + var resolvePromise;
1656 + this.promise = new Promise(function promiseExecutor(resolve) {
1657 + resolvePromise = resolve;
1658 + });
1659 +
1660 + var token = this;
1661 + executor(function cancel(message) {
1662 + if (token.reason) {
1663 + // Cancellation has already been requested
1664 + return;
1665 + }
1666 +
1667 + token.reason = new Cancel(message);
1668 + resolvePromise(token.reason);
1669 + });
1670 + }
1671 +
1672 + /**
1673 + * Throws a `Cancel` if cancellation has been requested.
1674 + */
1675 + CancelToken.prototype.throwIfRequested = function throwIfRequested() {
1676 + if (this.reason) {
1677 + throw this.reason;
1678 + }
1679 + };
1680 +
1681 + /**
1682 + * Returns an object that contains a new `CancelToken` and a function that, when called,
1683 + * cancels the `CancelToken`.
1684 + */
1685 + CancelToken.source = function source() {
1686 + var cancel;
1687 + var token = new CancelToken(function executor(c) {
1688 + cancel = c;
1689 + });
1690 + return {
1691 + token: token,
1692 + cancel: cancel
1693 + };
1694 + };
1695 +
1696 + module.exports = CancelToken;
1697 +
1698 +
1699 +/***/ }),
1700 +/* 25 */
1701 +/***/ (function(module, exports) {
1702 +
1703 + 'use strict';
1704 +
1705 + /**
1706 + * Syntactic sugar for invoking a function and expanding an array for arguments.
1707 + *
1708 + * Common use case would be to use `Function.prototype.apply`.
1709 + *
1710 + * ```js
1711 + * function f(x, y, z) {}
1712 + * var args = [1, 2, 3];
1713 + * f.apply(null, args);
1714 + * ```
1715 + *
1716 + * With `spread` this example can be re-written.
1717 + *
1718 + * ```js
1719 + * spread(function(x, y, z) {})([1, 2, 3]);
1720 + * ```
1721 + *
1722 + * @param {Function} callback
1723 + * @returns {Function}
1724 + */
1725 + module.exports = function spread(callback) {
1726 + return function wrap(arr) {
1727 + return callback.apply(null, arr);
1728 + };
1729 + };
1730 +
1731 +
1732 +/***/ })
1733 +/******/ ])
1734 +});
1735 +;
1736 +//# sourceMappingURL=axios.map
...\ No newline at end of file ...\ No newline at end of file
1 +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 6b0707aec88359b2feaf","webpack:///./index.js","webpack:///./lib/axios.js","webpack:///./lib/utils.js","webpack:///./lib/helpers/bind.js","webpack:///./lib/core/Axios.js","webpack:///./lib/helpers/buildURL.js","webpack:///./lib/core/InterceptorManager.js","webpack:///./lib/core/dispatchRequest.js","webpack:///./lib/core/transformData.js","webpack:///./lib/cancel/isCancel.js","webpack:///./lib/defaults.js","webpack:///./lib/helpers/normalizeHeaderName.js","webpack:///./lib/adapters/xhr.js","webpack:///./lib/core/settle.js","webpack:///./lib/core/createError.js","webpack:///./lib/core/enhanceError.js","webpack:///./lib/helpers/cookies.js","webpack:///./lib/core/buildFullPath.js","webpack:///./lib/helpers/isAbsoluteURL.js","webpack:///./lib/helpers/combineURLs.js","webpack:///./lib/helpers/parseHeaders.js","webpack:///./lib/helpers/isURLSameOrigin.js","webpack:///./lib/core/mergeConfig.js","webpack:///./lib/cancel/Cancel.js","webpack:///./lib/cancel/CancelToken.js","webpack:///./lib/helpers/spread.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA,yC;;;;;;ACAA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,aAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;;;;;ACpDA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,aAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,aAAa;AACxB,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oCAAmC,OAAO;AAC1C;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA2B;AAC3B;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,6BAA4B;AAC5B,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA;;AAEA,wCAAuC,OAAO;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,aAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,aAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9VA;;AAEA;AACA;AACA;AACA,oBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;;;;;;;ACVA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAgD;AAChD;AACA;AACA,0BAAyB;AACzB,MAAK;AACL;AACA,EAAC;;AAED;AACA;AACA;AACA,iDAAgD;AAChD;AACA;AACA;AACA,MAAK;AACL;AACA,EAAC;;AAED;;;;;;;AC9FA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,QAAO;AACP,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACrEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,SAAS;AACpB;AACA,aAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;;;;;;;ACnDA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAA+B;AAC/B,wCAAuC;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;;;;;;;AC9EA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,cAAc;AACzB,YAAW,MAAM;AACjB,YAAW,eAAe;AAC1B,cAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;;;;;;ACnBA;;AAEA;AACA;AACA;;;;;;;ACJA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAwE;AACxE;AACA;AACA;AACA,wDAAuD;AACvD;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,QAAO,YAAY;AACnB;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAC;;AAED;AACA;AACA,EAAC;;AAED;;;;;;;ACjGA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;;;;;;ACXA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,6CAA4C;AAC5C;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;;;;;;AClLA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,SAAS;AACpB,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxBA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;;;;;;ACjBA;;AAEA;AACA;AACA;AACA,YAAW,MAAM;AACjB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzCA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2CAA0C;AAC1C,UAAS;;AAET;AACA,6DAA4D,wBAAwB;AACpF;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,mCAAkC;AAClC,gCAA+B,aAAa,EAAE;AAC9C;AACA;AACA,MAAK;AACL;;;;;;;ACpDA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnBA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACbA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;;;;;;ACbA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAiB,eAAe;;AAEhC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;;AAEH;AACA;;;;;;;ACpDA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAc,OAAO;AACrB,iBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,eAAc,OAAO;AACrB,iBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;;;;;;ACnEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL,4BAA2B;AAC3B,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;;AAEH;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;;;;;;;ACtFA;;AAEA;AACA;AACA;AACA;AACA,YAAW,QAAQ;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;;;;;;AClBA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACxDA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAA+B;AAC/B;AACA;AACA,YAAW,SAAS;AACpB,cAAa;AACb;AACA;AACA;AACA;AACA;AACA","file":"axios.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"axios\"] = factory();\n\telse\n\t\troot[\"axios\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6b0707aec88359b2feaf","module.exports = require('./lib/axios');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./index.js\n// module id = 0\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/axios.js\n// module id = 1\n// module chunks = 0","'use strict';\n\nvar bind = require('./helpers/bind');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/utils.js\n// module id = 2\n// module chunks = 0","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/bind.js\n// module id = 3\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/Axios.js\n// module id = 4\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/buildURL.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/InterceptorManager.js\n// module id = 6\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/dispatchRequest.js\n// module id = 7\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/transformData.js\n// module id = 8\n// module chunks = 0","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/isCancel.js\n// module id = 9\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/defaults.js\n// module id = 10\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/normalizeHeaderName.js\n// module id = 11\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/adapters/xhr.js\n// module id = 12\n// module chunks = 0","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/settle.js\n// module id = 13\n// module chunks = 0","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/createError.js\n// module id = 14\n// module chunks = 0","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/enhanceError.js\n// module id = 15\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/cookies.js\n// module id = 16\n// module chunks = 0","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/buildFullPath.js\n// module id = 17\n// module chunks = 0","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isAbsoluteURL.js\n// module id = 18\n// module chunks = 0","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/combineURLs.js\n// module id = 19\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/parseHeaders.js\n// module id = 20\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isURLSameOrigin.js\n// module id = 21\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = [\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n ];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys)\n .concat(directMergeKeys);\n\n var otherKeys = Object\n .keys(config1)\n .concat(Object.keys(config2))\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, mergeDeepProperties);\n\n return config;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/mergeConfig.js\n// module id = 22\n// module chunks = 0","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/Cancel.js\n// module id = 23\n// module chunks = 0","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/CancelToken.js\n// module id = 24\n// module chunks = 0","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/spread.js\n// module id = 25\n// module chunks = 0"],"sourceRoot":""}
...\ No newline at end of file ...\ No newline at end of file
1 +/* axios v0.21.0 | (c) 2020 by Matt Zabriskie */
2 +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){var t=new i(e),n=s(i.prototype.request,t);return o.extend(n,i.prototype,t),o.extend(n,t),n}var o=n(2),s=n(3),i=n(4),a=n(22),u=n(10),c=r(u);c.Axios=i,c.create=function(e){return r(a(c.defaults,e))},c.Cancel=n(23),c.CancelToken=n(24),c.isCancel=n(9),c.all=function(e){return Promise.all(e)},c.spread=n(25),e.exports=c,e.exports.default=c},function(e,t,n){"use strict";function r(e){return"[object Array]"===R.call(e)}function o(e){return"undefined"==typeof e}function s(e){return null!==e&&!o(e)&&null!==e.constructor&&!o(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function i(e){return"[object ArrayBuffer]"===R.call(e)}function a(e){return"undefined"!=typeof FormData&&e instanceof FormData}function u(e){var t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function c(e){return"string"==typeof e}function f(e){return"number"==typeof e}function p(e){return null!==e&&"object"==typeof e}function d(e){if("[object Object]"!==R.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Date]"===R.call(e)}function h(e){return"[object File]"===R.call(e)}function m(e){return"[object Blob]"===R.call(e)}function y(e){return"[object Function]"===R.call(e)}function g(e){return p(e)&&y(e.pipe)}function v(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function x(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function w(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function b(e,t){if(null!==e&&"undefined"!=typeof e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.call(null,e[s],s,e)}function E(){function e(e,n){d(t[n])&&d(e)?t[n]=E(t[n],e):d(e)?t[n]=E({},e):r(e)?t[n]=e.slice():t[n]=e}for(var t={},n=0,o=arguments.length;n<o;n++)b(arguments[n],e);return t}function C(e,t,n){return b(t,function(t,r){n&&"function"==typeof t?e[r]=S(t,n):e[r]=t}),e}function j(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}var S=n(3),R=Object.prototype.toString;e.exports={isArray:r,isArrayBuffer:i,isBuffer:s,isFormData:a,isArrayBufferView:u,isString:c,isNumber:f,isObject:p,isPlainObject:d,isUndefined:o,isDate:l,isFile:h,isBlob:m,isFunction:y,isStream:g,isURLSearchParams:v,isStandardBrowserEnv:w,forEach:b,merge:E,extend:C,trim:x,stripBOM:j}},function(e,t){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";function r(e){this.defaults=e,this.interceptors={request:new i,response:new i}}var o=n(2),s=n(5),i=n(6),a=n(7),u=n(22);r.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=u(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},r.prototype.getUri=function(e){return e=u(this.defaults,e),s(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},o.forEach(["delete","get","head","options"],function(e){r.prototype[e]=function(t,n){return this.request(u(n||{},{method:e,url:t,data:(n||{}).data}))}}),o.forEach(["post","put","patch"],function(e){r.prototype[e]=function(t,n,r){return this.request(u(r||{},{method:e,url:t,data:n}))}}),e.exports=r},function(e,t,n){"use strict";function r(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var o=n(2);e.exports=function(e,t,n){if(!t)return e;var s;if(n)s=n(t);else if(o.isURLSearchParams(t))s=t.toString();else{var i=[];o.forEach(t,function(e,t){null!==e&&"undefined"!=typeof e&&(o.isArray(e)?t+="[]":e=[e],o.forEach(e,function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),i.push(r(t)+"="+r(e))}))}),s=i.join("&")}if(s){var a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}},function(e,t,n){"use strict";function r(){this.handlers=[]}var o=n(2);r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var o=n(2),s=n(8),i=n(9),a=n(10);e.exports=function(e){r(e),e.headers=e.headers||{},e.data=s(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),o.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]});var t=e.adapter||a.adapter;return t(e).then(function(t){return r(e),t.data=s(t.data,t.headers,e.transformResponse),t},function(t){return i(t)||(r(e),t&&t.response&&(t.response.data=s(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";function r(e,t){!s.isUndefined(e)&&s.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function o(){var e;return"undefined"!=typeof XMLHttpRequest?e=n(12):"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(e=n(12)),e}var s=n(2),i=n(11),a={"Content-Type":"application/x-www-form-urlencoded"},u={adapter:o(),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),s.isFormData(e)||s.isArrayBuffer(e)||s.isBuffer(e)||s.isStream(e)||s.isFile(e)||s.isBlob(e)?e:s.isArrayBufferView(e)?e.buffer:s.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):s.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},s.forEach(["delete","get","head"],function(e){u.headers[e]={}}),s.forEach(["post","put","patch"],function(e){u.headers[e]=s.merge(a)}),e.exports=u},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(2),o=n(13),s=n(16),i=n(5),a=n(17),u=n(20),c=n(21),f=n(14);e.exports=function(e){return new Promise(function(t,n){var p=e.data,d=e.headers;r.isFormData(p)&&delete d["Content-Type"];var l=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(h+":"+m)}var y=a(e.baseURL,e.url);if(l.open(e.method.toUpperCase(),i(y,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,l.onreadystatechange=function(){if(l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in l?u(l.getAllResponseHeaders()):null,s=e.responseType&&"text"!==e.responseType?l.response:l.responseText,i={data:s,status:l.status,statusText:l.statusText,headers:r,config:e,request:l};o(t,n,i),l=null}},l.onabort=function(){l&&(n(f("Request aborted",e,"ECONNABORTED",l)),l=null)},l.onerror=function(){n(f("Network Error",e,null,l)),l=null},l.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(f(t,e,"ECONNABORTED",l)),l=null},r.isStandardBrowserEnv()){var g=(e.withCredentials||c(y))&&e.xsrfCookieName?s.read(e.xsrfCookieName):void 0;g&&(d[e.xsrfHeaderName]=g)}if("setRequestHeader"in l&&r.forEach(d,function(e,t){"undefined"==typeof p&&"content-type"===t.toLowerCase()?delete d[t]:l.setRequestHeader(t,e)}),r.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),e.responseType)try{l.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){l&&(l.abort(),n(e),l=null)}),p||(p=null),l.send(p)})}},function(e,t,n){"use strict";var r=n(14);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(15);e.exports=function(e,t,n,o,s){var i=new Error(e);return r(i,t,n,o,s)}},function(e,t){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,s,i){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(s)&&a.push("domain="+s),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";var r=n(18),o=n(19);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},function(e,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(2),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,s,i={};return e?(r.forEach(e.split("\n"),function(e){if(s=e.indexOf(":"),t=r.trim(e.substr(0,s)).toLowerCase(),n=r.trim(e.substr(s+1)),t){if(i[t]&&o.indexOf(t)>=0)return;"set-cookie"===t?i[t]=(i[t]?i[t]:[]).concat([n]):i[t]=i[t]?i[t]+", "+n:n}}),i):i}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){function n(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function o(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(s[o]=n(void 0,e[o])):s[o]=n(e[o],t[o])}t=t||{};var s={},i=["url","method","data"],a=["headers","auth","proxy","params"],u=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],c=["validateStatus"];r.forEach(i,function(e){r.isUndefined(t[e])||(s[e]=n(void 0,t[e]))}),r.forEach(a,o),r.forEach(u,function(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(s[o]=n(void 0,e[o])):s[o]=n(void 0,t[o])}),r.forEach(c,function(r){r in t?s[r]=n(e[r],t[r]):r in e&&(s[r]=n(void 0,e[r]))});var f=i.concat(a).concat(u).concat(c),p=Object.keys(e).concat(Object.keys(t)).filter(function(e){return f.indexOf(e)===-1});return r.forEach(p,o),s}},function(e,t){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(23);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e,t=new r(function(t){e=t});return{token:t,cancel:e}},e.exports=r},function(e,t){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}}])});
3 +//# sourceMappingURL=axios.min.map
...\ No newline at end of file ...\ No newline at end of file
This diff could not be displayed because it is too large.
1 +export interface AxiosTransformer {
2 + (data: any, headers?: any): any;
3 +}
4 +
5 +export interface AxiosAdapter {
6 + (config: AxiosRequestConfig): AxiosPromise<any>;
7 +}
8 +
9 +export interface AxiosBasicCredentials {
10 + username: string;
11 + password: string;
12 +}
13 +
14 +export interface AxiosProxyConfig {
15 + host: string;
16 + port: number;
17 + auth?: {
18 + username: string;
19 + password:string;
20 + };
21 + protocol?: string;
22 +}
23 +
24 +export type Method =
25 + | 'get' | 'GET'
26 + | 'delete' | 'DELETE'
27 + | 'head' | 'HEAD'
28 + | 'options' | 'OPTIONS'
29 + | 'post' | 'POST'
30 + | 'put' | 'PUT'
31 + | 'patch' | 'PATCH'
32 + | 'purge' | 'PURGE'
33 + | 'link' | 'LINK'
34 + | 'unlink' | 'UNLINK'
35 +
36 +export type ResponseType =
37 + | 'arraybuffer'
38 + | 'blob'
39 + | 'document'
40 + | 'json'
41 + | 'text'
42 + | 'stream'
43 +
44 +export interface AxiosRequestConfig {
45 + url?: string;
46 + method?: Method;
47 + baseURL?: string;
48 + transformRequest?: AxiosTransformer | AxiosTransformer[];
49 + transformResponse?: AxiosTransformer | AxiosTransformer[];
50 + headers?: any;
51 + params?: any;
52 + paramsSerializer?: (params: any) => string;
53 + data?: any;
54 + timeout?: number;
55 + timeoutErrorMessage?: string;
56 + withCredentials?: boolean;
57 + adapter?: AxiosAdapter;
58 + auth?: AxiosBasicCredentials;
59 + responseType?: ResponseType;
60 + xsrfCookieName?: string;
61 + xsrfHeaderName?: string;
62 + onUploadProgress?: (progressEvent: any) => void;
63 + onDownloadProgress?: (progressEvent: any) => void;
64 + maxContentLength?: number;
65 + validateStatus?: ((status: number) => boolean) | null;
66 + maxBodyLength?: number;
67 + maxRedirects?: number;
68 + socketPath?: string | null;
69 + httpAgent?: any;
70 + httpsAgent?: any;
71 + proxy?: AxiosProxyConfig | false;
72 + cancelToken?: CancelToken;
73 + decompress?: boolean;
74 +}
75 +
76 +export interface AxiosResponse<T = any> {
77 + data: T;
78 + status: number;
79 + statusText: string;
80 + headers: any;
81 + config: AxiosRequestConfig;
82 + request?: any;
83 +}
84 +
85 +export interface AxiosError<T = any> extends Error {
86 + config: AxiosRequestConfig;
87 + code?: string;
88 + request?: any;
89 + response?: AxiosResponse<T>;
90 + isAxiosError: boolean;
91 + toJSON: () => object;
92 +}
93 +
94 +export interface AxiosPromise<T = any> extends Promise<AxiosResponse<T>> {
95 +}
96 +
97 +export interface CancelStatic {
98 + new (message?: string): Cancel;
99 +}
100 +
101 +export interface Cancel {
102 + message: string;
103 +}
104 +
105 +export interface Canceler {
106 + (message?: string): void;
107 +}
108 +
109 +export interface CancelTokenStatic {
110 + new (executor: (cancel: Canceler) => void): CancelToken;
111 + source(): CancelTokenSource;
112 +}
113 +
114 +export interface CancelToken {
115 + promise: Promise<Cancel>;
116 + reason?: Cancel;
117 + throwIfRequested(): void;
118 +}
119 +
120 +export interface CancelTokenSource {
121 + token: CancelToken;
122 + cancel: Canceler;
123 +}
124 +
125 +export interface AxiosInterceptorManager<V> {
126 + use(onFulfilled?: (value: V) => V | Promise<V>, onRejected?: (error: any) => any): number;
127 + eject(id: number): void;
128 +}
129 +
130 +export interface AxiosInstance {
131 + (config: AxiosRequestConfig): AxiosPromise;
132 + (url: string, config?: AxiosRequestConfig): AxiosPromise;
133 + defaults: AxiosRequestConfig;
134 + interceptors: {
135 + request: AxiosInterceptorManager<AxiosRequestConfig>;
136 + response: AxiosInterceptorManager<AxiosResponse>;
137 + };
138 + getUri(config?: AxiosRequestConfig): string;
139 + request<T = any, R = AxiosResponse<T>> (config: AxiosRequestConfig): Promise<R>;
140 + get<T = any, R = AxiosResponse<T>>(url: string, config?: AxiosRequestConfig): Promise<R>;
141 + delete<T = any, R = AxiosResponse<T>>(url: string, config?: AxiosRequestConfig): Promise<R>;
142 + head<T = any, R = AxiosResponse<T>>(url: string, config?: AxiosRequestConfig): Promise<R>;
143 + options<T = any, R = AxiosResponse<T>>(url: string, config?: AxiosRequestConfig): Promise<R>;
144 + post<T = any, R = AxiosResponse<T>>(url: string, data?: any, config?: AxiosRequestConfig): Promise<R>;
145 + put<T = any, R = AxiosResponse<T>>(url: string, data?: any, config?: AxiosRequestConfig): Promise<R>;
146 + patch<T = any, R = AxiosResponse<T>>(url: string, data?: any, config?: AxiosRequestConfig): Promise<R>;
147 +}
148 +
149 +export interface AxiosStatic extends AxiosInstance {
150 + create(config?: AxiosRequestConfig): AxiosInstance;
151 + Cancel: CancelStatic;
152 + CancelToken: CancelTokenStatic;
153 + isCancel(value: any): boolean;
154 + all<T>(values: (T | Promise<T>)[]): Promise<T[]>;
155 + spread<T, R>(callback: (...args: T[]) => R): (array: T[]) => R;
156 +}
157 +
158 +declare const Axios: AxiosStatic;
159 +
160 +export default Axios;
1 +module.exports = require('./lib/axios');
...\ No newline at end of file ...\ No newline at end of file
1 +# axios // adapters
2 +
3 +The modules under `adapters/` are modules that handle dispatching a request and settling a returned `Promise` once a response is received.
4 +
5 +## Example
6 +
7 +```js
8 +var settle = require('./../core/settle');
9 +
10 +module.exports = function myAdapter(config) {
11 + // At this point:
12 + // - config has been merged with defaults
13 + // - request transformers have already run
14 + // - request interceptors have already run
15 +
16 + // Make the request using config provided
17 + // Upon response settle the Promise
18 +
19 + return new Promise(function(resolve, reject) {
20 +
21 + var response = {
22 + data: responseData,
23 + status: request.status,
24 + statusText: request.statusText,
25 + headers: responseHeaders,
26 + config: config,
27 + request: request
28 + };
29 +
30 + settle(resolve, reject, response);
31 +
32 + // From here:
33 + // - response transformers will run
34 + // - response interceptors will run
35 + });
36 +}
37 +```
1 +'use strict';
2 +
3 +var utils = require('./../utils');
4 +var settle = require('./../core/settle');
5 +var buildFullPath = require('../core/buildFullPath');
6 +var buildURL = require('./../helpers/buildURL');
7 +var http = require('http');
8 +var https = require('https');
9 +var httpFollow = require('follow-redirects').http;
10 +var httpsFollow = require('follow-redirects').https;
11 +var url = require('url');
12 +var zlib = require('zlib');
13 +var pkg = require('./../../package.json');
14 +var createError = require('../core/createError');
15 +var enhanceError = require('../core/enhanceError');
16 +
17 +var isHttps = /https:?/;
18 +
19 +/*eslint consistent-return:0*/
20 +module.exports = function httpAdapter(config) {
21 + return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) {
22 + var resolve = function resolve(value) {
23 + resolvePromise(value);
24 + };
25 + var reject = function reject(value) {
26 + rejectPromise(value);
27 + };
28 + var data = config.data;
29 + var headers = config.headers;
30 +
31 + // Set User-Agent (required by some servers)
32 + // Only set header if it hasn't been set in config
33 + // See https://github.com/axios/axios/issues/69
34 + if (!headers['User-Agent'] && !headers['user-agent']) {
35 + headers['User-Agent'] = 'axios/' + pkg.version;
36 + }
37 +
38 + if (data && !utils.isStream(data)) {
39 + if (Buffer.isBuffer(data)) {
40 + // Nothing to do...
41 + } else if (utils.isArrayBuffer(data)) {
42 + data = Buffer.from(new Uint8Array(data));
43 + } else if (utils.isString(data)) {
44 + data = Buffer.from(data, 'utf-8');
45 + } else {
46 + return reject(createError(
47 + 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream',
48 + config
49 + ));
50 + }
51 +
52 + // Add Content-Length header if data exists
53 + headers['Content-Length'] = data.length;
54 + }
55 +
56 + // HTTP basic authentication
57 + var auth = undefined;
58 + if (config.auth) {
59 + var username = config.auth.username || '';
60 + var password = config.auth.password || '';
61 + auth = username + ':' + password;
62 + }
63 +
64 + // Parse url
65 + var fullPath = buildFullPath(config.baseURL, config.url);
66 + var parsed = url.parse(fullPath);
67 + var protocol = parsed.protocol || 'http:';
68 +
69 + if (!auth && parsed.auth) {
70 + var urlAuth = parsed.auth.split(':');
71 + var urlUsername = urlAuth[0] || '';
72 + var urlPassword = urlAuth[1] || '';
73 + auth = urlUsername + ':' + urlPassword;
74 + }
75 +
76 + if (auth) {
77 + delete headers.Authorization;
78 + }
79 +
80 + var isHttpsRequest = isHttps.test(protocol);
81 + var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
82 +
83 + var options = {
84 + path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ''),
85 + method: config.method.toUpperCase(),
86 + headers: headers,
87 + agent: agent,
88 + agents: { http: config.httpAgent, https: config.httpsAgent },
89 + auth: auth
90 + };
91 +
92 + if (config.socketPath) {
93 + options.socketPath = config.socketPath;
94 + } else {
95 + options.hostname = parsed.hostname;
96 + options.port = parsed.port;
97 + }
98 +
99 + var proxy = config.proxy;
100 + if (!proxy && proxy !== false) {
101 + var proxyEnv = protocol.slice(0, -1) + '_proxy';
102 + var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()];
103 + if (proxyUrl) {
104 + var parsedProxyUrl = url.parse(proxyUrl);
105 + var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY;
106 + var shouldProxy = true;
107 +
108 + if (noProxyEnv) {
109 + var noProxy = noProxyEnv.split(',').map(function trim(s) {
110 + return s.trim();
111 + });
112 +
113 + shouldProxy = !noProxy.some(function proxyMatch(proxyElement) {
114 + if (!proxyElement) {
115 + return false;
116 + }
117 + if (proxyElement === '*') {
118 + return true;
119 + }
120 + if (proxyElement[0] === '.' &&
121 + parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement) {
122 + return true;
123 + }
124 +
125 + return parsed.hostname === proxyElement;
126 + });
127 + }
128 +
129 +
130 + if (shouldProxy) {
131 + proxy = {
132 + host: parsedProxyUrl.hostname,
133 + port: parsedProxyUrl.port
134 + };
135 +
136 + if (parsedProxyUrl.auth) {
137 + var proxyUrlAuth = parsedProxyUrl.auth.split(':');
138 + proxy.auth = {
139 + username: proxyUrlAuth[0],
140 + password: proxyUrlAuth[1]
141 + };
142 + }
143 + }
144 + }
145 + }
146 +
147 + if (proxy) {
148 + options.hostname = proxy.host;
149 + options.host = proxy.host;
150 + options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : '');
151 + options.port = proxy.port;
152 + options.path = protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path;
153 +
154 + // Basic proxy authorization
155 + if (proxy.auth) {
156 + var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64');
157 + options.headers['Proxy-Authorization'] = 'Basic ' + base64;
158 + }
159 + }
160 +
161 + var transport;
162 + var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true);
163 + if (config.transport) {
164 + transport = config.transport;
165 + } else if (config.maxRedirects === 0) {
166 + transport = isHttpsProxy ? https : http;
167 + } else {
168 + if (config.maxRedirects) {
169 + options.maxRedirects = config.maxRedirects;
170 + }
171 + transport = isHttpsProxy ? httpsFollow : httpFollow;
172 + }
173 +
174 + if (config.maxBodyLength > -1) {
175 + options.maxBodyLength = config.maxBodyLength;
176 + }
177 +
178 + // Create the request
179 + var req = transport.request(options, function handleResponse(res) {
180 + if (req.aborted) return;
181 +
182 + // uncompress the response body transparently if required
183 + var stream = res;
184 +
185 + // return the last request in case of redirects
186 + var lastRequest = res.req || req;
187 +
188 +
189 + // if no content, is HEAD request or decompress disabled we should not decompress
190 + if (res.statusCode !== 204 && lastRequest.method !== 'HEAD' && config.decompress !== false) {
191 + switch (res.headers['content-encoding']) {
192 + /*eslint default-case:0*/
193 + case 'gzip':
194 + case 'compress':
195 + case 'deflate':
196 + // add the unzipper to the body stream processing pipeline
197 + stream = stream.pipe(zlib.createUnzip());
198 +
199 + // remove the content-encoding in order to not confuse downstream operations
200 + delete res.headers['content-encoding'];
201 + break;
202 + }
203 + }
204 +
205 + var response = {
206 + status: res.statusCode,
207 + statusText: res.statusMessage,
208 + headers: res.headers,
209 + config: config,
210 + request: lastRequest
211 + };
212 +
213 + if (config.responseType === 'stream') {
214 + response.data = stream;
215 + settle(resolve, reject, response);
216 + } else {
217 + var responseBuffer = [];
218 + stream.on('data', function handleStreamData(chunk) {
219 + responseBuffer.push(chunk);
220 +
221 + // make sure the content length is not over the maxContentLength if specified
222 + if (config.maxContentLength > -1 && Buffer.concat(responseBuffer).length > config.maxContentLength) {
223 + stream.destroy();
224 + reject(createError('maxContentLength size of ' + config.maxContentLength + ' exceeded',
225 + config, null, lastRequest));
226 + }
227 + });
228 +
229 + stream.on('error', function handleStreamError(err) {
230 + if (req.aborted) return;
231 + reject(enhanceError(err, config, null, lastRequest));
232 + });
233 +
234 + stream.on('end', function handleStreamEnd() {
235 + var responseData = Buffer.concat(responseBuffer);
236 + if (config.responseType !== 'arraybuffer') {
237 + responseData = responseData.toString(config.responseEncoding);
238 + if (!config.responseEncoding || config.responseEncoding === 'utf8') {
239 + responseData = utils.stripBOM(responseData);
240 + }
241 + }
242 +
243 + response.data = responseData;
244 + settle(resolve, reject, response);
245 + });
246 + }
247 + });
248 +
249 + // Handle errors
250 + req.on('error', function handleRequestError(err) {
251 + if (req.aborted && err.code !== 'ERR_FR_TOO_MANY_REDIRECTS') return;
252 + reject(enhanceError(err, config, null, req));
253 + });
254 +
255 + // Handle request timeout
256 + if (config.timeout) {
257 + // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system.
258 + // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET.
259 + // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up.
260 + // And then these socket which be hang up will devoring CPU little by little.
261 + // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect.
262 + req.setTimeout(config.timeout, function handleRequestTimeout() {
263 + req.abort();
264 + reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', req));
265 + });
266 + }
267 +
268 + if (config.cancelToken) {
269 + // Handle cancellation
270 + config.cancelToken.promise.then(function onCanceled(cancel) {
271 + if (req.aborted) return;
272 +
273 + req.abort();
274 + reject(cancel);
275 + });
276 + }
277 +
278 + // Send the request
279 + if (utils.isStream(data)) {
280 + data.on('error', function handleStreamError(err) {
281 + reject(enhanceError(err, config, null, req));
282 + }).pipe(req);
283 + } else {
284 + req.end(data);
285 + }
286 + });
287 +};
1 +'use strict';
2 +
3 +var utils = require('./../utils');
4 +var settle = require('./../core/settle');
5 +var cookies = require('./../helpers/cookies');
6 +var buildURL = require('./../helpers/buildURL');
7 +var buildFullPath = require('../core/buildFullPath');
8 +var parseHeaders = require('./../helpers/parseHeaders');
9 +var isURLSameOrigin = require('./../helpers/isURLSameOrigin');
10 +var createError = require('../core/createError');
11 +
12 +module.exports = function xhrAdapter(config) {
13 + return new Promise(function dispatchXhrRequest(resolve, reject) {
14 + var requestData = config.data;
15 + var requestHeaders = config.headers;
16 +
17 + if (utils.isFormData(requestData)) {
18 + delete requestHeaders['Content-Type']; // Let the browser set it
19 + }
20 +
21 + var request = new XMLHttpRequest();
22 +
23 + // HTTP basic authentication
24 + if (config.auth) {
25 + var username = config.auth.username || '';
26 + var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
27 + requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
28 + }
29 +
30 + var fullPath = buildFullPath(config.baseURL, config.url);
31 + request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
32 +
33 + // Set the request timeout in MS
34 + request.timeout = config.timeout;
35 +
36 + // Listen for ready state
37 + request.onreadystatechange = function handleLoad() {
38 + if (!request || request.readyState !== 4) {
39 + return;
40 + }
41 +
42 + // The request errored out and we didn't get a response, this will be
43 + // handled by onerror instead
44 + // With one exception: request that using file: protocol, most browsers
45 + // will return status as 0 even though it's a successful request
46 + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
47 + return;
48 + }
49 +
50 + // Prepare the response
51 + var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
52 + var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
53 + var response = {
54 + data: responseData,
55 + status: request.status,
56 + statusText: request.statusText,
57 + headers: responseHeaders,
58 + config: config,
59 + request: request
60 + };
61 +
62 + settle(resolve, reject, response);
63 +
64 + // Clean up request
65 + request = null;
66 + };
67 +
68 + // Handle browser request cancellation (as opposed to a manual cancellation)
69 + request.onabort = function handleAbort() {
70 + if (!request) {
71 + return;
72 + }
73 +
74 + reject(createError('Request aborted', config, 'ECONNABORTED', request));
75 +
76 + // Clean up request
77 + request = null;
78 + };
79 +
80 + // Handle low level network errors
81 + request.onerror = function handleError() {
82 + // Real errors are hidden from us by the browser
83 + // onerror should only fire if it's a network error
84 + reject(createError('Network Error', config, null, request));
85 +
86 + // Clean up request
87 + request = null;
88 + };
89 +
90 + // Handle timeout
91 + request.ontimeout = function handleTimeout() {
92 + var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
93 + if (config.timeoutErrorMessage) {
94 + timeoutErrorMessage = config.timeoutErrorMessage;
95 + }
96 + reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',
97 + request));
98 +
99 + // Clean up request
100 + request = null;
101 + };
102 +
103 + // Add xsrf header
104 + // This is only done if running in a standard browser environment.
105 + // Specifically not if we're in a web worker, or react-native.
106 + if (utils.isStandardBrowserEnv()) {
107 + // Add xsrf header
108 + var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
109 + cookies.read(config.xsrfCookieName) :
110 + undefined;
111 +
112 + if (xsrfValue) {
113 + requestHeaders[config.xsrfHeaderName] = xsrfValue;
114 + }
115 + }
116 +
117 + // Add headers to the request
118 + if ('setRequestHeader' in request) {
119 + utils.forEach(requestHeaders, function setRequestHeader(val, key) {
120 + if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
121 + // Remove Content-Type if data is undefined
122 + delete requestHeaders[key];
123 + } else {
124 + // Otherwise add header to the request
125 + request.setRequestHeader(key, val);
126 + }
127 + });
128 + }
129 +
130 + // Add withCredentials to request if needed
131 + if (!utils.isUndefined(config.withCredentials)) {
132 + request.withCredentials = !!config.withCredentials;
133 + }
134 +
135 + // Add responseType to request if needed
136 + if (config.responseType) {
137 + try {
138 + request.responseType = config.responseType;
139 + } catch (e) {
140 + // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.
141 + // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.
142 + if (config.responseType !== 'json') {
143 + throw e;
144 + }
145 + }
146 + }
147 +
148 + // Handle progress if needed
149 + if (typeof config.onDownloadProgress === 'function') {
150 + request.addEventListener('progress', config.onDownloadProgress);
151 + }
152 +
153 + // Not all browsers support upload events
154 + if (typeof config.onUploadProgress === 'function' && request.upload) {
155 + request.upload.addEventListener('progress', config.onUploadProgress);
156 + }
157 +
158 + if (config.cancelToken) {
159 + // Handle cancellation
160 + config.cancelToken.promise.then(function onCanceled(cancel) {
161 + if (!request) {
162 + return;
163 + }
164 +
165 + request.abort();
166 + reject(cancel);
167 + // Clean up request
168 + request = null;
169 + });
170 + }
171 +
172 + if (!requestData) {
173 + requestData = null;
174 + }
175 +
176 + // Send the request
177 + request.send(requestData);
178 + });
179 +};
1 +'use strict';
2 +
3 +var utils = require('./utils');
4 +var bind = require('./helpers/bind');
5 +var Axios = require('./core/Axios');
6 +var mergeConfig = require('./core/mergeConfig');
7 +var defaults = require('./defaults');
8 +
9 +/**
10 + * Create an instance of Axios
11 + *
12 + * @param {Object} defaultConfig The default config for the instance
13 + * @return {Axios} A new instance of Axios
14 + */
15 +function createInstance(defaultConfig) {
16 + var context = new Axios(defaultConfig);
17 + var instance = bind(Axios.prototype.request, context);
18 +
19 + // Copy axios.prototype to instance
20 + utils.extend(instance, Axios.prototype, context);
21 +
22 + // Copy context to instance
23 + utils.extend(instance, context);
24 +
25 + return instance;
26 +}
27 +
28 +// Create the default instance to be exported
29 +var axios = createInstance(defaults);
30 +
31 +// Expose Axios class to allow class inheritance
32 +axios.Axios = Axios;
33 +
34 +// Factory for creating new instances
35 +axios.create = function create(instanceConfig) {
36 + return createInstance(mergeConfig(axios.defaults, instanceConfig));
37 +};
38 +
39 +// Expose Cancel & CancelToken
40 +axios.Cancel = require('./cancel/Cancel');
41 +axios.CancelToken = require('./cancel/CancelToken');
42 +axios.isCancel = require('./cancel/isCancel');
43 +
44 +// Expose all/spread
45 +axios.all = function all(promises) {
46 + return Promise.all(promises);
47 +};
48 +axios.spread = require('./helpers/spread');
49 +
50 +module.exports = axios;
51 +
52 +// Allow use of default import syntax in TypeScript
53 +module.exports.default = axios;
1 +'use strict';
2 +
3 +/**
4 + * A `Cancel` is an object that is thrown when an operation is canceled.
5 + *
6 + * @class
7 + * @param {string=} message The message.
8 + */
9 +function Cancel(message) {
10 + this.message = message;
11 +}
12 +
13 +Cancel.prototype.toString = function toString() {
14 + return 'Cancel' + (this.message ? ': ' + this.message : '');
15 +};
16 +
17 +Cancel.prototype.__CANCEL__ = true;
18 +
19 +module.exports = Cancel;
1 +'use strict';
2 +
3 +var Cancel = require('./Cancel');
4 +
5 +/**
6 + * A `CancelToken` is an object that can be used to request cancellation of an operation.
7 + *
8 + * @class
9 + * @param {Function} executor The executor function.
10 + */
11 +function CancelToken(executor) {
12 + if (typeof executor !== 'function') {
13 + throw new TypeError('executor must be a function.');
14 + }
15 +
16 + var resolvePromise;
17 + this.promise = new Promise(function promiseExecutor(resolve) {
18 + resolvePromise = resolve;
19 + });
20 +
21 + var token = this;
22 + executor(function cancel(message) {
23 + if (token.reason) {
24 + // Cancellation has already been requested
25 + return;
26 + }
27 +
28 + token.reason = new Cancel(message);
29 + resolvePromise(token.reason);
30 + });
31 +}
32 +
33 +/**
34 + * Throws a `Cancel` if cancellation has been requested.
35 + */
36 +CancelToken.prototype.throwIfRequested = function throwIfRequested() {
37 + if (this.reason) {
38 + throw this.reason;
39 + }
40 +};
41 +
42 +/**
43 + * Returns an object that contains a new `CancelToken` and a function that, when called,
44 + * cancels the `CancelToken`.
45 + */
46 +CancelToken.source = function source() {
47 + var cancel;
48 + var token = new CancelToken(function executor(c) {
49 + cancel = c;
50 + });
51 + return {
52 + token: token,
53 + cancel: cancel
54 + };
55 +};
56 +
57 +module.exports = CancelToken;
1 +'use strict';
2 +
3 +module.exports = function isCancel(value) {
4 + return !!(value && value.__CANCEL__);
5 +};
1 +'use strict';
2 +
3 +var utils = require('./../utils');
4 +var buildURL = require('../helpers/buildURL');
5 +var InterceptorManager = require('./InterceptorManager');
6 +var dispatchRequest = require('./dispatchRequest');
7 +var mergeConfig = require('./mergeConfig');
8 +
9 +/**
10 + * Create a new instance of Axios
11 + *
12 + * @param {Object} instanceConfig The default config for the instance
13 + */
14 +function Axios(instanceConfig) {
15 + this.defaults = instanceConfig;
16 + this.interceptors = {
17 + request: new InterceptorManager(),
18 + response: new InterceptorManager()
19 + };
20 +}
21 +
22 +/**
23 + * Dispatch a request
24 + *
25 + * @param {Object} config The config specific for this request (merged with this.defaults)
26 + */
27 +Axios.prototype.request = function request(config) {
28 + /*eslint no-param-reassign:0*/
29 + // Allow for axios('example/url'[, config]) a la fetch API
30 + if (typeof config === 'string') {
31 + config = arguments[1] || {};
32 + config.url = arguments[0];
33 + } else {
34 + config = config || {};
35 + }
36 +
37 + config = mergeConfig(this.defaults, config);
38 +
39 + // Set config.method
40 + if (config.method) {
41 + config.method = config.method.toLowerCase();
42 + } else if (this.defaults.method) {
43 + config.method = this.defaults.method.toLowerCase();
44 + } else {
45 + config.method = 'get';
46 + }
47 +
48 + // Hook up interceptors middleware
49 + var chain = [dispatchRequest, undefined];
50 + var promise = Promise.resolve(config);
51 +
52 + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
53 + chain.unshift(interceptor.fulfilled, interceptor.rejected);
54 + });
55 +
56 + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
57 + chain.push(interceptor.fulfilled, interceptor.rejected);
58 + });
59 +
60 + while (chain.length) {
61 + promise = promise.then(chain.shift(), chain.shift());
62 + }
63 +
64 + return promise;
65 +};
66 +
67 +Axios.prototype.getUri = function getUri(config) {
68 + config = mergeConfig(this.defaults, config);
69 + return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
70 +};
71 +
72 +// Provide aliases for supported request methods
73 +utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
74 + /*eslint func-names:0*/
75 + Axios.prototype[method] = function(url, config) {
76 + return this.request(mergeConfig(config || {}, {
77 + method: method,
78 + url: url,
79 + data: (config || {}).data
80 + }));
81 + };
82 +});
83 +
84 +utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
85 + /*eslint func-names:0*/
86 + Axios.prototype[method] = function(url, data, config) {
87 + return this.request(mergeConfig(config || {}, {
88 + method: method,
89 + url: url,
90 + data: data
91 + }));
92 + };
93 +});
94 +
95 +module.exports = Axios;
1 +'use strict';
2 +
3 +var utils = require('./../utils');
4 +
5 +function InterceptorManager() {
6 + this.handlers = [];
7 +}
8 +
9 +/**
10 + * Add a new interceptor to the stack
11 + *
12 + * @param {Function} fulfilled The function to handle `then` for a `Promise`
13 + * @param {Function} rejected The function to handle `reject` for a `Promise`
14 + *
15 + * @return {Number} An ID used to remove interceptor later
16 + */
17 +InterceptorManager.prototype.use = function use(fulfilled, rejected) {
18 + this.handlers.push({
19 + fulfilled: fulfilled,
20 + rejected: rejected
21 + });
22 + return this.handlers.length - 1;
23 +};
24 +
25 +/**
26 + * Remove an interceptor from the stack
27 + *
28 + * @param {Number} id The ID that was returned by `use`
29 + */
30 +InterceptorManager.prototype.eject = function eject(id) {
31 + if (this.handlers[id]) {
32 + this.handlers[id] = null;
33 + }
34 +};
35 +
36 +/**
37 + * Iterate over all the registered interceptors
38 + *
39 + * This method is particularly useful for skipping over any
40 + * interceptors that may have become `null` calling `eject`.
41 + *
42 + * @param {Function} fn The function to call for each interceptor
43 + */
44 +InterceptorManager.prototype.forEach = function forEach(fn) {
45 + utils.forEach(this.handlers, function forEachHandler(h) {
46 + if (h !== null) {
47 + fn(h);
48 + }
49 + });
50 +};
51 +
52 +module.exports = InterceptorManager;
1 +# axios // core
2 +
3 +The modules found in `core/` should be modules that are specific to the domain logic of axios. These modules would most likely not make sense to be consumed outside of the axios module, as their logic is too specific. Some examples of core modules are:
4 +
5 +- Dispatching requests
6 +- Managing interceptors
7 +- Handling config
1 +'use strict';
2 +
3 +var isAbsoluteURL = require('../helpers/isAbsoluteURL');
4 +var combineURLs = require('../helpers/combineURLs');
5 +
6 +/**
7 + * Creates a new URL by combining the baseURL with the requestedURL,
8 + * only when the requestedURL is not already an absolute URL.
9 + * If the requestURL is absolute, this function returns the requestedURL untouched.
10 + *
11 + * @param {string} baseURL The base URL
12 + * @param {string} requestedURL Absolute or relative URL to combine
13 + * @returns {string} The combined full path
14 + */
15 +module.exports = function buildFullPath(baseURL, requestedURL) {
16 + if (baseURL && !isAbsoluteURL(requestedURL)) {
17 + return combineURLs(baseURL, requestedURL);
18 + }
19 + return requestedURL;
20 +};
1 +'use strict';
2 +
3 +var enhanceError = require('./enhanceError');
4 +
5 +/**
6 + * Create an Error with the specified message, config, error code, request and response.
7 + *
8 + * @param {string} message The error message.
9 + * @param {Object} config The config.
10 + * @param {string} [code] The error code (for example, 'ECONNABORTED').
11 + * @param {Object} [request] The request.
12 + * @param {Object} [response] The response.
13 + * @returns {Error} The created error.
14 + */
15 +module.exports = function createError(message, config, code, request, response) {
16 + var error = new Error(message);
17 + return enhanceError(error, config, code, request, response);
18 +};
1 +'use strict';
2 +
3 +var utils = require('./../utils');
4 +var transformData = require('./transformData');
5 +var isCancel = require('../cancel/isCancel');
6 +var defaults = require('../defaults');
7 +
8 +/**
9 + * Throws a `Cancel` if cancellation has been requested.
10 + */
11 +function throwIfCancellationRequested(config) {
12 + if (config.cancelToken) {
13 + config.cancelToken.throwIfRequested();
14 + }
15 +}
16 +
17 +/**
18 + * Dispatch a request to the server using the configured adapter.
19 + *
20 + * @param {object} config The config that is to be used for the request
21 + * @returns {Promise} The Promise to be fulfilled
22 + */
23 +module.exports = function dispatchRequest(config) {
24 + throwIfCancellationRequested(config);
25 +
26 + // Ensure headers exist
27 + config.headers = config.headers || {};
28 +
29 + // Transform request data
30 + config.data = transformData(
31 + config.data,
32 + config.headers,
33 + config.transformRequest
34 + );
35 +
36 + // Flatten headers
37 + config.headers = utils.merge(
38 + config.headers.common || {},
39 + config.headers[config.method] || {},
40 + config.headers
41 + );
42 +
43 + utils.forEach(
44 + ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
45 + function cleanHeaderConfig(method) {
46 + delete config.headers[method];
47 + }
48 + );
49 +
50 + var adapter = config.adapter || defaults.adapter;
51 +
52 + return adapter(config).then(function onAdapterResolution(response) {
53 + throwIfCancellationRequested(config);
54 +
55 + // Transform response data
56 + response.data = transformData(
57 + response.data,
58 + response.headers,
59 + config.transformResponse
60 + );
61 +
62 + return response;
63 + }, function onAdapterRejection(reason) {
64 + if (!isCancel(reason)) {
65 + throwIfCancellationRequested(config);
66 +
67 + // Transform response data
68 + if (reason && reason.response) {
69 + reason.response.data = transformData(
70 + reason.response.data,
71 + reason.response.headers,
72 + config.transformResponse
73 + );
74 + }
75 + }
76 +
77 + return Promise.reject(reason);
78 + });
79 +};
1 +'use strict';
2 +
3 +/**
4 + * Update an Error with the specified config, error code, and response.
5 + *
6 + * @param {Error} error The error to update.
7 + * @param {Object} config The config.
8 + * @param {string} [code] The error code (for example, 'ECONNABORTED').
9 + * @param {Object} [request] The request.
10 + * @param {Object} [response] The response.
11 + * @returns {Error} The error.
12 + */
13 +module.exports = function enhanceError(error, config, code, request, response) {
14 + error.config = config;
15 + if (code) {
16 + error.code = code;
17 + }
18 +
19 + error.request = request;
20 + error.response = response;
21 + error.isAxiosError = true;
22 +
23 + error.toJSON = function toJSON() {
24 + return {
25 + // Standard
26 + message: this.message,
27 + name: this.name,
28 + // Microsoft
29 + description: this.description,
30 + number: this.number,
31 + // Mozilla
32 + fileName: this.fileName,
33 + lineNumber: this.lineNumber,
34 + columnNumber: this.columnNumber,
35 + stack: this.stack,
36 + // Axios
37 + config: this.config,
38 + code: this.code
39 + };
40 + };
41 + return error;
42 +};
1 +'use strict';
2 +
3 +var utils = require('../utils');
4 +
5 +/**
6 + * Config-specific merge-function which creates a new config-object
7 + * by merging two configuration objects together.
8 + *
9 + * @param {Object} config1
10 + * @param {Object} config2
11 + * @returns {Object} New object resulting from merging config2 to config1
12 + */
13 +module.exports = function mergeConfig(config1, config2) {
14 + // eslint-disable-next-line no-param-reassign
15 + config2 = config2 || {};
16 + var config = {};
17 +
18 + var valueFromConfig2Keys = ['url', 'method', 'data'];
19 + var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
20 + var defaultToConfig2Keys = [
21 + 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
22 + 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
23 + 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
24 + 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
25 + 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
26 + ];
27 + var directMergeKeys = ['validateStatus'];
28 +
29 + function getMergedValue(target, source) {
30 + if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
31 + return utils.merge(target, source);
32 + } else if (utils.isPlainObject(source)) {
33 + return utils.merge({}, source);
34 + } else if (utils.isArray(source)) {
35 + return source.slice();
36 + }
37 + return source;
38 + }
39 +
40 + function mergeDeepProperties(prop) {
41 + if (!utils.isUndefined(config2[prop])) {
42 + config[prop] = getMergedValue(config1[prop], config2[prop]);
43 + } else if (!utils.isUndefined(config1[prop])) {
44 + config[prop] = getMergedValue(undefined, config1[prop]);
45 + }
46 + }
47 +
48 + utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
49 + if (!utils.isUndefined(config2[prop])) {
50 + config[prop] = getMergedValue(undefined, config2[prop]);
51 + }
52 + });
53 +
54 + utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
55 +
56 + utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
57 + if (!utils.isUndefined(config2[prop])) {
58 + config[prop] = getMergedValue(undefined, config2[prop]);
59 + } else if (!utils.isUndefined(config1[prop])) {
60 + config[prop] = getMergedValue(undefined, config1[prop]);
61 + }
62 + });
63 +
64 + utils.forEach(directMergeKeys, function merge(prop) {
65 + if (prop in config2) {
66 + config[prop] = getMergedValue(config1[prop], config2[prop]);
67 + } else if (prop in config1) {
68 + config[prop] = getMergedValue(undefined, config1[prop]);
69 + }
70 + });
71 +
72 + var axiosKeys = valueFromConfig2Keys
73 + .concat(mergeDeepPropertiesKeys)
74 + .concat(defaultToConfig2Keys)
75 + .concat(directMergeKeys);
76 +
77 + var otherKeys = Object
78 + .keys(config1)
79 + .concat(Object.keys(config2))
80 + .filter(function filterAxiosKeys(key) {
81 + return axiosKeys.indexOf(key) === -1;
82 + });
83 +
84 + utils.forEach(otherKeys, mergeDeepProperties);
85 +
86 + return config;
87 +};
1 +'use strict';
2 +
3 +var createError = require('./createError');
4 +
5 +/**
6 + * Resolve or reject a Promise based on response status.
7 + *
8 + * @param {Function} resolve A function that resolves the promise.
9 + * @param {Function} reject A function that rejects the promise.
10 + * @param {object} response The response.
11 + */
12 +module.exports = function settle(resolve, reject, response) {
13 + var validateStatus = response.config.validateStatus;
14 + if (!response.status || !validateStatus || validateStatus(response.status)) {
15 + resolve(response);
16 + } else {
17 + reject(createError(
18 + 'Request failed with status code ' + response.status,
19 + response.config,
20 + null,
21 + response.request,
22 + response
23 + ));
24 + }
25 +};
1 +'use strict';
2 +
3 +var utils = require('./../utils');
4 +
5 +/**
6 + * Transform the data for a request or a response
7 + *
8 + * @param {Object|String} data The data to be transformed
9 + * @param {Array} headers The headers for the request or response
10 + * @param {Array|Function} fns A single function or Array of functions
11 + * @returns {*} The resulting transformed data
12 + */
13 +module.exports = function transformData(data, headers, fns) {
14 + /*eslint no-param-reassign:0*/
15 + utils.forEach(fns, function transform(fn) {
16 + data = fn(data, headers);
17 + });
18 +
19 + return data;
20 +};
1 +'use strict';
2 +
3 +var utils = require('./utils');
4 +var normalizeHeaderName = require('./helpers/normalizeHeaderName');
5 +
6 +var DEFAULT_CONTENT_TYPE = {
7 + 'Content-Type': 'application/x-www-form-urlencoded'
8 +};
9 +
10 +function setContentTypeIfUnset(headers, value) {
11 + if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
12 + headers['Content-Type'] = value;
13 + }
14 +}
15 +
16 +function getDefaultAdapter() {
17 + var adapter;
18 + if (typeof XMLHttpRequest !== 'undefined') {
19 + // For browsers use XHR adapter
20 + adapter = require('./adapters/xhr');
21 + } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
22 + // For node use HTTP adapter
23 + adapter = require('./adapters/http');
24 + }
25 + return adapter;
26 +}
27 +
28 +var defaults = {
29 + adapter: getDefaultAdapter(),
30 +
31 + transformRequest: [function transformRequest(data, headers) {
32 + normalizeHeaderName(headers, 'Accept');
33 + normalizeHeaderName(headers, 'Content-Type');
34 + if (utils.isFormData(data) ||
35 + utils.isArrayBuffer(data) ||
36 + utils.isBuffer(data) ||
37 + utils.isStream(data) ||
38 + utils.isFile(data) ||
39 + utils.isBlob(data)
40 + ) {
41 + return data;
42 + }
43 + if (utils.isArrayBufferView(data)) {
44 + return data.buffer;
45 + }
46 + if (utils.isURLSearchParams(data)) {
47 + setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
48 + return data.toString();
49 + }
50 + if (utils.isObject(data)) {
51 + setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
52 + return JSON.stringify(data);
53 + }
54 + return data;
55 + }],
56 +
57 + transformResponse: [function transformResponse(data) {
58 + /*eslint no-param-reassign:0*/
59 + if (typeof data === 'string') {
60 + try {
61 + data = JSON.parse(data);
62 + } catch (e) { /* Ignore */ }
63 + }
64 + return data;
65 + }],
66 +
67 + /**
68 + * A timeout in milliseconds to abort a request. If set to 0 (default) a
69 + * timeout is not created.
70 + */
71 + timeout: 0,
72 +
73 + xsrfCookieName: 'XSRF-TOKEN',
74 + xsrfHeaderName: 'X-XSRF-TOKEN',
75 +
76 + maxContentLength: -1,
77 + maxBodyLength: -1,
78 +
79 + validateStatus: function validateStatus(status) {
80 + return status >= 200 && status < 300;
81 + }
82 +};
83 +
84 +defaults.headers = {
85 + common: {
86 + 'Accept': 'application/json, text/plain, */*'
87 + }
88 +};
89 +
90 +utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
91 + defaults.headers[method] = {};
92 +});
93 +
94 +utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
95 + defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
96 +});
97 +
98 +module.exports = defaults;
1 +# axios // helpers
2 +
3 +The modules found in `helpers/` should be generic modules that are _not_ specific to the domain logic of axios. These modules could theoretically be published to npm on their own and consumed by other modules or apps. Some examples of generic modules are things like:
4 +
5 +- Browser polyfills
6 +- Managing cookies
7 +- Parsing HTTP headers
1 +'use strict';
2 +
3 +module.exports = function bind(fn, thisArg) {
4 + return function wrap() {
5 + var args = new Array(arguments.length);
6 + for (var i = 0; i < args.length; i++) {
7 + args[i] = arguments[i];
8 + }
9 + return fn.apply(thisArg, args);
10 + };
11 +};
1 +'use strict';
2 +
3 +var utils = require('./../utils');
4 +
5 +function encode(val) {
6 + return encodeURIComponent(val).
7 + replace(/%3A/gi, ':').
8 + replace(/%24/g, '$').
9 + replace(/%2C/gi, ',').
10 + replace(/%20/g, '+').
11 + replace(/%5B/gi, '[').
12 + replace(/%5D/gi, ']');
13 +}
14 +
15 +/**
16 + * Build a URL by appending params to the end
17 + *
18 + * @param {string} url The base of the url (e.g., http://www.google.com)
19 + * @param {object} [params] The params to be appended
20 + * @returns {string} The formatted url
21 + */
22 +module.exports = function buildURL(url, params, paramsSerializer) {
23 + /*eslint no-param-reassign:0*/
24 + if (!params) {
25 + return url;
26 + }
27 +
28 + var serializedParams;
29 + if (paramsSerializer) {
30 + serializedParams = paramsSerializer(params);
31 + } else if (utils.isURLSearchParams(params)) {
32 + serializedParams = params.toString();
33 + } else {
34 + var parts = [];
35 +
36 + utils.forEach(params, function serialize(val, key) {
37 + if (val === null || typeof val === 'undefined') {
38 + return;
39 + }
40 +
41 + if (utils.isArray(val)) {
42 + key = key + '[]';
43 + } else {
44 + val = [val];
45 + }
46 +
47 + utils.forEach(val, function parseValue(v) {
48 + if (utils.isDate(v)) {
49 + v = v.toISOString();
50 + } else if (utils.isObject(v)) {
51 + v = JSON.stringify(v);
52 + }
53 + parts.push(encode(key) + '=' + encode(v));
54 + });
55 + });
56 +
57 + serializedParams = parts.join('&');
58 + }
59 +
60 + if (serializedParams) {
61 + var hashmarkIndex = url.indexOf('#');
62 + if (hashmarkIndex !== -1) {
63 + url = url.slice(0, hashmarkIndex);
64 + }
65 +
66 + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
67 + }
68 +
69 + return url;
70 +};
1 +'use strict';
2 +
3 +/**
4 + * Creates a new URL by combining the specified URLs
5 + *
6 + * @param {string} baseURL The base URL
7 + * @param {string} relativeURL The relative URL
8 + * @returns {string} The combined URL
9 + */
10 +module.exports = function combineURLs(baseURL, relativeURL) {
11 + return relativeURL
12 + ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
13 + : baseURL;
14 +};
1 +'use strict';
2 +
3 +var utils = require('./../utils');
4 +
5 +module.exports = (
6 + utils.isStandardBrowserEnv() ?
7 +
8 + // Standard browser envs support document.cookie
9 + (function standardBrowserEnv() {
10 + return {
11 + write: function write(name, value, expires, path, domain, secure) {
12 + var cookie = [];
13 + cookie.push(name + '=' + encodeURIComponent(value));
14 +
15 + if (utils.isNumber(expires)) {
16 + cookie.push('expires=' + new Date(expires).toGMTString());
17 + }
18 +
19 + if (utils.isString(path)) {
20 + cookie.push('path=' + path);
21 + }
22 +
23 + if (utils.isString(domain)) {
24 + cookie.push('domain=' + domain);
25 + }
26 +
27 + if (secure === true) {
28 + cookie.push('secure');
29 + }
30 +
31 + document.cookie = cookie.join('; ');
32 + },
33 +
34 + read: function read(name) {
35 + var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
36 + return (match ? decodeURIComponent(match[3]) : null);
37 + },
38 +
39 + remove: function remove(name) {
40 + this.write(name, '', Date.now() - 86400000);
41 + }
42 + };
43 + })() :
44 +
45 + // Non standard browser env (web workers, react-native) lack needed support.
46 + (function nonStandardBrowserEnv() {
47 + return {
48 + write: function write() {},
49 + read: function read() { return null; },
50 + remove: function remove() {}
51 + };
52 + })()
53 +);
1 +'use strict';
2 +
3 +/*eslint no-console:0*/
4 +
5 +/**
6 + * Supply a warning to the developer that a method they are using
7 + * has been deprecated.
8 + *
9 + * @param {string} method The name of the deprecated method
10 + * @param {string} [instead] The alternate method to use if applicable
11 + * @param {string} [docs] The documentation URL to get further details
12 + */
13 +module.exports = function deprecatedMethod(method, instead, docs) {
14 + try {
15 + console.warn(
16 + 'DEPRECATED method `' + method + '`.' +
17 + (instead ? ' Use `' + instead + '` instead.' : '') +
18 + ' This method will be removed in a future release.');
19 +
20 + if (docs) {
21 + console.warn('For more information about usage see ' + docs);
22 + }
23 + } catch (e) { /* Ignore */ }
24 +};
1 +'use strict';
2 +
3 +/**
4 + * Determines whether the specified URL is absolute
5 + *
6 + * @param {string} url The URL to test
7 + * @returns {boolean} True if the specified URL is absolute, otherwise false
8 + */
9 +module.exports = function isAbsoluteURL(url) {
10 + // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
11 + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
12 + // by any combination of letters, digits, plus, period, or hyphen.
13 + return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
14 +};
1 +'use strict';
2 +
3 +var utils = require('./../utils');
4 +
5 +module.exports = (
6 + utils.isStandardBrowserEnv() ?
7 +
8 + // Standard browser envs have full support of the APIs needed to test
9 + // whether the request URL is of the same origin as current location.
10 + (function standardBrowserEnv() {
11 + var msie = /(msie|trident)/i.test(navigator.userAgent);
12 + var urlParsingNode = document.createElement('a');
13 + var originURL;
14 +
15 + /**
16 + * Parse a URL to discover it's components
17 + *
18 + * @param {String} url The URL to be parsed
19 + * @returns {Object}
20 + */
21 + function resolveURL(url) {
22 + var href = url;
23 +
24 + if (msie) {
25 + // IE needs attribute set twice to normalize properties
26 + urlParsingNode.setAttribute('href', href);
27 + href = urlParsingNode.href;
28 + }
29 +
30 + urlParsingNode.setAttribute('href', href);
31 +
32 + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
33 + return {
34 + href: urlParsingNode.href,
35 + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
36 + host: urlParsingNode.host,
37 + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
38 + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
39 + hostname: urlParsingNode.hostname,
40 + port: urlParsingNode.port,
41 + pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
42 + urlParsingNode.pathname :
43 + '/' + urlParsingNode.pathname
44 + };
45 + }
46 +
47 + originURL = resolveURL(window.location.href);
48 +
49 + /**
50 + * Determine if a URL shares the same origin as the current location
51 + *
52 + * @param {String} requestURL The URL to test
53 + * @returns {boolean} True if URL shares the same origin, otherwise false
54 + */
55 + return function isURLSameOrigin(requestURL) {
56 + var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
57 + return (parsed.protocol === originURL.protocol &&
58 + parsed.host === originURL.host);
59 + };
60 + })() :
61 +
62 + // Non standard browser envs (web workers, react-native) lack needed support.
63 + (function nonStandardBrowserEnv() {
64 + return function isURLSameOrigin() {
65 + return true;
66 + };
67 + })()
68 +);
1 +'use strict';
2 +
3 +var utils = require('../utils');
4 +
5 +module.exports = function normalizeHeaderName(headers, normalizedName) {
6 + utils.forEach(headers, function processHeader(value, name) {
7 + if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
8 + headers[normalizedName] = value;
9 + delete headers[name];
10 + }
11 + });
12 +};
1 +'use strict';
2 +
3 +var utils = require('./../utils');
4 +
5 +// Headers whose duplicates are ignored by node
6 +// c.f. https://nodejs.org/api/http.html#http_message_headers
7 +var ignoreDuplicateOf = [
8 + 'age', 'authorization', 'content-length', 'content-type', 'etag',
9 + 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
10 + 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
11 + 'referer', 'retry-after', 'user-agent'
12 +];
13 +
14 +/**
15 + * Parse headers into an object
16 + *
17 + * ```
18 + * Date: Wed, 27 Aug 2014 08:58:49 GMT
19 + * Content-Type: application/json
20 + * Connection: keep-alive
21 + * Transfer-Encoding: chunked
22 + * ```
23 + *
24 + * @param {String} headers Headers needing to be parsed
25 + * @returns {Object} Headers parsed into an object
26 + */
27 +module.exports = function parseHeaders(headers) {
28 + var parsed = {};
29 + var key;
30 + var val;
31 + var i;
32 +
33 + if (!headers) { return parsed; }
34 +
35 + utils.forEach(headers.split('\n'), function parser(line) {
36 + i = line.indexOf(':');
37 + key = utils.trim(line.substr(0, i)).toLowerCase();
38 + val = utils.trim(line.substr(i + 1));
39 +
40 + if (key) {
41 + if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
42 + return;
43 + }
44 + if (key === 'set-cookie') {
45 + parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
46 + } else {
47 + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
48 + }
49 + }
50 + });
51 +
52 + return parsed;
53 +};
1 +'use strict';
2 +
3 +/**
4 + * Syntactic sugar for invoking a function and expanding an array for arguments.
5 + *
6 + * Common use case would be to use `Function.prototype.apply`.
7 + *
8 + * ```js
9 + * function f(x, y, z) {}
10 + * var args = [1, 2, 3];
11 + * f.apply(null, args);
12 + * ```
13 + *
14 + * With `spread` this example can be re-written.
15 + *
16 + * ```js
17 + * spread(function(x, y, z) {})([1, 2, 3]);
18 + * ```
19 + *
20 + * @param {Function} callback
21 + * @returns {Function}
22 + */
23 +module.exports = function spread(callback) {
24 + return function wrap(arr) {
25 + return callback.apply(null, arr);
26 + };
27 +};
1 +'use strict';
2 +
3 +var bind = require('./helpers/bind');
4 +
5 +/*global toString:true*/
6 +
7 +// utils is a library of generic helper functions non-specific to axios
8 +
9 +var toString = Object.prototype.toString;
10 +
11 +/**
12 + * Determine if a value is an Array
13 + *
14 + * @param {Object} val The value to test
15 + * @returns {boolean} True if value is an Array, otherwise false
16 + */
17 +function isArray(val) {
18 + return toString.call(val) === '[object Array]';
19 +}
20 +
21 +/**
22 + * Determine if a value is undefined
23 + *
24 + * @param {Object} val The value to test
25 + * @returns {boolean} True if the value is undefined, otherwise false
26 + */
27 +function isUndefined(val) {
28 + return typeof val === 'undefined';
29 +}
30 +
31 +/**
32 + * Determine if a value is a Buffer
33 + *
34 + * @param {Object} val The value to test
35 + * @returns {boolean} True if value is a Buffer, otherwise false
36 + */
37 +function isBuffer(val) {
38 + return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
39 + && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
40 +}
41 +
42 +/**
43 + * Determine if a value is an ArrayBuffer
44 + *
45 + * @param {Object} val The value to test
46 + * @returns {boolean} True if value is an ArrayBuffer, otherwise false
47 + */
48 +function isArrayBuffer(val) {
49 + return toString.call(val) === '[object ArrayBuffer]';
50 +}
51 +
52 +/**
53 + * Determine if a value is a FormData
54 + *
55 + * @param {Object} val The value to test
56 + * @returns {boolean} True if value is an FormData, otherwise false
57 + */
58 +function isFormData(val) {
59 + return (typeof FormData !== 'undefined') && (val instanceof FormData);
60 +}
61 +
62 +/**
63 + * Determine if a value is a view on an ArrayBuffer
64 + *
65 + * @param {Object} val The value to test
66 + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
67 + */
68 +function isArrayBufferView(val) {
69 + var result;
70 + if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
71 + result = ArrayBuffer.isView(val);
72 + } else {
73 + result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
74 + }
75 + return result;
76 +}
77 +
78 +/**
79 + * Determine if a value is a String
80 + *
81 + * @param {Object} val The value to test
82 + * @returns {boolean} True if value is a String, otherwise false
83 + */
84 +function isString(val) {
85 + return typeof val === 'string';
86 +}
87 +
88 +/**
89 + * Determine if a value is a Number
90 + *
91 + * @param {Object} val The value to test
92 + * @returns {boolean} True if value is a Number, otherwise false
93 + */
94 +function isNumber(val) {
95 + return typeof val === 'number';
96 +}
97 +
98 +/**
99 + * Determine if a value is an Object
100 + *
101 + * @param {Object} val The value to test
102 + * @returns {boolean} True if value is an Object, otherwise false
103 + */
104 +function isObject(val) {
105 + return val !== null && typeof val === 'object';
106 +}
107 +
108 +/**
109 + * Determine if a value is a plain Object
110 + *
111 + * @param {Object} val The value to test
112 + * @return {boolean} True if value is a plain Object, otherwise false
113 + */
114 +function isPlainObject(val) {
115 + if (toString.call(val) !== '[object Object]') {
116 + return false;
117 + }
118 +
119 + var prototype = Object.getPrototypeOf(val);
120 + return prototype === null || prototype === Object.prototype;
121 +}
122 +
123 +/**
124 + * Determine if a value is a Date
125 + *
126 + * @param {Object} val The value to test
127 + * @returns {boolean} True if value is a Date, otherwise false
128 + */
129 +function isDate(val) {
130 + return toString.call(val) === '[object Date]';
131 +}
132 +
133 +/**
134 + * Determine if a value is a File
135 + *
136 + * @param {Object} val The value to test
137 + * @returns {boolean} True if value is a File, otherwise false
138 + */
139 +function isFile(val) {
140 + return toString.call(val) === '[object File]';
141 +}
142 +
143 +/**
144 + * Determine if a value is a Blob
145 + *
146 + * @param {Object} val The value to test
147 + * @returns {boolean} True if value is a Blob, otherwise false
148 + */
149 +function isBlob(val) {
150 + return toString.call(val) === '[object Blob]';
151 +}
152 +
153 +/**
154 + * Determine if a value is a Function
155 + *
156 + * @param {Object} val The value to test
157 + * @returns {boolean} True if value is a Function, otherwise false
158 + */
159 +function isFunction(val) {
160 + return toString.call(val) === '[object Function]';
161 +}
162 +
163 +/**
164 + * Determine if a value is a Stream
165 + *
166 + * @param {Object} val The value to test
167 + * @returns {boolean} True if value is a Stream, otherwise false
168 + */
169 +function isStream(val) {
170 + return isObject(val) && isFunction(val.pipe);
171 +}
172 +
173 +/**
174 + * Determine if a value is a URLSearchParams object
175 + *
176 + * @param {Object} val The value to test
177 + * @returns {boolean} True if value is a URLSearchParams object, otherwise false
178 + */
179 +function isURLSearchParams(val) {
180 + return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
181 +}
182 +
183 +/**
184 + * Trim excess whitespace off the beginning and end of a string
185 + *
186 + * @param {String} str The String to trim
187 + * @returns {String} The String freed of excess whitespace
188 + */
189 +function trim(str) {
190 + return str.replace(/^\s*/, '').replace(/\s*$/, '');
191 +}
192 +
193 +/**
194 + * Determine if we're running in a standard browser environment
195 + *
196 + * This allows axios to run in a web worker, and react-native.
197 + * Both environments support XMLHttpRequest, but not fully standard globals.
198 + *
199 + * web workers:
200 + * typeof window -> undefined
201 + * typeof document -> undefined
202 + *
203 + * react-native:
204 + * navigator.product -> 'ReactNative'
205 + * nativescript
206 + * navigator.product -> 'NativeScript' or 'NS'
207 + */
208 +function isStandardBrowserEnv() {
209 + if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
210 + navigator.product === 'NativeScript' ||
211 + navigator.product === 'NS')) {
212 + return false;
213 + }
214 + return (
215 + typeof window !== 'undefined' &&
216 + typeof document !== 'undefined'
217 + );
218 +}
219 +
220 +/**
221 + * Iterate over an Array or an Object invoking a function for each item.
222 + *
223 + * If `obj` is an Array callback will be called passing
224 + * the value, index, and complete array for each item.
225 + *
226 + * If 'obj' is an Object callback will be called passing
227 + * the value, key, and complete object for each property.
228 + *
229 + * @param {Object|Array} obj The object to iterate
230 + * @param {Function} fn The callback to invoke for each item
231 + */
232 +function forEach(obj, fn) {
233 + // Don't bother if no value provided
234 + if (obj === null || typeof obj === 'undefined') {
235 + return;
236 + }
237 +
238 + // Force an array if not already something iterable
239 + if (typeof obj !== 'object') {
240 + /*eslint no-param-reassign:0*/
241 + obj = [obj];
242 + }
243 +
244 + if (isArray(obj)) {
245 + // Iterate over array values
246 + for (var i = 0, l = obj.length; i < l; i++) {
247 + fn.call(null, obj[i], i, obj);
248 + }
249 + } else {
250 + // Iterate over object keys
251 + for (var key in obj) {
252 + if (Object.prototype.hasOwnProperty.call(obj, key)) {
253 + fn.call(null, obj[key], key, obj);
254 + }
255 + }
256 + }
257 +}
258 +
259 +/**
260 + * Accepts varargs expecting each argument to be an object, then
261 + * immutably merges the properties of each object and returns result.
262 + *
263 + * When multiple objects contain the same key the later object in
264 + * the arguments list will take precedence.
265 + *
266 + * Example:
267 + *
268 + * ```js
269 + * var result = merge({foo: 123}, {foo: 456});
270 + * console.log(result.foo); // outputs 456
271 + * ```
272 + *
273 + * @param {Object} obj1 Object to merge
274 + * @returns {Object} Result of all merge properties
275 + */
276 +function merge(/* obj1, obj2, obj3, ... */) {
277 + var result = {};
278 + function assignValue(val, key) {
279 + if (isPlainObject(result[key]) && isPlainObject(val)) {
280 + result[key] = merge(result[key], val);
281 + } else if (isPlainObject(val)) {
282 + result[key] = merge({}, val);
283 + } else if (isArray(val)) {
284 + result[key] = val.slice();
285 + } else {
286 + result[key] = val;
287 + }
288 + }
289 +
290 + for (var i = 0, l = arguments.length; i < l; i++) {
291 + forEach(arguments[i], assignValue);
292 + }
293 + return result;
294 +}
295 +
296 +/**
297 + * Extends object a by mutably adding to it the properties of object b.
298 + *
299 + * @param {Object} a The object to be extended
300 + * @param {Object} b The object to copy properties from
301 + * @param {Object} thisArg The object to bind function to
302 + * @return {Object} The resulting value of object a
303 + */
304 +function extend(a, b, thisArg) {
305 + forEach(b, function assignValue(val, key) {
306 + if (thisArg && typeof val === 'function') {
307 + a[key] = bind(val, thisArg);
308 + } else {
309 + a[key] = val;
310 + }
311 + });
312 + return a;
313 +}
314 +
315 +/**
316 + * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
317 + *
318 + * @param {string} content with BOM
319 + * @return {string} content value without BOM
320 + */
321 +function stripBOM(content) {
322 + if (content.charCodeAt(0) === 0xFEFF) {
323 + content = content.slice(1);
324 + }
325 + return content;
326 +}
327 +
328 +module.exports = {
329 + isArray: isArray,
330 + isArrayBuffer: isArrayBuffer,
331 + isBuffer: isBuffer,
332 + isFormData: isFormData,
333 + isArrayBufferView: isArrayBufferView,
334 + isString: isString,
335 + isNumber: isNumber,
336 + isObject: isObject,
337 + isPlainObject: isPlainObject,
338 + isUndefined: isUndefined,
339 + isDate: isDate,
340 + isFile: isFile,
341 + isBlob: isBlob,
342 + isFunction: isFunction,
343 + isStream: isStream,
344 + isURLSearchParams: isURLSearchParams,
345 + isStandardBrowserEnv: isStandardBrowserEnv,
346 + forEach: forEach,
347 + merge: merge,
348 + extend: extend,
349 + trim: trim,
350 + stripBOM: stripBOM
351 +};
1 +{
2 + "_from": "axios",
3 + "_id": "axios@0.21.0",
4 + "_inBundle": false,
5 + "_integrity": "sha512-fmkJBknJKoZwem3/IKSSLpkdNXZeBu5Q7GA/aRsr2btgrptmSCxi2oFjZHqGdK9DoTil9PIHlPIZw2EcRJXRvw==",
6 + "_location": "/axios",
7 + "_phantomChildren": {},
8 + "_requested": {
9 + "type": "tag",
10 + "registry": true,
11 + "raw": "axios",
12 + "name": "axios",
13 + "escapedName": "axios",
14 + "rawSpec": "",
15 + "saveSpec": null,
16 + "fetchSpec": "latest"
17 + },
18 + "_requiredBy": [
19 + "#USER",
20 + "/"
21 + ],
22 + "_resolved": "https://registry.npmjs.org/axios/-/axios-0.21.0.tgz",
23 + "_shasum": "26df088803a2350dff2c27f96fef99fe49442aca",
24 + "_spec": "axios",
25 + "_where": "C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\mypro",
26 + "author": {
27 + "name": "Matt Zabriskie"
28 + },
29 + "browser": {
30 + "./lib/adapters/http.js": "./lib/adapters/xhr.js"
31 + },
32 + "bugs": {
33 + "url": "https://github.com/axios/axios/issues"
34 + },
35 + "bundleDependencies": false,
36 + "bundlesize": [
37 + {
38 + "path": "./dist/axios.min.js",
39 + "threshold": "5kB"
40 + }
41 + ],
42 + "dependencies": {
43 + "follow-redirects": "^1.10.0"
44 + },
45 + "deprecated": false,
46 + "description": "Promise based HTTP client for the browser and node.js",
47 + "devDependencies": {
48 + "bundlesize": "^0.17.0",
49 + "coveralls": "^3.0.0",
50 + "es6-promise": "^4.2.4",
51 + "grunt": "^1.0.2",
52 + "grunt-banner": "^0.6.0",
53 + "grunt-cli": "^1.2.0",
54 + "grunt-contrib-clean": "^1.1.0",
55 + "grunt-contrib-watch": "^1.0.0",
56 + "grunt-eslint": "^20.1.0",
57 + "grunt-karma": "^2.0.0",
58 + "grunt-mocha-test": "^0.13.3",
59 + "grunt-ts": "^6.0.0-beta.19",
60 + "grunt-webpack": "^1.0.18",
61 + "istanbul-instrumenter-loader": "^1.0.0",
62 + "jasmine-core": "^2.4.1",
63 + "karma": "^1.3.0",
64 + "karma-chrome-launcher": "^2.2.0",
65 + "karma-coverage": "^1.1.1",
66 + "karma-firefox-launcher": "^1.1.0",
67 + "karma-jasmine": "^1.1.1",
68 + "karma-jasmine-ajax": "^0.1.13",
69 + "karma-opera-launcher": "^1.0.0",
70 + "karma-safari-launcher": "^1.0.0",
71 + "karma-sauce-launcher": "^1.2.0",
72 + "karma-sinon": "^1.0.5",
73 + "karma-sourcemap-loader": "^0.3.7",
74 + "karma-webpack": "^1.7.0",
75 + "load-grunt-tasks": "^3.5.2",
76 + "minimist": "^1.2.0",
77 + "mocha": "^5.2.0",
78 + "sinon": "^4.5.0",
79 + "typescript": "^2.8.1",
80 + "url-search-params": "^0.10.0",
81 + "webpack": "^1.13.1",
82 + "webpack-dev-server": "^1.14.1"
83 + },
84 + "homepage": "https://github.com/axios/axios",
85 + "jsdelivr": "dist/axios.min.js",
86 + "keywords": [
87 + "xhr",
88 + "http",
89 + "ajax",
90 + "promise",
91 + "node"
92 + ],
93 + "license": "MIT",
94 + "main": "index.js",
95 + "name": "axios",
96 + "repository": {
97 + "type": "git",
98 + "url": "git+https://github.com/axios/axios.git"
99 + },
100 + "scripts": {
101 + "build": "NODE_ENV=production grunt build",
102 + "coveralls": "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
103 + "examples": "node ./examples/server.js",
104 + "fix": "eslint --fix lib/**/*.js",
105 + "postversion": "git push && git push --tags",
106 + "preversion": "npm test",
107 + "start": "node ./sandbox/server.js",
108 + "test": "grunt test && bundlesize",
109 + "version": "npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"
110 + },
111 + "typings": "./index.d.ts",
112 + "unpkg": "dist/axios.min.js",
113 + "version": "0.21.0"
114 +}
1 +Copyright 2014–present Olivier Lalonde <olalonde@gmail.com>, James Talmage <james@talmage.io>, Ruben Verborgh
2 +
3 +Permission is hereby granted, free of charge, to any person obtaining a copy of
4 +this software and associated documentation files (the "Software"), to deal in
5 +the Software without restriction, including without limitation the rights to
6 +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7 +of the Software, and to permit persons to whom the Software is furnished to do
8 +so, subject to the following conditions:
9 +
10 +The above copyright notice and this permission notice shall be included in all
11 +copies or substantial portions of the Software.
12 +
13 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
17 +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
18 +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 +## Follow Redirects
2 +
3 +Drop-in replacement for Node's `http` and `https` modules that automatically follows redirects.
4 +
5 +[![npm version](https://img.shields.io/npm/v/follow-redirects.svg)](https://www.npmjs.com/package/follow-redirects)
6 +[![Build Status](https://travis-ci.com/follow-redirects/follow-redirects.svg?branch=master)](https://travis-ci.com/follow-redirects/follow-redirects)
7 +[![Coverage Status](https://coveralls.io/repos/follow-redirects/follow-redirects/badge.svg?branch=master)](https://coveralls.io/r/follow-redirects/follow-redirects?branch=master)
8 +[![npm downloads](https://img.shields.io/npm/dm/follow-redirects.svg)](https://www.npmjs.com/package/follow-redirects)
9 +[![Sponsor on GitHub](https://img.shields.io/static/v1?label=Sponsor&message=%F0%9F%92%96&logo=GitHub)](https://github.com/sponsors/RubenVerborgh)
10 +
11 +`follow-redirects` provides [request](https://nodejs.org/api/http.html#http_http_request_options_callback) and [get](https://nodejs.org/api/http.html#http_http_get_options_callback)
12 + methods that behave identically to those found on the native [http](https://nodejs.org/api/http.html#http_http_request_options_callback) and [https](https://nodejs.org/api/https.html#https_https_request_options_callback)
13 + modules, with the exception that they will seamlessly follow redirects.
14 +
15 +```javascript
16 +const { http, https } = require('follow-redirects');
17 +
18 +http.get('http://bit.ly/900913', response => {
19 + response.on('data', chunk => {
20 + console.log(chunk);
21 + });
22 +}).on('error', err => {
23 + console.error(err);
24 +});
25 +```
26 +
27 +You can inspect the final redirected URL through the `responseUrl` property on the `response`.
28 +If no redirection happened, `responseUrl` is the original request URL.
29 +
30 +```javascript
31 +const request = https.request({
32 + host: 'bitly.com',
33 + path: '/UHfDGO',
34 +}, response => {
35 + console.log(response.responseUrl);
36 + // 'http://duckduckgo.com/robots.txt'
37 +});
38 +request.end();
39 +```
40 +
41 +## Options
42 +### Global options
43 +Global options are set directly on the `follow-redirects` module:
44 +
45 +```javascript
46 +const followRedirects = require('follow-redirects');
47 +followRedirects.maxRedirects = 10;
48 +followRedirects.maxBodyLength = 20 * 1024 * 1024; // 20 MB
49 +```
50 +
51 +The following global options are supported:
52 +
53 +- `maxRedirects` (default: `21`) – sets the maximum number of allowed redirects; if exceeded, an error will be emitted.
54 +
55 +- `maxBodyLength` (default: 10MB) – sets the maximum size of the request body; if exceeded, an error will be emitted.
56 +
57 +### Per-request options
58 +Per-request options are set by passing an `options` object:
59 +
60 +```javascript
61 +const url = require('url');
62 +const { http, https } = require('follow-redirects');
63 +
64 +const options = url.parse('http://bit.ly/900913');
65 +options.maxRedirects = 10;
66 +options.beforeRedirect = (options, { headers }) => {
67 + // Use this to adjust the request options upon redirecting,
68 + // to inspect the latest response headers,
69 + // or to cancel the request by throwing an error
70 + if (options.hostname === "example.com") {
71 + options.auth = "user:password";
72 + }
73 +};
74 +http.request(options);
75 +```
76 +
77 +In addition to the [standard HTTP](https://nodejs.org/api/http.html#http_http_request_options_callback) and [HTTPS options](https://nodejs.org/api/https.html#https_https_request_options_callback),
78 +the following per-request options are supported:
79 +- `followRedirects` (default: `true`) – whether redirects should be followed.
80 +
81 +- `maxRedirects` (default: `21`) – sets the maximum number of allowed redirects; if exceeded, an error will be emitted.
82 +
83 +- `maxBodyLength` (default: 10MB) – sets the maximum size of the request body; if exceeded, an error will be emitted.
84 +
85 +- `beforeRedirect` (default: `undefined`) – optionally change the request `options` on redirects, or abort the request by throwing an error.
86 +
87 +- `agents` (default: `undefined`) – sets the `agent` option per protocol, since HTTP and HTTPS use different agents. Example value: `{ http: new http.Agent(), https: new https.Agent() }`
88 +
89 +- `trackRedirects` (default: `false`) – whether to store the redirected response details into the `redirects` array on the response object.
90 +
91 +
92 +### Advanced usage
93 +By default, `follow-redirects` will use the Node.js default implementations
94 +of [`http`](https://nodejs.org/api/http.html)
95 +and [`https`](https://nodejs.org/api/https.html).
96 +To enable features such as caching and/or intermediate request tracking,
97 +you might instead want to wrap `follow-redirects` around custom protocol implementations:
98 +
99 +```javascript
100 +const { http, https } = require('follow-redirects').wrap({
101 + http: require('your-custom-http'),
102 + https: require('your-custom-https'),
103 +});
104 +```
105 +
106 +Such custom protocols only need an implementation of the `request` method.
107 +
108 +## Browser Usage
109 +
110 +Due to the way the browser works,
111 +the `http` and `https` browser equivalents perform redirects by default.
112 +
113 +By requiring `follow-redirects` this way:
114 +```javascript
115 +const http = require('follow-redirects/http');
116 +const https = require('follow-redirects/https');
117 +```
118 +you can easily tell webpack and friends to replace
119 +`follow-redirect` by the built-in versions:
120 +
121 +```json
122 +{
123 + "follow-redirects/http" : "http",
124 + "follow-redirects/https" : "https"
125 +}
126 +```
127 +
128 +## Contributing
129 +
130 +Pull Requests are always welcome. Please [file an issue](https://github.com/follow-redirects/follow-redirects/issues)
131 + detailing your proposal before you invest your valuable time. Additional features and bug fixes should be accompanied
132 + by tests. You can run the test suite locally with a simple `npm test` command.
133 +
134 +## Debug Logging
135 +
136 +`follow-redirects` uses the excellent [debug](https://www.npmjs.com/package/debug) for logging. To turn on logging
137 + set the environment variable `DEBUG=follow-redirects` for debug output from just this module. When running the test
138 + suite it is sometimes advantageous to set `DEBUG=*` to see output from the express server as well.
139 +
140 +## Authors
141 +
142 +- [Ruben Verborgh](https://ruben.verborgh.org/)
143 +- [Olivier Lalonde](mailto:olalonde@gmail.com)
144 +- [James Talmage](mailto:james@talmage.io)
145 +
146 +## License
147 +
148 +[MIT License](https://github.com/follow-redirects/follow-redirects/blob/master/LICENSE)
1 +var debug;
2 +try {
3 + /* eslint global-require: off */
4 + debug = require("debug")("follow-redirects");
5 +}
6 +catch (error) {
7 + debug = function () { /* */ };
8 +}
9 +module.exports = debug;
1 +module.exports = require("./").http;
1 +module.exports = require("./").https;
1 +var url = require("url");
2 +var URL = url.URL;
3 +var http = require("http");
4 +var https = require("https");
5 +var Writable = require("stream").Writable;
6 +var assert = require("assert");
7 +var debug = require("./debug");
8 +
9 +// Create handlers that pass events from native requests
10 +var eventHandlers = Object.create(null);
11 +["abort", "aborted", "connect", "error", "socket", "timeout"].forEach(function (event) {
12 + eventHandlers[event] = function (arg1, arg2, arg3) {
13 + this._redirectable.emit(event, arg1, arg2, arg3);
14 + };
15 +});
16 +
17 +// Error types with codes
18 +var RedirectionError = createErrorType(
19 + "ERR_FR_REDIRECTION_FAILURE",
20 + ""
21 +);
22 +var TooManyRedirectsError = createErrorType(
23 + "ERR_FR_TOO_MANY_REDIRECTS",
24 + "Maximum number of redirects exceeded"
25 +);
26 +var MaxBodyLengthExceededError = createErrorType(
27 + "ERR_FR_MAX_BODY_LENGTH_EXCEEDED",
28 + "Request body larger than maxBodyLength limit"
29 +);
30 +var WriteAfterEndError = createErrorType(
31 + "ERR_STREAM_WRITE_AFTER_END",
32 + "write after end"
33 +);
34 +
35 +// An HTTP(S) request that can be redirected
36 +function RedirectableRequest(options, responseCallback) {
37 + // Initialize the request
38 + Writable.call(this);
39 + this._sanitizeOptions(options);
40 + this._options = options;
41 + this._ended = false;
42 + this._ending = false;
43 + this._redirectCount = 0;
44 + this._redirects = [];
45 + this._requestBodyLength = 0;
46 + this._requestBodyBuffers = [];
47 +
48 + // Attach a callback if passed
49 + if (responseCallback) {
50 + this.on("response", responseCallback);
51 + }
52 +
53 + // React to responses of native requests
54 + var self = this;
55 + this._onNativeResponse = function (response) {
56 + self._processResponse(response);
57 + };
58 +
59 + // Perform the first request
60 + this._performRequest();
61 +}
62 +RedirectableRequest.prototype = Object.create(Writable.prototype);
63 +
64 +// Writes buffered data to the current native request
65 +RedirectableRequest.prototype.write = function (data, encoding, callback) {
66 + // Writing is not allowed if end has been called
67 + if (this._ending) {
68 + throw new WriteAfterEndError();
69 + }
70 +
71 + // Validate input and shift parameters if necessary
72 + if (!(typeof data === "string" || typeof data === "object" && ("length" in data))) {
73 + throw new TypeError("data should be a string, Buffer or Uint8Array");
74 + }
75 + if (typeof encoding === "function") {
76 + callback = encoding;
77 + encoding = null;
78 + }
79 +
80 + // Ignore empty buffers, since writing them doesn't invoke the callback
81 + // https://github.com/nodejs/node/issues/22066
82 + if (data.length === 0) {
83 + if (callback) {
84 + callback();
85 + }
86 + return;
87 + }
88 + // Only write when we don't exceed the maximum body length
89 + if (this._requestBodyLength + data.length <= this._options.maxBodyLength) {
90 + this._requestBodyLength += data.length;
91 + this._requestBodyBuffers.push({ data: data, encoding: encoding });
92 + this._currentRequest.write(data, encoding, callback);
93 + }
94 + // Error when we exceed the maximum body length
95 + else {
96 + this.emit("error", new MaxBodyLengthExceededError());
97 + this.abort();
98 + }
99 +};
100 +
101 +// Ends the current native request
102 +RedirectableRequest.prototype.end = function (data, encoding, callback) {
103 + // Shift parameters if necessary
104 + if (typeof data === "function") {
105 + callback = data;
106 + data = encoding = null;
107 + }
108 + else if (typeof encoding === "function") {
109 + callback = encoding;
110 + encoding = null;
111 + }
112 +
113 + // Write data if needed and end
114 + if (!data) {
115 + this._ended = this._ending = true;
116 + this._currentRequest.end(null, null, callback);
117 + }
118 + else {
119 + var self = this;
120 + var currentRequest = this._currentRequest;
121 + this.write(data, encoding, function () {
122 + self._ended = true;
123 + currentRequest.end(null, null, callback);
124 + });
125 + this._ending = true;
126 + }
127 +};
128 +
129 +// Sets a header value on the current native request
130 +RedirectableRequest.prototype.setHeader = function (name, value) {
131 + this._options.headers[name] = value;
132 + this._currentRequest.setHeader(name, value);
133 +};
134 +
135 +// Clears a header value on the current native request
136 +RedirectableRequest.prototype.removeHeader = function (name) {
137 + delete this._options.headers[name];
138 + this._currentRequest.removeHeader(name);
139 +};
140 +
141 +// Global timeout for all underlying requests
142 +RedirectableRequest.prototype.setTimeout = function (msecs, callback) {
143 + if (callback) {
144 + this.once("timeout", callback);
145 + }
146 +
147 + if (this.socket) {
148 + startTimer(this, msecs);
149 + }
150 + else {
151 + var self = this;
152 + this._currentRequest.once("socket", function () {
153 + startTimer(self, msecs);
154 + });
155 + }
156 +
157 + this.once("response", clearTimer);
158 + this.once("error", clearTimer);
159 +
160 + return this;
161 +};
162 +
163 +function startTimer(request, msecs) {
164 + clearTimeout(request._timeout);
165 + request._timeout = setTimeout(function () {
166 + request.emit("timeout");
167 + }, msecs);
168 +}
169 +
170 +function clearTimer() {
171 + clearTimeout(this._timeout);
172 +}
173 +
174 +// Proxy all other public ClientRequest methods
175 +[
176 + "abort", "flushHeaders", "getHeader",
177 + "setNoDelay", "setSocketKeepAlive",
178 +].forEach(function (method) {
179 + RedirectableRequest.prototype[method] = function (a, b) {
180 + return this._currentRequest[method](a, b);
181 + };
182 +});
183 +
184 +// Proxy all public ClientRequest properties
185 +["aborted", "connection", "socket"].forEach(function (property) {
186 + Object.defineProperty(RedirectableRequest.prototype, property, {
187 + get: function () { return this._currentRequest[property]; },
188 + });
189 +});
190 +
191 +RedirectableRequest.prototype._sanitizeOptions = function (options) {
192 + // Ensure headers are always present
193 + if (!options.headers) {
194 + options.headers = {};
195 + }
196 +
197 + // Since http.request treats host as an alias of hostname,
198 + // but the url module interprets host as hostname plus port,
199 + // eliminate the host property to avoid confusion.
200 + if (options.host) {
201 + // Use hostname if set, because it has precedence
202 + if (!options.hostname) {
203 + options.hostname = options.host;
204 + }
205 + delete options.host;
206 + }
207 +
208 + // Complete the URL object when necessary
209 + if (!options.pathname && options.path) {
210 + var searchPos = options.path.indexOf("?");
211 + if (searchPos < 0) {
212 + options.pathname = options.path;
213 + }
214 + else {
215 + options.pathname = options.path.substring(0, searchPos);
216 + options.search = options.path.substring(searchPos);
217 + }
218 + }
219 +};
220 +
221 +
222 +// Executes the next native request (initial or redirect)
223 +RedirectableRequest.prototype._performRequest = function () {
224 + // Load the native protocol
225 + var protocol = this._options.protocol;
226 + var nativeProtocol = this._options.nativeProtocols[protocol];
227 + if (!nativeProtocol) {
228 + this.emit("error", new TypeError("Unsupported protocol " + protocol));
229 + return;
230 + }
231 +
232 + // If specified, use the agent corresponding to the protocol
233 + // (HTTP and HTTPS use different types of agents)
234 + if (this._options.agents) {
235 + var scheme = protocol.substr(0, protocol.length - 1);
236 + this._options.agent = this._options.agents[scheme];
237 + }
238 +
239 + // Create the native request
240 + var request = this._currentRequest =
241 + nativeProtocol.request(this._options, this._onNativeResponse);
242 + this._currentUrl = url.format(this._options);
243 +
244 + // Set up event handlers
245 + request._redirectable = this;
246 + for (var event in eventHandlers) {
247 + /* istanbul ignore else */
248 + if (event) {
249 + request.on(event, eventHandlers[event]);
250 + }
251 + }
252 +
253 + // End a redirected request
254 + // (The first request must be ended explicitly with RedirectableRequest#end)
255 + if (this._isRedirect) {
256 + // Write the request entity and end.
257 + var i = 0;
258 + var self = this;
259 + var buffers = this._requestBodyBuffers;
260 + (function writeNext(error) {
261 + // Only write if this request has not been redirected yet
262 + /* istanbul ignore else */
263 + if (request === self._currentRequest) {
264 + // Report any write errors
265 + /* istanbul ignore if */
266 + if (error) {
267 + self.emit("error", error);
268 + }
269 + // Write the next buffer if there are still left
270 + else if (i < buffers.length) {
271 + var buffer = buffers[i++];
272 + /* istanbul ignore else */
273 + if (!request.finished) {
274 + request.write(buffer.data, buffer.encoding, writeNext);
275 + }
276 + }
277 + // End the request if `end` has been called on us
278 + else if (self._ended) {
279 + request.end();
280 + }
281 + }
282 + }());
283 + }
284 +};
285 +
286 +// Processes a response from the current native request
287 +RedirectableRequest.prototype._processResponse = function (response) {
288 + // Store the redirected response
289 + var statusCode = response.statusCode;
290 + if (this._options.trackRedirects) {
291 + this._redirects.push({
292 + url: this._currentUrl,
293 + headers: response.headers,
294 + statusCode: statusCode,
295 + });
296 + }
297 +
298 + // RFC7231§6.4: The 3xx (Redirection) class of status code indicates
299 + // that further action needs to be taken by the user agent in order to
300 + // fulfill the request. If a Location header field is provided,
301 + // the user agent MAY automatically redirect its request to the URI
302 + // referenced by the Location field value,
303 + // even if the specific status code is not understood.
304 + var location = response.headers.location;
305 + if (location && this._options.followRedirects !== false &&
306 + statusCode >= 300 && statusCode < 400) {
307 + // Abort the current request
308 + this._currentRequest.removeAllListeners();
309 + this._currentRequest.on("error", noop);
310 + this._currentRequest.abort();
311 + // Discard the remainder of the response to avoid waiting for data
312 + response.destroy();
313 +
314 + // RFC7231§6.4: A client SHOULD detect and intervene
315 + // in cyclical redirections (i.e., "infinite" redirection loops).
316 + if (++this._redirectCount > this._options.maxRedirects) {
317 + this.emit("error", new TooManyRedirectsError());
318 + return;
319 + }
320 +
321 + // RFC7231§6.4: Automatic redirection needs to done with
322 + // care for methods not known to be safe, […]
323 + // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change
324 + // the request method from POST to GET for the subsequent request.
325 + if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" ||
326 + // RFC7231§6.4.4: The 303 (See Other) status code indicates that
327 + // the server is redirecting the user agent to a different resource […]
328 + // A user agent can perform a retrieval request targeting that URI
329 + // (a GET or HEAD request if using HTTP) […]
330 + (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) {
331 + this._options.method = "GET";
332 + // Drop a possible entity and headers related to it
333 + this._requestBodyBuffers = [];
334 + removeMatchingHeaders(/^content-/i, this._options.headers);
335 + }
336 +
337 + // Drop the Host header, as the redirect might lead to a different host
338 + var previousHostName = removeMatchingHeaders(/^host$/i, this._options.headers) ||
339 + url.parse(this._currentUrl).hostname;
340 +
341 + // Create the redirected request
342 + var redirectUrl = url.resolve(this._currentUrl, location);
343 + debug("redirecting to", redirectUrl);
344 + this._isRedirect = true;
345 + var redirectUrlParts = url.parse(redirectUrl);
346 + Object.assign(this._options, redirectUrlParts);
347 +
348 + // Drop the Authorization header if redirecting to another host
349 + if (redirectUrlParts.hostname !== previousHostName) {
350 + removeMatchingHeaders(/^authorization$/i, this._options.headers);
351 + }
352 +
353 + // Evaluate the beforeRedirect callback
354 + if (typeof this._options.beforeRedirect === "function") {
355 + var responseDetails = { headers: response.headers };
356 + try {
357 + this._options.beforeRedirect.call(null, this._options, responseDetails);
358 + }
359 + catch (err) {
360 + this.emit("error", err);
361 + return;
362 + }
363 + this._sanitizeOptions(this._options);
364 + }
365 +
366 + // Perform the redirected request
367 + try {
368 + this._performRequest();
369 + }
370 + catch (cause) {
371 + var error = new RedirectionError("Redirected request failed: " + cause.message);
372 + error.cause = cause;
373 + this.emit("error", error);
374 + }
375 + }
376 + else {
377 + // The response is not a redirect; return it as-is
378 + response.responseUrl = this._currentUrl;
379 + response.redirects = this._redirects;
380 + this.emit("response", response);
381 +
382 + // Clean up
383 + this._requestBodyBuffers = [];
384 + }
385 +};
386 +
387 +// Wraps the key/value object of protocols with redirect functionality
388 +function wrap(protocols) {
389 + // Default settings
390 + var exports = {
391 + maxRedirects: 21,
392 + maxBodyLength: 10 * 1024 * 1024,
393 + };
394 +
395 + // Wrap each protocol
396 + var nativeProtocols = {};
397 + Object.keys(protocols).forEach(function (scheme) {
398 + var protocol = scheme + ":";
399 + var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
400 + var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol);
401 +
402 + // Executes a request, following redirects
403 + function request(input, options, callback) {
404 + // Parse parameters
405 + if (typeof input === "string") {
406 + var urlStr = input;
407 + try {
408 + input = urlToOptions(new URL(urlStr));
409 + }
410 + catch (err) {
411 + /* istanbul ignore next */
412 + input = url.parse(urlStr);
413 + }
414 + }
415 + else if (URL && (input instanceof URL)) {
416 + input = urlToOptions(input);
417 + }
418 + else {
419 + callback = options;
420 + options = input;
421 + input = { protocol: protocol };
422 + }
423 + if (typeof options === "function") {
424 + callback = options;
425 + options = null;
426 + }
427 +
428 + // Set defaults
429 + options = Object.assign({
430 + maxRedirects: exports.maxRedirects,
431 + maxBodyLength: exports.maxBodyLength,
432 + }, input, options);
433 + options.nativeProtocols = nativeProtocols;
434 +
435 + assert.equal(options.protocol, protocol, "protocol mismatch");
436 + debug("options", options);
437 + return new RedirectableRequest(options, callback);
438 + }
439 +
440 + // Executes a GET request, following redirects
441 + function get(input, options, callback) {
442 + var wrappedRequest = wrappedProtocol.request(input, options, callback);
443 + wrappedRequest.end();
444 + return wrappedRequest;
445 + }
446 +
447 + // Expose the properties on the wrapped protocol
448 + Object.defineProperties(wrappedProtocol, {
449 + request: { value: request, configurable: true, enumerable: true, writable: true },
450 + get: { value: get, configurable: true, enumerable: true, writable: true },
451 + });
452 + });
453 + return exports;
454 +}
455 +
456 +/* istanbul ignore next */
457 +function noop() { /* empty */ }
458 +
459 +// from https://github.com/nodejs/node/blob/master/lib/internal/url.js
460 +function urlToOptions(urlObject) {
461 + var options = {
462 + protocol: urlObject.protocol,
463 + hostname: urlObject.hostname.startsWith("[") ?
464 + /* istanbul ignore next */
465 + urlObject.hostname.slice(1, -1) :
466 + urlObject.hostname,
467 + hash: urlObject.hash,
468 + search: urlObject.search,
469 + pathname: urlObject.pathname,
470 + path: urlObject.pathname + urlObject.search,
471 + href: urlObject.href,
472 + };
473 + if (urlObject.port !== "") {
474 + options.port = Number(urlObject.port);
475 + }
476 + return options;
477 +}
478 +
479 +function removeMatchingHeaders(regex, headers) {
480 + var lastValue;
481 + for (var header in headers) {
482 + if (regex.test(header)) {
483 + lastValue = headers[header];
484 + delete headers[header];
485 + }
486 + }
487 + return lastValue;
488 +}
489 +
490 +function createErrorType(code, defaultMessage) {
491 + function CustomError(message) {
492 + Error.captureStackTrace(this, this.constructor);
493 + this.message = message || defaultMessage;
494 + }
495 + CustomError.prototype = new Error();
496 + CustomError.prototype.constructor = CustomError;
497 + CustomError.prototype.name = "Error [" + code + "]";
498 + CustomError.prototype.code = code;
499 + return CustomError;
500 +}
501 +
502 +// Exports
503 +module.exports = wrap({ http: http, https: https });
504 +module.exports.wrap = wrap;
1 +{
2 + "_from": "follow-redirects@^1.10.0",
3 + "_id": "follow-redirects@1.13.1",
4 + "_inBundle": false,
5 + "_integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==",
6 + "_location": "/follow-redirects",
7 + "_phantomChildren": {},
8 + "_requested": {
9 + "type": "range",
10 + "registry": true,
11 + "raw": "follow-redirects@^1.10.0",
12 + "name": "follow-redirects",
13 + "escapedName": "follow-redirects",
14 + "rawSpec": "^1.10.0",
15 + "saveSpec": null,
16 + "fetchSpec": "^1.10.0"
17 + },
18 + "_requiredBy": [
19 + "/axios"
20 + ],
21 + "_resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz",
22 + "_shasum": "5f69b813376cee4fd0474a3aba835df04ab763b7",
23 + "_spec": "follow-redirects@^1.10.0",
24 + "_where": "C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\mypro\\node_modules\\axios",
25 + "author": {
26 + "name": "Ruben Verborgh",
27 + "email": "ruben@verborgh.org",
28 + "url": "https://ruben.verborgh.org/"
29 + },
30 + "bugs": {
31 + "url": "https://github.com/follow-redirects/follow-redirects/issues"
32 + },
33 + "bundleDependencies": false,
34 + "contributors": [
35 + {
36 + "name": "Olivier Lalonde",
37 + "email": "olalonde@gmail.com",
38 + "url": "http://www.syskall.com"
39 + },
40 + {
41 + "name": "James Talmage",
42 + "email": "james@talmage.io"
43 + }
44 + ],
45 + "deprecated": false,
46 + "description": "HTTP and HTTPS modules that follow redirects.",
47 + "devDependencies": {
48 + "concat-stream": "^2.0.0",
49 + "eslint": "^5.16.0",
50 + "express": "^4.16.4",
51 + "lolex": "^3.1.0",
52 + "mocha": "^6.0.2",
53 + "nyc": "^14.1.1"
54 + },
55 + "engines": {
56 + "node": ">=4.0"
57 + },
58 + "files": [
59 + "*.js"
60 + ],
61 + "funding": [
62 + {
63 + "type": "individual",
64 + "url": "https://github.com/sponsors/RubenVerborgh"
65 + }
66 + ],
67 + "homepage": "https://github.com/follow-redirects/follow-redirects",
68 + "keywords": [
69 + "http",
70 + "https",
71 + "url",
72 + "redirect",
73 + "client",
74 + "location",
75 + "utility"
76 + ],
77 + "license": "MIT",
78 + "main": "index.js",
79 + "name": "follow-redirects",
80 + "peerDependenciesMeta": {
81 + "debug": {
82 + "optional": true
83 + }
84 + },
85 + "repository": {
86 + "type": "git",
87 + "url": "git+ssh://git@github.com/follow-redirects/follow-redirects.git"
88 + },
89 + "scripts": {
90 + "lint": "eslint *.js test",
91 + "mocha": "nyc mocha",
92 + "test": "npm run lint && npm run mocha"
93 + },
94 + "version": "1.13.1"
95 +}
1 +{
2 + "requires": true,
3 + "lockfileVersion": 1,
4 + "dependencies": {
5 + "axios": {
6 + "version": "0.21.0",
7 + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.0.tgz",
8 + "integrity": "sha512-fmkJBknJKoZwem3/IKSSLpkdNXZeBu5Q7GA/aRsr2btgrptmSCxi2oFjZHqGdK9DoTil9PIHlPIZw2EcRJXRvw==",
9 + "requires": {
10 + "follow-redirects": "^1.10.0"
11 + }
12 + },
13 + "follow-redirects": {
14 + "version": "1.13.1",
15 + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz",
16 + "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg=="
17 + }
18 + }
19 +}
1 +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 +
3 +# dependencies
4 +/node_modules
5 +/bin
6 +
7 +# misc
8 +.DS_Store
9 +.env.local
10 +.env.development.local
11 +.env.test.local
12 +.env.production.local
13 +
14 +npm-debug.log*
15 +yarn-debug.log*
16 +yarn-error.log*
1 +var createError = require('http-errors');
2 +var express = require('express');
3 +var path = require('path');
4 +var cookieParser = require('cookie-parser');
5 +var logger = require('morgan');
6 +
7 +var indexRouter = require('./routes/index');
8 +var usersRouter = require('./routes/users');
9 +var tikzsRouter = require('./routes/tikzs');
10 +//const uploadsRouter = require('./routes/upload');
11 +//파일 저장
12 +const Html =require('./routes/uploadHtml');
13 +const Math =require('./routes/uploadMathCha');
14 +const Tikz =require('./routes/uploadTikz');
15 +
16 +
17 +// CORS 충돌 해결을 위한것
18 +const cors =require('cors');
19 +// //CORS 옵션을 위해
20 + const corsOptions = {
21 + origin:'http://localhost:3000', //허락하고자 하는 요청 주소(client단 요청 주소)
22 + credentials:true, //설정한 내용을 response 헤더에 추가해준다.
23 + };
24 +
25 +var app = express();
26 +
27 +//CORS 미들웨어 추가
28 +app.use(cors(corsOptions));
29 +// view engine setup
30 +app.set('views', path.join(__dirname, 'views'));
31 +app.set('view engine', 'jade');
32 +
33 +app.use(logger('dev'));
34 +app.use(express.json());
35 +
36 +
37 +app.use(express.urlencoded({ extended: false }));
38 +app.use(cookieParser());
39 +app.use(express.static(path.join(__dirname, 'public')));
40 +
41 +app.use('/', indexRouter);
42 +app.use('/users', usersRouter);
43 +app.use('/tikzs', tikzsRouter); //This is test for tikz
44 +
45 +//파일 업로드
46 +app.use('/upload/html',Html);
47 +app.use('/upload/math',Math);
48 +app.use('/upload/tikz',Tikz);
49 +
50 +app.use('/htmlPreview', express.static('html'));
51 +app.use('/mathchaDownload', express.static('math'));
52 +
53 +
54 +// catch 404 and forward to error handler
55 +app.use(function(req, res, next) {
56 + next(createError(404));
57 +});
58 +
59 +// error handler
60 +app.use(function(err, req, res, next) {
61 + // set locals, only providing error in development
62 + res.locals.message = err.message;
63 + res.locals.error = req.app.get('env') === 'development' ? err : {};
64 +
65 + // render the error page
66 + res.status(err.status || 500);
67 + res.render('error');
68 +});
69 +
70 +
71 +
72 +const models = require('./models');
73 +models.sequelize.sync()
74 + .then(() => {
75 + console.log('✓ DB connection success.');
76 + console.log(' Press CTRL-C to stop\n');
77 + })
78 + .catch(err => {
79 + console.error(err);
80 + console.log('✗ DB connection error. Please make sure DB is running.');
81 + process.exit();
82 + });
83 +
84 +module.exports = app;
1 +{
2 + "development": {
3 + "username": "math2020",
4 + "password": "1qaz@WSX@2020",
5 + "database": "tikzmath",
6 + "host": "ai.natmal.com",
7 + "dialect": "mysql"
8 + },
9 + "test": {
10 + "username": "math2020",
11 + "password": "1qaz@WSX@2020",
12 + "database": "tikzmath",
13 + "host": "ai.natmal.com",
14 + "dialect": "mysql"
15 + },
16 + "production": {
17 + "username": "math2020",
18 + "password": "1qaz@WSX@2020",
19 + "database": "tikzmath",
20 + "host": "ai.natmal.com",
21 + "dialect": "mysql"
22 + }
23 +}
No preview for this file type
No preview for this file type
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 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 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 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 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 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 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 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 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 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 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 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 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.
No preview for this file type
1 +'use strict';
2 +
3 +const fs = require('fs');
4 +const path = require('path');
5 +const Sequelize = require('sequelize');
6 +const basename = path.basename(__filename);
7 +const env = process.env.NODE_ENV || 'development';
8 +const config = require(__dirname + '/../config/config.json')[env];
9 +const db = {};
10 +
11 +let sequelize;
12 +if (config.use_env_variable) {
13 + sequelize = new Sequelize(process.env[config.use_env_variable], config);
14 +} else {
15 + sequelize = new Sequelize(config.database, config.username, config.password, config);
16 +}
17 +
18 +fs
19 + .readdirSync(__dirname)
20 + .filter(file => {
21 + return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js');
22 + })
23 + .forEach(file => {
24 + console.log(file);
25 + const model = require(path.join(__dirname, file))(sequelize, Sequelize.DataTypes);
26 + console.log(model.name);
27 + db[model.name] = model;
28 + });
29 +
30 +Object.keys(db).forEach(modelName => {
31 + if (db[modelName].associate) {
32 + db[modelName].associate(db);
33 + }
34 +});
35 +
36 +db.sequelize = sequelize;
37 +db.Sequelize = Sequelize;
38 +
39 +module.exports = db;
1 +'use strict';
2 +
3 +module.exports = function (sequelize, DataTypes) {
4 + const Tikz = sequelize.define(
5 + 'Tikz',
6 + {
7 + qno: {
8 + type:DataTypes.INTEGER,
9 + set: function (val) {
10 + this.setDataValue('qno', val);
11 + },
12 + get: function () {
13 + return this.getDataValue('qno');
14 + },
15 + },
16 + typeSol:{
17 + type:DataTypes.STRING(10),
18 + set: function (val){
19 + this.setDataValue('typeSol', val);
20 + },
21 + get: function () {
22 + return this.getDataValue('typeSol');
23 + }
24 +
25 + },
26 + typeQue:{
27 + type:DataTypes.STRING(4),
28 + set: function (val){
29 + this.setDataValue('typeQue',val);
30 + },
31 + get: function () {
32 + return this.getDataValue('typeQue');
33 + }
34 + },
35 + htmlFileName: {
36 + type:DataTypes.STRING,
37 + set: function (val) {
38 + this.setDataValue('htmlFileName', val);
39 + },
40 + get: function () {
41 + return this.getDataValue('htmlFileName');
42 + },
43 + },
44 + mathcharFileName: {
45 + type:DataTypes.STRING,
46 + set: function (val) {
47 + this.setDataValue('mathcharFileName',val);
48 + },
49 + get: function () {
50 + return this.getDataValue('mathcharFileName');
51 + },
52 + },
53 +
54 + tex:{
55 + type:DataTypes.TEXT,
56 + set: function (val) {
57 + this.setDataValue('tex',val);
58 + },
59 + get: function () {
60 + return this.getDataValue('tex');
61 + },
62 + },
63 + creator:{
64 + type:DataTypes.STRING,
65 + set: function (val) {
66 + this.setDataValue('creator',val);
67 + },
68 + get: function () {
69 + return this.getDataValue('creator');
70 + },
71 + }
72 + },
73 + {
74 + classMethods: {},
75 + tableName: 'tikz',
76 + freezeTableName: true,
77 + underscored: true,
78 + timestamps: true,
79 + }
80 + );
81 + return Tikz;
82 +};
...\ No newline at end of file ...\ No newline at end of file
1 +'use strict';
2 +
3 +module.exports = function (sequelize, DataTypes) {
4 + const User = sequelize.define(
5 + 'User',
6 + {
7 + id:{
8 + type:DataTypes.STRING,
9 + primaryKey: true,
10 + },
11 + pwd:{
12 + type: DataTypes.STRING
13 + },
14 + },
15 + {
16 + classMethods: {},
17 + tableName: 'user',
18 + freezeTableName: true,
19 + underscored: true,
20 + timestamps: true,
21 + }
22 + );
23 + return User;
24 +};
...\ No newline at end of file ...\ No newline at end of file
This diff could not be displayed because it is too large.
1 +{
2 + "name": "server",
3 + "version": "0.0.0",
4 + "private": true,
5 + "scripts": {
6 + "start": "cross-env NODE_PATH=../server nodemon ./bin/www"
7 + },
8 + "dependencies": {
9 + "cookie-parser": "~1.4.4",
10 + "cors": "^2.8.5",
11 + "debug": "~2.6.9",
12 + "express": "~4.16.1",
13 + "http-errors": "~1.6.3",
14 + "jade": "~1.11.0",
15 + "morgan": "~1.9.1",
16 + "multer": "^1.4.2",
17 + "mysql2": "^2.1.0",
18 + "nodemon": "^2.0.4"
19 + },
20 + "devDependencies": {
21 + "sequelize": "^6.2.4",
22 + "tedious": "^8.3.0"
23 + }
24 +}
1 +body {
2 + padding: 50px;
3 + font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
4 +}
5 +
6 +a {
7 + color: #00B7FF;
8 +}
1 +var express = require('express');
2 +var router = express.Router();
3 +
4 +/* GET home page. */
5 +router.get('/', function(req, res, next) {
6 + res.render('index', { title: 'minsung' });
7 +});
8 +
9 +module.exports = router;
1 +var express = require('express');
2 +var router = express.Router();
3 +var models = require('../models');
4 +const { text } = require('express');
5 +/* GET users listing. */
6 +const { Op } = require("sequelize");
7 +
8 +router.post('/',async function(req, res, next) {
9 + const {user, pageSize, currentPage,orderWhat,orderKind} = req.body;
10 + const offset = pageSize*(currentPage-1);
11 + const limit=pageSize;
12 +console.log(pageSize,currentPage,orderWhat,orderKind);
13 + const result = await models.Tikz.findAndCountAll({where:{creator:user}, order:[[orderWhat,orderKind]], limit , offset});
14 + if(result){
15 + const total=result.count;
16 + const values= result.rows.map(x => x.get({plain:true}))
17 + res.status(200).json({tikzs:values,total});
18 + }
19 +});
20 +// const result = await models.Tikz.findAndCountAll({where:{creator:user}, order:[['qno','desc']], limit , offset});
21 +router.get('/removeItem', async function(req,res,next){
22 + const {id} =req.query;
23 +
24 + if(id ==null){
25 + return res.status(500).json({message:"id를 확인해 주세요."});
26 + }try{
27 + const result = await models.Tikz.destroy({where:{id}});
28 + if(result){
29 + res.status(200).json({message:"삭제되었습니다."});
30 + }
31 +}catch(e){
32 + console.log(e);
33 + res.status(500).json({message:"알 수 없는 오류입니다."})
34 +}
35 +});
36 +
37 +router.post('/removeItems', async function(req,res,next){
38 + const {ids} =req.body;
39 +
40 + if(ids ==null){
41 + return res.status(500).json({message:"ids를 확인해 주세요."});
42 + }
43 + console.log(ids);
44 + try{
45 + const result = await models.Tikz.destroy({where:{ id:[...ids]}});
46 + if(result){
47 + res.status(200).json({message:"삭제되었습니다."});
48 + }
49 +}catch(e){
50 + console.log(e);
51 + res.status(500).json({message:"알 수 없는 오류입니다."})
52 +}
53 +});
54 +
55 +
56 +module.exports = router;
1 +const express = require('express');
2 +const multer = require('multer');
3 +const fs = require('fs');
4 +const path = require('path');
5 +const {Tikz} = require('../models');
6 +
7 +const router = express.Router();
8 +
9 +fs.readdir('html', (error) => {
10 + // html 폴더 없으면 생성
11 + if (error) {
12 + fs.mkdirSync('html');
13 + }
14 +})
15 +
16 +const upload = multer({
17 + storage: multer.diskStorage({
18 + destination(req, file, cb) {
19 + cb(null, 'html/');
20 + },
21 + filename(req, file, cb) {
22 + const ext = path.extname(file.originalname);
23 + cb(null, path.basename(file.originalname, ext) + Date.now() + ext);
24 + },
25 + }),
26 + limits: { fileSize: 5 * 1024 * 1024 },
27 +})
28 +// 이미지 업로드를 위한 API
29 +// upload의 single 메서드는 하나의 이미지를 업로드할 때 사용
30 +router.post('/', upload.single('html'),async (req, res)=> {
31 + try{
32 + const {qno, typeSol, typeQue, creator} = req.body;
33 + const {filename} = req.file;
34 + console.log(filename);
35 + console.log(qno);
36 + if(qno==null || filename==null){
37 + return res.status(500).json({message:"문항번호와 파일명을 확인해 주세요."});
38 + }
39 + //데이터 베이스 저장
40 +
41 +
42 + let tikz = await Tikz.findOne({where:{qno, typeSol, typeQue, creator}});
43 + if(tikz){
44 + console.log(tikz);
45 + tikz.htmlFileName = filename;
46 + await tikz.save();
47 +
48 + res.status(200).json({message: '수정되었습니다.'});
49 + }else{
50 + tikz = new Tikz();
51 + tikz.qno = qno;
52 + tikz.typeSol = typeSol;
53 + tikz.typeQue = typeQue;
54 + tikz.creator = creator;
55 + tikz.htmlFileName = filename;
56 + await tikz.save();
57 + res.status(200).json({message: '저장되었습니다.' });
58 + }
59 +
60 + }catch(e){
61 + console.log(e);
62 + res.status(500).json({message:"잠시후 다시 저장해 주세요"});
63 + }
64 + //res.json({ url : `http://localhost:5000/upload/${req.file.filename}`});
65 +})
66 +
67 +module.exports = router;
...\ No newline at end of file ...\ No newline at end of file
1 +const express = require('express');
2 +const multer = require('multer');
3 +const fs = require('fs');
4 +const path = require('path');
5 +const {Tikz} = require('../models');
6 +
7 +const router = express.Router();
8 +
9 +fs.readdir('math', (error) => {
10 + // math 폴더 없으면 생성
11 + if (error) {
12 + fs.mkdirSync('math');
13 + }
14 +})
15 +
16 +const upload = multer({
17 + storage: multer.diskStorage({
18 + destination(req, file, cb) {
19 + cb(null, 'math/');
20 + },
21 + filename(req, file, cb) {
22 + const ext = path.extname(file.originalname);
23 + cb(null, path.basename(file.originalname, ext) + Date.now() + ext);
24 + },
25 + }),
26 + limits: { fileSize: 5 * 1024 * 1024 },
27 +})
28 +// 이미지 업로드를 위한 API
29 +// upload의 single 메서드는 하나의 이미지를 업로드할 때 사용
30 +router.post('/', upload.single('math'),async (req, res)=> {
31 + try{
32 + const {qno, typeSol, typeQue, creator} = req.body;
33 + const {filename} = req.file;
34 + console.log(filename);
35 + console.log(qno);
36 + if(qno==null || filename==null){
37 + return res.status(500).json({message:"문항번호와 파일명을 확인해 주세요."});
38 + }
39 + //데이터 베이스 저장
40 +
41 +
42 + let math = await Tikz.findOne({where:{qno, typeSol, typeQue, creator}});
43 + if(math){
44 + console.log(math);
45 + math.mathcharFileName = filename;
46 + await math.save();
47 +
48 + res.status(200).json({message: '수정되었습니다.'});
49 + }else{
50 + math = new Tikz();
51 + math.qno = qno;
52 + math.typeSol = typeSol;
53 + math.typeQue = typeQue;
54 + math.creator = creator;
55 + math.mathcharFileName = filename;
56 + await math.save();
57 + res.status(200).json({message: '저장되었습니다.' });
58 + }
59 +
60 + }catch(e){
61 + console.log(e);
62 + res.status(500).json({message:"잠시후 다시 저장해 주세요"});
63 + }
64 + //res.json({ url : `http://localhost:5000/upload/${req.file.filename}`});
65 +})
66 +
67 +module.exports = router;
...\ No newline at end of file ...\ No newline at end of file
1 +const express = require('express');
2 +const {Tikz} = require('../models');
3 +const router = express.Router();
4 +
5 +
6 +// 이미지 업로드를 위한 API
7 +// upload의 single 메서드는 하나의 이미지를 업로드할 때 사용
8 +router.post('/', async(req, res) => {
9 + const {qno, typeSol,typeQue, creator, tikzCode} = req.body;
10 + if(qno==null || typeSol==null || typeQue==null || creator==null ||tikzCode==null){
11 + return res.status(500).json({message:"값이 없습니다. 값을 확인해 주세요."});
12 + }
13 + console.log(qno,typeSol,typeQue,creator,tikzCode);
14 + try{
15 + let tikz = await Tikz.findOne({where:{qno, typeSol, typeQue, creator}});
16 + if(tikz){
17 + tikz.tex = tikzCode;
18 + await tikz.save();
19 +
20 + res.status(200).json({message: '수정되었습니다.'});
21 + }else{
22 + tikz = new Tikz();
23 + tikz.qno = qno;
24 + tikz.typeSol = typeSol;
25 + tikz.typeQue = typeQue;
26 + tikz.creator = creator;
27 + tikz.tex = tikzCode;
28 + await tikz.save();
29 + res.status(200).json({message: '저장되었습니다.' });
30 + }
31 +}catch(e){
32 + console.log(e);
33 + res.status(500).json({message:"잠시후 다시 저장해 주세요"});
34 +}
35 +
36 +})
37 +
38 +module.exports = router;
...\ No newline at end of file ...\ No newline at end of file
1 +var express = require('express');
2 +var router = express.Router();
3 +var models = require('../models');
4 +const { text } = require('express');
5 +/* GET users listing. */
6 +
7 +
8 +router.post('/',async function(req, res, next) {
9 + try{
10 + const {userid, userpwd} =req.body;
11 + const result =await models.User.findOne({where:{id:userid, pwd:userpwd}});
12 + if(result){
13 + const values= result.get({plain:true});
14 + console.log(values);
15 + res.status(200).json({data:values});
16 + }else {
17 + res.status(500).json({message:"Fail"});
18 + }}catch(e){
19 + console.log(e);
20 + res.status(500).json({message:"Fail"});
21 + }
22 +});
23 +
24 +//생성 이였으면 경로와 함께 findall을 수정해주면 된다.
25 +router.post('/create',async function(req, res, next) {
26 + try{
27 + const {userid, userpwd} =req.body;
28 + const result =await models.User.findOne({where:{id:userid, pwd:userpwd}});
29 + if(result==null){
30 + const values= result.get({plain:true});
31 + //const values= result.map(x => x.get({plain:true}))
32 + console.log(values);
33 + res.status(200).json({data:values});
34 + }else{
35 + res.status(500).json({message:"Fail"});
36 + }}catch(e){
37 + console.log(e);
38 + res.status(500).json({message:"Fail"});
39 + }
40 +});
41 +//만약 REST api중 get으로 넘긴다면 req.query 가 되며 Url 뒤에 추가가 된다.
42 +// ex) uers?id=200&pwd=200
43 +
44 +
45 +module.exports = router;
1 +extends layout
2 +
3 +block content
4 + h1= message
5 + h2= error.status
6 + pre #{error.stack}
1 +extends layout
2 +
3 +block content
4 + h1= title
5 + p Welcome to #{title}
6 +
...\ No newline at end of file ...\ No newline at end of file
1 +doctype html
2 +html
3 + head
4 + title= title
5 + link(rel='stylesheet', href='/stylesheets/style.css')
6 + body
7 + block content
1 +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 +# yarn lockfile v1
3 +
4 +
5 +"@azure/ms-rest-azure-env@^1.1.2":
6 + version "1.1.2"
7 + resolved "https://registry.yarnpkg.com/@azure/ms-rest-azure-env/-/ms-rest-azure-env-1.1.2.tgz#8505873afd4a1227ec040894a64fdd736b4a101f"
8 + integrity sha512-l7z0DPCi2Hp88w12JhDTtx5d0Y3+vhfE7JKJb9O7sEz71Cwp053N8piTtTnnk/tUor9oZHgEKi/p3tQQmLPjvA==
9 +
10 +"@azure/ms-rest-js@^1.8.7":
11 + version "1.8.15"
12 + resolved "https://registry.yarnpkg.com/@azure/ms-rest-js/-/ms-rest-js-1.8.15.tgz#4267b6b8c00d85301791fe0cf347e0455a807338"
13 + integrity sha512-kIB71V3DcrA4iysBbOsYcxd4WWlOE7OFtCUYNfflPODM0lbIR23A236QeTn5iAeYwcHmMjR/TAKp5KQQh/WqoQ==
14 + dependencies:
15 + "@types/tunnel" "0.0.0"
16 + axios "^0.19.0"
17 + form-data "^2.3.2"
18 + tough-cookie "^2.4.3"
19 + tslib "^1.9.2"
20 + tunnel "0.0.6"
21 + uuid "^3.2.1"
22 + xml2js "^0.4.19"
23 +
24 +"@azure/ms-rest-nodeauth@2.0.2":
25 + version "2.0.2"
26 + resolved "https://registry.yarnpkg.com/@azure/ms-rest-nodeauth/-/ms-rest-nodeauth-2.0.2.tgz#037e29540c5625eaec718b8fcc178dd7ad5dfb96"
27 + integrity sha512-KmNNICOxt3EwViAJI3iu2VH8t8BQg5J2rSAyO4IUYLF9ZwlyYsP419pdvl4NBUhluAP2cgN7dfD2V6E6NOMZlQ==
28 + dependencies:
29 + "@azure/ms-rest-azure-env" "^1.1.2"
30 + "@azure/ms-rest-js" "^1.8.7"
31 + adal-node "^0.1.28"
32 +
33 +"@js-joda/core@^2.0.0":
34 + version "2.0.0"
35 + resolved "https://registry.yarnpkg.com/@js-joda/core/-/core-2.0.0.tgz#e9a351ee6feb91262770e2a3d085aa0219ad6afb"
36 + integrity sha512-OWm/xa9O9e4ugzNHoRT3IsXZZYfaV6Ia1aRwctOmCQ2GYWMnhKBzMC1WomqCh/oGxEZKNtPy5xv5//VIAOgMqw==
37 +
38 +"@types/node@*":
39 + version "14.0.14"
40 + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.14.tgz#24a0b5959f16ac141aeb0c5b3cd7a15b7c64cbce"
41 + integrity sha512-syUgf67ZQpaJj01/tRTknkMNoBBLWJOBODF0Zm4NrXmiSuxjymFrxnTu1QVYRubhVkRcZLYZG8STTwJRdVm/WQ==
42 +
43 +"@types/node@^8.0.47":
44 + version "8.10.61"
45 + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.61.tgz#d299136ce54bcaf1abaa4a487f9e4bedf6b0d393"
46 + integrity sha512-l+zSbvT8TPRaCxL1l9cwHCb0tSqGAGcjPJFItGGYat5oCTiq1uQQKYg5m7AF1mgnEBzFXGLJ2LRmNjtreRX76Q==
47 +
48 +"@types/tunnel@0.0.0":
49 + version "0.0.0"
50 + resolved "https://registry.yarnpkg.com/@types/tunnel/-/tunnel-0.0.0.tgz#c2a42943ee63c90652a5557b8c4e56cda77f944e"
51 + integrity sha512-FGDp0iBRiBdPjOgjJmn1NH0KDLN+Z8fRmo+9J7XGBhubq1DPrGrbmG4UTlGzrpbCpesMqD0sWkzi27EYkOMHyg==
52 + dependencies:
53 + "@types/node" "*"
54 +
55 +accepts@~1.3.5:
56 + version "1.3.7"
57 + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"
58 + integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==
59 + dependencies:
60 + mime-types "~2.1.24"
61 + negotiator "0.6.2"
62 +
63 +acorn-globals@^1.0.3:
64 + version "1.0.9"
65 + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-1.0.9.tgz#55bb5e98691507b74579d0513413217c380c54cf"
66 + integrity sha1-VbtemGkVB7dFedBRNBMhfDgMVM8=
67 + dependencies:
68 + acorn "^2.1.0"
69 +
70 +acorn@^1.0.1:
71 + version "1.2.2"
72 + resolved "https://registry.yarnpkg.com/acorn/-/acorn-1.2.2.tgz#c8ce27de0acc76d896d2b1fad3df588d9e82f014"
73 + integrity sha1-yM4n3grMdtiW0rH6099YjZ6C8BQ=
74 +
75 +acorn@^2.1.0:
76 + version "2.7.0"
77 + resolved "https://registry.yarnpkg.com/acorn/-/acorn-2.7.0.tgz#ab6e7d9d886aaca8b085bc3312b79a198433f0e7"
78 + integrity sha1-q259nYhqrKiwhbwzEreaGYQz8Oc=
79 +
80 +adal-node@^0.1.28:
81 + version "0.1.28"
82 + resolved "https://registry.yarnpkg.com/adal-node/-/adal-node-0.1.28.tgz#468c4bb3ebbd96b1270669f4b9cba4e0065ea485"
83 + integrity sha1-RoxLs+u9lrEnBmn0ucuk4AZepIU=
84 + dependencies:
85 + "@types/node" "^8.0.47"
86 + async ">=0.6.0"
87 + date-utils "*"
88 + jws "3.x.x"
89 + request ">= 2.52.0"
90 + underscore ">= 1.3.1"
91 + uuid "^3.1.0"
92 + xmldom ">= 0.1.x"
93 + xpath.js "~1.1.0"
94 +
95 +ajv@^6.5.5:
96 + version "6.12.2"
97 + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.2.tgz#c629c5eced17baf314437918d2da88c99d5958cd"
98 + integrity sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==
99 + dependencies:
100 + fast-deep-equal "^3.1.1"
101 + fast-json-stable-stringify "^2.0.0"
102 + json-schema-traverse "^0.4.1"
103 + uri-js "^4.2.2"
104 +
105 +align-text@^0.1.1, align-text@^0.1.3:
106 + version "0.1.4"
107 + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
108 + integrity sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=
109 + dependencies:
110 + kind-of "^3.0.2"
111 + longest "^1.0.1"
112 + repeat-string "^1.5.2"
113 +
114 +amdefine@>=0.0.4:
115 + version "1.0.1"
116 + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
117 + integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=
118 +
119 +any-promise@^1.3.0:
120 + version "1.3.0"
121 + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f"
122 + integrity sha1-q8av7tzqUugJzcA3au0845Y10X8=
123 +
124 +array-flatten@1.1.1:
125 + version "1.1.1"
126 + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2"
127 + integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=
128 +
129 +asap@~1.0.0:
130 + version "1.0.0"
131 + resolved "https://registry.yarnpkg.com/asap/-/asap-1.0.0.tgz#b2a45da5fdfa20b0496fc3768cc27c12fa916a7d"
132 + integrity sha1-sqRdpf36ILBJb8N2jMJ8EvqRan0=
133 +
134 +asn1@~0.2.3:
135 + version "0.2.4"
136 + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136"
137 + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==
138 + dependencies:
139 + safer-buffer "~2.1.0"
140 +
141 +assert-plus@1.0.0, assert-plus@^1.0.0:
142 + version "1.0.0"
143 + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
144 + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=
145 +
146 +async@>=0.6.0:
147 + version "3.2.0"
148 + resolved "https://registry.yarnpkg.com/async/-/async-3.2.0.tgz#b3a2685c5ebb641d3de02d161002c60fc9f85720"
149 + integrity sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==
150 +
151 +asynckit@^0.4.0:
152 + version "0.4.0"
153 + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
154 + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k=
155 +
156 +aws-sign2@~0.7.0:
157 + version "0.7.0"
158 + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
159 + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=
160 +
161 +aws4@^1.8.0:
162 + version "1.10.0"
163 + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.0.tgz#a17b3a8ea811060e74d47d306122400ad4497ae2"
164 + integrity sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==
165 +
166 +axios@^0.19.0:
167 + version "0.19.2"
168 + resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27"
169 + integrity sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==
170 + dependencies:
171 + follow-redirects "1.5.10"
172 +
173 +basic-auth@~2.0.0:
174 + version "2.0.1"
175 + resolved "https://registry.yarnpkg.com/basic-auth/-/basic-auth-2.0.1.tgz#b998279bf47ce38344b4f3cf916d4679bbf51e3a"
176 + integrity sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==
177 + dependencies:
178 + safe-buffer "5.1.2"
179 +
180 +bcrypt-pbkdf@^1.0.0:
181 + version "1.0.2"
182 + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e"
183 + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=
184 + dependencies:
185 + tweetnacl "^0.14.3"
186 +
187 +bl@^3.0.0:
188 + version "3.0.0"
189 + resolved "https://registry.yarnpkg.com/bl/-/bl-3.0.0.tgz#3611ec00579fd18561754360b21e9f784500ff88"
190 + integrity sha512-EUAyP5UHU5hxF8BPT0LKW8gjYLhq1DQIcneOX/pL/m2Alo+OYDQAJlHq+yseMP50Os2nHXOSic6Ss3vSQeyf4A==
191 + dependencies:
192 + readable-stream "^3.0.1"
193 +
194 +body-parser@1.18.3:
195 + version "1.18.3"
196 + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4"
197 + integrity sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=
198 + dependencies:
199 + bytes "3.0.0"
200 + content-type "~1.0.4"
201 + debug "2.6.9"
202 + depd "~1.1.2"
203 + http-errors "~1.6.3"
204 + iconv-lite "0.4.23"
205 + on-finished "~2.3.0"
206 + qs "6.5.2"
207 + raw-body "2.3.3"
208 + type-is "~1.6.16"
209 +
210 +buffer-equal-constant-time@1.0.1:
211 + version "1.0.1"
212 + resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819"
213 + integrity sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=
214 +
215 +bytes@3.0.0:
216 + version "3.0.0"
217 + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"
218 + integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=
219 +
220 +camelcase@^1.0.2:
221 + version "1.2.1"
222 + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39"
223 + integrity sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=
224 +
225 +caseless@~0.12.0:
226 + version "0.12.0"
227 + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
228 + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=
229 +
230 +center-align@^0.1.1:
231 + version "0.1.3"
232 + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad"
233 + integrity sha1-qg0yYptu6XIgBBHL1EYckHvCt60=
234 + dependencies:
235 + align-text "^0.1.3"
236 + lazy-cache "^1.0.3"
237 +
238 +character-parser@1.2.1:
239 + version "1.2.1"
240 + resolved "https://registry.yarnpkg.com/character-parser/-/character-parser-1.2.1.tgz#c0dde4ab182713b919b970959a123ecc1a30fcd6"
241 + integrity sha1-wN3kqxgnE7kZuXCVmhI+zBow/NY=
242 +
243 +clean-css@^3.1.9:
244 + version "3.4.28"
245 + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-3.4.28.tgz#bf1945e82fc808f55695e6ddeaec01400efd03ff"
246 + integrity sha1-vxlF6C/ICPVWlebd6uwBQA79A/8=
247 + dependencies:
248 + commander "2.8.x"
249 + source-map "0.4.x"
250 +
251 +cliui@^2.1.0:
252 + version "2.1.0"
253 + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
254 + integrity sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=
255 + dependencies:
256 + center-align "^0.1.1"
257 + right-align "^0.1.1"
258 + wordwrap "0.0.2"
259 +
260 +combined-stream@^1.0.6, combined-stream@~1.0.6:
261 + version "1.0.8"
262 + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
263 + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
264 + dependencies:
265 + delayed-stream "~1.0.0"
266 +
267 +commander@2.8.x:
268 + version "2.8.1"
269 + resolved "https://registry.yarnpkg.com/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4"
270 + integrity sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=
271 + dependencies:
272 + graceful-readlink ">= 1.0.0"
273 +
274 +commander@~2.6.0:
275 + version "2.6.0"
276 + resolved "https://registry.yarnpkg.com/commander/-/commander-2.6.0.tgz#9df7e52fb2a0cb0fb89058ee80c3104225f37e1d"
277 + integrity sha1-nfflL7Kgyw+4kFjugMMQQiXzfh0=
278 +
279 +constantinople@~3.0.1:
280 + version "3.0.2"
281 + resolved "https://registry.yarnpkg.com/constantinople/-/constantinople-3.0.2.tgz#4b945d9937907bcd98ee575122c3817516544141"
282 + integrity sha1-S5RdmTeQe82Y7ldRIsOBdRZUQUE=
283 + dependencies:
284 + acorn "^2.1.0"
285 +
286 +content-disposition@0.5.2:
287 + version "0.5.2"
288 + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4"
289 + integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ=
290 +
291 +content-type@~1.0.4:
292 + version "1.0.4"
293 + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
294 + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==
295 +
296 +cookie-parser@~1.4.4:
297 + version "1.4.5"
298 + resolved "https://registry.yarnpkg.com/cookie-parser/-/cookie-parser-1.4.5.tgz#3e572d4b7c0c80f9c61daf604e4336831b5d1d49"
299 + integrity sha512-f13bPUj/gG/5mDr+xLmSxxDsB9DQiTIfhJS/sqjrmfAWiAN+x2O4i/XguTL9yDZ+/IFDanJ+5x7hC4CXT9Tdzw==
300 + dependencies:
301 + cookie "0.4.0"
302 + cookie-signature "1.0.6"
303 +
304 +cookie-signature@1.0.6:
305 + version "1.0.6"
306 + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c"
307 + integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw=
308 +
309 +cookie@0.3.1:
310 + version "0.3.1"
311 + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb"
312 + integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=
313 +
314 +cookie@0.4.0:
315 + version "0.4.0"
316 + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba"
317 + integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==
318 +
319 +core-util-is@1.0.2:
320 + version "1.0.2"
321 + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
322 + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
323 +
324 +css-parse@1.0.4:
325 + version "1.0.4"
326 + resolved "https://registry.yarnpkg.com/css-parse/-/css-parse-1.0.4.tgz#38b0503fbf9da9f54e9c1dbda60e145c77117bdd"
327 + integrity sha1-OLBQP7+dqfVOnB29pg4UXHcRe90=
328 +
329 +css-stringify@1.0.5:
330 + version "1.0.5"
331 + resolved "https://registry.yarnpkg.com/css-stringify/-/css-stringify-1.0.5.tgz#b0d042946db2953bb9d292900a6cb5f6d0122031"
332 + integrity sha1-sNBClG2ylTu50pKQCmy19tASIDE=
333 +
334 +css@~1.0.8:
335 + version "1.0.8"
336 + resolved "https://registry.yarnpkg.com/css/-/css-1.0.8.tgz#9386811ca82bccc9ee7fb5a732b1e2a317c8a3e7"
337 + integrity sha1-k4aBHKgrzMnuf7WnMrHioxfIo+c=
338 + dependencies:
339 + css-parse "1.0.4"
340 + css-stringify "1.0.5"
341 +
342 +dashdash@^1.12.0:
343 + version "1.14.1"
344 + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
345 + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=
346 + dependencies:
347 + assert-plus "^1.0.0"
348 +
349 +date-utils@*:
350 + version "1.2.21"
351 + resolved "https://registry.yarnpkg.com/date-utils/-/date-utils-1.2.21.tgz#61fb16cdc1274b3c9acaaffe9fc69df8720a2b64"
352 + integrity sha1-YfsWzcEnSzyayq/+n8ad+HIKK2Q=
353 +
354 +debug@2.6.9, debug@~2.6.9:
355 + version "2.6.9"
356 + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
357 + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
358 + dependencies:
359 + ms "2.0.0"
360 +
361 +debug@=3.1.0:
362 + version "3.1.0"
363 + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
364 + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==
365 + dependencies:
366 + ms "2.0.0"
367 +
368 +debug@^4.1.1:
369 + version "4.1.1"
370 + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
371 + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
372 + dependencies:
373 + ms "^2.1.1"
374 +
375 +decamelize@^1.0.0:
376 + version "1.2.0"
377 + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
378 + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=
379 +
380 +delayed-stream@~1.0.0:
381 + version "1.0.0"
382 + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
383 + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
384 +
385 +depd@^2.0.0:
386 + version "2.0.0"
387 + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df"
388 + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==
389 +
390 +depd@~1.1.2:
391 + version "1.1.2"
392 + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
393 + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=
394 +
395 +destroy@~1.0.4:
396 + version "1.0.4"
397 + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80"
398 + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=
399 +
400 +dottie@^2.0.0:
401 + version "2.0.2"
402 + resolved "https://registry.yarnpkg.com/dottie/-/dottie-2.0.2.tgz#cc91c0726ce3a054ebf11c55fbc92a7f266dd154"
403 + integrity sha512-fmrwR04lsniq/uSr8yikThDTrM7epXHBAAjH9TbeH3rEA8tdCO7mRzB9hdmdGyJCxF8KERo9CITcm3kGuoyMhg==
404 +
405 +ecc-jsbn@~0.1.1:
406 + version "0.1.2"
407 + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"
408 + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=
409 + dependencies:
410 + jsbn "~0.1.0"
411 + safer-buffer "^2.1.0"
412 +
413 +ecdsa-sig-formatter@1.0.11:
414 + version "1.0.11"
415 + resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf"
416 + integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==
417 + dependencies:
418 + safe-buffer "^5.0.1"
419 +
420 +ee-first@1.1.1:
421 + version "1.1.1"
422 + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
423 + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
424 +
425 +encodeurl@~1.0.2:
426 + version "1.0.2"
427 + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
428 + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=
429 +
430 +escape-html@~1.0.3:
431 + version "1.0.3"
432 + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
433 + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
434 +
435 +etag@~1.8.1:
436 + version "1.8.1"
437 + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
438 + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
439 +
440 +express@~4.16.1:
441 + version "4.16.4"
442 + resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e"
443 + integrity sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==
444 + dependencies:
445 + accepts "~1.3.5"
446 + array-flatten "1.1.1"
447 + body-parser "1.18.3"
448 + content-disposition "0.5.2"
449 + content-type "~1.0.4"
450 + cookie "0.3.1"
451 + cookie-signature "1.0.6"
452 + debug "2.6.9"
453 + depd "~1.1.2"
454 + encodeurl "~1.0.2"
455 + escape-html "~1.0.3"
456 + etag "~1.8.1"
457 + finalhandler "1.1.1"
458 + fresh "0.5.2"
459 + merge-descriptors "1.0.1"
460 + methods "~1.1.2"
461 + on-finished "~2.3.0"
462 + parseurl "~1.3.2"
463 + path-to-regexp "0.1.7"
464 + proxy-addr "~2.0.4"
465 + qs "6.5.2"
466 + range-parser "~1.2.0"
467 + safe-buffer "5.1.2"
468 + send "0.16.2"
469 + serve-static "1.13.2"
470 + setprototypeof "1.1.0"
471 + statuses "~1.4.0"
472 + type-is "~1.6.16"
473 + utils-merge "1.0.1"
474 + vary "~1.1.2"
475 +
476 +extend@~3.0.2:
477 + version "3.0.2"
478 + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
479 + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==
480 +
481 +extsprintf@1.3.0:
482 + version "1.3.0"
483 + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
484 + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=
485 +
486 +extsprintf@^1.2.0:
487 + version "1.4.0"
488 + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
489 + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8=
490 +
491 +fast-deep-equal@^3.1.1:
492 + version "3.1.3"
493 + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
494 + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
495 +
496 +fast-json-stable-stringify@^2.0.0:
497 + version "2.1.0"
498 + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
499 + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
500 +
501 +finalhandler@1.1.1:
502 + version "1.1.1"
503 + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105"
504 + integrity sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==
505 + dependencies:
506 + debug "2.6.9"
507 + encodeurl "~1.0.2"
508 + escape-html "~1.0.3"
509 + on-finished "~2.3.0"
510 + parseurl "~1.3.2"
511 + statuses "~1.4.0"
512 + unpipe "~1.0.0"
513 +
514 +follow-redirects@1.5.10:
515 + version "1.5.10"
516 + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a"
517 + integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==
518 + dependencies:
519 + debug "=3.1.0"
520 +
521 +forever-agent@~0.6.1:
522 + version "0.6.1"
523 + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
524 + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
525 +
526 +form-data@^2.3.2:
527 + version "2.5.1"
528 + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4"
529 + integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==
530 + dependencies:
531 + asynckit "^0.4.0"
532 + combined-stream "^1.0.6"
533 + mime-types "^2.1.12"
534 +
535 +form-data@~2.3.2:
536 + version "2.3.3"
537 + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
538 + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==
539 + dependencies:
540 + asynckit "^0.4.0"
541 + combined-stream "^1.0.6"
542 + mime-types "^2.1.12"
543 +
544 +forwarded@~0.1.2:
545 + version "0.1.2"
546 + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
547 + integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=
548 +
549 +fresh@0.5.2:
550 + version "0.5.2"
551 + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
552 + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=
553 +
554 +getpass@^0.1.1:
555 + version "0.1.7"
556 + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa"
557 + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=
558 + dependencies:
559 + assert-plus "^1.0.0"
560 +
561 +"graceful-readlink@>= 1.0.0":
562 + version "1.0.1"
563 + resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
564 + integrity sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=
565 +
566 +har-schema@^2.0.0:
567 + version "2.0.0"
568 + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
569 + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=
570 +
571 +har-validator@~5.1.3:
572 + version "5.1.3"
573 + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080"
574 + integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==
575 + dependencies:
576 + ajv "^6.5.5"
577 + har-schema "^2.0.0"
578 +
579 +http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3:
580 + version "1.6.3"
581 + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d"
582 + integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=
583 + dependencies:
584 + depd "~1.1.2"
585 + inherits "2.0.3"
586 + setprototypeof "1.1.0"
587 + statuses ">= 1.4.0 < 2"
588 +
589 +http-signature@~1.2.0:
590 + version "1.2.0"
591 + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
592 + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=
593 + dependencies:
594 + assert-plus "^1.0.0"
595 + jsprim "^1.2.2"
596 + sshpk "^1.7.0"
597 +
598 +iconv-lite@0.4.23:
599 + version "0.4.23"
600 + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63"
601 + integrity sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==
602 + dependencies:
603 + safer-buffer ">= 2.1.2 < 3"
604 +
605 +iconv-lite@^0.5.0:
606 + version "0.5.2"
607 + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.5.2.tgz#af6d628dccfb463b7364d97f715e4b74b8c8c2b8"
608 + integrity sha512-kERHXvpSaB4aU3eANwidg79K8FlrN77m8G9V+0vOR3HYaRifrlwMEpT7ZBJqLSEIHnEgJTHcWK82wwLwwKwtag==
609 + dependencies:
610 + safer-buffer ">= 2.1.2 < 3"
611 +
612 +inflection@1.12.0:
613 + version "1.12.0"
614 + resolved "https://registry.yarnpkg.com/inflection/-/inflection-1.12.0.tgz#a200935656d6f5f6bc4dc7502e1aecb703228416"
615 + integrity sha1-ogCTVlbW9fa8TcdQLhrstwMihBY=
616 +
617 +inherits@2.0.3:
618 + version "2.0.3"
619 + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
620 + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
621 +
622 +inherits@^2.0.3:
623 + version "2.0.4"
624 + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
625 + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
626 +
627 +ipaddr.js@1.9.1:
628 + version "1.9.1"
629 + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3"
630 + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==
631 +
632 +is-buffer@^1.1.5:
633 + version "1.1.6"
634 + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
635 + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
636 +
637 +is-promise@^2.0.0:
638 + version "2.2.2"
639 + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1"
640 + integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==
641 +
642 +is-promise@~1:
643 + version "1.0.1"
644 + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-1.0.1.tgz#31573761c057e33c2e91aab9e96da08cefbe76e5"
645 + integrity sha1-MVc3YcBX4zwukaq56W2gjO++duU=
646 +
647 +is-typedarray@~1.0.0:
648 + version "1.0.0"
649 + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
650 + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=
651 +
652 +isstream@~0.1.2:
653 + version "0.1.2"
654 + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
655 + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=
656 +
657 +jade@~1.11.0:
658 + version "1.11.0"
659 + resolved "https://registry.yarnpkg.com/jade/-/jade-1.11.0.tgz#9c80e538c12d3fb95c8d9bb9559fa0cc040405fd"
660 + integrity sha1-nIDlOMEtP7lcjZu5VZ+gzAQEBf0=
661 + dependencies:
662 + character-parser "1.2.1"
663 + clean-css "^3.1.9"
664 + commander "~2.6.0"
665 + constantinople "~3.0.1"
666 + jstransformer "0.0.2"
667 + mkdirp "~0.5.0"
668 + transformers "2.1.0"
669 + uglify-js "^2.4.19"
670 + void-elements "~2.0.1"
671 + with "~4.0.0"
672 +
673 +jsbi@^3.1.1:
674 + version "3.1.3"
675 + resolved "https://registry.yarnpkg.com/jsbi/-/jsbi-3.1.3.tgz#f024b340032f7c7caaa6ca4b32b55e8d33f6e897"
676 + integrity sha512-nBJqA0C6Qns+ZxurbEoIR56wyjiUszpNy70FHvxO5ervMoCbZVE3z3kxr5nKGhlxr/9MhKTSUBs7cAwwuf3g9w==
677 +
678 +jsbn@~0.1.0:
679 + version "0.1.1"
680 + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
681 + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM=
682 +
683 +json-schema-traverse@^0.4.1:
684 + version "0.4.1"
685 + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
686 + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
687 +
688 +json-schema@0.2.3:
689 + version "0.2.3"
690 + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
691 + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=
692 +
693 +json-stringify-safe@~5.0.1:
694 + version "5.0.1"
695 + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
696 + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
697 +
698 +jsprim@^1.2.2:
699 + version "1.4.1"
700 + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
701 + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=
702 + dependencies:
703 + assert-plus "1.0.0"
704 + extsprintf "1.3.0"
705 + json-schema "0.2.3"
706 + verror "1.10.0"
707 +
708 +jstransformer@0.0.2:
709 + version "0.0.2"
710 + resolved "https://registry.yarnpkg.com/jstransformer/-/jstransformer-0.0.2.tgz#7aae29a903d196cfa0973d885d3e47947ecd76ab"
711 + integrity sha1-eq4pqQPRls+glz2IXT5HlH7Ndqs=
712 + dependencies:
713 + is-promise "^2.0.0"
714 + promise "^6.0.1"
715 +
716 +jwa@^1.4.1:
717 + version "1.4.1"
718 + resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a"
719 + integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==
720 + dependencies:
721 + buffer-equal-constant-time "1.0.1"
722 + ecdsa-sig-formatter "1.0.11"
723 + safe-buffer "^5.0.1"
724 +
725 +jws@3.x.x:
726 + version "3.2.2"
727 + resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304"
728 + integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==
729 + dependencies:
730 + jwa "^1.4.1"
731 + safe-buffer "^5.0.1"
732 +
733 +kind-of@^3.0.2:
734 + version "3.2.2"
735 + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
736 + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=
737 + dependencies:
738 + is-buffer "^1.1.5"
739 +
740 +lazy-cache@^1.0.3:
741 + version "1.0.4"
742 + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e"
743 + integrity sha1-odePw6UEdMuAhF07O24dpJpEbo4=
744 +
745 +lodash@^4.17.15:
746 + version "4.17.15"
747 + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
748 + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
749 +
750 +longest@^1.0.1:
751 + version "1.0.1"
752 + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
753 + integrity sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=
754 +
755 +media-typer@0.3.0:
756 + version "0.3.0"
757 + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
758 + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=
759 +
760 +merge-descriptors@1.0.1:
761 + version "1.0.1"
762 + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61"
763 + integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=
764 +
765 +methods@~1.1.2:
766 + version "1.1.2"
767 + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
768 + integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=
769 +
770 +mime-db@1.44.0:
771 + version "1.44.0"
772 + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92"
773 + integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==
774 +
775 +mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24:
776 + version "2.1.27"
777 + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f"
778 + integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==
779 + dependencies:
780 + mime-db "1.44.0"
781 +
782 +mime@1.4.1:
783 + version "1.4.1"
784 + resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6"
785 + integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==
786 +
787 +minimist@^1.2.5:
788 + version "1.2.5"
789 + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
790 + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
791 +
792 +mkdirp@~0.5.0:
793 + version "0.5.5"
794 + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
795 + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
796 + dependencies:
797 + minimist "^1.2.5"
798 +
799 +moment-timezone@^0.5.31:
800 + version "0.5.31"
801 + resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.31.tgz#9c40d8c5026f0c7ab46eda3d63e49c155148de05"
802 + integrity sha512-+GgHNg8xRhMXfEbv81iDtrVeTcWt0kWmTEY1XQK14dICTXnWJnT0dxdlPspwqF3keKMVPXwayEsk1DI0AA/jdA==
803 + dependencies:
804 + moment ">= 2.9.0"
805 +
806 +"moment@>= 2.9.0", moment@^2.26.0:
807 + version "2.27.0"
808 + resolved "https://registry.yarnpkg.com/moment/-/moment-2.27.0.tgz#8bff4e3e26a236220dfe3e36de756b6ebaa0105d"
809 + integrity sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ==
810 +
811 +morgan@~1.9.1:
812 + version "1.9.1"
813 + resolved "https://registry.yarnpkg.com/morgan/-/morgan-1.9.1.tgz#0a8d16734a1d9afbc824b99df87e738e58e2da59"
814 + integrity sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA==
815 + dependencies:
816 + basic-auth "~2.0.0"
817 + debug "2.6.9"
818 + depd "~1.1.2"
819 + on-finished "~2.3.0"
820 + on-headers "~1.0.1"
821 +
822 +ms@2.0.0:
823 + version "2.0.0"
824 + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
825 + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
826 +
827 +ms@^2.1.1:
828 + version "2.1.2"
829 + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
830 + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
831 +
832 +native-duplexpair@^1.0.0:
833 + version "1.0.0"
834 + resolved "https://registry.yarnpkg.com/native-duplexpair/-/native-duplexpair-1.0.0.tgz#7899078e64bf3c8a3d732601b3d40ff05db58fa0"
835 + integrity sha1-eJkHjmS/PIo9cyYBs9QP8F21j6A=
836 +
837 +negotiator@0.6.2:
838 + version "0.6.2"
839 + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
840 + integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==
841 +
842 +oauth-sign@~0.9.0:
843 + version "0.9.0"
844 + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455"
845 + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==
846 +
847 +on-finished@~2.3.0:
848 + version "2.3.0"
849 + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947"
850 + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=
851 + dependencies:
852 + ee-first "1.1.1"
853 +
854 +on-headers@~1.0.1:
855 + version "1.0.2"
856 + resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f"
857 + integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==
858 +
859 +optimist@~0.3.5:
860 + version "0.3.7"
861 + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.3.7.tgz#c90941ad59e4273328923074d2cf2e7cbc6ec0d9"
862 + integrity sha1-yQlBrVnkJzMokjB00s8ufLxuwNk=
863 + dependencies:
864 + wordwrap "~0.0.2"
865 +
866 +parseurl@~1.3.2:
867 + version "1.3.3"
868 + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
869 + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==
870 +
871 +path-to-regexp@0.1.7:
872 + version "0.1.7"
873 + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
874 + integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=
875 +
876 +performance-now@^2.1.0:
877 + version "2.1.0"
878 + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
879 + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
880 +
881 +promise@^6.0.1:
882 + version "6.1.0"
883 + resolved "https://registry.yarnpkg.com/promise/-/promise-6.1.0.tgz#2ce729f6b94b45c26891ad0602c5c90e04c6eef6"
884 + integrity sha1-LOcp9rlLRcJoka0GAsXJDgTG7vY=
885 + dependencies:
886 + asap "~1.0.0"
887 +
888 +promise@~2.0:
889 + version "2.0.0"
890 + resolved "https://registry.yarnpkg.com/promise/-/promise-2.0.0.tgz#46648aa9d605af5d2e70c3024bf59436da02b80e"
891 + integrity sha1-RmSKqdYFr10ucMMCS/WUNtoCuA4=
892 + dependencies:
893 + is-promise "~1"
894 +
895 +proxy-addr@~2.0.4:
896 + version "2.0.6"
897 + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf"
898 + integrity sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==
899 + dependencies:
900 + forwarded "~0.1.2"
901 + ipaddr.js "1.9.1"
902 +
903 +psl@^1.1.28:
904 + version "1.8.0"
905 + resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24"
906 + integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==
907 +
908 +punycode@^2.1.0, punycode@^2.1.1:
909 + version "2.1.1"
910 + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
911 + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
912 +
913 +qs@6.5.2, qs@~6.5.2:
914 + version "6.5.2"
915 + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
916 + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
917 +
918 +range-parser@~1.2.0:
919 + version "1.2.1"
920 + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"
921 + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==
922 +
923 +raw-body@2.3.3:
924 + version "2.3.3"
925 + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3"
926 + integrity sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==
927 + dependencies:
928 + bytes "3.0.0"
929 + http-errors "1.6.3"
930 + iconv-lite "0.4.23"
931 + unpipe "1.0.0"
932 +
933 +readable-stream@^3.0.1, readable-stream@^3.6.0:
934 + version "3.6.0"
935 + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198"
936 + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==
937 + dependencies:
938 + inherits "^2.0.3"
939 + string_decoder "^1.1.1"
940 + util-deprecate "^1.0.1"
941 +
942 +repeat-string@^1.5.2:
943 + version "1.6.1"
944 + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
945 + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc=
946 +
947 +"request@>= 2.52.0":
948 + version "2.88.2"
949 + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3"
950 + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==
951 + dependencies:
952 + aws-sign2 "~0.7.0"
953 + aws4 "^1.8.0"
954 + caseless "~0.12.0"
955 + combined-stream "~1.0.6"
956 + extend "~3.0.2"
957 + forever-agent "~0.6.1"
958 + form-data "~2.3.2"
959 + har-validator "~5.1.3"
960 + http-signature "~1.2.0"
961 + is-typedarray "~1.0.0"
962 + isstream "~0.1.2"
963 + json-stringify-safe "~5.0.1"
964 + mime-types "~2.1.19"
965 + oauth-sign "~0.9.0"
966 + performance-now "^2.1.0"
967 + qs "~6.5.2"
968 + safe-buffer "^5.1.2"
969 + tough-cookie "~2.5.0"
970 + tunnel-agent "^0.6.0"
971 + uuid "^3.3.2"
972 +
973 +retry-as-promised@^3.2.0:
974 + version "3.2.0"
975 + resolved "https://registry.yarnpkg.com/retry-as-promised/-/retry-as-promised-3.2.0.tgz#769f63d536bec4783549db0777cb56dadd9d8543"
976 + integrity sha512-CybGs60B7oYU/qSQ6kuaFmRd9sTZ6oXSc0toqePvV74Ac6/IFZSI1ReFQmtCN+uvW1Mtqdwpvt/LGOiCBAY2Mg==
977 + dependencies:
978 + any-promise "^1.3.0"
979 +
980 +right-align@^0.1.1:
981 + version "0.1.3"
982 + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
983 + integrity sha1-YTObci/mo1FWiSENJOFMlhSGE+8=
984 + dependencies:
985 + align-text "^0.1.1"
986 +
987 +safe-buffer@5.1.2:
988 + version "5.1.2"
989 + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
990 + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
991 +
992 +safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0:
993 + version "5.2.1"
994 + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
995 + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
996 +
997 +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0:
998 + version "2.1.2"
999 + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
1000 + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
1001 +
1002 +sax@>=0.6.0:
1003 + version "1.2.4"
1004 + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
1005 + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
1006 +
1007 +semver@^7.3.2:
1008 + version "7.3.2"
1009 + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938"
1010 + integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==
1011 +
1012 +send@0.16.2:
1013 + version "0.16.2"
1014 + resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1"
1015 + integrity sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==
1016 + dependencies:
1017 + debug "2.6.9"
1018 + depd "~1.1.2"
1019 + destroy "~1.0.4"
1020 + encodeurl "~1.0.2"
1021 + escape-html "~1.0.3"
1022 + etag "~1.8.1"
1023 + fresh "0.5.2"
1024 + http-errors "~1.6.2"
1025 + mime "1.4.1"
1026 + ms "2.0.0"
1027 + on-finished "~2.3.0"
1028 + range-parser "~1.2.0"
1029 + statuses "~1.4.0"
1030 +
1031 +sequelize-pool@^6.0.0:
1032 + version "6.0.0"
1033 + resolved "https://registry.yarnpkg.com/sequelize-pool/-/sequelize-pool-6.0.0.tgz#2b2f6570fb633ecb38a338c4fc266c0e42ce2af7"
1034 + integrity sha512-D/VfOX2Z+6JTWqM73lhcqMXp1X4CeqRNVMlndvbOMtyjFAZ2kYzH7rGFGFrLO1r+RZQdc/h+3zQL4nd3cclNLg==
1035 +
1036 +sequelize@^6.2.4:
1037 + version "6.2.4"
1038 + resolved "https://registry.yarnpkg.com/sequelize/-/sequelize-6.2.4.tgz#d6903294177c1df5c2a8b89902d1f76789f0fd70"
1039 + integrity sha512-pgb3CC2Dk3kjZ4knuonF6ixpdBxJwPyjmE8metIJ3D6LovAQK+5QG/DesA43OPsWhgo2TYPZst8YsBk/RE1ZyA==
1040 + dependencies:
1041 + debug "^4.1.1"
1042 + dottie "^2.0.0"
1043 + inflection "1.12.0"
1044 + lodash "^4.17.15"
1045 + moment "^2.26.0"
1046 + moment-timezone "^0.5.31"
1047 + retry-as-promised "^3.2.0"
1048 + semver "^7.3.2"
1049 + sequelize-pool "^6.0.0"
1050 + toposort-class "^1.0.1"
1051 + uuid "^8.1.0"
1052 + validator "^10.11.0"
1053 + wkx "^0.5.0"
1054 +
1055 +serve-static@1.13.2:
1056 + version "1.13.2"
1057 + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1"
1058 + integrity sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==
1059 + dependencies:
1060 + encodeurl "~1.0.2"
1061 + escape-html "~1.0.3"
1062 + parseurl "~1.3.2"
1063 + send "0.16.2"
1064 +
1065 +setprototypeof@1.1.0:
1066 + version "1.1.0"
1067 + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656"
1068 + integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==
1069 +
1070 +source-map@0.4.x:
1071 + version "0.4.4"
1072 + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b"
1073 + integrity sha1-66T12pwNyZneaAMti092FzZSA2s=
1074 + dependencies:
1075 + amdefine ">=0.0.4"
1076 +
1077 +source-map@~0.1.7:
1078 + version "0.1.43"
1079 + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346"
1080 + integrity sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=
1081 + dependencies:
1082 + amdefine ">=0.0.4"
1083 +
1084 +source-map@~0.5.1:
1085 + version "0.5.7"
1086 + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
1087 + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=
1088 +
1089 +sprintf-js@^1.1.2:
1090 + version "1.1.2"
1091 + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673"
1092 + integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==
1093 +
1094 +sshpk@^1.7.0:
1095 + version "1.16.1"
1096 + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877"
1097 + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==
1098 + dependencies:
1099 + asn1 "~0.2.3"
1100 + assert-plus "^1.0.0"
1101 + bcrypt-pbkdf "^1.0.0"
1102 + dashdash "^1.12.0"
1103 + ecc-jsbn "~0.1.1"
1104 + getpass "^0.1.1"
1105 + jsbn "~0.1.0"
1106 + safer-buffer "^2.0.2"
1107 + tweetnacl "~0.14.0"
1108 +
1109 +"statuses@>= 1.4.0 < 2":
1110 + version "1.5.0"
1111 + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
1112 + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=
1113 +
1114 +statuses@~1.4.0:
1115 + version "1.4.0"
1116 + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087"
1117 + integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==
1118 +
1119 +string_decoder@^1.1.1:
1120 + version "1.3.0"
1121 + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e"
1122 + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==
1123 + dependencies:
1124 + safe-buffer "~5.2.0"
1125 +
1126 +tedious@^8.3.0:
1127 + version "8.3.0"
1128 + resolved "https://registry.yarnpkg.com/tedious/-/tedious-8.3.0.tgz#74d3d434638b0bdd02b6266f041c003ceca93f67"
1129 + integrity sha512-v46Q9SRVgz6IolyPdlsxQtfm9q/sqDs+y4aRFK0ET1iKitbpzCCQRHb6rnVcR1FLnLR0Y7AgcqnWUoMPUXz9HA==
1130 + dependencies:
1131 + "@azure/ms-rest-nodeauth" "2.0.2"
1132 + "@js-joda/core" "^2.0.0"
1133 + bl "^3.0.0"
1134 + depd "^2.0.0"
1135 + iconv-lite "^0.5.0"
1136 + jsbi "^3.1.1"
1137 + native-duplexpair "^1.0.0"
1138 + punycode "^2.1.0"
1139 + readable-stream "^3.6.0"
1140 + sprintf-js "^1.1.2"
1141 +
1142 +toposort-class@^1.0.1:
1143 + version "1.0.1"
1144 + resolved "https://registry.yarnpkg.com/toposort-class/-/toposort-class-1.0.1.tgz#7ffd1f78c8be28c3ba45cd4e1a3f5ee193bd9988"
1145 + integrity sha1-f/0feMi+KMO6Rc1OGj9e4ZO9mYg=
1146 +
1147 +tough-cookie@^2.4.3, tough-cookie@~2.5.0:
1148 + version "2.5.0"
1149 + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2"
1150 + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==
1151 + dependencies:
1152 + psl "^1.1.28"
1153 + punycode "^2.1.1"
1154 +
1155 +transformers@2.1.0:
1156 + version "2.1.0"
1157 + resolved "https://registry.yarnpkg.com/transformers/-/transformers-2.1.0.tgz#5d23cb35561dd85dc67fb8482309b47d53cce9a7"
1158 + integrity sha1-XSPLNVYd2F3Gf7hIIwm0fVPM6ac=
1159 + dependencies:
1160 + css "~1.0.8"
1161 + promise "~2.0"
1162 + uglify-js "~2.2.5"
1163 +
1164 +tslib@^1.9.2:
1165 + version "1.13.0"
1166 + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043"
1167 + integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==
1168 +
1169 +tunnel-agent@^0.6.0:
1170 + version "0.6.0"
1171 + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
1172 + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=
1173 + dependencies:
1174 + safe-buffer "^5.0.1"
1175 +
1176 +tunnel@0.0.6:
1177 + version "0.0.6"
1178 + resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c"
1179 + integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==
1180 +
1181 +tweetnacl@^0.14.3, tweetnacl@~0.14.0:
1182 + version "0.14.5"
1183 + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
1184 + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=
1185 +
1186 +type-is@~1.6.16:
1187 + version "1.6.18"
1188 + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131"
1189 + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==
1190 + dependencies:
1191 + media-typer "0.3.0"
1192 + mime-types "~2.1.24"
1193 +
1194 +uglify-js@^2.4.19:
1195 + version "2.8.29"
1196 + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
1197 + integrity sha1-KcVzMUgFe7Th913zW3qcty5qWd0=
1198 + dependencies:
1199 + source-map "~0.5.1"
1200 + yargs "~3.10.0"
1201 + optionalDependencies:
1202 + uglify-to-browserify "~1.0.0"
1203 +
1204 +uglify-js@~2.2.5:
1205 + version "2.2.5"
1206 + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.2.5.tgz#a6e02a70d839792b9780488b7b8b184c095c99c7"
1207 + integrity sha1-puAqcNg5eSuXgEiLe4sYTAlcmcc=
1208 + dependencies:
1209 + optimist "~0.3.5"
1210 + source-map "~0.1.7"
1211 +
1212 +uglify-to-browserify@~1.0.0:
1213 + version "1.0.2"
1214 + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
1215 + integrity sha1-bgkk1r2mta/jSeOabWMoUKD4grc=
1216 +
1217 +"underscore@>= 1.3.1":
1218 + version "1.10.2"
1219 + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.10.2.tgz#73d6aa3668f3188e4adb0f1943bd12cfd7efaaaf"
1220 + integrity sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg==
1221 +
1222 +unpipe@1.0.0, unpipe@~1.0.0:
1223 + version "1.0.0"
1224 + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
1225 + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=
1226 +
1227 +uri-js@^4.2.2:
1228 + version "4.2.2"
1229 + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0"
1230 + integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==
1231 + dependencies:
1232 + punycode "^2.1.0"
1233 +
1234 +util-deprecate@^1.0.1:
1235 + version "1.0.2"
1236 + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
1237 + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
1238 +
1239 +utils-merge@1.0.1:
1240 + version "1.0.1"
1241 + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
1242 + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=
1243 +
1244 +uuid@^3.1.0, uuid@^3.2.1, uuid@^3.3.2:
1245 + version "3.4.0"
1246 + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
1247 + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==
1248 +
1249 +uuid@^8.1.0:
1250 + version "8.2.0"
1251 + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.2.0.tgz#cb10dd6b118e2dada7d0cd9730ba7417c93d920e"
1252 + integrity sha512-CYpGiFTUrmI6OBMkAdjSDM0k5h8SkkiTP4WAjQgDgNB1S3Ou9VBEvr6q0Kv2H1mMk7IWfxYGpMH5sd5AvcIV2Q==
1253 +
1254 +validator@^10.11.0:
1255 + version "10.11.0"
1256 + resolved "https://registry.yarnpkg.com/validator/-/validator-10.11.0.tgz#003108ea6e9a9874d31ccc9e5006856ccd76b228"
1257 + integrity sha512-X/p3UZerAIsbBfN/IwahhYaBbY68EN/UQBWHtsbXGT5bfrH/p4NQzUCG1kF/rtKaNpnJ7jAu6NGTdSNtyNIXMw==
1258 +
1259 +vary@~1.1.2:
1260 + version "1.1.2"
1261 + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
1262 + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
1263 +
1264 +verror@1.10.0:
1265 + version "1.10.0"
1266 + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
1267 + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=
1268 + dependencies:
1269 + assert-plus "^1.0.0"
1270 + core-util-is "1.0.2"
1271 + extsprintf "^1.2.0"
1272 +
1273 +void-elements@~2.0.1:
1274 + version "2.0.1"
1275 + resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec"
1276 + integrity sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=
1277 +
1278 +window-size@0.1.0:
1279 + version "0.1.0"
1280 + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
1281 + integrity sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=
1282 +
1283 +with@~4.0.0:
1284 + version "4.0.3"
1285 + resolved "https://registry.yarnpkg.com/with/-/with-4.0.3.tgz#eefd154e9e79d2c8d3417b647a8f14d9fecce14e"
1286 + integrity sha1-7v0VTp550sjTQXtkeo8U2f7M4U4=
1287 + dependencies:
1288 + acorn "^1.0.1"
1289 + acorn-globals "^1.0.3"
1290 +
1291 +wkx@^0.5.0:
1292 + version "0.5.0"
1293 + resolved "https://registry.yarnpkg.com/wkx/-/wkx-0.5.0.tgz#c6c37019acf40e517cc6b94657a25a3d4aa33e8c"
1294 + integrity sha512-Xng/d4Ichh8uN4l0FToV/258EjMGU9MGcA0HV2d9B/ZpZB3lqQm7nkOdZdm5GhKtLLhAE7PiVQwN4eN+2YJJUg==
1295 + dependencies:
1296 + "@types/node" "*"
1297 +
1298 +wordwrap@0.0.2:
1299 + version "0.0.2"
1300 + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
1301 + integrity sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=
1302 +
1303 +wordwrap@~0.0.2:
1304 + version "0.0.3"
1305 + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
1306 + integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc=
1307 +
1308 +xml2js@^0.4.19:
1309 + version "0.4.23"
1310 + resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.23.tgz#a0c69516752421eb2ac758ee4d4ccf58843eac66"
1311 + integrity sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==
1312 + dependencies:
1313 + sax ">=0.6.0"
1314 + xmlbuilder "~11.0.0"
1315 +
1316 +xmlbuilder@~11.0.0:
1317 + version "11.0.1"
1318 + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3"
1319 + integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==
1320 +
1321 +"xmldom@>= 0.1.x":
1322 + version "0.3.0"
1323 + resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.3.0.tgz#e625457f4300b5df9c2e1ecb776147ece47f3e5a"
1324 + integrity sha512-z9s6k3wxE+aZHgXYxSTpGDo7BYOUfJsIRyoZiX6HTjwpwfS2wpQBQKa2fD+ShLyPkqDYo5ud7KitmLZ2Cd6r0g==
1325 +
1326 +xpath.js@~1.1.0:
1327 + version "1.1.0"
1328 + resolved "https://registry.yarnpkg.com/xpath.js/-/xpath.js-1.1.0.tgz#3816a44ed4bb352091083d002a383dd5104a5ff1"
1329 + integrity sha512-jg+qkfS4K8E7965sqaUl8mRngXiKb3WZGfONgE18pr03FUQiuSV6G+Ej4tS55B+rIQSFEIw3phdVAQ4pPqNWfQ==
1330 +
1331 +yargs@~3.10.0:
1332 + version "3.10.0"
1333 + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
1334 + integrity sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=
1335 + dependencies:
1336 + camelcase "^1.0.2"
1337 + cliui "^2.1.0"
1338 + decamelize "^1.0.0"
1339 + window-size "0.1.0"
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
5 import React from 'react'; 5 import React from 'react';
6 import TuiImageEditor from 'tui-image-editor'; 6 import TuiImageEditor from 'tui-image-editor';
7 7
8 -
9 export default class ImageEditor extends React.Component { 8 export default class ImageEditor extends React.Component {
10 rootEl = React.createRef(); 9 rootEl = React.createRef();
11 10
......
1 +---
2 +name: Bug report
3 +about: Create a report to help us improve
4 +title: ''
5 +labels: Bug
6 +assignees: ''
7 +---
8 +
9 +**Describe the bug**
10 +A clear and concise description of what the bug is.
11 +
12 +**To Reproduce**
13 +Steps to reproduce the behavior:
14 +
15 +1. Go to '...'
16 +2. Click on '....'
17 +3. Scroll down to '....'
18 +4. See error
19 +
20 +**Expected behavior**
21 +A clear and concise description of what you expected to happen.
22 +
23 +**Screenshots**
24 +If applicable, add screenshots to help explain your problem.
25 +
26 +**Desktop (please complete the following information):**
27 +
28 +- OS: [e.g. iOS]
29 +- Browser [e.g. chrome, safari]
30 +- Version [e.g. 22]
31 +
32 +**Smartphone (please complete the following information):**
33 +
34 +- Device: [e.g. iPhone6]
35 +- OS: [e.g. iOS8.1]
36 +- Browser [e.g. stock browser, safari]
37 +- Version [e.g. 22]
38 +
39 +**Additional context**
40 +Add any other context about the problem here.
1 +---
2 +name: Feature request
3 +about: Suggest an idea for this project
4 +title: ''
5 +labels: Enhancement, Need Discussion
6 +assignees: ''
7 +---
8 +
9 +<!--
10 +Thank you for your contribution.
11 +
12 +When it comes to write an issue, please, use the template below.
13 +To use the template is mandatory for submit new issue and we won't reply the issue that without the template.
14 +
15 +And you can write template's contents in Korean also.
16 +-->
17 +
18 +<!-- TEMPLATE -->
19 +
20 +## Version
21 +
22 +<!-- Write the version of the imageEditor you are currently using. -->
23 +
24 +## Development Environment
25 +
26 +<!-- Write the browser type, OS and so on -->
27 +
28 +## Current Behavior
29 +
30 +<!-- Write a description of the current operation. You can add sample code, 'CodePen' or 'jsfiddle' links. -->
31 +
32 +```js
33 +// Write example code
34 +```
35 +
36 +## Expected Behavior
37 +
38 +<!-- Write a description of the future action. -->
1 +---
2 +name: Question
3 +about: Create a question about imageEditor
4 +title: ''
5 +labels: Question
6 +assignees: ''
7 +---
8 +
9 +<!--
10 + To make it easier for us to help you, please include as much useful information as possible.
11 +
12 + Useful Links:
13 + - tutorial: https://github.com/nhn/tui.image-editor/tree/master/docs
14 + - API/Example: https://nhn.github.io/tui.image-editor/latest
15 +
16 + Before opening a new issue, please search existing issues https://github.com/nhn/tui.image-editor/issues
17 +-->
18 +
19 +**Summary**
20 +A clear and concise description of what the question is.
21 +
22 +**Screenshots**
23 +If applicable, add screenshots to help explain your question.
24 +
25 +**Version**
26 +Write the version of the imageEditor you are currently using.
27 +
28 +**Additional context**
29 +Add any other context about the problem here.
1 +# Comment to a new issue.
2 +issuesOpened: >
3 + Thank you for raising an issue.
4 +
5 + We will try and get back to you as soon as possible.
6 +
7 +
8 + Please make sure you have filled out issue respecting our form **in English** and given us as much context as possible.
9 + **If not, the issue will be closed or not replied.**
10 +
1 +# Configuration for probot-stale - https://github.com/probot/stale
2 +
3 +# Number of days of inactivity before an Issue or Pull Request becomes stale
4 +daysUntilStale: 30
5 +
6 +# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
7 +# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
8 +daysUntilClose: 7
9 +
10 +# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
11 +exemptLabels:
12 + - Feature
13 + - Enhancement
14 + - Bug
15 + - NHN
16 +
17 +# Label to use when marking as stale
18 +staleLabel: inactive
19 +
20 +# Comment to post when marking as stale. Set to `false` to disable
21 +markComment: >
22 + This issue has been automatically marked as inactive because there hasn’t been much going on it lately.
23 + It is going to be closed after 7 days. Thanks!
24 +# Comment to post when removing the stale label.
25 +# unmarkComment: >
26 +# Your comment here.
27 +
28 +# Comment to post when closing a stale Issue or Pull Request.
29 +closeComment: >
30 + This issue will be closed due to inactivity. Thanks for your contribution!
1 +name: detect runtime error
2 +
3 +on:
4 + schedule:
5 + - cron: "0 22 * * *"
6 +jobs:
7 + detectError:
8 + runs-on: ubuntu-latest
9 + steps:
10 + - name: checkout repository
11 + uses: actions/checkout@v2
12 + - name: create config variable
13 + run: |
14 + node createConfigVariable.js
15 + - name: set global error variable
16 + run: |
17 + errorVariable=`cat ./errorVariable.txt`
18 + echo "ERROR_VARIABLE=$errorVariable" >> $GITHUB_ENV
19 + - name: set url
20 + shell: bash
21 + run: |
22 + url=`cat ./url.txt`
23 + echo "URLS=$url" >> $GITHUB_ENV
24 + - name: detect runtime error
25 + uses: nhn/toast-ui.detect-runtime-error-actions@v1.0.1
26 + with:
27 + global-error-log-variable: ${{ env.ERROR_VARIABLE }}
28 + urls: ${{ env.URLS }}
29 + env:
30 + BROWSERSTACK_USERNAME: ${{secrets.BROWSERSTACK_USERNAME}}
31 + BROWSERSTACK_ACCESS_KEY: ${{secrets.BROWSERSTACK_ACCESS_KEY}}
1 -var blackTheme = { 1 +const blackTheme = {
2 'common.bi.image': 'https://uicdn.toast.com/toastui/img/tui-image-editor-bi.png', 2 'common.bi.image': 'https://uicdn.toast.com/toastui/img/tui-image-editor-bi.png',
3 'common.bisize.width': '251px', 3 'common.bisize.width': '251px',
4 'common.bisize.height': '21px', 4 'common.bisize.height': '21px',
......
1 -var whiteTheme = { 1 +const whiteTheme = {
2 'common.bi.image': 'https://uicdn.toast.com/toastui/img/tui-image-editor-bi.png', 2 'common.bi.image': 'https://uicdn.toast.com/toastui/img/tui-image-editor-bi.png',
3 'common.bisize.width': '251px', 3 'common.bisize.width': '251px',
4 'common.bisize.height': '21px', 4 'common.bisize.height': '21px',
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
35 "eslint": "^4.19.1", 35 "eslint": "^4.19.1",
36 "eslint-config-prettier": "^6.15.0", 36 "eslint-config-prettier": "^6.15.0",
37 "eslint-config-tui": "^1.0.1", 37 "eslint-config-tui": "^1.0.1",
38 - "eslint-loader": "^2.2.1", 38 + "eslint-loader": "^2.2.0",
39 "eslint-plugin-prettier": "^3.1.4", 39 "eslint-plugin-prettier": "^3.1.4",
40 "file-saver": "^1.3.3", 40 "file-saver": "^1.3.3",
41 "istanbul-instrumenter-loader": "^1.0.0", 41 "istanbul-instrumenter-loader": "^1.0.0",
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
77 "webpack-dev-server": "^3.11.0" 77 "webpack-dev-server": "^3.11.0"
78 }, 78 },
79 "scripts": { 79 "scripts": {
80 + "lint": "eslint --fix --ext .js,.jsx .",
80 "test": "karma start --no-single-run", 81 "test": "karma start --no-single-run",
81 "test:ne": "KARMA_SERVER=ne karma start", 82 "test:ne": "KARMA_SERVER=ne karma start",
82 "test:types": "tsc --project test/types", 83 "test:types": "tsc --project test/types",
......
...@@ -25,4 +25,3 @@ import './js/command/setObjectPosition'; ...@@ -25,4 +25,3 @@ import './js/command/setObjectPosition';
25 import './js/command/changeSelection'; 25 import './js/command/changeSelection';
26 26
27 module.exports = ImageEditor; 27 module.exports = ImageEditor;
28 -
......