@squidcloud/client 1.0.144 → 1.0.145-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -27293,15 +27293,6 @@ __webpack_require__.d(__webpack_exports__, {
27293
27293
  deserializeQuery: () => (/* reexport */ deserializeQuery)
27294
27294
  });
27295
27295
 
27296
- // NAMESPACE OBJECT: ../node_modules/axios/lib/platform/common/utils.js
27297
- var common_utils_namespaceObject = {};
27298
- __webpack_require__.r(common_utils_namespaceObject);
27299
- __webpack_require__.d(common_utils_namespaceObject, {
27300
- hasBrowserEnv: () => (hasBrowserEnv),
27301
- hasStandardBrowserEnv: () => (hasStandardBrowserEnv),
27302
- hasStandardBrowserWebWorkerEnv: () => (hasStandardBrowserWebWorkerEnv)
27303
- });
27304
-
27305
27296
  ;// CONCATENATED MODULE: ../common/src/ai-chatbot.schemas.ts
27306
27297
  /** @internal */
27307
27298
  const AiChatbotChatRequestSchema = {
@@ -27324,6 +27315,8 @@ const AiChatbotChatRequestSchema = {
27324
27315
  };
27325
27316
 
27326
27317
  ;// CONCATENATED MODULE: ../common/src/ai-chatbot.types.ts
27318
+ /** The supported AI model names. */
27319
+ const AI_MODEL_NAMES = (/* unused pure expression or super */ null && (['gpt-3.5-turbo', 'gpt-4', 'claude-2', 'gpt-4-1106-preview']));
27327
27320
  /** @internal */
27328
27321
  const AiModelData = {
27329
27322
  'gpt-4': {
@@ -49425,3509 +49418,9 @@ class RateLimiter {
49425
49418
  }
49426
49419
  }
49427
49420
 
49428
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/helpers/bind.js
49429
-
49430
-
49431
- function bind_bind(fn, thisArg) {
49432
- return function wrap() {
49433
- return fn.apply(thisArg, arguments);
49434
- };
49435
- }
49436
-
49437
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/utils.js
49438
-
49439
-
49440
-
49441
-
49442
- // utils is a library of generic helper functions non-specific to axios
49443
-
49444
- const {toString: utils_toString} = Object.prototype;
49445
- const {getPrototypeOf} = Object;
49446
-
49447
- const kindOf = (cache => thing => {
49448
- const str = utils_toString.call(thing);
49449
- return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
49450
- })(Object.create(null));
49451
-
49452
- const kindOfTest = (type) => {
49453
- type = type.toLowerCase();
49454
- return (thing) => kindOf(thing) === type
49455
- }
49456
-
49457
- const typeOfTest = type => thing => typeof thing === type;
49458
-
49459
- /**
49460
- * Determine if a value is an Array
49461
- *
49462
- * @param {Object} val The value to test
49463
- *
49464
- * @returns {boolean} True if value is an Array, otherwise false
49465
- */
49466
- const {isArray: utils_isArray} = Array;
49467
-
49468
- /**
49469
- * Determine if a value is undefined
49470
- *
49471
- * @param {*} val The value to test
49472
- *
49473
- * @returns {boolean} True if the value is undefined, otherwise false
49474
- */
49475
- const isUndefined = typeOfTest('undefined');
49476
-
49477
- /**
49478
- * Determine if a value is a Buffer
49479
- *
49480
- * @param {*} val The value to test
49481
- *
49482
- * @returns {boolean} True if value is a Buffer, otherwise false
49483
- */
49484
- function isBuffer(val) {
49485
- return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
49486
- && utils_isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
49487
- }
49488
-
49489
- /**
49490
- * Determine if a value is an ArrayBuffer
49491
- *
49492
- * @param {*} val The value to test
49493
- *
49494
- * @returns {boolean} True if value is an ArrayBuffer, otherwise false
49495
- */
49496
- const isArrayBuffer = kindOfTest('ArrayBuffer');
49497
-
49498
-
49499
- /**
49500
- * Determine if a value is a view on an ArrayBuffer
49501
- *
49502
- * @param {*} val The value to test
49503
- *
49504
- * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
49505
- */
49506
- function isArrayBufferView(val) {
49507
- let result;
49508
- if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
49509
- result = ArrayBuffer.isView(val);
49510
- } else {
49511
- result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
49512
- }
49513
- return result;
49514
- }
49515
-
49516
- /**
49517
- * Determine if a value is a String
49518
- *
49519
- * @param {*} val The value to test
49520
- *
49521
- * @returns {boolean} True if value is a String, otherwise false
49522
- */
49523
- const isString = typeOfTest('string');
49524
-
49525
- /**
49526
- * Determine if a value is a Function
49527
- *
49528
- * @param {*} val The value to test
49529
- * @returns {boolean} True if value is a Function, otherwise false
49530
- */
49531
- const utils_isFunction = typeOfTest('function');
49532
-
49533
- /**
49534
- * Determine if a value is a Number
49535
- *
49536
- * @param {*} val The value to test
49537
- *
49538
- * @returns {boolean} True if value is a Number, otherwise false
49539
- */
49540
- const isNumber = typeOfTest('number');
49541
-
49542
- /**
49543
- * Determine if a value is an Object
49544
- *
49545
- * @param {*} thing The value to test
49546
- *
49547
- * @returns {boolean} True if value is an Object, otherwise false
49548
- */
49549
- const isObject = (thing) => thing !== null && typeof thing === 'object';
49550
-
49551
- /**
49552
- * Determine if a value is a Boolean
49553
- *
49554
- * @param {*} thing The value to test
49555
- * @returns {boolean} True if value is a Boolean, otherwise false
49556
- */
49557
- const isBoolean = thing => thing === true || thing === false;
49558
-
49559
- /**
49560
- * Determine if a value is a plain Object
49561
- *
49562
- * @param {*} val The value to test
49563
- *
49564
- * @returns {boolean} True if value is a plain Object, otherwise false
49565
- */
49566
- const isPlainObject = (val) => {
49567
- if (kindOf(val) !== 'object') {
49568
- return false;
49569
- }
49570
-
49571
- const prototype = getPrototypeOf(val);
49572
- return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
49573
- }
49574
-
49575
- /**
49576
- * Determine if a value is a Date
49577
- *
49578
- * @param {*} val The value to test
49579
- *
49580
- * @returns {boolean} True if value is a Date, otherwise false
49581
- */
49582
- const isDate = kindOfTest('Date');
49583
-
49584
- /**
49585
- * Determine if a value is a File
49586
- *
49587
- * @param {*} val The value to test
49588
- *
49589
- * @returns {boolean} True if value is a File, otherwise false
49590
- */
49591
- const isFile = kindOfTest('File');
49592
-
49593
- /**
49594
- * Determine if a value is a Blob
49595
- *
49596
- * @param {*} val The value to test
49597
- *
49598
- * @returns {boolean} True if value is a Blob, otherwise false
49599
- */
49600
- const utils_isBlob = kindOfTest('Blob');
49601
-
49602
- /**
49603
- * Determine if a value is a FileList
49604
- *
49605
- * @param {*} val The value to test
49606
- *
49607
- * @returns {boolean} True if value is a File, otherwise false
49608
- */
49609
- const isFileList = kindOfTest('FileList');
49610
-
49611
- /**
49612
- * Determine if a value is a Stream
49613
- *
49614
- * @param {*} val The value to test
49615
- *
49616
- * @returns {boolean} True if value is a Stream, otherwise false
49617
- */
49618
- const isStream = (val) => isObject(val) && utils_isFunction(val.pipe);
49619
-
49620
- /**
49621
- * Determine if a value is a FormData
49622
- *
49623
- * @param {*} thing The value to test
49624
- *
49625
- * @returns {boolean} True if value is an FormData, otherwise false
49626
- */
49627
- const isFormData = (thing) => {
49628
- let kind;
49629
- return thing && (
49630
- (typeof FormData === 'function' && thing instanceof FormData) || (
49631
- utils_isFunction(thing.append) && (
49632
- (kind = kindOf(thing)) === 'formdata' ||
49633
- // detect form-data instance
49634
- (kind === 'object' && utils_isFunction(thing.toString) && thing.toString() === '[object FormData]')
49635
- )
49636
- )
49637
- )
49638
- }
49639
-
49640
- /**
49641
- * Determine if a value is a URLSearchParams object
49642
- *
49643
- * @param {*} val The value to test
49644
- *
49645
- * @returns {boolean} True if value is a URLSearchParams object, otherwise false
49646
- */
49647
- const isURLSearchParams = kindOfTest('URLSearchParams');
49648
-
49649
- /**
49650
- * Trim excess whitespace off the beginning and end of a string
49651
- *
49652
- * @param {String} str The String to trim
49653
- *
49654
- * @returns {String} The String freed of excess whitespace
49655
- */
49656
- const trim = (str) => str.trim ?
49657
- str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
49658
-
49659
- /**
49660
- * Iterate over an Array or an Object invoking a function for each item.
49661
- *
49662
- * If `obj` is an Array callback will be called passing
49663
- * the value, index, and complete array for each item.
49664
- *
49665
- * If 'obj' is an Object callback will be called passing
49666
- * the value, key, and complete object for each property.
49667
- *
49668
- * @param {Object|Array} obj The object to iterate
49669
- * @param {Function} fn The callback to invoke for each item
49670
- *
49671
- * @param {Boolean} [allOwnKeys = false]
49672
- * @returns {any}
49673
- */
49674
- function utils_forEach(obj, fn, {allOwnKeys = false} = {}) {
49675
- // Don't bother if no value provided
49676
- if (obj === null || typeof obj === 'undefined') {
49677
- return;
49678
- }
49679
-
49680
- let i;
49681
- let l;
49682
-
49683
- // Force an array if not already something iterable
49684
- if (typeof obj !== 'object') {
49685
- /*eslint no-param-reassign:0*/
49686
- obj = [obj];
49687
- }
49688
-
49689
- if (utils_isArray(obj)) {
49690
- // Iterate over array values
49691
- for (i = 0, l = obj.length; i < l; i++) {
49692
- fn.call(null, obj[i], i, obj);
49693
- }
49694
- } else {
49695
- // Iterate over object keys
49696
- const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
49697
- const len = keys.length;
49698
- let key;
49699
-
49700
- for (i = 0; i < len; i++) {
49701
- key = keys[i];
49702
- fn.call(null, obj[key], key, obj);
49703
- }
49704
- }
49705
- }
49706
-
49707
- function findKey(obj, key) {
49708
- key = key.toLowerCase();
49709
- const keys = Object.keys(obj);
49710
- let i = keys.length;
49711
- let _key;
49712
- while (i-- > 0) {
49713
- _key = keys[i];
49714
- if (key === _key.toLowerCase()) {
49715
- return _key;
49716
- }
49717
- }
49718
- return null;
49719
- }
49720
-
49721
- const _global = (() => {
49722
- /*eslint no-undef:0*/
49723
- if (typeof globalThis !== "undefined") return globalThis;
49724
- return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
49725
- })();
49726
-
49727
- const isContextDefined = (context) => !isUndefined(context) && context !== _global;
49728
-
49729
- /**
49730
- * Accepts varargs expecting each argument to be an object, then
49731
- * immutably merges the properties of each object and returns result.
49732
- *
49733
- * When multiple objects contain the same key the later object in
49734
- * the arguments list will take precedence.
49735
- *
49736
- * Example:
49737
- *
49738
- * ```js
49739
- * var result = merge({foo: 123}, {foo: 456});
49740
- * console.log(result.foo); // outputs 456
49741
- * ```
49742
- *
49743
- * @param {Object} obj1 Object to merge
49744
- *
49745
- * @returns {Object} Result of all merge properties
49746
- */
49747
- function merge(/* obj1, obj2, obj3, ... */) {
49748
- const {caseless} = isContextDefined(this) && this || {};
49749
- const result = {};
49750
- const assignValue = (val, key) => {
49751
- const targetKey = caseless && findKey(result, key) || key;
49752
- if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
49753
- result[targetKey] = merge(result[targetKey], val);
49754
- } else if (isPlainObject(val)) {
49755
- result[targetKey] = merge({}, val);
49756
- } else if (utils_isArray(val)) {
49757
- result[targetKey] = val.slice();
49758
- } else {
49759
- result[targetKey] = val;
49760
- }
49761
- }
49762
-
49763
- for (let i = 0, l = arguments.length; i < l; i++) {
49764
- arguments[i] && utils_forEach(arguments[i], assignValue);
49765
- }
49766
- return result;
49767
- }
49768
-
49769
- /**
49770
- * Extends object a by mutably adding to it the properties of object b.
49771
- *
49772
- * @param {Object} a The object to be extended
49773
- * @param {Object} b The object to copy properties from
49774
- * @param {Object} thisArg The object to bind function to
49775
- *
49776
- * @param {Boolean} [allOwnKeys]
49777
- * @returns {Object} The resulting value of object a
49778
- */
49779
- const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
49780
- utils_forEach(b, (val, key) => {
49781
- if (thisArg && utils_isFunction(val)) {
49782
- a[key] = bind_bind(val, thisArg);
49783
- } else {
49784
- a[key] = val;
49785
- }
49786
- }, {allOwnKeys});
49787
- return a;
49788
- }
49789
-
49790
- /**
49791
- * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
49792
- *
49793
- * @param {string} content with BOM
49794
- *
49795
- * @returns {string} content value without BOM
49796
- */
49797
- const stripBOM = (content) => {
49798
- if (content.charCodeAt(0) === 0xFEFF) {
49799
- content = content.slice(1);
49800
- }
49801
- return content;
49802
- }
49803
-
49804
- /**
49805
- * Inherit the prototype methods from one constructor into another
49806
- * @param {function} constructor
49807
- * @param {function} superConstructor
49808
- * @param {object} [props]
49809
- * @param {object} [descriptors]
49810
- *
49811
- * @returns {void}
49812
- */
49813
- const inherits = (constructor, superConstructor, props, descriptors) => {
49814
- constructor.prototype = Object.create(superConstructor.prototype, descriptors);
49815
- constructor.prototype.constructor = constructor;
49816
- Object.defineProperty(constructor, 'super', {
49817
- value: superConstructor.prototype
49818
- });
49819
- props && Object.assign(constructor.prototype, props);
49820
- }
49821
-
49822
- /**
49823
- * Resolve object with deep prototype chain to a flat object
49824
- * @param {Object} sourceObj source object
49825
- * @param {Object} [destObj]
49826
- * @param {Function|Boolean} [filter]
49827
- * @param {Function} [propFilter]
49828
- *
49829
- * @returns {Object}
49830
- */
49831
- const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
49832
- let props;
49833
- let i;
49834
- let prop;
49835
- const merged = {};
49836
-
49837
- destObj = destObj || {};
49838
- // eslint-disable-next-line no-eq-null,eqeqeq
49839
- if (sourceObj == null) return destObj;
49840
-
49841
- do {
49842
- props = Object.getOwnPropertyNames(sourceObj);
49843
- i = props.length;
49844
- while (i-- > 0) {
49845
- prop = props[i];
49846
- if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
49847
- destObj[prop] = sourceObj[prop];
49848
- merged[prop] = true;
49849
- }
49850
- }
49851
- sourceObj = filter !== false && getPrototypeOf(sourceObj);
49852
- } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
49853
-
49854
- return destObj;
49855
- }
49856
-
49857
- /**
49858
- * Determines whether a string ends with the characters of a specified string
49859
- *
49860
- * @param {String} str
49861
- * @param {String} searchString
49862
- * @param {Number} [position= 0]
49863
- *
49864
- * @returns {boolean}
49865
- */
49866
- const utils_endsWith = (str, searchString, position) => {
49867
- str = String(str);
49868
- if (position === undefined || position > str.length) {
49869
- position = str.length;
49870
- }
49871
- position -= searchString.length;
49872
- const lastIndex = str.indexOf(searchString, position);
49873
- return lastIndex !== -1 && lastIndex === position;
49874
- }
49875
-
49876
-
49877
- /**
49878
- * Returns new array from array like object or null if failed
49879
- *
49880
- * @param {*} [thing]
49881
- *
49882
- * @returns {?Array}
49883
- */
49884
- const utils_toArray = (thing) => {
49885
- if (!thing) return null;
49886
- if (utils_isArray(thing)) return thing;
49887
- let i = thing.length;
49888
- if (!isNumber(i)) return null;
49889
- const arr = new Array(i);
49890
- while (i-- > 0) {
49891
- arr[i] = thing[i];
49892
- }
49893
- return arr;
49894
- }
49895
-
49896
- /**
49897
- * Checking if the Uint8Array exists and if it does, it returns a function that checks if the
49898
- * thing passed in is an instance of Uint8Array
49899
- *
49900
- * @param {TypedArray}
49901
- *
49902
- * @returns {Array}
49903
- */
49904
- // eslint-disable-next-line func-names
49905
- const isTypedArray = (TypedArray => {
49906
- // eslint-disable-next-line func-names
49907
- return thing => {
49908
- return TypedArray && thing instanceof TypedArray;
49909
- };
49910
- })(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
49911
-
49912
- /**
49913
- * For each entry in the object, call the function with the key and value.
49914
- *
49915
- * @param {Object<any, any>} obj - The object to iterate over.
49916
- * @param {Function} fn - The function to call for each entry.
49917
- *
49918
- * @returns {void}
49919
- */
49920
- const forEachEntry = (obj, fn) => {
49921
- const generator = obj && obj[Symbol.iterator];
49922
-
49923
- const iterator = generator.call(obj);
49924
-
49925
- let result;
49926
-
49927
- while ((result = iterator.next()) && !result.done) {
49928
- const pair = result.value;
49929
- fn.call(obj, pair[0], pair[1]);
49930
- }
49931
- }
49932
-
49933
- /**
49934
- * It takes a regular expression and a string, and returns an array of all the matches
49935
- *
49936
- * @param {string} regExp - The regular expression to match against.
49937
- * @param {string} str - The string to search.
49938
- *
49939
- * @returns {Array<boolean>}
49940
- */
49941
- const matchAll = (regExp, str) => {
49942
- let matches;
49943
- const arr = [];
49944
-
49945
- while ((matches = regExp.exec(str)) !== null) {
49946
- arr.push(matches);
49947
- }
49948
-
49949
- return arr;
49950
- }
49951
-
49952
- /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
49953
- const isHTMLForm = kindOfTest('HTMLFormElement');
49954
-
49955
- const toCamelCase = str => {
49956
- return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
49957
- function replacer(m, p1, p2) {
49958
- return p1.toUpperCase() + p2;
49959
- }
49960
- );
49961
- };
49962
-
49963
- /* Creating a function that will check if an object has a property. */
49964
- const utils_hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
49965
-
49966
- /**
49967
- * Determine if a value is a RegExp object
49968
- *
49969
- * @param {*} val The value to test
49970
- *
49971
- * @returns {boolean} True if value is a RegExp object, otherwise false
49972
- */
49973
- const isRegExp = kindOfTest('RegExp');
49974
-
49975
- const reduceDescriptors = (obj, reducer) => {
49976
- const descriptors = Object.getOwnPropertyDescriptors(obj);
49977
- const reducedDescriptors = {};
49978
-
49979
- utils_forEach(descriptors, (descriptor, name) => {
49980
- let ret;
49981
- if ((ret = reducer(descriptor, name, obj)) !== false) {
49982
- reducedDescriptors[name] = ret || descriptor;
49983
- }
49984
- });
49985
-
49986
- Object.defineProperties(obj, reducedDescriptors);
49987
- }
49988
-
49989
- /**
49990
- * Makes all methods read-only
49991
- * @param {Object} obj
49992
- */
49993
-
49994
- const freezeMethods = (obj) => {
49995
- reduceDescriptors(obj, (descriptor, name) => {
49996
- // skip restricted props in strict mode
49997
- if (utils_isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
49998
- return false;
49999
- }
50000
-
50001
- const value = obj[name];
50002
-
50003
- if (!utils_isFunction(value)) return;
50004
-
50005
- descriptor.enumerable = false;
50006
-
50007
- if ('writable' in descriptor) {
50008
- descriptor.writable = false;
50009
- return;
50010
- }
50011
-
50012
- if (!descriptor.set) {
50013
- descriptor.set = () => {
50014
- throw Error('Can not rewrite read-only method \'' + name + '\'');
50015
- };
50016
- }
50017
- });
50018
- }
50019
-
50020
- const toObjectSet = (arrayOrString, delimiter) => {
50021
- const obj = {};
50022
-
50023
- const define = (arr) => {
50024
- arr.forEach(value => {
50025
- obj[value] = true;
50026
- });
50027
- }
50028
-
50029
- utils_isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
50030
-
50031
- return obj;
50032
- }
50033
-
50034
- const utils_noop = () => {}
50035
-
50036
- const toFiniteNumber = (value, defaultValue) => {
50037
- value = +value;
50038
- return Number.isFinite(value) ? value : defaultValue;
50039
- }
50040
-
50041
- const ALPHA = 'abcdefghijklmnopqrstuvwxyz'
50042
-
50043
- const DIGIT = '0123456789';
50044
-
50045
- const ALPHABET = {
50046
- DIGIT,
50047
- ALPHA,
50048
- ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
50049
- }
50050
-
50051
- const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
50052
- let str = '';
50053
- const {length} = alphabet;
50054
- while (size--) {
50055
- str += alphabet[Math.random() * length|0]
50056
- }
50057
-
50058
- return str;
50059
- }
50060
-
50061
- /**
50062
- * If the thing is a FormData object, return true, otherwise return false.
50063
- *
50064
- * @param {unknown} thing - The thing to check.
50065
- *
50066
- * @returns {boolean}
50067
- */
50068
- function isSpecCompliantForm(thing) {
50069
- return !!(thing && utils_isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
50070
- }
50071
-
50072
- const toJSONObject = (obj) => {
50073
- const stack = new Array(10);
50074
-
50075
- const visit = (source, i) => {
50076
-
50077
- if (isObject(source)) {
50078
- if (stack.indexOf(source) >= 0) {
50079
- return;
50080
- }
50081
-
50082
- if(!('toJSON' in source)) {
50083
- stack[i] = source;
50084
- const target = utils_isArray(source) ? [] : {};
50085
-
50086
- utils_forEach(source, (value, key) => {
50087
- const reducedValue = visit(value, i + 1);
50088
- !isUndefined(reducedValue) && (target[key] = reducedValue);
50089
- });
50090
-
50091
- stack[i] = undefined;
50092
-
50093
- return target;
50094
- }
50095
- }
50096
-
50097
- return source;
50098
- }
50099
-
50100
- return visit(obj, 0);
50101
- }
50102
-
50103
- const isAsyncFn = kindOfTest('AsyncFunction');
50104
-
50105
- const isThenable = (thing) =>
50106
- thing && (isObject(thing) || utils_isFunction(thing)) && utils_isFunction(thing.then) && utils_isFunction(thing.catch);
50107
-
50108
- /* harmony default export */ const utils = ({
50109
- isArray: utils_isArray,
50110
- isArrayBuffer,
50111
- isBuffer,
50112
- isFormData,
50113
- isArrayBufferView,
50114
- isString,
50115
- isNumber,
50116
- isBoolean,
50117
- isObject,
50118
- isPlainObject,
50119
- isUndefined,
50120
- isDate,
50121
- isFile,
50122
- isBlob: utils_isBlob,
50123
- isRegExp,
50124
- isFunction: utils_isFunction,
50125
- isStream,
50126
- isURLSearchParams,
50127
- isTypedArray,
50128
- isFileList,
50129
- forEach: utils_forEach,
50130
- merge,
50131
- extend,
50132
- trim,
50133
- stripBOM,
50134
- inherits,
50135
- toFlatObject,
50136
- kindOf,
50137
- kindOfTest,
50138
- endsWith: utils_endsWith,
50139
- toArray: utils_toArray,
50140
- forEachEntry,
50141
- matchAll,
50142
- isHTMLForm,
50143
- hasOwnProperty: utils_hasOwnProperty,
50144
- hasOwnProp: utils_hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
50145
- reduceDescriptors,
50146
- freezeMethods,
50147
- toObjectSet,
50148
- toCamelCase,
50149
- noop: utils_noop,
50150
- toFiniteNumber,
50151
- findKey,
50152
- global: _global,
50153
- isContextDefined,
50154
- ALPHABET,
50155
- generateString,
50156
- isSpecCompliantForm,
50157
- toJSONObject,
50158
- isAsyncFn,
50159
- isThenable
50160
- });
50161
-
50162
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/core/AxiosError.js
50163
-
50164
-
50165
-
50166
-
50167
- /**
50168
- * Create an Error with the specified message, config, error code, request and response.
50169
- *
50170
- * @param {string} message The error message.
50171
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
50172
- * @param {Object} [config] The config.
50173
- * @param {Object} [request] The request.
50174
- * @param {Object} [response] The response.
50175
- *
50176
- * @returns {Error} The created error.
50177
- */
50178
- function AxiosError(message, code, config, request, response) {
50179
- Error.call(this);
50180
-
50181
- if (Error.captureStackTrace) {
50182
- Error.captureStackTrace(this, this.constructor);
50183
- } else {
50184
- this.stack = (new Error()).stack;
50185
- }
50186
-
50187
- this.message = message;
50188
- this.name = 'AxiosError';
50189
- code && (this.code = code);
50190
- config && (this.config = config);
50191
- request && (this.request = request);
50192
- response && (this.response = response);
50193
- }
50194
-
50195
- utils.inherits(AxiosError, Error, {
50196
- toJSON: function toJSON() {
50197
- return {
50198
- // Standard
50199
- message: this.message,
50200
- name: this.name,
50201
- // Microsoft
50202
- description: this.description,
50203
- number: this.number,
50204
- // Mozilla
50205
- fileName: this.fileName,
50206
- lineNumber: this.lineNumber,
50207
- columnNumber: this.columnNumber,
50208
- stack: this.stack,
50209
- // Axios
50210
- config: utils.toJSONObject(this.config),
50211
- code: this.code,
50212
- status: this.response && this.response.status ? this.response.status : null
50213
- };
50214
- }
50215
- });
50216
-
50217
- const AxiosError_prototype = AxiosError.prototype;
50218
- const descriptors = {};
50219
-
50220
- [
50221
- 'ERR_BAD_OPTION_VALUE',
50222
- 'ERR_BAD_OPTION',
50223
- 'ECONNABORTED',
50224
- 'ETIMEDOUT',
50225
- 'ERR_NETWORK',
50226
- 'ERR_FR_TOO_MANY_REDIRECTS',
50227
- 'ERR_DEPRECATED',
50228
- 'ERR_BAD_RESPONSE',
50229
- 'ERR_BAD_REQUEST',
50230
- 'ERR_CANCELED',
50231
- 'ERR_NOT_SUPPORT',
50232
- 'ERR_INVALID_URL'
50233
- // eslint-disable-next-line func-names
50234
- ].forEach(code => {
50235
- descriptors[code] = {value: code};
50236
- });
50237
-
50238
- Object.defineProperties(AxiosError, descriptors);
50239
- Object.defineProperty(AxiosError_prototype, 'isAxiosError', {value: true});
50240
-
50241
- // eslint-disable-next-line func-names
50242
- AxiosError.from = (error, code, config, request, response, customProps) => {
50243
- const axiosError = Object.create(AxiosError_prototype);
50244
-
50245
- utils.toFlatObject(error, axiosError, function filter(obj) {
50246
- return obj !== Error.prototype;
50247
- }, prop => {
50248
- return prop !== 'isAxiosError';
50249
- });
50250
-
50251
- AxiosError.call(axiosError, error.message, code, config, request, response);
50252
-
50253
- axiosError.cause = error;
50254
-
50255
- axiosError.name = error.name;
50256
-
50257
- customProps && Object.assign(axiosError, customProps);
50258
-
50259
- return axiosError;
50260
- };
50261
-
50262
- /* harmony default export */ const core_AxiosError = (AxiosError);
50263
-
50264
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/helpers/null.js
50265
- // eslint-disable-next-line strict
50266
- /* harmony default export */ const helpers_null = (null);
50267
-
50268
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/helpers/toFormData.js
50269
-
50270
-
50271
-
50272
-
50273
- // temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored
50274
-
50275
-
50276
- /**
50277
- * Determines if the given thing is a array or js object.
50278
- *
50279
- * @param {string} thing - The object or array to be visited.
50280
- *
50281
- * @returns {boolean}
50282
- */
50283
- function isVisitable(thing) {
50284
- return utils.isPlainObject(thing) || utils.isArray(thing);
50285
- }
50286
-
50287
- /**
50288
- * It removes the brackets from the end of a string
50289
- *
50290
- * @param {string} key - The key of the parameter.
50291
- *
50292
- * @returns {string} the key without the brackets.
50293
- */
50294
- function removeBrackets(key) {
50295
- return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
50296
- }
50297
-
50298
- /**
50299
- * It takes a path, a key, and a boolean, and returns a string
50300
- *
50301
- * @param {string} path - The path to the current key.
50302
- * @param {string} key - The key of the current object being iterated over.
50303
- * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
50304
- *
50305
- * @returns {string} The path to the current key.
50306
- */
50307
- function renderKey(path, key, dots) {
50308
- if (!path) return key;
50309
- return path.concat(key).map(function each(token, i) {
50310
- // eslint-disable-next-line no-param-reassign
50311
- token = removeBrackets(token);
50312
- return !dots && i ? '[' + token + ']' : token;
50313
- }).join(dots ? '.' : '');
50314
- }
50315
-
50316
- /**
50317
- * If the array is an array and none of its elements are visitable, then it's a flat array.
50318
- *
50319
- * @param {Array<any>} arr - The array to check
50320
- *
50321
- * @returns {boolean}
50322
- */
50323
- function isFlatArray(arr) {
50324
- return utils.isArray(arr) && !arr.some(isVisitable);
50325
- }
50326
-
50327
- const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
50328
- return /^is[A-Z]/.test(prop);
50329
- });
50330
-
50331
- /**
50332
- * Convert a data object to FormData
50333
- *
50334
- * @param {Object} obj
50335
- * @param {?Object} [formData]
50336
- * @param {?Object} [options]
50337
- * @param {Function} [options.visitor]
50338
- * @param {Boolean} [options.metaTokens = true]
50339
- * @param {Boolean} [options.dots = false]
50340
- * @param {?Boolean} [options.indexes = false]
50341
- *
50342
- * @returns {Object}
50343
- **/
50344
-
50345
- /**
50346
- * It converts an object into a FormData object
50347
- *
50348
- * @param {Object<any, any>} obj - The object to convert to form data.
50349
- * @param {string} formData - The FormData object to append to.
50350
- * @param {Object<string, any>} options
50351
- *
50352
- * @returns
50353
- */
50354
- function toFormData(obj, formData, options) {
50355
- if (!utils.isObject(obj)) {
50356
- throw new TypeError('target must be an object');
50357
- }
50358
-
50359
- // eslint-disable-next-line no-param-reassign
50360
- formData = formData || new (helpers_null || FormData)();
50361
-
50362
- // eslint-disable-next-line no-param-reassign
50363
- options = utils.toFlatObject(options, {
50364
- metaTokens: true,
50365
- dots: false,
50366
- indexes: false
50367
- }, false, function defined(option, source) {
50368
- // eslint-disable-next-line no-eq-null,eqeqeq
50369
- return !utils.isUndefined(source[option]);
50370
- });
50371
-
50372
- const metaTokens = options.metaTokens;
50373
- // eslint-disable-next-line no-use-before-define
50374
- const visitor = options.visitor || defaultVisitor;
50375
- const dots = options.dots;
50376
- const indexes = options.indexes;
50377
- const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
50378
- const useBlob = _Blob && utils.isSpecCompliantForm(formData);
50379
-
50380
- if (!utils.isFunction(visitor)) {
50381
- throw new TypeError('visitor must be a function');
50382
- }
50383
-
50384
- function convertValue(value) {
50385
- if (value === null) return '';
50386
-
50387
- if (utils.isDate(value)) {
50388
- return value.toISOString();
50389
- }
50390
-
50391
- if (!useBlob && utils.isBlob(value)) {
50392
- throw new core_AxiosError('Blob is not supported. Use a Buffer instead.');
50393
- }
50394
-
50395
- if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
50396
- return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
50397
- }
50398
-
50399
- return value;
50400
- }
50401
-
50402
- /**
50403
- * Default visitor.
50404
- *
50405
- * @param {*} value
50406
- * @param {String|Number} key
50407
- * @param {Array<String|Number>} path
50408
- * @this {FormData}
50409
- *
50410
- * @returns {boolean} return true to visit the each prop of the value recursively
50411
- */
50412
- function defaultVisitor(value, key, path) {
50413
- let arr = value;
50414
-
50415
- if (value && !path && typeof value === 'object') {
50416
- if (utils.endsWith(key, '{}')) {
50417
- // eslint-disable-next-line no-param-reassign
50418
- key = metaTokens ? key : key.slice(0, -2);
50419
- // eslint-disable-next-line no-param-reassign
50420
- value = JSON.stringify(value);
50421
- } else if (
50422
- (utils.isArray(value) && isFlatArray(value)) ||
50423
- ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
50424
- )) {
50425
- // eslint-disable-next-line no-param-reassign
50426
- key = removeBrackets(key);
50427
-
50428
- arr.forEach(function each(el, index) {
50429
- !(utils.isUndefined(el) || el === null) && formData.append(
50430
- // eslint-disable-next-line no-nested-ternary
50431
- indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
50432
- convertValue(el)
50433
- );
50434
- });
50435
- return false;
50436
- }
50437
- }
50438
-
50439
- if (isVisitable(value)) {
50440
- return true;
50441
- }
50442
-
50443
- formData.append(renderKey(path, key, dots), convertValue(value));
50444
-
50445
- return false;
50446
- }
50447
-
50448
- const stack = [];
50449
-
50450
- const exposedHelpers = Object.assign(predicates, {
50451
- defaultVisitor,
50452
- convertValue,
50453
- isVisitable
50454
- });
50455
-
50456
- function build(value, path) {
50457
- if (utils.isUndefined(value)) return;
50458
-
50459
- if (stack.indexOf(value) !== -1) {
50460
- throw Error('Circular reference detected in ' + path.join('.'));
50461
- }
50462
-
50463
- stack.push(value);
50464
-
50465
- utils.forEach(value, function each(el, key) {
50466
- const result = !(utils.isUndefined(el) || el === null) && visitor.call(
50467
- formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers
50468
- );
50469
-
50470
- if (result === true) {
50471
- build(el, path ? path.concat(key) : [key]);
50472
- }
50473
- });
50474
-
50475
- stack.pop();
50476
- }
50477
-
50478
- if (!utils.isObject(obj)) {
50479
- throw new TypeError('data must be an object');
50480
- }
50481
-
50482
- build(obj);
50483
-
50484
- return formData;
50485
- }
50486
-
50487
- /* harmony default export */ const helpers_toFormData = (toFormData);
50488
-
50489
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/helpers/AxiosURLSearchParams.js
50490
-
50491
-
50492
-
50493
-
50494
- /**
50495
- * It encodes a string by replacing all characters that are not in the unreserved set with
50496
- * their percent-encoded equivalents
50497
- *
50498
- * @param {string} str - The string to encode.
50499
- *
50500
- * @returns {string} The encoded string.
50501
- */
50502
- function encode(str) {
50503
- const charMap = {
50504
- '!': '%21',
50505
- "'": '%27',
50506
- '(': '%28',
50507
- ')': '%29',
50508
- '~': '%7E',
50509
- '%20': '+',
50510
- '%00': '\x00'
50511
- };
50512
- return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
50513
- return charMap[match];
50514
- });
50515
- }
50516
-
50517
- /**
50518
- * It takes a params object and converts it to a FormData object
50519
- *
50520
- * @param {Object<string, any>} params - The parameters to be converted to a FormData object.
50521
- * @param {Object<string, any>} options - The options object passed to the Axios constructor.
50522
- *
50523
- * @returns {void}
50524
- */
50525
- function AxiosURLSearchParams(params, options) {
50526
- this._pairs = [];
50527
-
50528
- params && helpers_toFormData(params, this, options);
50529
- }
50530
-
50531
- const AxiosURLSearchParams_prototype = AxiosURLSearchParams.prototype;
50532
-
50533
- AxiosURLSearchParams_prototype.append = function append(name, value) {
50534
- this._pairs.push([name, value]);
50535
- };
50536
-
50537
- AxiosURLSearchParams_prototype.toString = function toString(encoder) {
50538
- const _encode = encoder ? function(value) {
50539
- return encoder.call(this, value, encode);
50540
- } : encode;
50541
-
50542
- return this._pairs.map(function each(pair) {
50543
- return _encode(pair[0]) + '=' + _encode(pair[1]);
50544
- }, '').join('&');
50545
- };
50546
-
50547
- /* harmony default export */ const helpers_AxiosURLSearchParams = (AxiosURLSearchParams);
50548
-
50549
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/helpers/buildURL.js
50550
-
50551
-
50552
-
50553
-
50554
-
50555
- /**
50556
- * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
50557
- * URI encoded counterparts
50558
- *
50559
- * @param {string} val The value to be encoded.
50560
- *
50561
- * @returns {string} The encoded value.
50562
- */
50563
- function buildURL_encode(val) {
50564
- return encodeURIComponent(val).
50565
- replace(/%3A/gi, ':').
50566
- replace(/%24/g, '$').
50567
- replace(/%2C/gi, ',').
50568
- replace(/%20/g, '+').
50569
- replace(/%5B/gi, '[').
50570
- replace(/%5D/gi, ']');
50571
- }
50572
-
50573
- /**
50574
- * Build a URL by appending params to the end
50575
- *
50576
- * @param {string} url The base of the url (e.g., http://www.google.com)
50577
- * @param {object} [params] The params to be appended
50578
- * @param {?object} options
50579
- *
50580
- * @returns {string} The formatted url
50581
- */
50582
- function buildURL(url, params, options) {
50583
- /*eslint no-param-reassign:0*/
50584
- if (!params) {
50585
- return url;
50586
- }
50587
-
50588
- const _encode = options && options.encode || buildURL_encode;
50589
-
50590
- const serializeFn = options && options.serialize;
50591
-
50592
- let serializedParams;
50593
-
50594
- if (serializeFn) {
50595
- serializedParams = serializeFn(params, options);
50596
- } else {
50597
- serializedParams = utils.isURLSearchParams(params) ?
50598
- params.toString() :
50599
- new helpers_AxiosURLSearchParams(params, options).toString(_encode);
50600
- }
50601
-
50602
- if (serializedParams) {
50603
- const hashmarkIndex = url.indexOf("#");
50604
-
50605
- if (hashmarkIndex !== -1) {
50606
- url = url.slice(0, hashmarkIndex);
50607
- }
50608
- url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
50609
- }
50610
-
50611
- return url;
50612
- }
50613
-
50614
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/core/InterceptorManager.js
50615
-
50616
-
50617
-
50618
-
50619
- class InterceptorManager {
50620
- constructor() {
50621
- this.handlers = [];
50622
- }
50623
-
50624
- /**
50625
- * Add a new interceptor to the stack
50626
- *
50627
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
50628
- * @param {Function} rejected The function to handle `reject` for a `Promise`
50629
- *
50630
- * @return {Number} An ID used to remove interceptor later
50631
- */
50632
- use(fulfilled, rejected, options) {
50633
- this.handlers.push({
50634
- fulfilled,
50635
- rejected,
50636
- synchronous: options ? options.synchronous : false,
50637
- runWhen: options ? options.runWhen : null
50638
- });
50639
- return this.handlers.length - 1;
50640
- }
50641
-
50642
- /**
50643
- * Remove an interceptor from the stack
50644
- *
50645
- * @param {Number} id The ID that was returned by `use`
50646
- *
50647
- * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
50648
- */
50649
- eject(id) {
50650
- if (this.handlers[id]) {
50651
- this.handlers[id] = null;
50652
- }
50653
- }
50654
-
50655
- /**
50656
- * Clear all interceptors from the stack
50657
- *
50658
- * @returns {void}
50659
- */
50660
- clear() {
50661
- if (this.handlers) {
50662
- this.handlers = [];
50663
- }
50664
- }
50665
-
50666
- /**
50667
- * Iterate over all the registered interceptors
50668
- *
50669
- * This method is particularly useful for skipping over any
50670
- * interceptors that may have become `null` calling `eject`.
50671
- *
50672
- * @param {Function} fn The function to call for each interceptor
50673
- *
50674
- * @returns {void}
50675
- */
50676
- forEach(fn) {
50677
- utils.forEach(this.handlers, function forEachHandler(h) {
50678
- if (h !== null) {
50679
- fn(h);
50680
- }
50681
- });
50682
- }
50683
- }
50684
-
50685
- /* harmony default export */ const core_InterceptorManager = (InterceptorManager);
50686
-
50687
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/defaults/transitional.js
50688
-
50689
-
50690
- /* harmony default export */ const defaults_transitional = ({
50691
- silentJSONParsing: true,
50692
- forcedJSONParsing: true,
50693
- clarifyTimeoutError: false
50694
- });
50695
-
50696
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js
50697
-
50698
-
50699
-
50700
- /* harmony default export */ const classes_URLSearchParams = (typeof URLSearchParams !== 'undefined' ? URLSearchParams : helpers_AxiosURLSearchParams);
50701
-
50702
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/platform/browser/classes/FormData.js
50703
-
50704
-
50705
- /* harmony default export */ const classes_FormData = (typeof FormData !== 'undefined' ? FormData : null);
50706
-
50707
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/platform/browser/classes/Blob.js
50708
-
50709
-
50710
- /* harmony default export */ const classes_Blob = (typeof Blob !== 'undefined' ? Blob : null);
50711
-
50712
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/platform/browser/index.js
50713
-
50714
-
50715
-
50716
-
50717
- /* harmony default export */ const browser = ({
50718
- isBrowser: true,
50719
- classes: {
50720
- URLSearchParams: classes_URLSearchParams,
50721
- FormData: classes_FormData,
50722
- Blob: classes_Blob
50723
- },
50724
- protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
50725
- });
50726
-
50727
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/platform/common/utils.js
50728
- const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
50729
-
50730
- /**
50731
- * Determine if we're running in a standard browser environment
50732
- *
50733
- * This allows axios to run in a web worker, and react-native.
50734
- * Both environments support XMLHttpRequest, but not fully standard globals.
50735
- *
50736
- * web workers:
50737
- * typeof window -> undefined
50738
- * typeof document -> undefined
50739
- *
50740
- * react-native:
50741
- * navigator.product -> 'ReactNative'
50742
- * nativescript
50743
- * navigator.product -> 'NativeScript' or 'NS'
50744
- *
50745
- * @returns {boolean}
50746
- */
50747
- const hasStandardBrowserEnv = (
50748
- (product) => {
50749
- return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
50750
- })(typeof navigator !== 'undefined' && navigator.product);
50751
-
50752
- /**
50753
- * Determine if we're running in a standard browser webWorker environment
50754
- *
50755
- * Although the `isStandardBrowserEnv` method indicates that
50756
- * `allows axios to run in a web worker`, the WebWorker will still be
50757
- * filtered out due to its judgment standard
50758
- * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
50759
- * This leads to a problem when axios post `FormData` in webWorker
50760
- */
50761
- const hasStandardBrowserWebWorkerEnv = (() => {
50762
- return (
50763
- typeof WorkerGlobalScope !== 'undefined' &&
50764
- // eslint-disable-next-line no-undef
50765
- self instanceof WorkerGlobalScope &&
50766
- typeof self.importScripts === 'function'
50767
- );
50768
- })();
50769
-
50770
-
50771
-
50772
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/platform/index.js
50773
-
50774
-
50775
-
50776
- /* harmony default export */ const platform = ({
50777
- ...common_utils_namespaceObject,
50778
- ...browser
50779
- });
50780
-
50781
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/helpers/toURLEncodedForm.js
50782
-
50783
-
50784
-
50785
-
50786
-
50787
-
50788
- function toURLEncodedForm(data, options) {
50789
- return helpers_toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
50790
- visitor: function(value, key, path, helpers) {
50791
- if (platform.isNode && utils.isBuffer(value)) {
50792
- this.append(key, value.toString('base64'));
50793
- return false;
50794
- }
50795
-
50796
- return helpers.defaultVisitor.apply(this, arguments);
50797
- }
50798
- }, options));
50799
- }
50800
-
50801
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/helpers/formDataToJSON.js
50802
-
50803
-
50804
-
50805
-
50806
- /**
50807
- * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
50808
- *
50809
- * @param {string} name - The name of the property to get.
50810
- *
50811
- * @returns An array of strings.
50812
- */
50813
- function parsePropPath(name) {
50814
- // foo[x][y][z]
50815
- // foo.x.y.z
50816
- // foo-x-y-z
50817
- // foo x y z
50818
- return utils.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
50819
- return match[0] === '[]' ? '' : match[1] || match[0];
50820
- });
50821
- }
50822
-
50823
- /**
50824
- * Convert an array to an object.
50825
- *
50826
- * @param {Array<any>} arr - The array to convert to an object.
50827
- *
50828
- * @returns An object with the same keys and values as the array.
50829
- */
50830
- function arrayToObject(arr) {
50831
- const obj = {};
50832
- const keys = Object.keys(arr);
50833
- let i;
50834
- const len = keys.length;
50835
- let key;
50836
- for (i = 0; i < len; i++) {
50837
- key = keys[i];
50838
- obj[key] = arr[key];
50839
- }
50840
- return obj;
50841
- }
50842
-
50843
- /**
50844
- * It takes a FormData object and returns a JavaScript object
50845
- *
50846
- * @param {string} formData The FormData object to convert to JSON.
50847
- *
50848
- * @returns {Object<string, any> | null} The converted object.
50849
- */
50850
- function formDataToJSON(formData) {
50851
- function buildPath(path, value, target, index) {
50852
- let name = path[index++];
50853
- const isNumericKey = Number.isFinite(+name);
50854
- const isLast = index >= path.length;
50855
- name = !name && utils.isArray(target) ? target.length : name;
50856
-
50857
- if (isLast) {
50858
- if (utils.hasOwnProp(target, name)) {
50859
- target[name] = [target[name], value];
50860
- } else {
50861
- target[name] = value;
50862
- }
50863
-
50864
- return !isNumericKey;
50865
- }
50866
-
50867
- if (!target[name] || !utils.isObject(target[name])) {
50868
- target[name] = [];
50869
- }
50870
-
50871
- const result = buildPath(path, value, target[name], index);
50872
-
50873
- if (result && utils.isArray(target[name])) {
50874
- target[name] = arrayToObject(target[name]);
50875
- }
50876
-
50877
- return !isNumericKey;
50878
- }
50879
-
50880
- if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
50881
- const obj = {};
50882
-
50883
- utils.forEachEntry(formData, (name, value) => {
50884
- buildPath(parsePropPath(name), value, obj, 0);
50885
- });
50886
-
50887
- return obj;
50888
- }
50889
-
50890
- return null;
50891
- }
50892
-
50893
- /* harmony default export */ const helpers_formDataToJSON = (formDataToJSON);
50894
-
50895
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/defaults/index.js
50896
-
50897
-
50898
-
50899
-
50900
-
50901
-
50902
-
50903
-
50904
-
50905
-
50906
- /**
50907
- * It takes a string, tries to parse it, and if it fails, it returns the stringified version
50908
- * of the input
50909
- *
50910
- * @param {any} rawValue - The value to be stringified.
50911
- * @param {Function} parser - A function that parses a string into a JavaScript object.
50912
- * @param {Function} encoder - A function that takes a value and returns a string.
50913
- *
50914
- * @returns {string} A stringified version of the rawValue.
50915
- */
50916
- function stringifySafely(rawValue, parser, encoder) {
50917
- if (utils.isString(rawValue)) {
50918
- try {
50919
- (parser || JSON.parse)(rawValue);
50920
- return utils.trim(rawValue);
50921
- } catch (e) {
50922
- if (e.name !== 'SyntaxError') {
50923
- throw e;
50924
- }
50925
- }
50926
- }
50927
-
50928
- return (encoder || JSON.stringify)(rawValue);
50929
- }
50930
-
50931
- const defaults = {
50932
-
50933
- transitional: defaults_transitional,
50934
-
50935
- adapter: ['xhr', 'http'],
50936
-
50937
- transformRequest: [function transformRequest(data, headers) {
50938
- const contentType = headers.getContentType() || '';
50939
- const hasJSONContentType = contentType.indexOf('application/json') > -1;
50940
- const isObjectPayload = utils.isObject(data);
50941
-
50942
- if (isObjectPayload && utils.isHTMLForm(data)) {
50943
- data = new FormData(data);
50944
- }
50945
-
50946
- const isFormData = utils.isFormData(data);
50947
-
50948
- if (isFormData) {
50949
- if (!hasJSONContentType) {
50950
- return data;
50951
- }
50952
- return hasJSONContentType ? JSON.stringify(helpers_formDataToJSON(data)) : data;
50953
- }
50954
-
50955
- if (utils.isArrayBuffer(data) ||
50956
- utils.isBuffer(data) ||
50957
- utils.isStream(data) ||
50958
- utils.isFile(data) ||
50959
- utils.isBlob(data)
50960
- ) {
50961
- return data;
50962
- }
50963
- if (utils.isArrayBufferView(data)) {
50964
- return data.buffer;
50965
- }
50966
- if (utils.isURLSearchParams(data)) {
50967
- headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
50968
- return data.toString();
50969
- }
50970
-
50971
- let isFileList;
50972
-
50973
- if (isObjectPayload) {
50974
- if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
50975
- return toURLEncodedForm(data, this.formSerializer).toString();
50976
- }
50977
-
50978
- if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
50979
- const _FormData = this.env && this.env.FormData;
50980
-
50981
- return helpers_toFormData(
50982
- isFileList ? {'files[]': data} : data,
50983
- _FormData && new _FormData(),
50984
- this.formSerializer
50985
- );
50986
- }
50987
- }
50988
-
50989
- if (isObjectPayload || hasJSONContentType ) {
50990
- headers.setContentType('application/json', false);
50991
- return stringifySafely(data);
50992
- }
50993
-
50994
- return data;
50995
- }],
50996
-
50997
- transformResponse: [function transformResponse(data) {
50998
- const transitional = this.transitional || defaults.transitional;
50999
- const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
51000
- const JSONRequested = this.responseType === 'json';
51001
-
51002
- if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
51003
- const silentJSONParsing = transitional && transitional.silentJSONParsing;
51004
- const strictJSONParsing = !silentJSONParsing && JSONRequested;
51005
-
51006
- try {
51007
- return JSON.parse(data);
51008
- } catch (e) {
51009
- if (strictJSONParsing) {
51010
- if (e.name === 'SyntaxError') {
51011
- throw core_AxiosError.from(e, core_AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
51012
- }
51013
- throw e;
51014
- }
51015
- }
51016
- }
51017
-
51018
- return data;
51019
- }],
51020
-
51021
- /**
51022
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
51023
- * timeout is not created.
51024
- */
51025
- timeout: 0,
51026
-
51027
- xsrfCookieName: 'XSRF-TOKEN',
51028
- xsrfHeaderName: 'X-XSRF-TOKEN',
51029
-
51030
- maxContentLength: -1,
51031
- maxBodyLength: -1,
51032
-
51033
- env: {
51034
- FormData: platform.classes.FormData,
51035
- Blob: platform.classes.Blob
51036
- },
51037
-
51038
- validateStatus: function validateStatus(status) {
51039
- return status >= 200 && status < 300;
51040
- },
51041
-
51042
- headers: {
51043
- common: {
51044
- 'Accept': 'application/json, text/plain, */*',
51045
- 'Content-Type': undefined
51046
- }
51047
- }
51048
- };
51049
-
51050
- utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
51051
- defaults.headers[method] = {};
51052
- });
51053
-
51054
- /* harmony default export */ const lib_defaults = (defaults);
51055
-
51056
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/helpers/parseHeaders.js
51057
-
51058
-
51059
-
51060
-
51061
- // RawAxiosHeaders whose duplicates are ignored by node
51062
- // c.f. https://nodejs.org/api/http.html#http_message_headers
51063
- const ignoreDuplicateOf = utils.toObjectSet([
51064
- 'age', 'authorization', 'content-length', 'content-type', 'etag',
51065
- 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
51066
- 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
51067
- 'referer', 'retry-after', 'user-agent'
51068
- ]);
51069
-
51070
- /**
51071
- * Parse headers into an object
51072
- *
51073
- * ```
51074
- * Date: Wed, 27 Aug 2014 08:58:49 GMT
51075
- * Content-Type: application/json
51076
- * Connection: keep-alive
51077
- * Transfer-Encoding: chunked
51078
- * ```
51079
- *
51080
- * @param {String} rawHeaders Headers needing to be parsed
51081
- *
51082
- * @returns {Object} Headers parsed into an object
51083
- */
51084
- /* harmony default export */ const helpers_parseHeaders = (rawHeaders => {
51085
- const parsed = {};
51086
- let key;
51087
- let val;
51088
- let i;
51089
-
51090
- rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
51091
- i = line.indexOf(':');
51092
- key = line.substring(0, i).trim().toLowerCase();
51093
- val = line.substring(i + 1).trim();
51094
-
51095
- if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
51096
- return;
51097
- }
51098
-
51099
- if (key === 'set-cookie') {
51100
- if (parsed[key]) {
51101
- parsed[key].push(val);
51102
- } else {
51103
- parsed[key] = [val];
51104
- }
51105
- } else {
51106
- parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
51107
- }
51108
- });
51109
-
51110
- return parsed;
51111
- });
51112
-
51113
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/core/AxiosHeaders.js
51114
-
51115
-
51116
-
51117
-
51118
-
51119
- const $internals = Symbol('internals');
51120
-
51121
- function normalizeHeader(header) {
51122
- return header && String(header).trim().toLowerCase();
51123
- }
51124
-
51125
- function normalizeValue(value) {
51126
- if (value === false || value == null) {
51127
- return value;
51128
- }
51129
-
51130
- return utils.isArray(value) ? value.map(normalizeValue) : String(value);
51131
- }
51132
-
51133
- function parseTokens(str) {
51134
- const tokens = Object.create(null);
51135
- const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
51136
- let match;
51137
-
51138
- while ((match = tokensRE.exec(str))) {
51139
- tokens[match[1]] = match[2];
51140
- }
51141
-
51142
- return tokens;
51143
- }
51144
-
51145
- const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
51146
-
51147
- function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
51148
- if (utils.isFunction(filter)) {
51149
- return filter.call(this, value, header);
51150
- }
51151
-
51152
- if (isHeaderNameFilter) {
51153
- value = header;
51154
- }
51155
-
51156
- if (!utils.isString(value)) return;
51157
-
51158
- if (utils.isString(filter)) {
51159
- return value.indexOf(filter) !== -1;
51160
- }
51161
-
51162
- if (utils.isRegExp(filter)) {
51163
- return filter.test(value);
51164
- }
51165
- }
51166
-
51167
- function formatHeader(header) {
51168
- return header.trim()
51169
- .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
51170
- return char.toUpperCase() + str;
51171
- });
51172
- }
51173
-
51174
- function buildAccessors(obj, header) {
51175
- const accessorName = utils.toCamelCase(' ' + header);
51176
-
51177
- ['get', 'set', 'has'].forEach(methodName => {
51178
- Object.defineProperty(obj, methodName + accessorName, {
51179
- value: function(arg1, arg2, arg3) {
51180
- return this[methodName].call(this, header, arg1, arg2, arg3);
51181
- },
51182
- configurable: true
51183
- });
51184
- });
51185
- }
51186
-
51187
- class AxiosHeaders {
51188
- constructor(headers) {
51189
- headers && this.set(headers);
51190
- }
51191
-
51192
- set(header, valueOrRewrite, rewrite) {
51193
- const self = this;
51194
-
51195
- function setHeader(_value, _header, _rewrite) {
51196
- const lHeader = normalizeHeader(_header);
51197
-
51198
- if (!lHeader) {
51199
- throw new Error('header name must be a non-empty string');
51200
- }
51201
-
51202
- const key = utils.findKey(self, lHeader);
51203
-
51204
- if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
51205
- self[key || _header] = normalizeValue(_value);
51206
- }
51207
- }
51208
-
51209
- const setHeaders = (headers, _rewrite) =>
51210
- utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
51211
-
51212
- if (utils.isPlainObject(header) || header instanceof this.constructor) {
51213
- setHeaders(header, valueOrRewrite)
51214
- } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
51215
- setHeaders(helpers_parseHeaders(header), valueOrRewrite);
51216
- } else {
51217
- header != null && setHeader(valueOrRewrite, header, rewrite);
51218
- }
51219
-
51220
- return this;
51221
- }
51222
-
51223
- get(header, parser) {
51224
- header = normalizeHeader(header);
51225
-
51226
- if (header) {
51227
- const key = utils.findKey(this, header);
51228
-
51229
- if (key) {
51230
- const value = this[key];
51231
-
51232
- if (!parser) {
51233
- return value;
51234
- }
51235
-
51236
- if (parser === true) {
51237
- return parseTokens(value);
51238
- }
51239
-
51240
- if (utils.isFunction(parser)) {
51241
- return parser.call(this, value, key);
51242
- }
51243
-
51244
- if (utils.isRegExp(parser)) {
51245
- return parser.exec(value);
51246
- }
51247
-
51248
- throw new TypeError('parser must be boolean|regexp|function');
51249
- }
51250
- }
51251
- }
51252
-
51253
- has(header, matcher) {
51254
- header = normalizeHeader(header);
51255
-
51256
- if (header) {
51257
- const key = utils.findKey(this, header);
51258
-
51259
- return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
51260
- }
51261
-
51262
- return false;
51263
- }
51264
-
51265
- delete(header, matcher) {
51266
- const self = this;
51267
- let deleted = false;
51268
-
51269
- function deleteHeader(_header) {
51270
- _header = normalizeHeader(_header);
51271
-
51272
- if (_header) {
51273
- const key = utils.findKey(self, _header);
51274
-
51275
- if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
51276
- delete self[key];
51277
-
51278
- deleted = true;
51279
- }
51280
- }
51281
- }
51282
-
51283
- if (utils.isArray(header)) {
51284
- header.forEach(deleteHeader);
51285
- } else {
51286
- deleteHeader(header);
51287
- }
51288
-
51289
- return deleted;
51290
- }
51291
-
51292
- clear(matcher) {
51293
- const keys = Object.keys(this);
51294
- let i = keys.length;
51295
- let deleted = false;
51296
-
51297
- while (i--) {
51298
- const key = keys[i];
51299
- if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
51300
- delete this[key];
51301
- deleted = true;
51302
- }
51303
- }
51304
-
51305
- return deleted;
51306
- }
51307
-
51308
- normalize(format) {
51309
- const self = this;
51310
- const headers = {};
51311
-
51312
- utils.forEach(this, (value, header) => {
51313
- const key = utils.findKey(headers, header);
51314
-
51315
- if (key) {
51316
- self[key] = normalizeValue(value);
51317
- delete self[header];
51318
- return;
51319
- }
51320
-
51321
- const normalized = format ? formatHeader(header) : String(header).trim();
51322
-
51323
- if (normalized !== header) {
51324
- delete self[header];
51325
- }
51326
-
51327
- self[normalized] = normalizeValue(value);
51328
-
51329
- headers[normalized] = true;
51330
- });
51331
-
51332
- return this;
51333
- }
51334
-
51335
- concat(...targets) {
51336
- return this.constructor.concat(this, ...targets);
51337
- }
51338
-
51339
- toJSON(asStrings) {
51340
- const obj = Object.create(null);
51341
-
51342
- utils.forEach(this, (value, header) => {
51343
- value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);
51344
- });
51345
-
51346
- return obj;
51347
- }
51348
-
51349
- [Symbol.iterator]() {
51350
- return Object.entries(this.toJSON())[Symbol.iterator]();
51351
- }
51352
-
51353
- toString() {
51354
- return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
51355
- }
51356
-
51357
- get [Symbol.toStringTag]() {
51358
- return 'AxiosHeaders';
51359
- }
51360
-
51361
- static from(thing) {
51362
- return thing instanceof this ? thing : new this(thing);
51363
- }
51364
-
51365
- static concat(first, ...targets) {
51366
- const computed = new this(first);
51367
-
51368
- targets.forEach((target) => computed.set(target));
51369
-
51370
- return computed;
51371
- }
51372
-
51373
- static accessor(header) {
51374
- const internals = this[$internals] = (this[$internals] = {
51375
- accessors: {}
51376
- });
51377
-
51378
- const accessors = internals.accessors;
51379
- const prototype = this.prototype;
51380
-
51381
- function defineAccessor(_header) {
51382
- const lHeader = normalizeHeader(_header);
51383
-
51384
- if (!accessors[lHeader]) {
51385
- buildAccessors(prototype, _header);
51386
- accessors[lHeader] = true;
51387
- }
51388
- }
51389
-
51390
- utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
51391
-
51392
- return this;
51393
- }
51394
- }
51395
-
51396
- AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
51397
-
51398
- // reserved names hotfix
51399
- utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
51400
- let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
51401
- return {
51402
- get: () => value,
51403
- set(headerValue) {
51404
- this[mapped] = headerValue;
51405
- }
51406
- }
51407
- });
51408
-
51409
- utils.freezeMethods(AxiosHeaders);
51410
-
51411
- /* harmony default export */ const core_AxiosHeaders = (AxiosHeaders);
51412
-
51413
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/core/transformData.js
51414
-
51415
-
51416
-
51417
-
51418
-
51419
-
51420
- /**
51421
- * Transform the data for a request or a response
51422
- *
51423
- * @param {Array|Function} fns A single function or Array of functions
51424
- * @param {?Object} response The response object
51425
- *
51426
- * @returns {*} The resulting transformed data
51427
- */
51428
- function transformData(fns, response) {
51429
- const config = this || lib_defaults;
51430
- const context = response || config;
51431
- const headers = core_AxiosHeaders.from(context.headers);
51432
- let data = context.data;
51433
-
51434
- utils.forEach(fns, function transform(fn) {
51435
- data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
51436
- });
51437
-
51438
- headers.normalize();
51439
-
51440
- return data;
51441
- }
51442
-
51443
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/cancel/isCancel.js
51444
-
51445
-
51446
- function isCancel(value) {
51447
- return !!(value && value.__CANCEL__);
51448
- }
51449
-
51450
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/cancel/CanceledError.js
51451
-
51452
-
51453
-
51454
-
51455
-
51456
- /**
51457
- * A `CanceledError` is an object that is thrown when an operation is canceled.
51458
- *
51459
- * @param {string=} message The message.
51460
- * @param {Object=} config The config.
51461
- * @param {Object=} request The request.
51462
- *
51463
- * @returns {CanceledError} The created error.
51464
- */
51465
- function CanceledError(message, config, request) {
51466
- // eslint-disable-next-line no-eq-null,eqeqeq
51467
- core_AxiosError.call(this, message == null ? 'canceled' : message, core_AxiosError.ERR_CANCELED, config, request);
51468
- this.name = 'CanceledError';
51469
- }
51470
-
51471
- utils.inherits(CanceledError, core_AxiosError, {
51472
- __CANCEL__: true
51473
- });
51474
-
51475
- /* harmony default export */ const cancel_CanceledError = (CanceledError);
51476
-
51477
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/core/settle.js
51478
-
51479
-
51480
-
51481
-
51482
- /**
51483
- * Resolve or reject a Promise based on response status.
51484
- *
51485
- * @param {Function} resolve A function that resolves the promise.
51486
- * @param {Function} reject A function that rejects the promise.
51487
- * @param {object} response The response.
51488
- *
51489
- * @returns {object} The response.
51490
- */
51491
- function settle(resolve, reject, response) {
51492
- const validateStatus = response.config.validateStatus;
51493
- if (!response.status || !validateStatus || validateStatus(response.status)) {
51494
- resolve(response);
51495
- } else {
51496
- reject(new core_AxiosError(
51497
- 'Request failed with status code ' + response.status,
51498
- [core_AxiosError.ERR_BAD_REQUEST, core_AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
51499
- response.config,
51500
- response.request,
51501
- response
51502
- ));
51503
- }
51504
- }
51505
-
51506
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/helpers/cookies.js
51507
-
51508
-
51509
-
51510
- /* harmony default export */ const cookies = (platform.hasStandardBrowserEnv ?
51511
-
51512
- // Standard browser envs support document.cookie
51513
- {
51514
- write(name, value, expires, path, domain, secure) {
51515
- const cookie = [name + '=' + encodeURIComponent(value)];
51516
-
51517
- utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
51518
-
51519
- utils.isString(path) && cookie.push('path=' + path);
51520
-
51521
- utils.isString(domain) && cookie.push('domain=' + domain);
51522
-
51523
- secure === true && cookie.push('secure');
51524
-
51525
- document.cookie = cookie.join('; ');
51526
- },
51527
-
51528
- read(name) {
51529
- const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
51530
- return (match ? decodeURIComponent(match[3]) : null);
51531
- },
51532
-
51533
- remove(name) {
51534
- this.write(name, '', Date.now() - 86400000);
51535
- }
51536
- }
51537
-
51538
- :
51539
-
51540
- // Non-standard browser env (web workers, react-native) lack needed support.
51541
- {
51542
- write() {},
51543
- read() {
51544
- return null;
51545
- },
51546
- remove() {}
51547
- });
51548
-
51549
-
51550
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/helpers/isAbsoluteURL.js
51551
-
51552
-
51553
- /**
51554
- * Determines whether the specified URL is absolute
51555
- *
51556
- * @param {string} url The URL to test
51557
- *
51558
- * @returns {boolean} True if the specified URL is absolute, otherwise false
51559
- */
51560
- function isAbsoluteURL(url) {
51561
- // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
51562
- // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
51563
- // by any combination of letters, digits, plus, period, or hyphen.
51564
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
51565
- }
51566
-
51567
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/helpers/combineURLs.js
51568
-
51569
-
51570
- /**
51571
- * Creates a new URL by combining the specified URLs
51572
- *
51573
- * @param {string} baseURL The base URL
51574
- * @param {string} relativeURL The relative URL
51575
- *
51576
- * @returns {string} The combined URL
51577
- */
51578
- function combineURLs(baseURL, relativeURL) {
51579
- return relativeURL
51580
- ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
51581
- : baseURL;
51582
- }
51583
-
51584
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/core/buildFullPath.js
51585
-
51586
-
51587
-
51588
-
51589
-
51590
- /**
51591
- * Creates a new URL by combining the baseURL with the requestedURL,
51592
- * only when the requestedURL is not already an absolute URL.
51593
- * If the requestURL is absolute, this function returns the requestedURL untouched.
51594
- *
51595
- * @param {string} baseURL The base URL
51596
- * @param {string} requestedURL Absolute or relative URL to combine
51597
- *
51598
- * @returns {string} The combined full path
51599
- */
51600
- function buildFullPath(baseURL, requestedURL) {
51601
- if (baseURL && !isAbsoluteURL(requestedURL)) {
51602
- return combineURLs(baseURL, requestedURL);
51603
- }
51604
- return requestedURL;
51605
- }
51606
-
51607
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/helpers/isURLSameOrigin.js
51608
-
51609
-
51610
-
51611
-
51612
-
51613
- /* harmony default export */ const isURLSameOrigin = (platform.hasStandardBrowserEnv ?
51614
-
51615
- // Standard browser envs have full support of the APIs needed to test
51616
- // whether the request URL is of the same origin as current location.
51617
- (function standardBrowserEnv() {
51618
- const msie = /(msie|trident)/i.test(navigator.userAgent);
51619
- const urlParsingNode = document.createElement('a');
51620
- let originURL;
51621
-
51622
- /**
51623
- * Parse a URL to discover its components
51624
- *
51625
- * @param {String} url The URL to be parsed
51626
- * @returns {Object}
51627
- */
51628
- function resolveURL(url) {
51629
- let href = url;
51630
-
51631
- if (msie) {
51632
- // IE needs attribute set twice to normalize properties
51633
- urlParsingNode.setAttribute('href', href);
51634
- href = urlParsingNode.href;
51635
- }
51636
-
51637
- urlParsingNode.setAttribute('href', href);
51638
-
51639
- // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
51640
- return {
51641
- href: urlParsingNode.href,
51642
- protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
51643
- host: urlParsingNode.host,
51644
- search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
51645
- hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
51646
- hostname: urlParsingNode.hostname,
51647
- port: urlParsingNode.port,
51648
- pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
51649
- urlParsingNode.pathname :
51650
- '/' + urlParsingNode.pathname
51651
- };
51652
- }
51653
-
51654
- originURL = resolveURL(window.location.href);
51655
-
51656
- /**
51657
- * Determine if a URL shares the same origin as the current location
51658
- *
51659
- * @param {String} requestURL The URL to test
51660
- * @returns {boolean} True if URL shares the same origin, otherwise false
51661
- */
51662
- return function isURLSameOrigin(requestURL) {
51663
- const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
51664
- return (parsed.protocol === originURL.protocol &&
51665
- parsed.host === originURL.host);
51666
- };
51667
- })() :
51668
-
51669
- // Non standard browser envs (web workers, react-native) lack needed support.
51670
- (function nonStandardBrowserEnv() {
51671
- return function isURLSameOrigin() {
51672
- return true;
51673
- };
51674
- })());
51675
-
51676
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/helpers/parseProtocol.js
51677
-
51678
-
51679
- function parseProtocol(url) {
51680
- const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
51681
- return match && match[1] || '';
51682
- }
51683
-
51684
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/helpers/speedometer.js
51685
-
51686
-
51687
- /**
51688
- * Calculate data maxRate
51689
- * @param {Number} [samplesCount= 10]
51690
- * @param {Number} [min= 1000]
51691
- * @returns {Function}
51692
- */
51693
- function speedometer(samplesCount, min) {
51694
- samplesCount = samplesCount || 10;
51695
- const bytes = new Array(samplesCount);
51696
- const timestamps = new Array(samplesCount);
51697
- let head = 0;
51698
- let tail = 0;
51699
- let firstSampleTS;
51700
-
51701
- min = min !== undefined ? min : 1000;
51702
-
51703
- return function push(chunkLength) {
51704
- const now = Date.now();
51705
-
51706
- const startedAt = timestamps[tail];
51707
-
51708
- if (!firstSampleTS) {
51709
- firstSampleTS = now;
51710
- }
51711
-
51712
- bytes[head] = chunkLength;
51713
- timestamps[head] = now;
51714
-
51715
- let i = tail;
51716
- let bytesCount = 0;
51717
-
51718
- while (i !== head) {
51719
- bytesCount += bytes[i++];
51720
- i = i % samplesCount;
51721
- }
51722
-
51723
- head = (head + 1) % samplesCount;
51724
-
51725
- if (head === tail) {
51726
- tail = (tail + 1) % samplesCount;
51727
- }
51728
-
51729
- if (now - firstSampleTS < min) {
51730
- return;
51731
- }
51732
-
51733
- const passed = startedAt && now - startedAt;
51734
-
51735
- return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
51736
- };
51737
- }
51738
-
51739
- /* harmony default export */ const helpers_speedometer = (speedometer);
51740
-
51741
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/adapters/xhr.js
51742
-
51743
-
51744
-
51745
-
51746
-
51747
-
51748
-
51749
-
51750
-
51751
-
51752
-
51753
-
51754
-
51755
-
51756
-
51757
-
51758
- function progressEventReducer(listener, isDownloadStream) {
51759
- let bytesNotified = 0;
51760
- const _speedometer = helpers_speedometer(50, 250);
51761
-
51762
- return e => {
51763
- const loaded = e.loaded;
51764
- const total = e.lengthComputable ? e.total : undefined;
51765
- const progressBytes = loaded - bytesNotified;
51766
- const rate = _speedometer(progressBytes);
51767
- const inRange = loaded <= total;
51768
-
51769
- bytesNotified = loaded;
51770
-
51771
- const data = {
51772
- loaded,
51773
- total,
51774
- progress: total ? (loaded / total) : undefined,
51775
- bytes: progressBytes,
51776
- rate: rate ? rate : undefined,
51777
- estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
51778
- event: e
51779
- };
51780
-
51781
- data[isDownloadStream ? 'download' : 'upload'] = true;
51782
-
51783
- listener(data);
51784
- };
51785
- }
51786
-
51787
- const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
51788
-
51789
- /* harmony default export */ const xhr = (isXHRAdapterSupported && function (config) {
51790
- return new Promise(function dispatchXhrRequest(resolve, reject) {
51791
- let requestData = config.data;
51792
- const requestHeaders = core_AxiosHeaders.from(config.headers).normalize();
51793
- let {responseType, withXSRFToken} = config;
51794
- let onCanceled;
51795
- function done() {
51796
- if (config.cancelToken) {
51797
- config.cancelToken.unsubscribe(onCanceled);
51798
- }
51799
-
51800
- if (config.signal) {
51801
- config.signal.removeEventListener('abort', onCanceled);
51802
- }
51803
- }
51804
-
51805
- let contentType;
51806
-
51807
- if (utils.isFormData(requestData)) {
51808
- if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
51809
- requestHeaders.setContentType(false); // Let the browser set it
51810
- } else if ((contentType = requestHeaders.getContentType()) !== false) {
51811
- // fix semicolon duplication issue for ReactNative FormData implementation
51812
- const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
51813
- requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
51814
- }
51815
- }
51816
-
51817
- let request = new XMLHttpRequest();
51818
-
51819
- // HTTP basic authentication
51820
- if (config.auth) {
51821
- const username = config.auth.username || '';
51822
- const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
51823
- requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));
51824
- }
51825
-
51826
- const fullPath = buildFullPath(config.baseURL, config.url);
51827
-
51828
- request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
51829
-
51830
- // Set the request timeout in MS
51831
- request.timeout = config.timeout;
51832
-
51833
- function onloadend() {
51834
- if (!request) {
51835
- return;
51836
- }
51837
- // Prepare the response
51838
- const responseHeaders = core_AxiosHeaders.from(
51839
- 'getAllResponseHeaders' in request && request.getAllResponseHeaders()
51840
- );
51841
- const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
51842
- request.responseText : request.response;
51843
- const response = {
51844
- data: responseData,
51845
- status: request.status,
51846
- statusText: request.statusText,
51847
- headers: responseHeaders,
51848
- config,
51849
- request
51850
- };
51851
-
51852
- settle(function _resolve(value) {
51853
- resolve(value);
51854
- done();
51855
- }, function _reject(err) {
51856
- reject(err);
51857
- done();
51858
- }, response);
51859
-
51860
- // Clean up request
51861
- request = null;
51862
- }
51863
-
51864
- if ('onloadend' in request) {
51865
- // Use onloadend if available
51866
- request.onloadend = onloadend;
51867
- } else {
51868
- // Listen for ready state to emulate onloadend
51869
- request.onreadystatechange = function handleLoad() {
51870
- if (!request || request.readyState !== 4) {
51871
- return;
51872
- }
51873
-
51874
- // The request errored out and we didn't get a response, this will be
51875
- // handled by onerror instead
51876
- // With one exception: request that using file: protocol, most browsers
51877
- // will return status as 0 even though it's a successful request
51878
- if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
51879
- return;
51880
- }
51881
- // readystate handler is calling before onerror or ontimeout handlers,
51882
- // so we should call onloadend on the next 'tick'
51883
- setTimeout(onloadend);
51884
- };
51885
- }
51886
-
51887
- // Handle browser request cancellation (as opposed to a manual cancellation)
51888
- request.onabort = function handleAbort() {
51889
- if (!request) {
51890
- return;
51891
- }
51892
-
51893
- reject(new core_AxiosError('Request aborted', core_AxiosError.ECONNABORTED, config, request));
51894
-
51895
- // Clean up request
51896
- request = null;
51897
- };
51898
-
51899
- // Handle low level network errors
51900
- request.onerror = function handleError() {
51901
- // Real errors are hidden from us by the browser
51902
- // onerror should only fire if it's a network error
51903
- reject(new core_AxiosError('Network Error', core_AxiosError.ERR_NETWORK, config, request));
51904
-
51905
- // Clean up request
51906
- request = null;
51907
- };
51908
-
51909
- // Handle timeout
51910
- request.ontimeout = function handleTimeout() {
51911
- let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
51912
- const transitional = config.transitional || defaults_transitional;
51913
- if (config.timeoutErrorMessage) {
51914
- timeoutErrorMessage = config.timeoutErrorMessage;
51915
- }
51916
- reject(new core_AxiosError(
51917
- timeoutErrorMessage,
51918
- transitional.clarifyTimeoutError ? core_AxiosError.ETIMEDOUT : core_AxiosError.ECONNABORTED,
51919
- config,
51920
- request));
51921
-
51922
- // Clean up request
51923
- request = null;
51924
- };
51925
-
51926
- // Add xsrf header
51927
- // This is only done if running in a standard browser environment.
51928
- // Specifically not if we're in a web worker, or react-native.
51929
- if(platform.hasStandardBrowserEnv) {
51930
- withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
51931
-
51932
- if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {
51933
- // Add xsrf header
51934
- const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
51935
-
51936
- if (xsrfValue) {
51937
- requestHeaders.set(config.xsrfHeaderName, xsrfValue);
51938
- }
51939
- }
51940
- }
51941
-
51942
- // Remove Content-Type if data is undefined
51943
- requestData === undefined && requestHeaders.setContentType(null);
51944
-
51945
- // Add headers to the request
51946
- if ('setRequestHeader' in request) {
51947
- utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
51948
- request.setRequestHeader(key, val);
51949
- });
51950
- }
51951
-
51952
- // Add withCredentials to request if needed
51953
- if (!utils.isUndefined(config.withCredentials)) {
51954
- request.withCredentials = !!config.withCredentials;
51955
- }
51956
-
51957
- // Add responseType to request if needed
51958
- if (responseType && responseType !== 'json') {
51959
- request.responseType = config.responseType;
51960
- }
51961
-
51962
- // Handle progress if needed
51963
- if (typeof config.onDownloadProgress === 'function') {
51964
- request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));
51965
- }
51966
-
51967
- // Not all browsers support upload events
51968
- if (typeof config.onUploadProgress === 'function' && request.upload) {
51969
- request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));
51970
- }
51971
-
51972
- if (config.cancelToken || config.signal) {
51973
- // Handle cancellation
51974
- // eslint-disable-next-line func-names
51975
- onCanceled = cancel => {
51976
- if (!request) {
51977
- return;
51978
- }
51979
- reject(!cancel || cancel.type ? new cancel_CanceledError(null, config, request) : cancel);
51980
- request.abort();
51981
- request = null;
51982
- };
51983
-
51984
- config.cancelToken && config.cancelToken.subscribe(onCanceled);
51985
- if (config.signal) {
51986
- config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
51987
- }
51988
- }
51989
-
51990
- const protocol = parseProtocol(fullPath);
51991
-
51992
- if (protocol && platform.protocols.indexOf(protocol) === -1) {
51993
- reject(new core_AxiosError('Unsupported protocol ' + protocol + ':', core_AxiosError.ERR_BAD_REQUEST, config));
51994
- return;
51995
- }
51996
-
51997
-
51998
- // Send the request
51999
- request.send(requestData || null);
52000
- });
52001
- });
52002
-
52003
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/adapters/adapters.js
52004
-
52005
-
52006
-
52007
-
52008
-
52009
- const knownAdapters = {
52010
- http: helpers_null,
52011
- xhr: xhr
52012
- }
52013
-
52014
- utils.forEach(knownAdapters, (fn, value) => {
52015
- if (fn) {
52016
- try {
52017
- Object.defineProperty(fn, 'name', {value});
52018
- } catch (e) {
52019
- // eslint-disable-next-line no-empty
52020
- }
52021
- Object.defineProperty(fn, 'adapterName', {value});
52022
- }
52023
- });
52024
-
52025
- const renderReason = (reason) => `- ${reason}`;
52026
-
52027
- const isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;
52028
-
52029
- /* harmony default export */ const adapters = ({
52030
- getAdapter: (adapters) => {
52031
- adapters = utils.isArray(adapters) ? adapters : [adapters];
52032
-
52033
- const {length} = adapters;
52034
- let nameOrAdapter;
52035
- let adapter;
52036
-
52037
- const rejectedReasons = {};
52038
-
52039
- for (let i = 0; i < length; i++) {
52040
- nameOrAdapter = adapters[i];
52041
- let id;
52042
-
52043
- adapter = nameOrAdapter;
52044
-
52045
- if (!isResolvedHandle(nameOrAdapter)) {
52046
- adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
52047
-
52048
- if (adapter === undefined) {
52049
- throw new core_AxiosError(`Unknown adapter '${id}'`);
52050
- }
52051
- }
52052
-
52053
- if (adapter) {
52054
- break;
52055
- }
52056
-
52057
- rejectedReasons[id || '#' + i] = adapter;
52058
- }
52059
-
52060
- if (!adapter) {
52061
-
52062
- const reasons = Object.entries(rejectedReasons)
52063
- .map(([id, state]) => `adapter ${id} ` +
52064
- (state === false ? 'is not supported by the environment' : 'is not available in the build')
52065
- );
52066
-
52067
- let s = length ?
52068
- (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
52069
- 'as no adapter specified';
52070
-
52071
- throw new core_AxiosError(
52072
- `There is no suitable adapter to dispatch the request ` + s,
52073
- 'ERR_NOT_SUPPORT'
52074
- );
52075
- }
52076
-
52077
- return adapter;
52078
- },
52079
- adapters: knownAdapters
52080
- });
52081
-
52082
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/core/dispatchRequest.js
52083
-
52084
-
52085
-
52086
-
52087
-
52088
-
52089
-
52090
-
52091
-
52092
- /**
52093
- * Throws a `CanceledError` if cancellation has been requested.
52094
- *
52095
- * @param {Object} config The config that is to be used for the request
52096
- *
52097
- * @returns {void}
52098
- */
52099
- function throwIfCancellationRequested(config) {
52100
- if (config.cancelToken) {
52101
- config.cancelToken.throwIfRequested();
52102
- }
52103
-
52104
- if (config.signal && config.signal.aborted) {
52105
- throw new cancel_CanceledError(null, config);
52106
- }
52107
- }
52108
-
52109
- /**
52110
- * Dispatch a request to the server using the configured adapter.
52111
- *
52112
- * @param {object} config The config that is to be used for the request
52113
- *
52114
- * @returns {Promise} The Promise to be fulfilled
52115
- */
52116
- function dispatchRequest(config) {
52117
- throwIfCancellationRequested(config);
52118
-
52119
- config.headers = core_AxiosHeaders.from(config.headers);
52120
-
52121
- // Transform request data
52122
- config.data = transformData.call(
52123
- config,
52124
- config.transformRequest
52125
- );
52126
-
52127
- if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
52128
- config.headers.setContentType('application/x-www-form-urlencoded', false);
52129
- }
52130
-
52131
- const adapter = adapters.getAdapter(config.adapter || lib_defaults.adapter);
52132
-
52133
- return adapter(config).then(function onAdapterResolution(response) {
52134
- throwIfCancellationRequested(config);
52135
-
52136
- // Transform response data
52137
- response.data = transformData.call(
52138
- config,
52139
- config.transformResponse,
52140
- response
52141
- );
52142
-
52143
- response.headers = core_AxiosHeaders.from(response.headers);
52144
-
52145
- return response;
52146
- }, function onAdapterRejection(reason) {
52147
- if (!isCancel(reason)) {
52148
- throwIfCancellationRequested(config);
52149
-
52150
- // Transform response data
52151
- if (reason && reason.response) {
52152
- reason.response.data = transformData.call(
52153
- config,
52154
- config.transformResponse,
52155
- reason.response
52156
- );
52157
- reason.response.headers = core_AxiosHeaders.from(reason.response.headers);
52158
- }
52159
- }
52160
-
52161
- return Promise.reject(reason);
52162
- });
52163
- }
52164
-
52165
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/core/mergeConfig.js
52166
-
52167
-
52168
-
52169
-
52170
-
52171
- const headersToObject = (thing) => thing instanceof core_AxiosHeaders ? thing.toJSON() : thing;
52172
-
52173
- /**
52174
- * Config-specific merge-function which creates a new config-object
52175
- * by merging two configuration objects together.
52176
- *
52177
- * @param {Object} config1
52178
- * @param {Object} config2
52179
- *
52180
- * @returns {Object} New object resulting from merging config2 to config1
52181
- */
52182
- function mergeConfig(config1, config2) {
52183
- // eslint-disable-next-line no-param-reassign
52184
- config2 = config2 || {};
52185
- const config = {};
52186
-
52187
- function getMergedValue(target, source, caseless) {
52188
- if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
52189
- return utils.merge.call({caseless}, target, source);
52190
- } else if (utils.isPlainObject(source)) {
52191
- return utils.merge({}, source);
52192
- } else if (utils.isArray(source)) {
52193
- return source.slice();
52194
- }
52195
- return source;
52196
- }
52197
-
52198
- // eslint-disable-next-line consistent-return
52199
- function mergeDeepProperties(a, b, caseless) {
52200
- if (!utils.isUndefined(b)) {
52201
- return getMergedValue(a, b, caseless);
52202
- } else if (!utils.isUndefined(a)) {
52203
- return getMergedValue(undefined, a, caseless);
52204
- }
52205
- }
52206
-
52207
- // eslint-disable-next-line consistent-return
52208
- function valueFromConfig2(a, b) {
52209
- if (!utils.isUndefined(b)) {
52210
- return getMergedValue(undefined, b);
52211
- }
52212
- }
52213
-
52214
- // eslint-disable-next-line consistent-return
52215
- function defaultToConfig2(a, b) {
52216
- if (!utils.isUndefined(b)) {
52217
- return getMergedValue(undefined, b);
52218
- } else if (!utils.isUndefined(a)) {
52219
- return getMergedValue(undefined, a);
52220
- }
52221
- }
52222
-
52223
- // eslint-disable-next-line consistent-return
52224
- function mergeDirectKeys(a, b, prop) {
52225
- if (prop in config2) {
52226
- return getMergedValue(a, b);
52227
- } else if (prop in config1) {
52228
- return getMergedValue(undefined, a);
52229
- }
52230
- }
52231
-
52232
- const mergeMap = {
52233
- url: valueFromConfig2,
52234
- method: valueFromConfig2,
52235
- data: valueFromConfig2,
52236
- baseURL: defaultToConfig2,
52237
- transformRequest: defaultToConfig2,
52238
- transformResponse: defaultToConfig2,
52239
- paramsSerializer: defaultToConfig2,
52240
- timeout: defaultToConfig2,
52241
- timeoutMessage: defaultToConfig2,
52242
- withCredentials: defaultToConfig2,
52243
- withXSRFToken: defaultToConfig2,
52244
- adapter: defaultToConfig2,
52245
- responseType: defaultToConfig2,
52246
- xsrfCookieName: defaultToConfig2,
52247
- xsrfHeaderName: defaultToConfig2,
52248
- onUploadProgress: defaultToConfig2,
52249
- onDownloadProgress: defaultToConfig2,
52250
- decompress: defaultToConfig2,
52251
- maxContentLength: defaultToConfig2,
52252
- maxBodyLength: defaultToConfig2,
52253
- beforeRedirect: defaultToConfig2,
52254
- transport: defaultToConfig2,
52255
- httpAgent: defaultToConfig2,
52256
- httpsAgent: defaultToConfig2,
52257
- cancelToken: defaultToConfig2,
52258
- socketPath: defaultToConfig2,
52259
- responseEncoding: defaultToConfig2,
52260
- validateStatus: mergeDirectKeys,
52261
- headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
52262
- };
52263
-
52264
- utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
52265
- const merge = mergeMap[prop] || mergeDeepProperties;
52266
- const configValue = merge(config1[prop], config2[prop], prop);
52267
- (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
52268
- });
52269
-
52270
- return config;
52271
- }
52272
-
52273
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/env/data.js
52274
- const VERSION = "1.6.2";
52275
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/helpers/validator.js
52276
-
52277
-
52278
-
52279
-
52280
-
52281
- const validators = {};
52282
-
52283
- // eslint-disable-next-line func-names
52284
- ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {
52285
- validators[type] = function validator(thing) {
52286
- return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
52287
- };
52288
- });
52289
-
52290
- const deprecatedWarnings = {};
52291
-
52292
- /**
52293
- * Transitional option validator
52294
- *
52295
- * @param {function|boolean?} validator - set to false if the transitional option has been removed
52296
- * @param {string?} version - deprecated version / removed since version
52297
- * @param {string?} message - some message with additional info
52298
- *
52299
- * @returns {function}
52300
- */
52301
- validators.transitional = function transitional(validator, version, message) {
52302
- function formatMessage(opt, desc) {
52303
- return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
52304
- }
52305
-
52306
- // eslint-disable-next-line func-names
52307
- return (value, opt, opts) => {
52308
- if (validator === false) {
52309
- throw new core_AxiosError(
52310
- formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
52311
- core_AxiosError.ERR_DEPRECATED
52312
- );
52313
- }
52314
-
52315
- if (version && !deprecatedWarnings[opt]) {
52316
- deprecatedWarnings[opt] = true;
52317
- // eslint-disable-next-line no-console
52318
- console.warn(
52319
- formatMessage(
52320
- opt,
52321
- ' has been deprecated since v' + version + ' and will be removed in the near future'
52322
- )
52323
- );
52324
- }
52325
-
52326
- return validator ? validator(value, opt, opts) : true;
52327
- };
52328
- };
52329
-
52330
- /**
52331
- * Assert object's properties type
52332
- *
52333
- * @param {object} options
52334
- * @param {object} schema
52335
- * @param {boolean?} allowUnknown
52336
- *
52337
- * @returns {object}
52338
- */
52339
-
52340
- function assertOptions(options, schema, allowUnknown) {
52341
- if (typeof options !== 'object') {
52342
- throw new core_AxiosError('options must be an object', core_AxiosError.ERR_BAD_OPTION_VALUE);
52343
- }
52344
- const keys = Object.keys(options);
52345
- let i = keys.length;
52346
- while (i-- > 0) {
52347
- const opt = keys[i];
52348
- const validator = schema[opt];
52349
- if (validator) {
52350
- const value = options[opt];
52351
- const result = value === undefined || validator(value, opt, options);
52352
- if (result !== true) {
52353
- throw new core_AxiosError('option ' + opt + ' must be ' + result, core_AxiosError.ERR_BAD_OPTION_VALUE);
52354
- }
52355
- continue;
52356
- }
52357
- if (allowUnknown !== true) {
52358
- throw new core_AxiosError('Unknown option ' + opt, core_AxiosError.ERR_BAD_OPTION);
52359
- }
52360
- }
52361
- }
52362
-
52363
- /* harmony default export */ const validator = ({
52364
- assertOptions,
52365
- validators
52366
- });
52367
-
52368
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/core/Axios.js
52369
-
52370
-
52371
-
52372
-
52373
-
52374
-
52375
-
52376
-
52377
-
52378
-
52379
-
52380
- const Axios_validators = validator.validators;
52381
-
52382
- /**
52383
- * Create a new instance of Axios
52384
- *
52385
- * @param {Object} instanceConfig The default config for the instance
52386
- *
52387
- * @return {Axios} A new instance of Axios
52388
- */
52389
- class Axios {
52390
- constructor(instanceConfig) {
52391
- this.defaults = instanceConfig;
52392
- this.interceptors = {
52393
- request: new core_InterceptorManager(),
52394
- response: new core_InterceptorManager()
52395
- };
52396
- }
52397
-
52398
- /**
52399
- * Dispatch a request
52400
- *
52401
- * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
52402
- * @param {?Object} config
52403
- *
52404
- * @returns {Promise} The Promise to be fulfilled
52405
- */
52406
- request(configOrUrl, config) {
52407
- /*eslint no-param-reassign:0*/
52408
- // Allow for axios('example/url'[, config]) a la fetch API
52409
- if (typeof configOrUrl === 'string') {
52410
- config = config || {};
52411
- config.url = configOrUrl;
52412
- } else {
52413
- config = configOrUrl || {};
52414
- }
52415
-
52416
- config = mergeConfig(this.defaults, config);
52417
-
52418
- const {transitional, paramsSerializer, headers} = config;
52419
-
52420
- if (transitional !== undefined) {
52421
- validator.assertOptions(transitional, {
52422
- silentJSONParsing: Axios_validators.transitional(Axios_validators.boolean),
52423
- forcedJSONParsing: Axios_validators.transitional(Axios_validators.boolean),
52424
- clarifyTimeoutError: Axios_validators.transitional(Axios_validators.boolean)
52425
- }, false);
52426
- }
52427
-
52428
- if (paramsSerializer != null) {
52429
- if (utils.isFunction(paramsSerializer)) {
52430
- config.paramsSerializer = {
52431
- serialize: paramsSerializer
52432
- }
52433
- } else {
52434
- validator.assertOptions(paramsSerializer, {
52435
- encode: Axios_validators.function,
52436
- serialize: Axios_validators.function
52437
- }, true);
52438
- }
52439
- }
52440
-
52441
- // Set config.method
52442
- config.method = (config.method || this.defaults.method || 'get').toLowerCase();
52443
-
52444
- // Flatten headers
52445
- let contextHeaders = headers && utils.merge(
52446
- headers.common,
52447
- headers[config.method]
52448
- );
52449
-
52450
- headers && utils.forEach(
52451
- ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
52452
- (method) => {
52453
- delete headers[method];
52454
- }
52455
- );
52456
-
52457
- config.headers = core_AxiosHeaders.concat(contextHeaders, headers);
52458
-
52459
- // filter out skipped interceptors
52460
- const requestInterceptorChain = [];
52461
- let synchronousRequestInterceptors = true;
52462
- this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
52463
- if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
52464
- return;
52465
- }
52466
-
52467
- synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
52468
-
52469
- requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
52470
- });
52471
-
52472
- const responseInterceptorChain = [];
52473
- this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
52474
- responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
52475
- });
52476
-
52477
- let promise;
52478
- let i = 0;
52479
- let len;
52480
-
52481
- if (!synchronousRequestInterceptors) {
52482
- const chain = [dispatchRequest.bind(this), undefined];
52483
- chain.unshift.apply(chain, requestInterceptorChain);
52484
- chain.push.apply(chain, responseInterceptorChain);
52485
- len = chain.length;
52486
-
52487
- promise = Promise.resolve(config);
52488
-
52489
- while (i < len) {
52490
- promise = promise.then(chain[i++], chain[i++]);
52491
- }
52492
-
52493
- return promise;
52494
- }
52495
-
52496
- len = requestInterceptorChain.length;
52497
-
52498
- let newConfig = config;
52499
-
52500
- i = 0;
52501
-
52502
- while (i < len) {
52503
- const onFulfilled = requestInterceptorChain[i++];
52504
- const onRejected = requestInterceptorChain[i++];
52505
- try {
52506
- newConfig = onFulfilled(newConfig);
52507
- } catch (error) {
52508
- onRejected.call(this, error);
52509
- break;
52510
- }
52511
- }
52512
-
52513
- try {
52514
- promise = dispatchRequest.call(this, newConfig);
52515
- } catch (error) {
52516
- return Promise.reject(error);
52517
- }
52518
-
52519
- i = 0;
52520
- len = responseInterceptorChain.length;
52521
-
52522
- while (i < len) {
52523
- promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
52524
- }
52525
-
52526
- return promise;
52527
- }
52528
-
52529
- getUri(config) {
52530
- config = mergeConfig(this.defaults, config);
52531
- const fullPath = buildFullPath(config.baseURL, config.url);
52532
- return buildURL(fullPath, config.params, config.paramsSerializer);
52533
- }
52534
- }
52535
-
52536
- // Provide aliases for supported request methods
52537
- utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
52538
- /*eslint func-names:0*/
52539
- Axios.prototype[method] = function(url, config) {
52540
- return this.request(mergeConfig(config || {}, {
52541
- method,
52542
- url,
52543
- data: (config || {}).data
52544
- }));
52545
- };
52546
- });
52547
-
52548
- utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
52549
- /*eslint func-names:0*/
52550
-
52551
- function generateHTTPMethod(isForm) {
52552
- return function httpMethod(url, data, config) {
52553
- return this.request(mergeConfig(config || {}, {
52554
- method,
52555
- headers: isForm ? {
52556
- 'Content-Type': 'multipart/form-data'
52557
- } : {},
52558
- url,
52559
- data
52560
- }));
52561
- };
52562
- }
52563
-
52564
- Axios.prototype[method] = generateHTTPMethod();
52565
-
52566
- Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
52567
- });
52568
-
52569
- /* harmony default export */ const core_Axios = (Axios);
52570
-
52571
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/cancel/CancelToken.js
52572
-
52573
-
52574
-
52575
-
52576
- /**
52577
- * A `CancelToken` is an object that can be used to request cancellation of an operation.
52578
- *
52579
- * @param {Function} executor The executor function.
52580
- *
52581
- * @returns {CancelToken}
52582
- */
52583
- class CancelToken {
52584
- constructor(executor) {
52585
- if (typeof executor !== 'function') {
52586
- throw new TypeError('executor must be a function.');
52587
- }
52588
-
52589
- let resolvePromise;
52590
-
52591
- this.promise = new Promise(function promiseExecutor(resolve) {
52592
- resolvePromise = resolve;
52593
- });
52594
-
52595
- const token = this;
52596
-
52597
- // eslint-disable-next-line func-names
52598
- this.promise.then(cancel => {
52599
- if (!token._listeners) return;
52600
-
52601
- let i = token._listeners.length;
52602
-
52603
- while (i-- > 0) {
52604
- token._listeners[i](cancel);
52605
- }
52606
- token._listeners = null;
52607
- });
52608
-
52609
- // eslint-disable-next-line func-names
52610
- this.promise.then = onfulfilled => {
52611
- let _resolve;
52612
- // eslint-disable-next-line func-names
52613
- const promise = new Promise(resolve => {
52614
- token.subscribe(resolve);
52615
- _resolve = resolve;
52616
- }).then(onfulfilled);
52617
-
52618
- promise.cancel = function reject() {
52619
- token.unsubscribe(_resolve);
52620
- };
52621
-
52622
- return promise;
52623
- };
52624
-
52625
- executor(function cancel(message, config, request) {
52626
- if (token.reason) {
52627
- // Cancellation has already been requested
52628
- return;
52629
- }
52630
-
52631
- token.reason = new cancel_CanceledError(message, config, request);
52632
- resolvePromise(token.reason);
52633
- });
52634
- }
52635
-
52636
- /**
52637
- * Throws a `CanceledError` if cancellation has been requested.
52638
- */
52639
- throwIfRequested() {
52640
- if (this.reason) {
52641
- throw this.reason;
52642
- }
52643
- }
52644
-
52645
- /**
52646
- * Subscribe to the cancel signal
52647
- */
52648
-
52649
- subscribe(listener) {
52650
- if (this.reason) {
52651
- listener(this.reason);
52652
- return;
52653
- }
52654
-
52655
- if (this._listeners) {
52656
- this._listeners.push(listener);
52657
- } else {
52658
- this._listeners = [listener];
52659
- }
52660
- }
52661
-
52662
- /**
52663
- * Unsubscribe from the cancel signal
52664
- */
52665
-
52666
- unsubscribe(listener) {
52667
- if (!this._listeners) {
52668
- return;
52669
- }
52670
- const index = this._listeners.indexOf(listener);
52671
- if (index !== -1) {
52672
- this._listeners.splice(index, 1);
52673
- }
52674
- }
52675
-
52676
- /**
52677
- * Returns an object that contains a new `CancelToken` and a function that, when called,
52678
- * cancels the `CancelToken`.
52679
- */
52680
- static source() {
52681
- let cancel;
52682
- const token = new CancelToken(function executor(c) {
52683
- cancel = c;
52684
- });
52685
- return {
52686
- token,
52687
- cancel
52688
- };
52689
- }
52690
- }
52691
-
52692
- /* harmony default export */ const cancel_CancelToken = (CancelToken);
52693
-
52694
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/helpers/spread.js
52695
-
52696
-
52697
- /**
52698
- * Syntactic sugar for invoking a function and expanding an array for arguments.
52699
- *
52700
- * Common use case would be to use `Function.prototype.apply`.
52701
- *
52702
- * ```js
52703
- * function f(x, y, z) {}
52704
- * var args = [1, 2, 3];
52705
- * f.apply(null, args);
52706
- * ```
52707
- *
52708
- * With `spread` this example can be re-written.
52709
- *
52710
- * ```js
52711
- * spread(function(x, y, z) {})([1, 2, 3]);
52712
- * ```
52713
- *
52714
- * @param {Function} callback
52715
- *
52716
- * @returns {Function}
52717
- */
52718
- function spread(callback) {
52719
- return function wrap(arr) {
52720
- return callback.apply(null, arr);
52721
- };
52722
- }
52723
-
52724
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/helpers/isAxiosError.js
52725
-
52726
-
52727
-
52728
-
52729
- /**
52730
- * Determines whether the payload is an error thrown by Axios
52731
- *
52732
- * @param {*} payload The value to test
52733
- *
52734
- * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
52735
- */
52736
- function isAxiosError(payload) {
52737
- return utils.isObject(payload) && (payload.isAxiosError === true);
52738
- }
52739
-
52740
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/helpers/HttpStatusCode.js
52741
- const HttpStatusCode = {
52742
- Continue: 100,
52743
- SwitchingProtocols: 101,
52744
- Processing: 102,
52745
- EarlyHints: 103,
52746
- Ok: 200,
52747
- Created: 201,
52748
- Accepted: 202,
52749
- NonAuthoritativeInformation: 203,
52750
- NoContent: 204,
52751
- ResetContent: 205,
52752
- PartialContent: 206,
52753
- MultiStatus: 207,
52754
- AlreadyReported: 208,
52755
- ImUsed: 226,
52756
- MultipleChoices: 300,
52757
- MovedPermanently: 301,
52758
- Found: 302,
52759
- SeeOther: 303,
52760
- NotModified: 304,
52761
- UseProxy: 305,
52762
- Unused: 306,
52763
- TemporaryRedirect: 307,
52764
- PermanentRedirect: 308,
52765
- BadRequest: 400,
52766
- Unauthorized: 401,
52767
- PaymentRequired: 402,
52768
- Forbidden: 403,
52769
- NotFound: 404,
52770
- MethodNotAllowed: 405,
52771
- NotAcceptable: 406,
52772
- ProxyAuthenticationRequired: 407,
52773
- RequestTimeout: 408,
52774
- Conflict: 409,
52775
- Gone: 410,
52776
- LengthRequired: 411,
52777
- PreconditionFailed: 412,
52778
- PayloadTooLarge: 413,
52779
- UriTooLong: 414,
52780
- UnsupportedMediaType: 415,
52781
- RangeNotSatisfiable: 416,
52782
- ExpectationFailed: 417,
52783
- ImATeapot: 418,
52784
- MisdirectedRequest: 421,
52785
- UnprocessableEntity: 422,
52786
- Locked: 423,
52787
- FailedDependency: 424,
52788
- TooEarly: 425,
52789
- UpgradeRequired: 426,
52790
- PreconditionRequired: 428,
52791
- TooManyRequests: 429,
52792
- RequestHeaderFieldsTooLarge: 431,
52793
- UnavailableForLegalReasons: 451,
52794
- InternalServerError: 500,
52795
- NotImplemented: 501,
52796
- BadGateway: 502,
52797
- ServiceUnavailable: 503,
52798
- GatewayTimeout: 504,
52799
- HttpVersionNotSupported: 505,
52800
- VariantAlsoNegotiates: 506,
52801
- InsufficientStorage: 507,
52802
- LoopDetected: 508,
52803
- NotExtended: 510,
52804
- NetworkAuthenticationRequired: 511,
52805
- };
52806
-
52807
- Object.entries(HttpStatusCode).forEach(([key, value]) => {
52808
- HttpStatusCode[value] = key;
52809
- });
52810
-
52811
- /* harmony default export */ const helpers_HttpStatusCode = (HttpStatusCode);
52812
-
52813
- ;// CONCATENATED MODULE: ../node_modules/axios/lib/axios.js
52814
-
52815
-
52816
-
52817
-
52818
-
52819
-
52820
-
52821
-
52822
-
52823
-
52824
-
52825
-
52826
-
52827
-
52828
-
52829
-
52830
-
52831
-
52832
-
52833
-
52834
- /**
52835
- * Create an instance of Axios
52836
- *
52837
- * @param {Object} defaultConfig The default config for the instance
52838
- *
52839
- * @returns {Axios} A new instance of Axios
52840
- */
52841
- function createInstance(defaultConfig) {
52842
- const context = new core_Axios(defaultConfig);
52843
- const instance = bind_bind(core_Axios.prototype.request, context);
52844
-
52845
- // Copy axios.prototype to instance
52846
- utils.extend(instance, core_Axios.prototype, context, {allOwnKeys: true});
52847
-
52848
- // Copy context to instance
52849
- utils.extend(instance, context, null, {allOwnKeys: true});
52850
-
52851
- // Factory for creating new instances
52852
- instance.create = function create(instanceConfig) {
52853
- return createInstance(mergeConfig(defaultConfig, instanceConfig));
52854
- };
52855
-
52856
- return instance;
52857
- }
52858
-
52859
- // Create the default instance to be exported
52860
- const axios = createInstance(lib_defaults);
52861
-
52862
- // Expose Axios class to allow class inheritance
52863
- axios.Axios = core_Axios;
52864
-
52865
- // Expose Cancel & CancelToken
52866
- axios.CanceledError = cancel_CanceledError;
52867
- axios.CancelToken = cancel_CancelToken;
52868
- axios.isCancel = isCancel;
52869
- axios.VERSION = VERSION;
52870
- axios.toFormData = helpers_toFormData;
52871
-
52872
- // Expose AxiosError class
52873
- axios.AxiosError = core_AxiosError;
52874
-
52875
- // alias for CanceledError for backward compatibility
52876
- axios.Cancel = axios.CanceledError;
52877
-
52878
- // Expose all/spread
52879
- axios.all = function all(promises) {
52880
- return Promise.all(promises);
52881
- };
52882
-
52883
- axios.spread = spread;
52884
-
52885
- // Expose isAxiosError
52886
- axios.isAxiosError = isAxiosError;
52887
-
52888
- // Expose mergeConfig
52889
- axios.mergeConfig = mergeConfig;
52890
-
52891
- axios.AxiosHeaders = core_AxiosHeaders;
52892
-
52893
- axios.formToJSON = thing => helpers_formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
52894
-
52895
- axios.getAdapter = adapters.getAdapter;
52896
-
52897
- axios.HttpStatusCode = helpers_HttpStatusCode;
52898
-
52899
- axios.default = axios;
52900
-
52901
- // this module should only have a default export
52902
- /* harmony default export */ const lib_axios = (axios);
52903
-
52904
- ;// CONCATENATED MODULE: ../node_modules/axios/index.js
52905
-
52906
-
52907
- // This module is intended to unwrap Axios default export as named.
52908
- // Keep top-level export same with static properties
52909
- // so that it can keep same with es module or cjs
52910
- const {
52911
- Axios: axios_Axios,
52912
- AxiosError: axios_AxiosError,
52913
- CanceledError: axios_CanceledError,
52914
- isCancel: axios_isCancel,
52915
- CancelToken: axios_CancelToken,
52916
- VERSION: axios_VERSION,
52917
- all: axios_all,
52918
- Cancel,
52919
- isAxiosError: axios_isAxiosError,
52920
- spread: axios_spread,
52921
- toFormData: axios_toFormData,
52922
- AxiosHeaders: axios_AxiosHeaders,
52923
- HttpStatusCode: axios_HttpStatusCode,
52924
- formToJSON,
52925
- getAdapter,
52926
- mergeConfig: axios_mergeConfig
52927
- } = lib_axios;
52928
-
52929
-
52930
-
49421
+ ;// CONCATENATED MODULE: external "axios"
49422
+ const external_axios_namespaceObject = require("axios");
49423
+ var external_axios_default = /*#__PURE__*/__webpack_require__.n(external_axios_namespaceObject);
52931
49424
  ;// CONCATENATED MODULE: ./src/rpc.manager.ts
52932
49425
 
52933
49426
 
@@ -53013,20 +49506,20 @@ class RpcManager {
53013
49506
  });
53014
49507
  formData.append('body', serialization_serializeObj(message));
53015
49508
  // Make the axios call
53016
- axiosResponse = await lib_axios.post(url, formData, {
49509
+ axiosResponse = await external_axios_default().post(url, formData, {
53017
49510
  headers: Object.assign({}, headers),
53018
49511
  responseType: 'text',
53019
49512
  });
53020
49513
  }
53021
49514
  else {
53022
- axiosResponse = await lib_axios.post(url, serialization_serializeObj(message), {
49515
+ axiosResponse = await external_axios_default().post(url, serialization_serializeObj(message), {
53023
49516
  headers: Object.assign(Object.assign({}, headers), { 'Content-Type': 'application/json' }),
53024
49517
  responseType: 'text',
53025
49518
  });
53026
49519
  }
53027
49520
  }
53028
49521
  catch (e) {
53029
- if (e instanceof axios_AxiosError) {
49522
+ if (e instanceof external_axios_namespaceObject.AxiosError) {
53030
49523
  const response = e.response;
53031
49524
  if (!response)
53032
49525
  throw e;