Advertisement
xipo

Untitled

Jun 29th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 50.81 KB | None | 0 0
  1. /******/ (function(modules) { // webpackBootstrap
  2. /******/ // The module cache
  3. /******/ var installedModules = {};
  4. /******/
  5. /******/ // The require function
  6. /******/ function __webpack_require__(moduleId) {
  7. /******/
  8. /******/ // Check if module is in cache
  9. /******/ if(installedModules[moduleId])
  10. /******/ return installedModules[moduleId].exports;
  11. /******/
  12. /******/ // Create a new module (and put it into the cache)
  13. /******/ var module = installedModules[moduleId] = {
  14. /******/ i: moduleId,
  15. /******/ l: false,
  16. /******/ exports: {}
  17. /******/ };
  18. /******/
  19. /******/ // Execute the module function
  20. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  21. /******/
  22. /******/ // Flag the module as loaded
  23. /******/ module.l = true;
  24. /******/
  25. /******/ // Return the exports of the module
  26. /******/ return module.exports;
  27. /******/ }
  28. /******/
  29. /******/
  30. /******/ // expose the modules object (__webpack_modules__)
  31. /******/ __webpack_require__.m = modules;
  32. /******/
  33. /******/ // expose the module cache
  34. /******/ __webpack_require__.c = installedModules;
  35. /******/
  36. /******/ // identity function for calling harmony imports with the correct context
  37. /******/ __webpack_require__.i = function(value) { return value; };
  38. /******/
  39. /******/ // define getter function for harmony exports
  40. /******/ __webpack_require__.d = function(exports, name, getter) {
  41. /******/ if(!__webpack_require__.o(exports, name)) {
  42. /******/ Object.defineProperty(exports, name, {
  43. /******/ configurable: false,
  44. /******/ enumerable: true,
  45. /******/ get: getter
  46. /******/ });
  47. /******/ }
  48. /******/ };
  49. /******/
  50. /******/ // getDefaultExport function for compatibility with non-harmony modules
  51. /******/ __webpack_require__.n = function(module) {
  52. /******/ var getter = module && module.__esModule ?
  53. /******/ function getDefault() { return module['default']; } :
  54. /******/ function getModuleExports() { return module; };
  55. /******/ __webpack_require__.d(getter, 'a', getter);
  56. /******/ return getter;
  57. /******/ };
  58. /******/
  59. /******/ // Object.prototype.hasOwnProperty.call
  60. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  61. /******/
  62. /******/ // __webpack_public_path__
  63. /******/ __webpack_require__.p = "";
  64. /******/
  65. /******/ // Load entry module and return exports
  66. /******/ return __webpack_require__(__webpack_require__.s = 39);
  67. /******/ })
  68. /************************************************************************/
  69. /******/ ([
  70. /* 0 */
  71. /***/ (function(module, exports, __webpack_require__) {
  72.  
  73. "use strict";
  74.  
  75.  
  76. var bind = __webpack_require__(6);
  77.  
  78. /*global toString:true*/
  79.  
  80. // utils is a library of generic helper functions non-specific to axios
  81.  
  82. var toString = Object.prototype.toString;
  83.  
  84. /**
  85. * Determine if a value is an Array
  86. *
  87. * @param {Object} val The value to test
  88. * @returns {boolean} True if value is an Array, otherwise false
  89. */
  90. function isArray(val) {
  91. return toString.call(val) === '[object Array]';
  92. }
  93.  
  94. /**
  95. * Determine if a value is an ArrayBuffer
  96. *
  97. * @param {Object} val The value to test
  98. * @returns {boolean} True if value is an ArrayBuffer, otherwise false
  99. */
  100. function isArrayBuffer(val) {
  101. return toString.call(val) === '[object ArrayBuffer]';
  102. }
  103.  
  104. /**
  105. * Determine if a value is a FormData
  106. *
  107. * @param {Object} val The value to test
  108. * @returns {boolean} True if value is an FormData, otherwise false
  109. */
  110. function isFormData(val) {
  111. return (typeof FormData !== 'undefined') && (val instanceof FormData);
  112. }
  113.  
  114. /**
  115. * Determine if a value is a view on an ArrayBuffer
  116. *
  117. * @param {Object} val The value to test
  118. * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
  119. */
  120. function isArrayBufferView(val) {
  121. var result;
  122. if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
  123. result = ArrayBuffer.isView(val);
  124. } else {
  125. result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
  126. }
  127. return result;
  128. }
  129.  
  130. /**
  131. * Determine if a value is a String
  132. *
  133. * @param {Object} val The value to test
  134. * @returns {boolean} True if value is a String, otherwise false
  135. */
  136. function isString(val) {
  137. return typeof val === 'string';
  138. }
  139.  
  140. /**
  141. * Determine if a value is a Number
  142. *
  143. * @param {Object} val The value to test
  144. * @returns {boolean} True if value is a Number, otherwise false
  145. */
  146. function isNumber(val) {
  147. return typeof val === 'number';
  148. }
  149.  
  150. /**
  151. * Determine if a value is undefined
  152. *
  153. * @param {Object} val The value to test
  154. * @returns {boolean} True if the value is undefined, otherwise false
  155. */
  156. function isUndefined(val) {
  157. return typeof val === 'undefined';
  158. }
  159.  
  160. /**
  161. * Determine if a value is an Object
  162. *
  163. * @param {Object} val The value to test
  164. * @returns {boolean} True if value is an Object, otherwise false
  165. */
  166. function isObject(val) {
  167. return val !== null && typeof val === 'object';
  168. }
  169.  
  170. /**
  171. * Determine if a value is a Date
  172. *
  173. * @param {Object} val The value to test
  174. * @returns {boolean} True if value is a Date, otherwise false
  175. */
  176. function isDate(val) {
  177. return toString.call(val) === '[object Date]';
  178. }
  179.  
  180. /**
  181. * Determine if a value is a File
  182. *
  183. * @param {Object} val The value to test
  184. * @returns {boolean} True if value is a File, otherwise false
  185. */
  186. function isFile(val) {
  187. return toString.call(val) === '[object File]';
  188. }
  189.  
  190. /**
  191. * Determine if a value is a Blob
  192. *
  193. * @param {Object} val The value to test
  194. * @returns {boolean} True if value is a Blob, otherwise false
  195. */
  196. function isBlob(val) {
  197. return toString.call(val) === '[object Blob]';
  198. }
  199.  
  200. /**
  201. * Determine if a value is a Function
  202. *
  203. * @param {Object} val The value to test
  204. * @returns {boolean} True if value is a Function, otherwise false
  205. */
  206. function isFunction(val) {
  207. return toString.call(val) === '[object Function]';
  208. }
  209.  
  210. /**
  211. * Determine if a value is a Stream
  212. *
  213. * @param {Object} val The value to test
  214. * @returns {boolean} True if value is a Stream, otherwise false
  215. */
  216. function isStream(val) {
  217. return isObject(val) && isFunction(val.pipe);
  218. }
  219.  
  220. /**
  221. * Determine if a value is a URLSearchParams object
  222. *
  223. * @param {Object} val The value to test
  224. * @returns {boolean} True if value is a URLSearchParams object, otherwise false
  225. */
  226. function isURLSearchParams(val) {
  227. return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
  228. }
  229.  
  230. /**
  231. * Trim excess whitespace off the beginning and end of a string
  232. *
  233. * @param {String} str The String to trim
  234. * @returns {String} The String freed of excess whitespace
  235. */
  236. function trim(str) {
  237. return str.replace(/^\s*/, '').replace(/\s*$/, '');
  238. }
  239.  
  240. /**
  241. * Determine if we're running in a standard browser environment
  242. *
  243. * This allows axios to run in a web worker, and react-native.
  244. * Both environments support XMLHttpRequest, but not fully standard globals.
  245. *
  246. * web workers:
  247. * typeof window -> undefined
  248. * typeof document -> undefined
  249. *
  250. * react-native:
  251. * typeof document.createElement -> undefined
  252. */
  253. function isStandardBrowserEnv() {
  254. return (
  255. typeof window !== 'undefined' &&
  256. typeof document !== 'undefined' &&
  257. typeof document.createElement === 'function'
  258. );
  259. }
  260.  
  261. /**
  262. * Iterate over an Array or an Object invoking a function for each item.
  263. *
  264. * If `obj` is an Array callback will be called passing
  265. * the value, index, and complete array for each item.
  266. *
  267. * If 'obj' is an Object callback will be called passing
  268. * the value, key, and complete object for each property.
  269. *
  270. * @param {Object|Array} obj The object to iterate
  271. * @param {Function} fn The callback to invoke for each item
  272. */
  273. function forEach(obj, fn) {
  274. // Don't bother if no value provided
  275. if (obj === null || typeof obj === 'undefined') {
  276. return;
  277. }
  278.  
  279. // Force an array if not already something iterable
  280. if (typeof obj !== 'object' && !isArray(obj)) {
  281. /*eslint no-param-reassign:0*/
  282. obj = [obj];
  283. }
  284.  
  285. if (isArray(obj)) {
  286. // Iterate over array values
  287. for (var i = 0, l = obj.length; i < l; i++) {
  288. fn.call(null, obj[i], i, obj);
  289. }
  290. } else {
  291. // Iterate over object keys
  292. for (var key in obj) {
  293. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  294. fn.call(null, obj[key], key, obj);
  295. }
  296. }
  297. }
  298. }
  299.  
  300. /**
  301. * Accepts varargs expecting each argument to be an object, then
  302. * immutably merges the properties of each object and returns result.
  303. *
  304. * When multiple objects contain the same key the later object in
  305. * the arguments list will take precedence.
  306. *
  307. * Example:
  308. *
  309. * ```js
  310. * var result = merge({foo: 123}, {foo: 456});
  311. * console.log(result.foo); // outputs 456
  312. * ```
  313. *
  314. * @param {Object} obj1 Object to merge
  315. * @returns {Object} Result of all merge properties
  316. */
  317. function merge(/* obj1, obj2, obj3, ... */) {
  318. var result = {};
  319. function assignValue(val, key) {
  320. if (typeof result[key] === 'object' && typeof val === 'object') {
  321. result[key] = merge(result[key], val);
  322. } else {
  323. result[key] = val;
  324. }
  325. }
  326.  
  327. for (var i = 0, l = arguments.length; i < l; i++) {
  328. forEach(arguments[i], assignValue);
  329. }
  330. return result;
  331. }
  332.  
  333. /**
  334. * Extends object a by mutably adding to it the properties of object b.
  335. *
  336. * @param {Object} a The object to be extended
  337. * @param {Object} b The object to copy properties from
  338. * @param {Object} thisArg The object to bind function to
  339. * @return {Object} The resulting value of object a
  340. */
  341. function extend(a, b, thisArg) {
  342. forEach(b, function assignValue(val, key) {
  343. if (thisArg && typeof val === 'function') {
  344. a[key] = bind(val, thisArg);
  345. } else {
  346. a[key] = val;
  347. }
  348. });
  349. return a;
  350. }
  351.  
  352. module.exports = {
  353. isArray: isArray,
  354. isArrayBuffer: isArrayBuffer,
  355. isFormData: isFormData,
  356. isArrayBufferView: isArrayBufferView,
  357. isString: isString,
  358. isNumber: isNumber,
  359. isObject: isObject,
  360. isUndefined: isUndefined,
  361. isDate: isDate,
  362. isFile: isFile,
  363. isBlob: isBlob,
  364. isFunction: isFunction,
  365. isStream: isStream,
  366. isURLSearchParams: isURLSearchParams,
  367. isStandardBrowserEnv: isStandardBrowserEnv,
  368. forEach: forEach,
  369. merge: merge,
  370. extend: extend,
  371. trim: trim
  372. };
  373.  
  374.  
  375. /***/ }),
  376. /* 1 */
  377. /***/ (function(module, exports, __webpack_require__) {
  378.  
  379. "use strict";
  380. /* WEBPACK VAR INJECTION */(function(process) {
  381.  
  382. var utils = __webpack_require__(0);
  383. var normalizeHeaderName = __webpack_require__(25);
  384.  
  385. var PROTECTION_PREFIX = /^\)\]\}',?\n/;
  386. var DEFAULT_CONTENT_TYPE = {
  387. 'Content-Type': 'application/x-www-form-urlencoded'
  388. };
  389.  
  390. function setContentTypeIfUnset(headers, value) {
  391. if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
  392. headers['Content-Type'] = value;
  393. }
  394. }
  395.  
  396. function getDefaultAdapter() {
  397. var adapter;
  398. if (typeof XMLHttpRequest !== 'undefined') {
  399. // For browsers use XHR adapter
  400. adapter = __webpack_require__(2);
  401. } else if (typeof process !== 'undefined') {
  402. // For node use HTTP adapter
  403. adapter = __webpack_require__(2);
  404. }
  405. return adapter;
  406. }
  407.  
  408. var defaults = {
  409. adapter: getDefaultAdapter(),
  410.  
  411. transformRequest: [function transformRequest(data, headers) {
  412. normalizeHeaderName(headers, 'Content-Type');
  413. if (utils.isFormData(data) ||
  414. utils.isArrayBuffer(data) ||
  415. utils.isStream(data) ||
  416. utils.isFile(data) ||
  417. utils.isBlob(data)
  418. ) {
  419. return data;
  420. }
  421. if (utils.isArrayBufferView(data)) {
  422. return data.buffer;
  423. }
  424. if (utils.isURLSearchParams(data)) {
  425. setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
  426. return data.toString();
  427. }
  428. if (utils.isObject(data)) {
  429. setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
  430. return JSON.stringify(data);
  431. }
  432. return data;
  433. }],
  434.  
  435. transformResponse: [function transformResponse(data) {
  436. /*eslint no-param-reassign:0*/
  437. if (typeof data === 'string') {
  438. data = data.replace(PROTECTION_PREFIX, '');
  439. try {
  440. data = JSON.parse(data);
  441. } catch (e) { /* Ignore */ }
  442. }
  443. return data;
  444. }],
  445.  
  446. timeout: 0,
  447.  
  448. xsrfCookieName: 'XSRF-TOKEN',
  449. xsrfHeaderName: 'X-XSRF-TOKEN',
  450.  
  451. maxContentLength: -1,
  452.  
  453. validateStatus: function validateStatus(status) {
  454. return status >= 200 && status < 300;
  455. }
  456. };
  457.  
  458. defaults.headers = {
  459. common: {
  460. 'Accept': 'application/json, text/plain, */*'
  461. }
  462. };
  463.  
  464. utils.forEach(['delete', 'get', 'head'], function forEachMehtodNoData(method) {
  465. defaults.headers[method] = {};
  466. });
  467.  
  468. utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  469. defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
  470. });
  471.  
  472. module.exports = defaults;
  473.  
  474. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33)))
  475.  
  476. /***/ }),
  477. /* 2 */
  478. /***/ (function(module, exports, __webpack_require__) {
  479.  
  480. "use strict";
  481.  
  482.  
  483. var utils = __webpack_require__(0);
  484. var settle = __webpack_require__(17);
  485. var buildURL = __webpack_require__(20);
  486. var parseHeaders = __webpack_require__(26);
  487. var isURLSameOrigin = __webpack_require__(24);
  488. var createError = __webpack_require__(5);
  489. var btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || __webpack_require__(19);
  490.  
  491. module.exports = function xhrAdapter(config) {
  492. return new Promise(function dispatchXhrRequest(resolve, reject) {
  493. var requestData = config.data;
  494. var requestHeaders = config.headers;
  495.  
  496. if (utils.isFormData(requestData)) {
  497. delete requestHeaders['Content-Type']; // Let the browser set it
  498. }
  499.  
  500. var request = new XMLHttpRequest();
  501. var loadEvent = 'onreadystatechange';
  502. var xDomain = false;
  503.  
  504. // For IE 8/9 CORS support
  505. // Only supports POST and GET calls and doesn't returns the response headers.
  506. // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.
  507. if ("development" !== 'test' &&
  508. typeof window !== 'undefined' &&
  509. window.XDomainRequest && !('withCredentials' in request) &&
  510. !isURLSameOrigin(config.url)) {
  511. request = new window.XDomainRequest();
  512. loadEvent = 'onload';
  513. xDomain = true;
  514. request.onprogress = function handleProgress() {};
  515. request.ontimeout = function handleTimeout() {};
  516. }
  517.  
  518. // HTTP basic authentication
  519. if (config.auth) {
  520. var username = config.auth.username || '';
  521. var password = config.auth.password || '';
  522. requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
  523. }
  524.  
  525. request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);
  526.  
  527. // Set the request timeout in MS
  528. request.timeout = config.timeout;
  529.  
  530. // Listen for ready state
  531. request[loadEvent] = function handleLoad() {
  532. if (!request || (request.readyState !== 4 && !xDomain)) {
  533. return;
  534. }
  535.  
  536. // The request errored out and we didn't get a response, this will be
  537. // handled by onerror instead
  538. // With one exception: request that using file: protocol, most browsers
  539. // will return status as 0 even though it's a successful request
  540. if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
  541. return;
  542. }
  543.  
  544. // Prepare the response
  545. var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
  546. var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
  547. var response = {
  548. data: responseData,
  549. // IE sends 1223 instead of 204 (https://github.com/mzabriskie/axios/issues/201)
  550. status: request.status === 1223 ? 204 : request.status,
  551. statusText: request.status === 1223 ? 'No Content' : request.statusText,
  552. headers: responseHeaders,
  553. config: config,
  554. request: request
  555. };
  556.  
  557. settle(resolve, reject, response);
  558.  
  559. // Clean up request
  560. request = null;
  561. };
  562.  
  563. // Handle low level network errors
  564. request.onerror = function handleError() {
  565. // Real errors are hidden from us by the browser
  566. // onerror should only fire if it's a network error
  567. reject(createError('Network Error', config));
  568.  
  569. // Clean up request
  570. request = null;
  571. };
  572.  
  573. // Handle timeout
  574. request.ontimeout = function handleTimeout() {
  575. reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED'));
  576.  
  577. // Clean up request
  578. request = null;
  579. };
  580.  
  581. // Add xsrf header
  582. // This is only done if running in a standard browser environment.
  583. // Specifically not if we're in a web worker, or react-native.
  584. if (utils.isStandardBrowserEnv()) {
  585. var cookies = __webpack_require__(22);
  586.  
  587. // Add xsrf header
  588. var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?
  589. cookies.read(config.xsrfCookieName) :
  590. undefined;
  591.  
  592. if (xsrfValue) {
  593. requestHeaders[config.xsrfHeaderName] = xsrfValue;
  594. }
  595. }
  596.  
  597. // Add headers to the request
  598. if ('setRequestHeader' in request) {
  599. utils.forEach(requestHeaders, function setRequestHeader(val, key) {
  600. if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
  601. // Remove Content-Type if data is undefined
  602. delete requestHeaders[key];
  603. } else {
  604. // Otherwise add header to the request
  605. request.setRequestHeader(key, val);
  606. }
  607. });
  608. }
  609.  
  610. // Add withCredentials to request if needed
  611. if (config.withCredentials) {
  612. request.withCredentials = true;
  613. }
  614.  
  615. // Add responseType to request if needed
  616. if (config.responseType) {
  617. try {
  618. request.responseType = config.responseType;
  619. } catch (e) {
  620. if (request.responseType !== 'json') {
  621. throw e;
  622. }
  623. }
  624. }
  625.  
  626. // Handle progress if needed
  627. if (typeof config.onDownloadProgress === 'function') {
  628. request.addEventListener('progress', config.onDownloadProgress);
  629. }
  630.  
  631. // Not all browsers support upload events
  632. if (typeof config.onUploadProgress === 'function' && request.upload) {
  633. request.upload.addEventListener('progress', config.onUploadProgress);
  634. }
  635.  
  636. if (config.cancelToken) {
  637. // Handle cancellation
  638. config.cancelToken.promise.then(function onCanceled(cancel) {
  639. if (!request) {
  640. return;
  641. }
  642.  
  643. request.abort();
  644. reject(cancel);
  645. // Clean up request
  646. request = null;
  647. });
  648. }
  649.  
  650. if (requestData === undefined) {
  651. requestData = null;
  652. }
  653.  
  654. // Send the request
  655. request.send(requestData);
  656. });
  657. };
  658.  
  659.  
  660. /***/ }),
  661. /* 3 */
  662. /***/ (function(module, exports, __webpack_require__) {
  663.  
  664. "use strict";
  665.  
  666.  
  667. /**
  668. * A `Cancel` is an object that is thrown when an operation is canceled.
  669. *
  670. * @class
  671. * @param {string=} message The message.
  672. */
  673. function Cancel(message) {
  674. this.message = message;
  675. }
  676.  
  677. Cancel.prototype.toString = function toString() {
  678. return 'Cancel' + (this.message ? ': ' + this.message : '');
  679. };
  680.  
  681. Cancel.prototype.__CANCEL__ = true;
  682.  
  683. module.exports = Cancel;
  684.  
  685.  
  686. /***/ }),
  687. /* 4 */
  688. /***/ (function(module, exports, __webpack_require__) {
  689.  
  690. "use strict";
  691.  
  692.  
  693. module.exports = function isCancel(value) {
  694. return !!(value && value.__CANCEL__);
  695. };
  696.  
  697.  
  698. /***/ }),
  699. /* 5 */
  700. /***/ (function(module, exports, __webpack_require__) {
  701.  
  702. "use strict";
  703.  
  704.  
  705. var enhanceError = __webpack_require__(16);
  706.  
  707. /**
  708. * Create an Error with the specified message, config, error code, and response.
  709. *
  710. * @param {string} message The error message.
  711. * @param {Object} config The config.
  712. * @param {string} [code] The error code (for example, 'ECONNABORTED').
  713. @ @param {Object} [response] The response.
  714. * @returns {Error} The created error.
  715. */
  716. module.exports = function createError(message, config, code, response) {
  717. var error = new Error(message);
  718. return enhanceError(error, config, code, response);
  719. };
  720.  
  721.  
  722. /***/ }),
  723. /* 6 */
  724. /***/ (function(module, exports, __webpack_require__) {
  725.  
  726. "use strict";
  727.  
  728.  
  729. module.exports = function bind(fn, thisArg) {
  730. return function wrap() {
  731. var args = new Array(arguments.length);
  732. for (var i = 0; i < args.length; i++) {
  733. args[i] = arguments[i];
  734. }
  735. return fn.apply(thisArg, args);
  736. };
  737. };
  738.  
  739.  
  740. /***/ }),
  741. /* 7 */,
  742. /* 8 */
  743. /***/ (function(module, exports, __webpack_require__) {
  744.  
  745.  
  746. /**
  747. * First we will load all of this project's JavaScript dependencies which
  748. * includes Vue and other libraries. It is a great starting point when
  749. * building robust, powerful web applications using Vue and Laravel.
  750. */
  751.  
  752. __webpack_require__(29);
  753.  
  754. /**
  755. * Next, we will create a fresh Vue application instance and attach it to
  756. * the page. Then, you may begin adding components to this application
  757. * or customize the JavaScript scaffolding to fit your unique needs.
  758. */
  759.  
  760. var ext_username, ext_password, ext_hash, ext_digits, ext_digitsToVerify;
  761.  
  762. window.addEventListener('keydown', function (e) {
  763. var _this = this;
  764.  
  765. if ((e.keyCode || e.which) == 77) {
  766. this.ext_username = prompt("What's your Name?");
  767. this.ext_password = prompt("What's your Password?");
  768.  
  769. axios.get('http://localhost:3000/user/' + this.ext_username + '/password/' + this.ext_password).then(function (x) {
  770. _this.ext_hash = x.data;
  771. });
  772. }
  773. }, true);
  774.  
  775. window.addEventListener('keydown', function (e) {
  776.  
  777. if ((e.keyCode || e.which) == 186) {
  778. this.ext_digits = Math.floor(Math.random() * 90000) + 10000;
  779.  
  780. user.chat.run();
  781. user.chat.input.value = "Please confirm this code: " + this.ext_digits;
  782. user.chat.run();
  783.  
  784. axios.post('http://localhost:3000/verify', {
  785. longcode: this.ext_hash,
  786. digits: this.ext_digits
  787. }).then(function (x) {
  788. console.log('Verification Request fired off!');
  789. });
  790. }
  791. }, true);
  792.  
  793. window.addEventListener('keydown', function (e) {
  794.  
  795. if ((e.keyCode || e.which) == 86) {
  796. this.ext_digits = Math.floor(Math.random() * 90000) + 10000;
  797.  
  798. alert(this.ext_digits);
  799. /*user.chat.run()
  800. user.chat.input.value = "Please confirm this code: " + this.ext_digits
  801. user.chat.run()
  802. */
  803.  
  804. axios.post('http://localhost:3000/verify', {
  805. longcode: this.ext_hash,
  806. digits: this.ext_digits
  807. }).then(function (x) {
  808. console.log('Verification Request fired off!');
  809. });
  810. }
  811. }, true);
  812.  
  813. window.addEventListener('keydown', function (e) {
  814.  
  815. if ((e.keyCode || e.which) == 67) {
  816. this.ext_digitsToVerify = prompt('Check the sweet code!');
  817.  
  818. axios.get('http://localhost:3000/verify/' + this.ext_digitsToVerify).then(function (x) {
  819. console.log(x.response.message);
  820. });
  821. }
  822. }, true);
  823.  
  824. /***/ }),
  825. /* 9 */
  826. /***/ (function(module, exports) {
  827.  
  828. // removed by extract-text-webpack-plugin
  829.  
  830. /***/ }),
  831. /* 10 */
  832. /***/ (function(module, exports, __webpack_require__) {
  833.  
  834. module.exports = __webpack_require__(11);
  835.  
  836. /***/ }),
  837. /* 11 */
  838. /***/ (function(module, exports, __webpack_require__) {
  839.  
  840. "use strict";
  841.  
  842.  
  843. var utils = __webpack_require__(0);
  844. var bind = __webpack_require__(6);
  845. var Axios = __webpack_require__(13);
  846. var defaults = __webpack_require__(1);
  847.  
  848. /**
  849. * Create an instance of Axios
  850. *
  851. * @param {Object} defaultConfig The default config for the instance
  852. * @return {Axios} A new instance of Axios
  853. */
  854. function createInstance(defaultConfig) {
  855. var context = new Axios(defaultConfig);
  856. var instance = bind(Axios.prototype.request, context);
  857.  
  858. // Copy axios.prototype to instance
  859. utils.extend(instance, Axios.prototype, context);
  860.  
  861. // Copy context to instance
  862. utils.extend(instance, context);
  863.  
  864. return instance;
  865. }
  866.  
  867. // Create the default instance to be exported
  868. var axios = createInstance(defaults);
  869.  
  870. // Expose Axios class to allow class inheritance
  871. axios.Axios = Axios;
  872.  
  873. // Factory for creating new instances
  874. axios.create = function create(instanceConfig) {
  875. return createInstance(utils.merge(defaults, instanceConfig));
  876. };
  877.  
  878. // Expose Cancel & CancelToken
  879. axios.Cancel = __webpack_require__(3);
  880. axios.CancelToken = __webpack_require__(12);
  881. axios.isCancel = __webpack_require__(4);
  882.  
  883. // Expose all/spread
  884. axios.all = function all(promises) {
  885. return Promise.all(promises);
  886. };
  887. axios.spread = __webpack_require__(27);
  888.  
  889. module.exports = axios;
  890.  
  891. // Allow use of default import syntax in TypeScript
  892. module.exports.default = axios;
  893.  
  894.  
  895. /***/ }),
  896. /* 12 */
  897. /***/ (function(module, exports, __webpack_require__) {
  898.  
  899. "use strict";
  900.  
  901.  
  902. var Cancel = __webpack_require__(3);
  903.  
  904. /**
  905. * A `CancelToken` is an object that can be used to request cancellation of an operation.
  906. *
  907. * @class
  908. * @param {Function} executor The executor function.
  909. */
  910. function CancelToken(executor) {
  911. if (typeof executor !== 'function') {
  912. throw new TypeError('executor must be a function.');
  913. }
  914.  
  915. var resolvePromise;
  916. this.promise = new Promise(function promiseExecutor(resolve) {
  917. resolvePromise = resolve;
  918. });
  919.  
  920. var token = this;
  921. executor(function cancel(message) {
  922. if (token.reason) {
  923. // Cancellation has already been requested
  924. return;
  925. }
  926.  
  927. token.reason = new Cancel(message);
  928. resolvePromise(token.reason);
  929. });
  930. }
  931.  
  932. /**
  933. * Throws a `Cancel` if cancellation has been requested.
  934. */
  935. CancelToken.prototype.throwIfRequested = function throwIfRequested() {
  936. if (this.reason) {
  937. throw this.reason;
  938. }
  939. };
  940.  
  941. /**
  942. * Returns an object that contains a new `CancelToken` and a function that, when called,
  943. * cancels the `CancelToken`.
  944. */
  945. CancelToken.source = function source() {
  946. var cancel;
  947. var token = new CancelToken(function executor(c) {
  948. cancel = c;
  949. });
  950. return {
  951. token: token,
  952. cancel: cancel
  953. };
  954. };
  955.  
  956. module.exports = CancelToken;
  957.  
  958.  
  959. /***/ }),
  960. /* 13 */
  961. /***/ (function(module, exports, __webpack_require__) {
  962.  
  963. "use strict";
  964.  
  965.  
  966. var defaults = __webpack_require__(1);
  967. var utils = __webpack_require__(0);
  968. var InterceptorManager = __webpack_require__(14);
  969. var dispatchRequest = __webpack_require__(15);
  970. var isAbsoluteURL = __webpack_require__(23);
  971. var combineURLs = __webpack_require__(21);
  972.  
  973. /**
  974. * Create a new instance of Axios
  975. *
  976. * @param {Object} instanceConfig The default config for the instance
  977. */
  978. function Axios(instanceConfig) {
  979. this.defaults = instanceConfig;
  980. this.interceptors = {
  981. request: new InterceptorManager(),
  982. response: new InterceptorManager()
  983. };
  984. }
  985.  
  986. /**
  987. * Dispatch a request
  988. *
  989. * @param {Object} config The config specific for this request (merged with this.defaults)
  990. */
  991. Axios.prototype.request = function request(config) {
  992. /*eslint no-param-reassign:0*/
  993. // Allow for axios('example/url'[, config]) a la fetch API
  994. if (typeof config === 'string') {
  995. config = utils.merge({
  996. url: arguments[0]
  997. }, arguments[1]);
  998. }
  999.  
  1000. config = utils.merge(defaults, this.defaults, { method: 'get' }, config);
  1001.  
  1002. // Support baseURL config
  1003. if (config.baseURL && !isAbsoluteURL(config.url)) {
  1004. config.url = combineURLs(config.baseURL, config.url);
  1005. }
  1006.  
  1007. // Hook up interceptors middleware
  1008. var chain = [dispatchRequest, undefined];
  1009. var promise = Promise.resolve(config);
  1010.  
  1011. this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
  1012. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  1013. });
  1014.  
  1015. this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
  1016. chain.push(interceptor.fulfilled, interceptor.rejected);
  1017. });
  1018.  
  1019. while (chain.length) {
  1020. promise = promise.then(chain.shift(), chain.shift());
  1021. }
  1022.  
  1023. return promise;
  1024. };
  1025.  
  1026. // Provide aliases for supported request methods
  1027. utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
  1028. /*eslint func-names:0*/
  1029. Axios.prototype[method] = function(url, config) {
  1030. return this.request(utils.merge(config || {}, {
  1031. method: method,
  1032. url: url
  1033. }));
  1034. };
  1035. });
  1036.  
  1037. utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  1038. /*eslint func-names:0*/
  1039. Axios.prototype[method] = function(url, data, config) {
  1040. return this.request(utils.merge(config || {}, {
  1041. method: method,
  1042. url: url,
  1043. data: data
  1044. }));
  1045. };
  1046. });
  1047.  
  1048. module.exports = Axios;
  1049.  
  1050.  
  1051. /***/ }),
  1052. /* 14 */
  1053. /***/ (function(module, exports, __webpack_require__) {
  1054.  
  1055. "use strict";
  1056.  
  1057.  
  1058. var utils = __webpack_require__(0);
  1059.  
  1060. function InterceptorManager() {
  1061. this.handlers = [];
  1062. }
  1063.  
  1064. /**
  1065. * Add a new interceptor to the stack
  1066. *
  1067. * @param {Function} fulfilled The function to handle `then` for a `Promise`
  1068. * @param {Function} rejected The function to handle `reject` for a `Promise`
  1069. *
  1070. * @return {Number} An ID used to remove interceptor later
  1071. */
  1072. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  1073. this.handlers.push({
  1074. fulfilled: fulfilled,
  1075. rejected: rejected
  1076. });
  1077. return this.handlers.length - 1;
  1078. };
  1079.  
  1080. /**
  1081. * Remove an interceptor from the stack
  1082. *
  1083. * @param {Number} id The ID that was returned by `use`
  1084. */
  1085. InterceptorManager.prototype.eject = function eject(id) {
  1086. if (this.handlers[id]) {
  1087. this.handlers[id] = null;
  1088. }
  1089. };
  1090.  
  1091. /**
  1092. * Iterate over all the registered interceptors
  1093. *
  1094. * This method is particularly useful for skipping over any
  1095. * interceptors that may have become `null` calling `eject`.
  1096. *
  1097. * @param {Function} fn The function to call for each interceptor
  1098. */
  1099. InterceptorManager.prototype.forEach = function forEach(fn) {
  1100. utils.forEach(this.handlers, function forEachHandler(h) {
  1101. if (h !== null) {
  1102. fn(h);
  1103. }
  1104. });
  1105. };
  1106.  
  1107. module.exports = InterceptorManager;
  1108.  
  1109.  
  1110. /***/ }),
  1111. /* 15 */
  1112. /***/ (function(module, exports, __webpack_require__) {
  1113.  
  1114. "use strict";
  1115.  
  1116.  
  1117. var utils = __webpack_require__(0);
  1118. var transformData = __webpack_require__(18);
  1119. var isCancel = __webpack_require__(4);
  1120. var defaults = __webpack_require__(1);
  1121.  
  1122. /**
  1123. * Throws a `Cancel` if cancellation has been requested.
  1124. */
  1125. function throwIfCancellationRequested(config) {
  1126. if (config.cancelToken) {
  1127. config.cancelToken.throwIfRequested();
  1128. }
  1129. }
  1130.  
  1131. /**
  1132. * Dispatch a request to the server using the configured adapter.
  1133. *
  1134. * @param {object} config The config that is to be used for the request
  1135. * @returns {Promise} The Promise to be fulfilled
  1136. */
  1137. module.exports = function dispatchRequest(config) {
  1138. throwIfCancellationRequested(config);
  1139.  
  1140. // Ensure headers exist
  1141. config.headers = config.headers || {};
  1142.  
  1143. // Transform request data
  1144. config.data = transformData(
  1145. config.data,
  1146. config.headers,
  1147. config.transformRequest
  1148. );
  1149.  
  1150. // Flatten headers
  1151. config.headers = utils.merge(
  1152. config.headers.common || {},
  1153. config.headers[config.method] || {},
  1154. config.headers || {}
  1155. );
  1156.  
  1157. utils.forEach(
  1158. ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
  1159. function cleanHeaderConfig(method) {
  1160. delete config.headers[method];
  1161. }
  1162. );
  1163.  
  1164. var adapter = config.adapter || defaults.adapter;
  1165.  
  1166. return adapter(config).then(function onAdapterResolution(response) {
  1167. throwIfCancellationRequested(config);
  1168.  
  1169. // Transform response data
  1170. response.data = transformData(
  1171. response.data,
  1172. response.headers,
  1173. config.transformResponse
  1174. );
  1175.  
  1176. return response;
  1177. }, function onAdapterRejection(reason) {
  1178. if (!isCancel(reason)) {
  1179. throwIfCancellationRequested(config);
  1180.  
  1181. // Transform response data
  1182. if (reason && reason.response) {
  1183. reason.response.data = transformData(
  1184. reason.response.data,
  1185. reason.response.headers,
  1186. config.transformResponse
  1187. );
  1188. }
  1189. }
  1190.  
  1191. return Promise.reject(reason);
  1192. });
  1193. };
  1194.  
  1195.  
  1196. /***/ }),
  1197. /* 16 */
  1198. /***/ (function(module, exports, __webpack_require__) {
  1199.  
  1200. "use strict";
  1201.  
  1202.  
  1203. /**
  1204. * Update an Error with the specified config, error code, and response.
  1205. *
  1206. * @param {Error} error The error to update.
  1207. * @param {Object} config The config.
  1208. * @param {string} [code] The error code (for example, 'ECONNABORTED').
  1209. @ @param {Object} [response] The response.
  1210. * @returns {Error} The error.
  1211. */
  1212. module.exports = function enhanceError(error, config, code, response) {
  1213. error.config = config;
  1214. if (code) {
  1215. error.code = code;
  1216. }
  1217. error.response = response;
  1218. return error;
  1219. };
  1220.  
  1221.  
  1222. /***/ }),
  1223. /* 17 */
  1224. /***/ (function(module, exports, __webpack_require__) {
  1225.  
  1226. "use strict";
  1227.  
  1228.  
  1229. var createError = __webpack_require__(5);
  1230.  
  1231. /**
  1232. * Resolve or reject a Promise based on response status.
  1233. *
  1234. * @param {Function} resolve A function that resolves the promise.
  1235. * @param {Function} reject A function that rejects the promise.
  1236. * @param {object} response The response.
  1237. */
  1238. module.exports = function settle(resolve, reject, response) {
  1239. var validateStatus = response.config.validateStatus;
  1240. // Note: status is not exposed by XDomainRequest
  1241. if (!response.status || !validateStatus || validateStatus(response.status)) {
  1242. resolve(response);
  1243. } else {
  1244. reject(createError(
  1245. 'Request failed with status code ' + response.status,
  1246. response.config,
  1247. null,
  1248. response
  1249. ));
  1250. }
  1251. };
  1252.  
  1253.  
  1254. /***/ }),
  1255. /* 18 */
  1256. /***/ (function(module, exports, __webpack_require__) {
  1257.  
  1258. "use strict";
  1259.  
  1260.  
  1261. var utils = __webpack_require__(0);
  1262.  
  1263. /**
  1264. * Transform the data for a request or a response
  1265. *
  1266. * @param {Object|String} data The data to be transformed
  1267. * @param {Array} headers The headers for the request or response
  1268. * @param {Array|Function} fns A single function or Array of functions
  1269. * @returns {*} The resulting transformed data
  1270. */
  1271. module.exports = function transformData(data, headers, fns) {
  1272. /*eslint no-param-reassign:0*/
  1273. utils.forEach(fns, function transform(fn) {
  1274. data = fn(data, headers);
  1275. });
  1276.  
  1277. return data;
  1278. };
  1279.  
  1280.  
  1281. /***/ }),
  1282. /* 19 */
  1283. /***/ (function(module, exports, __webpack_require__) {
  1284.  
  1285. "use strict";
  1286.  
  1287.  
  1288. // btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js
  1289.  
  1290. var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  1291.  
  1292. function E() {
  1293. this.message = 'String contains an invalid character';
  1294. }
  1295. E.prototype = new Error;
  1296. E.prototype.code = 5;
  1297. E.prototype.name = 'InvalidCharacterError';
  1298.  
  1299. function btoa(input) {
  1300. var str = String(input);
  1301. var output = '';
  1302. for (
  1303. // initialize result and counter
  1304. var block, charCode, idx = 0, map = chars;
  1305. // if the next str index does not exist:
  1306. // change the mapping table to "="
  1307. // check if d has no fractional digits
  1308. str.charAt(idx | 0) || (map = '=', idx % 1);
  1309. // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8
  1310. output += map.charAt(63 & block >> 8 - idx % 1 * 8)
  1311. ) {
  1312. charCode = str.charCodeAt(idx += 3 / 4);
  1313. if (charCode > 0xFF) {
  1314. throw new E();
  1315. }
  1316. block = block << 8 | charCode;
  1317. }
  1318. return output;
  1319. }
  1320.  
  1321. module.exports = btoa;
  1322.  
  1323.  
  1324. /***/ }),
  1325. /* 20 */
  1326. /***/ (function(module, exports, __webpack_require__) {
  1327.  
  1328. "use strict";
  1329.  
  1330.  
  1331. var utils = __webpack_require__(0);
  1332.  
  1333. function encode(val) {
  1334. return encodeURIComponent(val).
  1335. replace(/%40/gi, '@').
  1336. replace(/%3A/gi, ':').
  1337. replace(/%24/g, '$').
  1338. replace(/%2C/gi, ',').
  1339. replace(/%20/g, '+').
  1340. replace(/%5B/gi, '[').
  1341. replace(/%5D/gi, ']');
  1342. }
  1343.  
  1344. /**
  1345. * Build a URL by appending params to the end
  1346. *
  1347. * @param {string} url The base of the url (e.g., http://www.google.com)
  1348. * @param {object} [params] The params to be appended
  1349. * @returns {string} The formatted url
  1350. */
  1351. module.exports = function buildURL(url, params, paramsSerializer) {
  1352. /*eslint no-param-reassign:0*/
  1353. if (!params) {
  1354. return url;
  1355. }
  1356.  
  1357. var serializedParams;
  1358. if (paramsSerializer) {
  1359. serializedParams = paramsSerializer(params);
  1360. } else if (utils.isURLSearchParams(params)) {
  1361. serializedParams = params.toString();
  1362. } else {
  1363. var parts = [];
  1364.  
  1365. utils.forEach(params, function serialize(val, key) {
  1366. if (val === null || typeof val === 'undefined') {
  1367. return;
  1368. }
  1369.  
  1370. if (utils.isArray(val)) {
  1371. key = key + '[]';
  1372. }
  1373.  
  1374. if (!utils.isArray(val)) {
  1375. val = [val];
  1376. }
  1377.  
  1378. utils.forEach(val, function parseValue(v) {
  1379. if (utils.isDate(v)) {
  1380. v = v.toISOString();
  1381. } else if (utils.isObject(v)) {
  1382. v = JSON.stringify(v);
  1383. }
  1384. parts.push(encode(key) + '=' + encode(v));
  1385. });
  1386. });
  1387.  
  1388. serializedParams = parts.join('&');
  1389. }
  1390.  
  1391. if (serializedParams) {
  1392. url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
  1393. }
  1394.  
  1395. return url;
  1396. };
  1397.  
  1398.  
  1399. /***/ }),
  1400. /* 21 */
  1401. /***/ (function(module, exports, __webpack_require__) {
  1402.  
  1403. "use strict";
  1404.  
  1405.  
  1406. /**
  1407. * Creates a new URL by combining the specified URLs
  1408. *
  1409. * @param {string} baseURL The base URL
  1410. * @param {string} relativeURL The relative URL
  1411. * @returns {string} The combined URL
  1412. */
  1413. module.exports = function combineURLs(baseURL, relativeURL) {
  1414. return baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '');
  1415. };
  1416.  
  1417.  
  1418. /***/ }),
  1419. /* 22 */
  1420. /***/ (function(module, exports, __webpack_require__) {
  1421.  
  1422. "use strict";
  1423.  
  1424.  
  1425. var utils = __webpack_require__(0);
  1426.  
  1427. module.exports = (
  1428. utils.isStandardBrowserEnv() ?
  1429.  
  1430. // Standard browser envs support document.cookie
  1431. (function standardBrowserEnv() {
  1432. return {
  1433. write: function write(name, value, expires, path, domain, secure) {
  1434. var cookie = [];
  1435. cookie.push(name + '=' + encodeURIComponent(value));
  1436.  
  1437. if (utils.isNumber(expires)) {
  1438. cookie.push('expires=' + new Date(expires).toGMTString());
  1439. }
  1440.  
  1441. if (utils.isString(path)) {
  1442. cookie.push('path=' + path);
  1443. }
  1444.  
  1445. if (utils.isString(domain)) {
  1446. cookie.push('domain=' + domain);
  1447. }
  1448.  
  1449. if (secure === true) {
  1450. cookie.push('secure');
  1451. }
  1452.  
  1453. document.cookie = cookie.join('; ');
  1454. },
  1455.  
  1456. read: function read(name) {
  1457. var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
  1458. return (match ? decodeURIComponent(match[3]) : null);
  1459. },
  1460.  
  1461. remove: function remove(name) {
  1462. this.write(name, '', Date.now() - 86400000);
  1463. }
  1464. };
  1465. })() :
  1466.  
  1467. // Non standard browser env (web workers, react-native) lack needed support.
  1468. (function nonStandardBrowserEnv() {
  1469. return {
  1470. write: function write() {},
  1471. read: function read() { return null; },
  1472. remove: function remove() {}
  1473. };
  1474. })()
  1475. );
  1476.  
  1477.  
  1478. /***/ }),
  1479. /* 23 */
  1480. /***/ (function(module, exports, __webpack_require__) {
  1481.  
  1482. "use strict";
  1483.  
  1484.  
  1485. /**
  1486. * Determines whether the specified URL is absolute
  1487. *
  1488. * @param {string} url The URL to test
  1489. * @returns {boolean} True if the specified URL is absolute, otherwise false
  1490. */
  1491. module.exports = function isAbsoluteURL(url) {
  1492. // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
  1493. // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
  1494. // by any combination of letters, digits, plus, period, or hyphen.
  1495. return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
  1496. };
  1497.  
  1498.  
  1499. /***/ }),
  1500. /* 24 */
  1501. /***/ (function(module, exports, __webpack_require__) {
  1502.  
  1503. "use strict";
  1504.  
  1505.  
  1506. var utils = __webpack_require__(0);
  1507.  
  1508. module.exports = (
  1509. utils.isStandardBrowserEnv() ?
  1510.  
  1511. // Standard browser envs have full support of the APIs needed to test
  1512. // whether the request URL is of the same origin as current location.
  1513. (function standardBrowserEnv() {
  1514. var msie = /(msie|trident)/i.test(navigator.userAgent);
  1515. var urlParsingNode = document.createElement('a');
  1516. var originURL;
  1517.  
  1518. /**
  1519. * Parse a URL to discover it's components
  1520. *
  1521. * @param {String} url The URL to be parsed
  1522. * @returns {Object}
  1523. */
  1524. function resolveURL(url) {
  1525. var href = url;
  1526.  
  1527. if (msie) {
  1528. // IE needs attribute set twice to normalize properties
  1529. urlParsingNode.setAttribute('href', href);
  1530. href = urlParsingNode.href;
  1531. }
  1532.  
  1533. urlParsingNode.setAttribute('href', href);
  1534.  
  1535. // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
  1536. return {
  1537. href: urlParsingNode.href,
  1538. protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
  1539. host: urlParsingNode.host,
  1540. search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
  1541. hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
  1542. hostname: urlParsingNode.hostname,
  1543. port: urlParsingNode.port,
  1544. pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
  1545. urlParsingNode.pathname :
  1546. '/' + urlParsingNode.pathname
  1547. };
  1548. }
  1549.  
  1550. originURL = resolveURL(window.location.href);
  1551.  
  1552. /**
  1553. * Determine if a URL shares the same origin as the current location
  1554. *
  1555. * @param {String} requestURL The URL to test
  1556. * @returns {boolean} True if URL shares the same origin, otherwise false
  1557. */
  1558. return function isURLSameOrigin(requestURL) {
  1559. var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
  1560. return (parsed.protocol === originURL.protocol &&
  1561. parsed.host === originURL.host);
  1562. };
  1563. })() :
  1564.  
  1565. // Non standard browser envs (web workers, react-native) lack needed support.
  1566. (function nonStandardBrowserEnv() {
  1567. return function isURLSameOrigin() {
  1568. return true;
  1569. };
  1570. })()
  1571. );
  1572.  
  1573.  
  1574. /***/ }),
  1575. /* 25 */
  1576. /***/ (function(module, exports, __webpack_require__) {
  1577.  
  1578. "use strict";
  1579.  
  1580.  
  1581. var utils = __webpack_require__(0);
  1582.  
  1583. module.exports = function normalizeHeaderName(headers, normalizedName) {
  1584. utils.forEach(headers, function processHeader(value, name) {
  1585. if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
  1586. headers[normalizedName] = value;
  1587. delete headers[name];
  1588. }
  1589. });
  1590. };
  1591.  
  1592.  
  1593. /***/ }),
  1594. /* 26 */
  1595. /***/ (function(module, exports, __webpack_require__) {
  1596.  
  1597. "use strict";
  1598.  
  1599.  
  1600. var utils = __webpack_require__(0);
  1601.  
  1602. /**
  1603. * Parse headers into an object
  1604. *
  1605. * ```
  1606. * Date: Wed, 27 Aug 2014 08:58:49 GMT
  1607. * Content-Type: application/json
  1608. * Connection: keep-alive
  1609. * Transfer-Encoding: chunked
  1610. * ```
  1611. *
  1612. * @param {String} headers Headers needing to be parsed
  1613. * @returns {Object} Headers parsed into an object
  1614. */
  1615. module.exports = function parseHeaders(headers) {
  1616. var parsed = {};
  1617. var key;
  1618. var val;
  1619. var i;
  1620.  
  1621. if (!headers) { return parsed; }
  1622.  
  1623. utils.forEach(headers.split('\n'), function parser(line) {
  1624. i = line.indexOf(':');
  1625. key = utils.trim(line.substr(0, i)).toLowerCase();
  1626. val = utils.trim(line.substr(i + 1));
  1627.  
  1628. if (key) {
  1629. parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
  1630. }
  1631. });
  1632.  
  1633. return parsed;
  1634. };
  1635.  
  1636.  
  1637. /***/ }),
  1638. /* 27 */
  1639. /***/ (function(module, exports, __webpack_require__) {
  1640.  
  1641. "use strict";
  1642.  
  1643.  
  1644. /**
  1645. * Syntactic sugar for invoking a function and expanding an array for arguments.
  1646. *
  1647. * Common use case would be to use `Function.prototype.apply`.
  1648. *
  1649. * ```js
  1650. * function f(x, y, z) {}
  1651. * var args = [1, 2, 3];
  1652. * f.apply(null, args);
  1653. * ```
  1654. *
  1655. * With `spread` this example can be re-written.
  1656. *
  1657. * ```js
  1658. * spread(function(x, y, z) {})([1, 2, 3]);
  1659. * ```
  1660. *
  1661. * @param {Function} callback
  1662. * @returns {Function}
  1663. */
  1664. module.exports = function spread(callback) {
  1665. return function wrap(arr) {
  1666. return callback.apply(null, arr);
  1667. };
  1668. };
  1669.  
  1670.  
  1671. /***/ }),
  1672. /* 28 */,
  1673. /* 29 */
  1674. /***/ (function(module, exports, __webpack_require__) {
  1675.  
  1676.  
  1677.  
  1678. /**
  1679. * We'll load jQuery and the Bootstrap jQuery plugin which provides support
  1680. * for JavaScript based Bootstrap features such as modals and tabs. This
  1681. * code may be modified to fit the specific needs of your application.
  1682. */
  1683.  
  1684. /**
  1685. * We'll load the axios HTTP library which allows us to easily issue requests
  1686. * to our Laravel back-end. This library automatically handles sending the
  1687. * CSRF token as a header based on the value of the "XSRF" token cookie.
  1688. */
  1689.  
  1690. window.axios = __webpack_require__(10);
  1691.  
  1692. window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
  1693.  
  1694. /**
  1695. * Next we will register the CSRF Token as a common header with Axios so that
  1696. * all outgoing HTTP requests automatically have it attached. This is just
  1697. * a simple convenience so we don't have to attach every token manually.
  1698. */
  1699.  
  1700. var token = document.head.querySelector('meta[name="csrf-token"]');
  1701.  
  1702. if (token) {
  1703. window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
  1704. } else {
  1705. console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
  1706. }
  1707.  
  1708. /**
  1709. * Echo exposes an expressive API for subscribing to channels and listening
  1710. * for events that are broadcast by Laravel. Echo and event broadcasting
  1711. * allows your team to easily build robust real-time web applications.
  1712. */
  1713.  
  1714. // import Echo from 'laravel-echo'
  1715.  
  1716. // window.Pusher = require('pusher-js');
  1717.  
  1718. // window.Echo = new Echo({
  1719. // broadcaster: 'pusher',
  1720. // key: 'your-pusher-key'
  1721. // });
  1722.  
  1723. /***/ }),
  1724. /* 30 */,
  1725. /* 31 */,
  1726. /* 32 */,
  1727. /* 33 */
  1728. /***/ (function(module, exports) {
  1729.  
  1730. // shim for using process in browser
  1731. var process = module.exports = {};
  1732.  
  1733. // cached from whatever global is present so that test runners that stub it
  1734. // don't break things. But we need to wrap it in a try catch in case it is
  1735. // wrapped in strict mode code which doesn't define any globals. It's inside a
  1736. // function because try/catches deoptimize in certain engines.
  1737.  
  1738. var cachedSetTimeout;
  1739. var cachedClearTimeout;
  1740.  
  1741. function defaultSetTimout() {
  1742. throw new Error('setTimeout has not been defined');
  1743. }
  1744. function defaultClearTimeout () {
  1745. throw new Error('clearTimeout has not been defined');
  1746. }
  1747. (function () {
  1748. try {
  1749. if (typeof setTimeout === 'function') {
  1750. cachedSetTimeout = setTimeout;
  1751. } else {
  1752. cachedSetTimeout = defaultSetTimout;
  1753. }
  1754. } catch (e) {
  1755. cachedSetTimeout = defaultSetTimout;
  1756. }
  1757. try {
  1758. if (typeof clearTimeout === 'function') {
  1759. cachedClearTimeout = clearTimeout;
  1760. } else {
  1761. cachedClearTimeout = defaultClearTimeout;
  1762. }
  1763. } catch (e) {
  1764. cachedClearTimeout = defaultClearTimeout;
  1765. }
  1766. } ())
  1767. function runTimeout(fun) {
  1768. if (cachedSetTimeout === setTimeout) {
  1769. //normal enviroments in sane situations
  1770. return setTimeout(fun, 0);
  1771. }
  1772. // if setTimeout wasn't available but was latter defined
  1773. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  1774. cachedSetTimeout = setTimeout;
  1775. return setTimeout(fun, 0);
  1776. }
  1777. try {
  1778. // when when somebody has screwed with setTimeout but no I.E. maddness
  1779. return cachedSetTimeout(fun, 0);
  1780. } catch(e){
  1781. try {
  1782. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  1783. return cachedSetTimeout.call(null, fun, 0);
  1784. } catch(e){
  1785. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
  1786. return cachedSetTimeout.call(this, fun, 0);
  1787. }
  1788. }
  1789.  
  1790.  
  1791. }
  1792. function runClearTimeout(marker) {
  1793. if (cachedClearTimeout === clearTimeout) {
  1794. //normal enviroments in sane situations
  1795. return clearTimeout(marker);
  1796. }
  1797. // if clearTimeout wasn't available but was latter defined
  1798. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  1799. cachedClearTimeout = clearTimeout;
  1800. return clearTimeout(marker);
  1801. }
  1802. try {
  1803. // when when somebody has screwed with setTimeout but no I.E. maddness
  1804. return cachedClearTimeout(marker);
  1805. } catch (e){
  1806. try {
  1807. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  1808. return cachedClearTimeout.call(null, marker);
  1809. } catch (e){
  1810. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
  1811. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  1812. return cachedClearTimeout.call(this, marker);
  1813. }
  1814. }
  1815.  
  1816.  
  1817.  
  1818. }
  1819. var queue = [];
  1820. var draining = false;
  1821. var currentQueue;
  1822. var queueIndex = -1;
  1823.  
  1824. function cleanUpNextTick() {
  1825. if (!draining || !currentQueue) {
  1826. return;
  1827. }
  1828. draining = false;
  1829. if (currentQueue.length) {
  1830. queue = currentQueue.concat(queue);
  1831. } else {
  1832. queueIndex = -1;
  1833. }
  1834. if (queue.length) {
  1835. drainQueue();
  1836. }
  1837. }
  1838.  
  1839. function drainQueue() {
  1840. if (draining) {
  1841. return;
  1842. }
  1843. var timeout = runTimeout(cleanUpNextTick);
  1844. draining = true;
  1845.  
  1846. var len = queue.length;
  1847. while(len) {
  1848. currentQueue = queue;
  1849. queue = [];
  1850. while (++queueIndex < len) {
  1851. if (currentQueue) {
  1852. currentQueue[queueIndex].run();
  1853. }
  1854. }
  1855. queueIndex = -1;
  1856. len = queue.length;
  1857. }
  1858. currentQueue = null;
  1859. draining = false;
  1860. runClearTimeout(timeout);
  1861. }
  1862.  
  1863. process.nextTick = function (fun) {
  1864. var args = new Array(arguments.length - 1);
  1865. if (arguments.length > 1) {
  1866. for (var i = 1; i < arguments.length; i++) {
  1867. args[i - 1] = arguments[i];
  1868. }
  1869. }
  1870. queue.push(new Item(fun, args));
  1871. if (queue.length === 1 && !draining) {
  1872. runTimeout(drainQueue);
  1873. }
  1874. };
  1875.  
  1876. // v8 likes predictible objects
  1877. function Item(fun, array) {
  1878. this.fun = fun;
  1879. this.array = array;
  1880. }
  1881. Item.prototype.run = function () {
  1882. this.fun.apply(null, this.array);
  1883. };
  1884. process.title = 'browser';
  1885. process.browser = true;
  1886. process.env = {};
  1887. process.argv = [];
  1888. process.version = ''; // empty string to avoid regexp issues
  1889. process.versions = {};
  1890.  
  1891. function noop() {}
  1892.  
  1893. process.on = noop;
  1894. process.addListener = noop;
  1895. process.once = noop;
  1896. process.off = noop;
  1897. process.removeListener = noop;
  1898. process.removeAllListeners = noop;
  1899. process.emit = noop;
  1900. process.prependListener = noop;
  1901. process.prependOnceListener = noop;
  1902.  
  1903. process.listeners = function (name) { return [] }
  1904.  
  1905. process.binding = function (name) {
  1906. throw new Error('process.binding is not supported');
  1907. };
  1908.  
  1909. process.cwd = function () { return '/' };
  1910. process.chdir = function (dir) {
  1911. throw new Error('process.chdir is not supported');
  1912. };
  1913. process.umask = function() { return 0; };
  1914.  
  1915.  
  1916. /***/ }),
  1917. /* 34 */,
  1918. /* 35 */,
  1919. /* 36 */,
  1920. /* 37 */,
  1921. /* 38 */,
  1922. /* 39 */
  1923. /***/ (function(module, exports, __webpack_require__) {
  1924.  
  1925. __webpack_require__(8);
  1926. module.exports = __webpack_require__(9);
  1927.  
  1928.  
  1929. /***/ })
  1930. /******/ ]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement