@indfnd/utils 0.1.32 → 0.1.35

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.
@@ -96,8 +96,8 @@ const INDEX_DESC_KEY = "indexDesc";
96
96
  function getIndexDescCache() {
97
97
  return getLocalStorage(INDEX_DESC_KEY);
98
98
  }
99
- function setIndexDescCache(data2) {
100
- setLocalStorage(INDEX_DESC_KEY, data2);
99
+ function setIndexDescCache(data) {
100
+ setLocalStorage(INDEX_DESC_KEY, data);
101
101
  }
102
102
  function clearIndexDescCache() {
103
103
  removeLocalStorage(INDEX_DESC_KEY);
@@ -106,8 +106,8 @@ const PERMISSION_KEY = "ibp-sc-permission";
106
106
  function getPermissionCache() {
107
107
  return getSessionStorage(PERMISSION_KEY);
108
108
  }
109
- function setPermissionCache(data2) {
110
- setSessionStorage(PERMISSION_KEY, data2);
109
+ function setPermissionCache(data) {
110
+ setSessionStorage(PERMISSION_KEY, data);
111
111
  }
112
112
  function clearPermissionCache() {
113
113
  removeSessionStorage(PERMISSION_KEY);
@@ -116,8 +116,8 @@ const USER_INFO_KEY = "lambo-userInfo";
116
116
  function getUserInfoCache() {
117
117
  return getSessionStorage(USER_INFO_KEY);
118
118
  }
119
- function setUserInfoCache(data2) {
120
- setSessionStorage(USER_INFO_KEY, data2);
119
+ function setUserInfoCache(data) {
120
+ setSessionStorage(USER_INFO_KEY, data);
121
121
  }
122
122
  function clearUserInfoCache() {
123
123
  removeSessionStorage(USER_INFO_KEY);
@@ -366,10 +366,10 @@ InterceptorManager$1.prototype.forEach = function forEach2(fn) {
366
366
  var InterceptorManager_1 = InterceptorManager$1;
367
367
  var utils$d = utils$g;
368
368
  var normalizeHeaderName$1 = function normalizeHeaderName(headers, normalizedName) {
369
- utils$d.forEach(headers, function processHeader(value, name) {
370
- if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
369
+ utils$d.forEach(headers, function processHeader(value, name2) {
370
+ if (name2 !== normalizedName && name2.toUpperCase() === normalizedName.toUpperCase()) {
371
371
  headers[normalizedName] = value;
372
- delete headers[name];
372
+ delete headers[name2];
373
373
  }
374
374
  });
375
375
  };
@@ -392,8 +392,7 @@ var enhanceError$2 = function enhanceError(error, config2, code, request2, respo
392
392
  columnNumber: this.columnNumber,
393
393
  stack: this.stack,
394
394
  config: this.config,
395
- code: this.code,
396
- status: this.response && this.response.status ? this.response.status : null
395
+ code: this.code
397
396
  };
398
397
  };
399
398
  return error;
@@ -421,9 +420,9 @@ var settle$1 = function settle(resolve, reject, response) {
421
420
  var utils$c = utils$g;
422
421
  var cookies$1 = utils$c.isStandardBrowserEnv() ? function standardBrowserEnv() {
423
422
  return {
424
- write: function write(name, value, expires, path, domain, secure) {
423
+ write: function write(name2, value, expires, path, domain, secure) {
425
424
  var cookie = [];
426
- cookie.push(name + "=" + encodeURIComponent(value));
425
+ cookie.push(name2 + "=" + encodeURIComponent(value));
427
426
  if (utils$c.isNumber(expires)) {
428
427
  cookie.push("expires=" + new Date(expires).toGMTString());
429
428
  }
@@ -438,12 +437,12 @@ var cookies$1 = utils$c.isStandardBrowserEnv() ? function standardBrowserEnv() {
438
437
  }
439
438
  document.cookie = cookie.join("; ");
440
439
  },
441
- read: function read(name) {
442
- var match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
440
+ read: function read(name2) {
441
+ var match = document.cookie.match(new RegExp("(^|;\\s*)(" + name2 + ")=([^;]*)"));
443
442
  return match ? decodeURIComponent(match[3]) : null;
444
443
  },
445
- remove: function remove(name) {
446
- this.write(name, "", Date.now() - 864e5);
444
+ remove: function remove(name2) {
445
+ this.write(name2, "", Date.now() - 864e5);
447
446
  }
448
447
  };
449
448
  }() : function nonStandardBrowserEnv() {
@@ -549,14 +548,6 @@ var isURLSameOrigin$1 = utils$a.isStandardBrowserEnv() ? function standardBrowse
549
548
  return true;
550
549
  };
551
550
  }();
552
- function Cancel$3(message) {
553
- this.message = message;
554
- }
555
- Cancel$3.prototype.toString = function toString() {
556
- return "Cancel" + (this.message ? ": " + this.message : "");
557
- };
558
- Cancel$3.prototype.__CANCEL__ = true;
559
- var Cancel_1 = Cancel$3;
560
551
  var utils$9 = utils$g;
561
552
  var settle2 = settle$1;
562
553
  var cookies = cookies$1;
@@ -565,22 +556,11 @@ var buildFullPath2 = buildFullPath$1;
565
556
  var parseHeaders2 = parseHeaders$1;
566
557
  var isURLSameOrigin = isURLSameOrigin$1;
567
558
  var createError2 = createError$2;
568
- var defaults$6 = defaults_1;
569
- var Cancel$2 = Cancel_1;
570
559
  var xhr = function xhrAdapter(config2) {
571
560
  return new Promise(function dispatchXhrRequest(resolve, reject) {
572
561
  var requestData = config2.data;
573
562
  var requestHeaders = config2.headers;
574
563
  var responseType = config2.responseType;
575
- var onCanceled;
576
- function done() {
577
- if (config2.cancelToken) {
578
- config2.cancelToken.unsubscribe(onCanceled);
579
- }
580
- if (config2.signal) {
581
- config2.signal.removeEventListener("abort", onCanceled);
582
- }
583
- }
584
564
  if (utils$9.isFormData(requestData)) {
585
565
  delete requestHeaders["Content-Type"];
586
566
  }
@@ -607,13 +587,7 @@ var xhr = function xhrAdapter(config2) {
607
587
  config: config2,
608
588
  request: request2
609
589
  };
610
- settle2(function _resolve(value) {
611
- resolve(value);
612
- done();
613
- }, function _reject(err) {
614
- reject(err);
615
- done();
616
- }, response);
590
+ settle2(resolve, reject, response);
617
591
  request2 = null;
618
592
  }
619
593
  if ("onloadend" in request2) {
@@ -641,15 +615,14 @@ var xhr = function xhrAdapter(config2) {
641
615
  request2 = null;
642
616
  };
643
617
  request2.ontimeout = function handleTimeout() {
644
- var timeoutErrorMessage = config2.timeout ? "timeout of " + config2.timeout + "ms exceeded" : "timeout exceeded";
645
- var transitional2 = config2.transitional || defaults$6.transitional;
618
+ var timeoutErrorMessage = "timeout of " + config2.timeout + "ms exceeded";
646
619
  if (config2.timeoutErrorMessage) {
647
620
  timeoutErrorMessage = config2.timeoutErrorMessage;
648
621
  }
649
622
  reject(createError2(
650
623
  timeoutErrorMessage,
651
624
  config2,
652
- transitional2.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED",
625
+ config2.transitional && config2.transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED",
653
626
  request2
654
627
  ));
655
628
  request2 = null;
@@ -681,19 +654,15 @@ var xhr = function xhrAdapter(config2) {
681
654
  if (typeof config2.onUploadProgress === "function" && request2.upload) {
682
655
  request2.upload.addEventListener("progress", config2.onUploadProgress);
683
656
  }
684
- if (config2.cancelToken || config2.signal) {
685
- onCanceled = function(cancel) {
657
+ if (config2.cancelToken) {
658
+ config2.cancelToken.promise.then(function onCanceled(cancel) {
686
659
  if (!request2) {
687
660
  return;
688
661
  }
689
- reject(!cancel || cancel && cancel.type ? new Cancel$2("canceled") : cancel);
690
662
  request2.abort();
663
+ reject(cancel);
691
664
  request2 = null;
692
- };
693
- config2.cancelToken && config2.cancelToken.subscribe(onCanceled);
694
- if (config2.signal) {
695
- config2.signal.aborted ? onCanceled() : config2.signal.addEventListener("abort", onCanceled);
696
- }
665
+ });
697
666
  }
698
667
  if (!requestData) {
699
668
  requestData = null;
@@ -741,33 +710,33 @@ var defaults$5 = {
741
710
  clarifyTimeoutError: false
742
711
  },
743
712
  adapter: getDefaultAdapter(),
744
- transformRequest: [function transformRequest(data2, headers) {
713
+ transformRequest: [function transformRequest(data, headers) {
745
714
  normalizeHeaderName2(headers, "Accept");
746
715
  normalizeHeaderName2(headers, "Content-Type");
747
- if (utils$8.isFormData(data2) || utils$8.isArrayBuffer(data2) || utils$8.isBuffer(data2) || utils$8.isStream(data2) || utils$8.isFile(data2) || utils$8.isBlob(data2)) {
748
- return data2;
716
+ if (utils$8.isFormData(data) || utils$8.isArrayBuffer(data) || utils$8.isBuffer(data) || utils$8.isStream(data) || utils$8.isFile(data) || utils$8.isBlob(data)) {
717
+ return data;
749
718
  }
750
- if (utils$8.isArrayBufferView(data2)) {
751
- return data2.buffer;
719
+ if (utils$8.isArrayBufferView(data)) {
720
+ return data.buffer;
752
721
  }
753
- if (utils$8.isURLSearchParams(data2)) {
722
+ if (utils$8.isURLSearchParams(data)) {
754
723
  setContentTypeIfUnset(headers, "application/x-www-form-urlencoded;charset=utf-8");
755
- return data2.toString();
724
+ return data.toString();
756
725
  }
757
- if (utils$8.isObject(data2) || headers && headers["Content-Type"] === "application/json") {
726
+ if (utils$8.isObject(data) || headers && headers["Content-Type"] === "application/json") {
758
727
  setContentTypeIfUnset(headers, "application/json");
759
- return stringifySafely(data2);
728
+ return stringifySafely(data);
760
729
  }
761
- return data2;
730
+ return data;
762
731
  }],
763
- transformResponse: [function transformResponse(data2) {
764
- var transitional2 = this.transitional || defaults$5.transitional;
732
+ transformResponse: [function transformResponse(data) {
733
+ var transitional2 = this.transitional;
765
734
  var silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
766
735
  var forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
767
736
  var strictJSONParsing = !silentJSONParsing && this.responseType === "json";
768
- if (strictJSONParsing || forcedJSONParsing && utils$8.isString(data2) && data2.length) {
737
+ if (strictJSONParsing || forcedJSONParsing && utils$8.isString(data) && data.length) {
769
738
  try {
770
- return JSON.parse(data2);
739
+ return JSON.parse(data);
771
740
  } catch (e) {
772
741
  if (strictJSONParsing) {
773
742
  if (e.name === "SyntaxError") {
@@ -777,7 +746,7 @@ var defaults$5 = {
777
746
  }
778
747
  }
779
748
  }
780
- return data2;
749
+ return data;
781
750
  }],
782
751
  timeout: 0,
783
752
  xsrfCookieName: "XSRF-TOKEN",
@@ -786,11 +755,11 @@ var defaults$5 = {
786
755
  maxBodyLength: -1,
787
756
  validateStatus: function validateStatus(status) {
788
757
  return status >= 200 && status < 300;
789
- },
790
- headers: {
791
- common: {
792
- "Accept": "application/json, text/plain, */*"
793
- }
758
+ }
759
+ };
760
+ defaults$5.headers = {
761
+ common: {
762
+ "Accept": "application/json, text/plain, */*"
794
763
  }
795
764
  };
796
765
  utils$8.forEach(["delete", "get", "head"], function forEachMethodNoData(method) {
@@ -802,12 +771,12 @@ utils$8.forEach(["post", "put", "patch"], function forEachMethodWithData(method)
802
771
  var defaults_1 = defaults$5;
803
772
  var utils$7 = utils$g;
804
773
  var defaults$4 = defaults_1;
805
- var transformData$1 = function transformData(data2, headers, fns) {
774
+ var transformData$1 = function transformData(data, headers, fns) {
806
775
  var context = this || defaults$4;
807
776
  utils$7.forEach(fns, function transform(fn) {
808
- data2 = fn.call(context, data2, headers);
777
+ data = fn.call(context, data, headers);
809
778
  });
810
- return data2;
779
+ return data;
811
780
  };
812
781
  var isCancel$1 = function isCancel(value) {
813
782
  return !!(value && value.__CANCEL__);
@@ -816,14 +785,10 @@ var utils$6 = utils$g;
816
785
  var transformData2 = transformData$1;
817
786
  var isCancel2 = isCancel$1;
818
787
  var defaults$3 = defaults_1;
819
- var Cancel$1 = Cancel_1;
820
788
  function throwIfCancellationRequested(config2) {
821
789
  if (config2.cancelToken) {
822
790
  config2.cancelToken.throwIfRequested();
823
791
  }
824
- if (config2.signal && config2.signal.aborted) {
825
- throw new Cancel$1("canceled");
826
- }
827
792
  }
828
793
  var dispatchRequest$1 = function dispatchRequest(config2) {
829
794
  throwIfCancellationRequested(config2);
@@ -874,6 +839,34 @@ var utils$5 = utils$g;
874
839
  var mergeConfig$2 = function mergeConfig(config1, config2) {
875
840
  config2 = config2 || {};
876
841
  var config3 = {};
842
+ var valueFromConfig2Keys = ["url", "method", "data"];
843
+ var mergeDeepPropertiesKeys = ["headers", "auth", "proxy", "params"];
844
+ var defaultToConfig2Keys = [
845
+ "baseURL",
846
+ "transformRequest",
847
+ "transformResponse",
848
+ "paramsSerializer",
849
+ "timeout",
850
+ "timeoutMessage",
851
+ "withCredentials",
852
+ "adapter",
853
+ "responseType",
854
+ "xsrfCookieName",
855
+ "xsrfHeaderName",
856
+ "onUploadProgress",
857
+ "onDownloadProgress",
858
+ "decompress",
859
+ "maxContentLength",
860
+ "maxBodyLength",
861
+ "maxRedirects",
862
+ "transport",
863
+ "httpAgent",
864
+ "httpsAgent",
865
+ "cancelToken",
866
+ "socketPath",
867
+ "responseEncoding"
868
+ ];
869
+ var directMergeKeys = ["validateStatus"];
877
870
  function getMergedValue(target, source2) {
878
871
  if (utils$5.isPlainObject(target) && utils$5.isPlainObject(source2)) {
879
872
  return utils$5.merge(target, source2);
@@ -886,69 +879,141 @@ var mergeConfig$2 = function mergeConfig(config1, config2) {
886
879
  }
887
880
  function mergeDeepProperties(prop) {
888
881
  if (!utils$5.isUndefined(config2[prop])) {
889
- return getMergedValue(config1[prop], config2[prop]);
882
+ config3[prop] = getMergedValue(config1[prop], config2[prop]);
890
883
  } else if (!utils$5.isUndefined(config1[prop])) {
891
- return getMergedValue(void 0, config1[prop]);
884
+ config3[prop] = getMergedValue(void 0, config1[prop]);
892
885
  }
893
886
  }
894
- function valueFromConfig2(prop) {
887
+ utils$5.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
895
888
  if (!utils$5.isUndefined(config2[prop])) {
896
- return getMergedValue(void 0, config2[prop]);
889
+ config3[prop] = getMergedValue(void 0, config2[prop]);
897
890
  }
898
- }
899
- function defaultToConfig2(prop) {
891
+ });
892
+ utils$5.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
893
+ utils$5.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
900
894
  if (!utils$5.isUndefined(config2[prop])) {
901
- return getMergedValue(void 0, config2[prop]);
895
+ config3[prop] = getMergedValue(void 0, config2[prop]);
902
896
  } else if (!utils$5.isUndefined(config1[prop])) {
903
- return getMergedValue(void 0, config1[prop]);
897
+ config3[prop] = getMergedValue(void 0, config1[prop]);
904
898
  }
905
- }
906
- function mergeDirectKeys(prop) {
899
+ });
900
+ utils$5.forEach(directMergeKeys, function merge3(prop) {
907
901
  if (prop in config2) {
908
- return getMergedValue(config1[prop], config2[prop]);
902
+ config3[prop] = getMergedValue(config1[prop], config2[prop]);
909
903
  } else if (prop in config1) {
910
- return getMergedValue(void 0, config1[prop]);
911
- }
912
- }
913
- var mergeMap = {
914
- "url": valueFromConfig2,
915
- "method": valueFromConfig2,
916
- "data": valueFromConfig2,
917
- "baseURL": defaultToConfig2,
918
- "transformRequest": defaultToConfig2,
919
- "transformResponse": defaultToConfig2,
920
- "paramsSerializer": defaultToConfig2,
921
- "timeout": defaultToConfig2,
922
- "timeoutMessage": defaultToConfig2,
923
- "withCredentials": defaultToConfig2,
924
- "adapter": defaultToConfig2,
925
- "responseType": defaultToConfig2,
926
- "xsrfCookieName": defaultToConfig2,
927
- "xsrfHeaderName": defaultToConfig2,
928
- "onUploadProgress": defaultToConfig2,
929
- "onDownloadProgress": defaultToConfig2,
930
- "decompress": defaultToConfig2,
931
- "maxContentLength": defaultToConfig2,
932
- "maxBodyLength": defaultToConfig2,
933
- "transport": defaultToConfig2,
934
- "httpAgent": defaultToConfig2,
935
- "httpsAgent": defaultToConfig2,
936
- "cancelToken": defaultToConfig2,
937
- "socketPath": defaultToConfig2,
938
- "responseEncoding": defaultToConfig2,
939
- "validateStatus": mergeDirectKeys
940
- };
941
- utils$5.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
942
- var merge3 = mergeMap[prop] || mergeDeepProperties;
943
- var configValue = merge3(prop);
944
- utils$5.isUndefined(configValue) && merge3 !== mergeDirectKeys || (config3[prop] = configValue);
904
+ config3[prop] = getMergedValue(void 0, config1[prop]);
905
+ }
945
906
  });
907
+ var axiosKeys = valueFromConfig2Keys.concat(mergeDeepPropertiesKeys).concat(defaultToConfig2Keys).concat(directMergeKeys);
908
+ var otherKeys = Object.keys(config1).concat(Object.keys(config2)).filter(function filterAxiosKeys(key) {
909
+ return axiosKeys.indexOf(key) === -1;
910
+ });
911
+ utils$5.forEach(otherKeys, mergeDeepProperties);
946
912
  return config3;
947
913
  };
948
- var data = {
949
- "version": "0.24.0"
950
- };
951
- var VERSION = data.version;
914
+ const name = "axios";
915
+ const version = "0.21.4";
916
+ const description = "Promise based HTTP client for the browser and node.js";
917
+ const main = "index.js";
918
+ const scripts = {
919
+ test: "grunt test",
920
+ start: "node ./sandbox/server.js",
921
+ build: "NODE_ENV=production grunt build",
922
+ preversion: "npm test",
923
+ version: "npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",
924
+ postversion: "git push && git push --tags",
925
+ examples: "node ./examples/server.js",
926
+ coveralls: "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
927
+ fix: "eslint --fix lib/**/*.js"
928
+ };
929
+ const repository = {
930
+ type: "git",
931
+ url: "https://github.com/axios/axios.git"
932
+ };
933
+ const keywords = [
934
+ "xhr",
935
+ "http",
936
+ "ajax",
937
+ "promise",
938
+ "node"
939
+ ];
940
+ const author = "Matt Zabriskie";
941
+ const license = "MIT";
942
+ const bugs = {
943
+ url: "https://github.com/axios/axios/issues"
944
+ };
945
+ const homepage = "https://axios-http.com";
946
+ const devDependencies = {
947
+ coveralls: "^3.0.0",
948
+ "es6-promise": "^4.2.4",
949
+ grunt: "^1.3.0",
950
+ "grunt-banner": "^0.6.0",
951
+ "grunt-cli": "^1.2.0",
952
+ "grunt-contrib-clean": "^1.1.0",
953
+ "grunt-contrib-watch": "^1.0.0",
954
+ "grunt-eslint": "^23.0.0",
955
+ "grunt-karma": "^4.0.0",
956
+ "grunt-mocha-test": "^0.13.3",
957
+ "grunt-ts": "^6.0.0-beta.19",
958
+ "grunt-webpack": "^4.0.2",
959
+ "istanbul-instrumenter-loader": "^1.0.0",
960
+ "jasmine-core": "^2.4.1",
961
+ karma: "^6.3.2",
962
+ "karma-chrome-launcher": "^3.1.0",
963
+ "karma-firefox-launcher": "^2.1.0",
964
+ "karma-jasmine": "^1.1.1",
965
+ "karma-jasmine-ajax": "^0.1.13",
966
+ "karma-safari-launcher": "^1.0.0",
967
+ "karma-sauce-launcher": "^4.3.6",
968
+ "karma-sinon": "^1.0.5",
969
+ "karma-sourcemap-loader": "^0.3.8",
970
+ "karma-webpack": "^4.0.2",
971
+ "load-grunt-tasks": "^3.5.2",
972
+ minimist: "^1.2.0",
973
+ mocha: "^8.2.1",
974
+ sinon: "^4.5.0",
975
+ "terser-webpack-plugin": "^4.2.3",
976
+ typescript: "^4.0.5",
977
+ "url-search-params": "^0.10.0",
978
+ webpack: "^4.44.2",
979
+ "webpack-dev-server": "^3.11.0"
980
+ };
981
+ const browser = {
982
+ "./lib/adapters/http.js": "./lib/adapters/xhr.js"
983
+ };
984
+ const jsdelivr = "dist/axios.min.js";
985
+ const unpkg = "dist/axios.min.js";
986
+ const typings = "./index.d.ts";
987
+ const dependencies = {
988
+ "follow-redirects": "^1.14.0"
989
+ };
990
+ const bundlesize = [
991
+ {
992
+ path: "./dist/axios.min.js",
993
+ threshold: "5kB"
994
+ }
995
+ ];
996
+ var require$$0$1 = {
997
+ name,
998
+ version,
999
+ description,
1000
+ main,
1001
+ scripts,
1002
+ repository,
1003
+ keywords,
1004
+ author,
1005
+ license,
1006
+ bugs,
1007
+ homepage,
1008
+ devDependencies,
1009
+ browser,
1010
+ jsdelivr,
1011
+ unpkg,
1012
+ typings,
1013
+ dependencies,
1014
+ bundlesize
1015
+ };
1016
+ var pkg = require$$0$1;
952
1017
  var validators$1 = {};
953
1018
  ["object", "boolean", "number", "function", "string", "symbol"].forEach(function(type, i) {
954
1019
  validators$1[type] = function validator2(thing) {
@@ -956,20 +1021,34 @@ var validators$1 = {};
956
1021
  };
957
1022
  });
958
1023
  var deprecatedWarnings = {};
959
- validators$1.transitional = function transitional(validator2, version, message) {
1024
+ var currentVerArr = pkg.version.split(".");
1025
+ function isOlderVersion(version2, thanVersion) {
1026
+ var pkgVersionArr = thanVersion ? thanVersion.split(".") : currentVerArr;
1027
+ var destVer = version2.split(".");
1028
+ for (var i = 0; i < 3; i++) {
1029
+ if (pkgVersionArr[i] > destVer[i]) {
1030
+ return true;
1031
+ } else if (pkgVersionArr[i] < destVer[i]) {
1032
+ return false;
1033
+ }
1034
+ }
1035
+ return false;
1036
+ }
1037
+ validators$1.transitional = function transitional(validator2, version2, message) {
1038
+ var isDeprecated = version2 && isOlderVersion(version2);
960
1039
  function formatMessage(opt, desc) {
961
- return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
1040
+ return "[Axios v" + pkg.version + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
962
1041
  }
963
1042
  return function(value, opt, opts) {
964
1043
  if (validator2 === false) {
965
- throw new Error(formatMessage(opt, " has been removed" + (version ? " in " + version : "")));
1044
+ throw new Error(formatMessage(opt, " has been removed in " + version2));
966
1045
  }
967
- if (version && !deprecatedWarnings[opt]) {
1046
+ if (isDeprecated && !deprecatedWarnings[opt]) {
968
1047
  deprecatedWarnings[opt] = true;
969
1048
  console.warn(
970
1049
  formatMessage(
971
1050
  opt,
972
- " has been deprecated since v" + version + " and will be removed in the near future"
1051
+ " has been deprecated since v" + version2 + " and will be removed in the near future"
973
1052
  )
974
1053
  );
975
1054
  }
@@ -999,6 +1078,7 @@ function assertOptions(options, schema, allowUnknown) {
999
1078
  }
1000
1079
  }
1001
1080
  var validator$1 = {
1081
+ isOlderVersion,
1002
1082
  assertOptions,
1003
1083
  validators: validators$1
1004
1084
  };
@@ -1034,9 +1114,9 @@ Axios$1.prototype.request = function request(config2) {
1034
1114
  var transitional2 = config2.transitional;
1035
1115
  if (transitional2 !== void 0) {
1036
1116
  validator.assertOptions(transitional2, {
1037
- silentJSONParsing: validators.transitional(validators.boolean),
1038
- forcedJSONParsing: validators.transitional(validators.boolean),
1039
- clarifyTimeoutError: validators.transitional(validators.boolean)
1117
+ silentJSONParsing: validators.transitional(validators.boolean, "1.0.0"),
1118
+ forcedJSONParsing: validators.transitional(validators.boolean, "1.0.0"),
1119
+ clarifyTimeoutError: validators.transitional(validators.boolean, "1.0.0")
1040
1120
  }, false);
1041
1121
  }
1042
1122
  var requestInterceptorChain = [];
@@ -1098,15 +1178,23 @@ utils$4.forEach(["delete", "get", "head", "options"], function forEachMethodNoDa
1098
1178
  };
1099
1179
  });
1100
1180
  utils$4.forEach(["post", "put", "patch"], function forEachMethodWithData2(method) {
1101
- Axios$1.prototype[method] = function(url, data2, config2) {
1181
+ Axios$1.prototype[method] = function(url, data, config2) {
1102
1182
  return this.request(mergeConfig$1(config2 || {}, {
1103
1183
  method,
1104
1184
  url,
1105
- data: data2
1185
+ data
1106
1186
  }));
1107
1187
  };
1108
1188
  });
1109
1189
  var Axios_1 = Axios$1;
1190
+ function Cancel$1(message) {
1191
+ this.message = message;
1192
+ }
1193
+ Cancel$1.prototype.toString = function toString() {
1194
+ return "Cancel" + (this.message ? ": " + this.message : "");
1195
+ };
1196
+ Cancel$1.prototype.__CANCEL__ = true;
1197
+ var Cancel_1 = Cancel$1;
1110
1198
  var Cancel = Cancel_1;
1111
1199
  function CancelToken(executor) {
1112
1200
  if (typeof executor !== "function") {
@@ -1117,27 +1205,6 @@ function CancelToken(executor) {
1117
1205
  resolvePromise = resolve;
1118
1206
  });
1119
1207
  var token = this;
1120
- this.promise.then(function(cancel) {
1121
- if (!token._listeners)
1122
- return;
1123
- var i;
1124
- var l = token._listeners.length;
1125
- for (i = 0; i < l; i++) {
1126
- token._listeners[i](cancel);
1127
- }
1128
- token._listeners = null;
1129
- });
1130
- this.promise.then = function(onfulfilled) {
1131
- var _resolve;
1132
- var promise = new Promise(function(resolve) {
1133
- token.subscribe(resolve);
1134
- _resolve = resolve;
1135
- }).then(onfulfilled);
1136
- promise.cancel = function reject() {
1137
- token.unsubscribe(_resolve);
1138
- };
1139
- return promise;
1140
- };
1141
1208
  executor(function cancel(message) {
1142
1209
  if (token.reason) {
1143
1210
  return;
@@ -1151,26 +1218,6 @@ CancelToken.prototype.throwIfRequested = function throwIfRequested() {
1151
1218
  throw this.reason;
1152
1219
  }
1153
1220
  };
1154
- CancelToken.prototype.subscribe = function subscribe(listener) {
1155
- if (this.reason) {
1156
- listener(this.reason);
1157
- return;
1158
- }
1159
- if (this._listeners) {
1160
- this._listeners.push(listener);
1161
- } else {
1162
- this._listeners = [listener];
1163
- }
1164
- };
1165
- CancelToken.prototype.unsubscribe = function unsubscribe(listener) {
1166
- if (!this._listeners) {
1167
- return;
1168
- }
1169
- var index = this._listeners.indexOf(listener);
1170
- if (index !== -1) {
1171
- this._listeners.splice(index, 1);
1172
- }
1173
- };
1174
1221
  CancelToken.source = function source() {
1175
1222
  var cancel;
1176
1223
  var token = new CancelToken(function executor(c) {
@@ -1200,17 +1247,16 @@ function createInstance(defaultConfig) {
1200
1247
  var instance2 = bind$2(Axios.prototype.request, context);
1201
1248
  utils$3.extend(instance2, Axios.prototype, context);
1202
1249
  utils$3.extend(instance2, context);
1203
- instance2.create = function create(instanceConfig) {
1204
- return createInstance(mergeConfig2(defaultConfig, instanceConfig));
1205
- };
1206
1250
  return instance2;
1207
1251
  }
1208
1252
  var axios$1 = createInstance(defaults$2);
1209
1253
  axios$1.Axios = Axios;
1254
+ axios$1.create = function create(instanceConfig) {
1255
+ return createInstance(mergeConfig2(axios$1.defaults, instanceConfig));
1256
+ };
1210
1257
  axios$1.Cancel = Cancel_1;
1211
1258
  axios$1.CancelToken = CancelToken_1;
1212
1259
  axios$1.isCancel = isCancel$1;
1213
- axios$1.VERSION = data.version;
1214
1260
  axios$1.all = function all(promises) {
1215
1261
  return Promise.all(promises);
1216
1262
  };
@@ -1479,26 +1525,26 @@ if (getProto) {
1479
1525
  INTRINSICS["%Error.prototype%"] = errorProto;
1480
1526
  }
1481
1527
  }
1482
- var doEval = function doEval2(name) {
1528
+ var doEval = function doEval2(name2) {
1483
1529
  var value;
1484
- if (name === "%AsyncFunction%") {
1530
+ if (name2 === "%AsyncFunction%") {
1485
1531
  value = getEvalledConstructor("async function () {}");
1486
- } else if (name === "%GeneratorFunction%") {
1532
+ } else if (name2 === "%GeneratorFunction%") {
1487
1533
  value = getEvalledConstructor("function* () {}");
1488
- } else if (name === "%AsyncGeneratorFunction%") {
1534
+ } else if (name2 === "%AsyncGeneratorFunction%") {
1489
1535
  value = getEvalledConstructor("async function* () {}");
1490
- } else if (name === "%AsyncGenerator%") {
1536
+ } else if (name2 === "%AsyncGenerator%") {
1491
1537
  var fn = doEval2("%AsyncGeneratorFunction%");
1492
1538
  if (fn) {
1493
1539
  value = fn.prototype;
1494
1540
  }
1495
- } else if (name === "%AsyncIteratorPrototype%") {
1541
+ } else if (name2 === "%AsyncIteratorPrototype%") {
1496
1542
  var gen = doEval2("%AsyncGenerator%");
1497
1543
  if (gen && getProto) {
1498
1544
  value = getProto(gen.prototype);
1499
1545
  }
1500
1546
  }
1501
- INTRINSICS[name] = value;
1547
+ INTRINSICS[name2] = value;
1502
1548
  return value;
1503
1549
  };
1504
1550
  var LEGACY_ALIASES = {
@@ -1577,8 +1623,8 @@ var stringToPath = function stringToPath2(string) {
1577
1623
  });
1578
1624
  return result;
1579
1625
  };
1580
- var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
1581
- var intrinsicName = name;
1626
+ var getBaseIntrinsic = function getBaseIntrinsic2(name2, allowMissing) {
1627
+ var intrinsicName = name2;
1582
1628
  var alias;
1583
1629
  if (hasOwn$1(LEGACY_ALIASES, intrinsicName)) {
1584
1630
  alias = LEGACY_ALIASES[intrinsicName];
@@ -1590,7 +1636,7 @@ var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
1590
1636
  value = doEval(intrinsicName);
1591
1637
  }
1592
1638
  if (typeof value === "undefined" && !allowMissing) {
1593
- throw new $TypeError$3("intrinsic " + name + " exists, but is not available. Please file an issue!");
1639
+ throw new $TypeError$3("intrinsic " + name2 + " exists, but is not available. Please file an issue!");
1594
1640
  }
1595
1641
  return {
1596
1642
  alias,
@@ -1598,19 +1644,19 @@ var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
1598
1644
  value
1599
1645
  };
1600
1646
  }
1601
- throw new $SyntaxError$1("intrinsic " + name + " does not exist!");
1647
+ throw new $SyntaxError$1("intrinsic " + name2 + " does not exist!");
1602
1648
  };
1603
- var getIntrinsic = function GetIntrinsic(name, allowMissing) {
1604
- if (typeof name !== "string" || name.length === 0) {
1649
+ var getIntrinsic = function GetIntrinsic(name2, allowMissing) {
1650
+ if (typeof name2 !== "string" || name2.length === 0) {
1605
1651
  throw new $TypeError$3("intrinsic name must be a non-empty string");
1606
1652
  }
1607
1653
  if (arguments.length > 1 && typeof allowMissing !== "boolean") {
1608
1654
  throw new $TypeError$3('"allowMissing" argument must be a boolean');
1609
1655
  }
1610
- if ($exec(/^%?[^%]*%?$/, name) === null) {
1656
+ if ($exec(/^%?[^%]*%?$/, name2) === null) {
1611
1657
  throw new $SyntaxError$1("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
1612
1658
  }
1613
- var parts = stringToPath(name);
1659
+ var parts = stringToPath(name2);
1614
1660
  var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
1615
1661
  var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
1616
1662
  var intrinsicRealName = intrinsic.name;
@@ -1638,7 +1684,7 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
1638
1684
  } else if (value != null) {
1639
1685
  if (!(part in value)) {
1640
1686
  if (!allowMissing) {
1641
- throw new $TypeError$3("base intrinsic for " + name + " exists, but the property is not available.");
1687
+ throw new $TypeError$3("base intrinsic for " + name2 + " exists, but the property is not available.");
1642
1688
  }
1643
1689
  return void 0;
1644
1690
  }
@@ -1820,9 +1866,9 @@ var setFunctionLength = function setFunctionLength2(fn, length) {
1820
1866
  var GetIntrinsic$1 = getIntrinsic;
1821
1867
  var callBind = callBind$1.exports;
1822
1868
  var $indexOf = callBind(GetIntrinsic$1("String.prototype.indexOf"));
1823
- var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
1824
- var intrinsic = GetIntrinsic$1(name, !!allowMissing);
1825
- if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
1869
+ var callBound$1 = function callBoundIntrinsic(name2, allowMissing) {
1870
+ var intrinsic = GetIntrinsic$1(name2, !!allowMissing);
1871
+ if (typeof intrinsic === "function" && $indexOf(name2, ".prototype.") > -1) {
1826
1872
  return callBind(intrinsic);
1827
1873
  }
1828
1874
  return intrinsic;
@@ -1959,9 +2005,9 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
1959
2005
  return inspect_(value, opts, depth + 1, seen);
1960
2006
  }
1961
2007
  if (typeof obj === "function" && !isRegExp$2(obj)) {
1962
- var name = nameOf(obj);
2008
+ var name2 = nameOf(obj);
1963
2009
  var keys = arrObjKeys(obj, inspect2);
1964
- return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "");
2010
+ return "[Function" + (name2 ? ": " + name2 : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "");
1965
2011
  }
1966
2012
  if (isSymbol(obj)) {
1967
2013
  var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj);
@@ -3356,23 +3402,23 @@ function requestInterceptors(config2) {
3356
3402
  }
3357
3403
  function responseInterceptors(response) {
3358
3404
  var _a;
3359
- let data2 = response.data;
3405
+ let data = response.data;
3360
3406
  const contentType = getContentType(response.headers);
3361
3407
  if (contentType !== CONTENT_TYPE.json) {
3362
- return data2;
3408
+ return data;
3363
3409
  }
3364
3410
  if (typeof response.data === "string") {
3365
- data2 = JSON.parse(response.data);
3411
+ data = JSON.parse(response.data);
3366
3412
  }
3367
- const code = data2.code;
3413
+ const code = data.code;
3368
3414
  switch (code) {
3369
3415
  case SUCCESS_CODE: {
3370
- if (sessionStorage.getItem("isFromIM") == "1" && ((_a = data2 == null ? void 0 : data2.extInfo) == null ? void 0 : _a.handleTask)) {
3416
+ if (sessionStorage.getItem("isFromIM") == "1" && ((_a = data == null ? void 0 : data.extInfo) == null ? void 0 : _a.handleTask)) {
3371
3417
  if (typeof window.native != "undefined") {
3372
3418
  window.native.goHome();
3373
3419
  }
3374
3420
  }
3375
- return data2;
3421
+ return data;
3376
3422
  }
3377
3423
  case NO_SESSION_CODE: {
3378
3424
  _debounce(function() {
@@ -3381,11 +3427,11 @@ function responseInterceptors(response) {
3381
3427
  break;
3382
3428
  }
3383
3429
  default: {
3384
- let msg = data2.message || data2.msg || config.errorMessage;
3430
+ let msg = data.message || data.msg || config.errorMessage;
3385
3431
  window.apiErrorHandler && window.apiErrorHandler(msg);
3386
3432
  }
3387
3433
  }
3388
- return Promise.reject(data2);
3434
+ return Promise.reject(data);
3389
3435
  }
3390
3436
  function inspectorError(error) {
3391
3437
  var _a;
@@ -3399,10 +3445,10 @@ function inspectorError(error) {
3399
3445
  const instance = axios.create({ timeout: 5 * 60 * 1e3 });
3400
3446
  instance.interceptors.request.use(requestInterceptors, inspectorError);
3401
3447
  instance.interceptors.response.use(responseInterceptors, inspectorError);
3402
- instance.formPost = function(url, data2, config2) {
3448
+ instance.formPost = function(url, data, config2) {
3403
3449
  const headers = (config2 == null ? void 0 : config2.headers) || {};
3404
3450
  setContentType(headers, CONTENT_TYPE.form);
3405
- return instance.post(url, data2, __spreadProps(__spreadValues({}, config2), { headers }));
3451
+ return instance.post(url, data, __spreadProps(__spreadValues({}, config2), { headers }));
3406
3452
  };
3407
3453
  const wrapApi = (api, isPost = false) => {
3408
3454
  let currentController = null;
@@ -4453,7 +4499,7 @@ var lodash = { exports: {} };
4453
4499
  (function(module, exports) {
4454
4500
  (function() {
4455
4501
  var undefined$12;
4456
- var VERSION2 = "4.17.21";
4502
+ var VERSION = "4.17.21";
4457
4503
  var LARGE_ARRAY_SIZE = 200;
4458
4504
  var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", FUNC_ERROR_TEXT = "Expected a function", INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`";
4459
4505
  var HASH_UNDEFINED = "__lodash_hash_undefined__";
@@ -5048,9 +5094,9 @@ var lodash = { exports: {} };
5048
5094
  return reHasUnicodeWord.test(string);
5049
5095
  }
5050
5096
  function iteratorToArray(iterator) {
5051
- var data2, result = [];
5052
- while (!(data2 = iterator.next()).done) {
5053
- result.push(data2.value);
5097
+ var data, result = [];
5098
+ while (!(data = iterator.next()).done) {
5099
+ result.push(data.value);
5054
5100
  }
5055
5101
  return result;
5056
5102
  }
@@ -5259,7 +5305,7 @@ var lodash = { exports: {} };
5259
5305
  index += dir;
5260
5306
  var iterIndex = -1, value = array[index];
5261
5307
  while (++iterIndex < iterLength) {
5262
- var data2 = iteratees[iterIndex], iteratee2 = data2.iteratee, type = data2.type, computed = iteratee2(value);
5308
+ var data = iteratees[iterIndex], iteratee2 = data.iteratee, type = data.type, computed = iteratee2(value);
5263
5309
  if (type == LAZY_MAP_FLAG) {
5264
5310
  value = computed;
5265
5311
  } else if (!computed) {
@@ -5294,21 +5340,21 @@ var lodash = { exports: {} };
5294
5340
  return result2;
5295
5341
  }
5296
5342
  function hashGet(key) {
5297
- var data2 = this.__data__;
5343
+ var data = this.__data__;
5298
5344
  if (nativeCreate) {
5299
- var result2 = data2[key];
5345
+ var result2 = data[key];
5300
5346
  return result2 === HASH_UNDEFINED ? undefined$12 : result2;
5301
5347
  }
5302
- return hasOwnProperty2.call(data2, key) ? data2[key] : undefined$12;
5348
+ return hasOwnProperty2.call(data, key) ? data[key] : undefined$12;
5303
5349
  }
5304
5350
  function hashHas(key) {
5305
- var data2 = this.__data__;
5306
- return nativeCreate ? data2[key] !== undefined$12 : hasOwnProperty2.call(data2, key);
5351
+ var data = this.__data__;
5352
+ return nativeCreate ? data[key] !== undefined$12 : hasOwnProperty2.call(data, key);
5307
5353
  }
5308
5354
  function hashSet(key, value) {
5309
- var data2 = this.__data__;
5355
+ var data = this.__data__;
5310
5356
  this.size += this.has(key) ? 0 : 1;
5311
- data2[key] = nativeCreate && value === undefined$12 ? HASH_UNDEFINED : value;
5357
+ data[key] = nativeCreate && value === undefined$12 ? HASH_UNDEFINED : value;
5312
5358
  return this;
5313
5359
  }
5314
5360
  Hash.prototype.clear = hashClear;
@@ -5329,33 +5375,33 @@ var lodash = { exports: {} };
5329
5375
  this.size = 0;
5330
5376
  }
5331
5377
  function listCacheDelete(key) {
5332
- var data2 = this.__data__, index = assocIndexOf(data2, key);
5378
+ var data = this.__data__, index = assocIndexOf(data, key);
5333
5379
  if (index < 0) {
5334
5380
  return false;
5335
5381
  }
5336
- var lastIndex = data2.length - 1;
5382
+ var lastIndex = data.length - 1;
5337
5383
  if (index == lastIndex) {
5338
- data2.pop();
5384
+ data.pop();
5339
5385
  } else {
5340
- splice.call(data2, index, 1);
5386
+ splice.call(data, index, 1);
5341
5387
  }
5342
5388
  --this.size;
5343
5389
  return true;
5344
5390
  }
5345
5391
  function listCacheGet(key) {
5346
- var data2 = this.__data__, index = assocIndexOf(data2, key);
5347
- return index < 0 ? undefined$12 : data2[index][1];
5392
+ var data = this.__data__, index = assocIndexOf(data, key);
5393
+ return index < 0 ? undefined$12 : data[index][1];
5348
5394
  }
5349
5395
  function listCacheHas(key) {
5350
5396
  return assocIndexOf(this.__data__, key) > -1;
5351
5397
  }
5352
5398
  function listCacheSet(key, value) {
5353
- var data2 = this.__data__, index = assocIndexOf(data2, key);
5399
+ var data = this.__data__, index = assocIndexOf(data, key);
5354
5400
  if (index < 0) {
5355
5401
  ++this.size;
5356
- data2.push([key, value]);
5402
+ data.push([key, value]);
5357
5403
  } else {
5358
- data2[index][1] = value;
5404
+ data[index][1] = value;
5359
5405
  }
5360
5406
  return this;
5361
5407
  }
@@ -5392,9 +5438,9 @@ var lodash = { exports: {} };
5392
5438
  return getMapData(this, key).has(key);
5393
5439
  }
5394
5440
  function mapCacheSet(key, value) {
5395
- var data2 = getMapData(this, key), size2 = data2.size;
5396
- data2.set(key, value);
5397
- this.size += data2.size == size2 ? 0 : 1;
5441
+ var data = getMapData(this, key), size2 = data.size;
5442
+ data.set(key, value);
5443
+ this.size += data.size == size2 ? 0 : 1;
5398
5444
  return this;
5399
5445
  }
5400
5446
  MapCache.prototype.clear = mapCacheClear;
@@ -5419,16 +5465,16 @@ var lodash = { exports: {} };
5419
5465
  SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
5420
5466
  SetCache.prototype.has = setCacheHas;
5421
5467
  function Stack(entries) {
5422
- var data2 = this.__data__ = new ListCache(entries);
5423
- this.size = data2.size;
5468
+ var data = this.__data__ = new ListCache(entries);
5469
+ this.size = data.size;
5424
5470
  }
5425
5471
  function stackClear() {
5426
5472
  this.__data__ = new ListCache();
5427
5473
  this.size = 0;
5428
5474
  }
5429
5475
  function stackDelete(key) {
5430
- var data2 = this.__data__, result2 = data2["delete"](key);
5431
- this.size = data2.size;
5476
+ var data = this.__data__, result2 = data["delete"](key);
5477
+ this.size = data.size;
5432
5478
  return result2;
5433
5479
  }
5434
5480
  function stackGet(key) {
@@ -5438,18 +5484,18 @@ var lodash = { exports: {} };
5438
5484
  return this.__data__.has(key);
5439
5485
  }
5440
5486
  function stackSet(key, value) {
5441
- var data2 = this.__data__;
5442
- if (data2 instanceof ListCache) {
5443
- var pairs = data2.__data__;
5487
+ var data = this.__data__;
5488
+ if (data instanceof ListCache) {
5489
+ var pairs = data.__data__;
5444
5490
  if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
5445
5491
  pairs.push([key, value]);
5446
- this.size = ++data2.size;
5492
+ this.size = ++data.size;
5447
5493
  return this;
5448
5494
  }
5449
- data2 = this.__data__ = new MapCache(pairs);
5495
+ data = this.__data__ = new MapCache(pairs);
5450
5496
  }
5451
- data2.set(key, value);
5452
- this.size = data2.size;
5497
+ data.set(key, value);
5498
+ this.size = data.size;
5453
5499
  return this;
5454
5500
  }
5455
5501
  Stack.prototype.clear = stackClear;
@@ -5868,15 +5914,15 @@ var lodash = { exports: {} };
5868
5914
  }
5869
5915
  object = Object2(object);
5870
5916
  while (index--) {
5871
- var data2 = matchData[index];
5872
- if (noCustomizer && data2[2] ? data2[1] !== object[data2[0]] : !(data2[0] in object)) {
5917
+ var data = matchData[index];
5918
+ if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
5873
5919
  return false;
5874
5920
  }
5875
5921
  }
5876
5922
  while (++index < length) {
5877
- data2 = matchData[index];
5878
- var key = data2[0], objValue = object[key], srcValue = data2[1];
5879
- if (noCustomizer && data2[2]) {
5923
+ data = matchData[index];
5924
+ var key = data[0], objValue = object[key], srcValue = data[1];
5925
+ if (noCustomizer && data[2]) {
5880
5926
  if (objValue === undefined$12 && !(key in object)) {
5881
5927
  return false;
5882
5928
  }
@@ -6179,8 +6225,8 @@ var lodash = { exports: {} };
6179
6225
  }
6180
6226
  return object;
6181
6227
  }
6182
- var baseSetData = !metaMap ? identity : function(func, data2) {
6183
- metaMap.set(func, data2);
6228
+ var baseSetData = !metaMap ? identity : function(func, data) {
6229
+ metaMap.set(func, data);
6184
6230
  return func;
6185
6231
  };
6186
6232
  var baseSetToString = !defineProperty ? identity : function(func, string) {
@@ -6684,9 +6730,9 @@ var lodash = { exports: {} };
6684
6730
  index = wrapper ? index : length;
6685
6731
  while (++index < length) {
6686
6732
  func = funcs[index];
6687
- var funcName = getFuncName(func), data2 = funcName == "wrapper" ? getData(func) : undefined$12;
6688
- if (data2 && isLaziable(data2[0]) && data2[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data2[4].length && data2[9] == 1) {
6689
- wrapper = wrapper[getFuncName(data2[0])].apply(wrapper, data2[3]);
6733
+ var funcName = getFuncName(func), data = funcName == "wrapper" ? getData(func) : undefined$12;
6734
+ if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) {
6735
+ wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
6690
6736
  } else {
6691
6737
  wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func);
6692
6738
  }
@@ -6913,7 +6959,7 @@ var lodash = { exports: {} };
6913
6959
  var partialsRight = partials, holdersRight = holders;
6914
6960
  partials = holders = undefined$12;
6915
6961
  }
6916
- var data2 = isBindKey ? undefined$12 : getData(func);
6962
+ var data = isBindKey ? undefined$12 : getData(func);
6917
6963
  var newData = [
6918
6964
  func,
6919
6965
  bitmask,
@@ -6926,8 +6972,8 @@ var lodash = { exports: {} };
6926
6972
  ary2,
6927
6973
  arity
6928
6974
  ];
6929
- if (data2) {
6930
- mergeData(newData, data2);
6975
+ if (data) {
6976
+ mergeData(newData, data);
6931
6977
  }
6932
6978
  func = newData[0];
6933
6979
  bitmask = newData[1];
@@ -6947,7 +6993,7 @@ var lodash = { exports: {} };
6947
6993
  } else {
6948
6994
  result2 = createHybrid.apply(undefined$12, newData);
6949
6995
  }
6950
- var setter = data2 ? baseSetData : setData;
6996
+ var setter = data ? baseSetData : setData;
6951
6997
  return setWrapToString(setter(result2, newData), func, bitmask);
6952
6998
  }
6953
6999
  function customDefaultsAssignIn(objValue, srcValue, key, object) {
@@ -7114,9 +7160,9 @@ var lodash = { exports: {} };
7114
7160
  function getFuncName(func) {
7115
7161
  var result2 = func.name + "", array = realNames[result2], length = hasOwnProperty2.call(realNames, result2) ? array.length : 0;
7116
7162
  while (length--) {
7117
- var data2 = array[length], otherFunc = data2.func;
7163
+ var data = array[length], otherFunc = data.func;
7118
7164
  if (otherFunc == null || otherFunc == func) {
7119
- return data2.name;
7165
+ return data.name;
7120
7166
  }
7121
7167
  }
7122
7168
  return result2;
@@ -7131,8 +7177,8 @@ var lodash = { exports: {} };
7131
7177
  return arguments.length ? result2(arguments[0], arguments[1]) : result2;
7132
7178
  }
7133
7179
  function getMapData(map2, key) {
7134
- var data2 = map2.__data__;
7135
- return isKeyable(key) ? data2[typeof key == "string" ? "string" : "hash"] : data2.map;
7180
+ var data = map2.__data__;
7181
+ return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
7136
7182
  }
7137
7183
  function getMatchData(object) {
7138
7184
  var result2 = keys(object), length = result2.length;
@@ -7204,8 +7250,8 @@ var lodash = { exports: {} };
7204
7250
  function getView(start, end, transforms) {
7205
7251
  var index = -1, length = transforms.length;
7206
7252
  while (++index < length) {
7207
- var data2 = transforms[index], size2 = data2.size;
7208
- switch (data2.type) {
7253
+ var data = transforms[index], size2 = data.size;
7254
+ switch (data.type) {
7209
7255
  case "drop":
7210
7256
  start += size2;
7211
7257
  break;
@@ -7336,8 +7382,8 @@ var lodash = { exports: {} };
7336
7382
  if (func === other) {
7337
7383
  return true;
7338
7384
  }
7339
- var data2 = getData(other);
7340
- return !!data2 && func === data2[0];
7385
+ var data = getData(other);
7386
+ return !!data && func === data[0];
7341
7387
  }
7342
7388
  function isMasked(func) {
7343
7389
  return !!maskSrcKey && maskSrcKey in func;
@@ -7368,41 +7414,41 @@ var lodash = { exports: {} };
7368
7414
  var cache = result2.cache;
7369
7415
  return result2;
7370
7416
  }
7371
- function mergeData(data2, source2) {
7372
- var bitmask = data2[1], srcBitmask = source2[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
7373
- var isCombo = srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG || srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data2[7].length <= source2[8] || srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && source2[7].length <= source2[8] && bitmask == WRAP_CURRY_FLAG;
7417
+ function mergeData(data, source2) {
7418
+ var bitmask = data[1], srcBitmask = source2[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
7419
+ var isCombo = srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG || srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data[7].length <= source2[8] || srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && source2[7].length <= source2[8] && bitmask == WRAP_CURRY_FLAG;
7374
7420
  if (!(isCommon || isCombo)) {
7375
- return data2;
7421
+ return data;
7376
7422
  }
7377
7423
  if (srcBitmask & WRAP_BIND_FLAG) {
7378
- data2[2] = source2[2];
7424
+ data[2] = source2[2];
7379
7425
  newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
7380
7426
  }
7381
7427
  var value = source2[3];
7382
7428
  if (value) {
7383
- var partials = data2[3];
7384
- data2[3] = partials ? composeArgs(partials, value, source2[4]) : value;
7385
- data2[4] = partials ? replaceHolders(data2[3], PLACEHOLDER) : source2[4];
7429
+ var partials = data[3];
7430
+ data[3] = partials ? composeArgs(partials, value, source2[4]) : value;
7431
+ data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source2[4];
7386
7432
  }
7387
7433
  value = source2[5];
7388
7434
  if (value) {
7389
- partials = data2[5];
7390
- data2[5] = partials ? composeArgsRight(partials, value, source2[6]) : value;
7391
- data2[6] = partials ? replaceHolders(data2[5], PLACEHOLDER) : source2[6];
7435
+ partials = data[5];
7436
+ data[5] = partials ? composeArgsRight(partials, value, source2[6]) : value;
7437
+ data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source2[6];
7392
7438
  }
7393
7439
  value = source2[7];
7394
7440
  if (value) {
7395
- data2[7] = value;
7441
+ data[7] = value;
7396
7442
  }
7397
7443
  if (srcBitmask & WRAP_ARY_FLAG) {
7398
- data2[8] = data2[8] == null ? source2[8] : nativeMin(data2[8], source2[8]);
7444
+ data[8] = data[8] == null ? source2[8] : nativeMin(data[8], source2[8]);
7399
7445
  }
7400
- if (data2[9] == null) {
7401
- data2[9] = source2[9];
7446
+ if (data[9] == null) {
7447
+ data[9] = source2[9];
7402
7448
  }
7403
- data2[0] = source2[0];
7404
- data2[1] = newBitmask;
7405
- return data2;
7449
+ data[0] = source2[0];
7450
+ data[1] = newBitmask;
7451
+ return data;
7406
7452
  }
7407
7453
  function nativeKeysIn(object) {
7408
7454
  var result2 = [];
@@ -8668,7 +8714,7 @@ var lodash = { exports: {} };
8668
8714
  copyObject(source2, keys(source2), object, customizer);
8669
8715
  });
8670
8716
  var at = flatRest(baseAt);
8671
- function create(prototype, properties) {
8717
+ function create2(prototype, properties) {
8672
8718
  var result2 = baseCreate(prototype);
8673
8719
  return properties == null ? result2 : baseAssign(result2, properties);
8674
8720
  }
@@ -9415,7 +9461,7 @@ var lodash = { exports: {} };
9415
9461
  lodash2.conforms = conforms;
9416
9462
  lodash2.constant = constant;
9417
9463
  lodash2.countBy = countBy;
9418
- lodash2.create = create;
9464
+ lodash2.create = create2;
9419
9465
  lodash2.curry = curry;
9420
9466
  lodash2.curryRight = curryRight;
9421
9467
  lodash2.debounce = debounce;
@@ -9710,7 +9756,7 @@ var lodash = { exports: {} };
9710
9756
  });
9711
9757
  return source2;
9712
9758
  }(), { "chain": false });
9713
- lodash2.VERSION = VERSION2;
9759
+ lodash2.VERSION = VERSION;
9714
9760
  arrayEach(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(methodName) {
9715
9761
  lodash2[methodName].placeholder = lodash2;
9716
9762
  });
@@ -10778,7 +10824,7 @@ function renderHeaderTooltip({
10778
10824
  }
10779
10825
  return text;
10780
10826
  }
10781
- function renderColumnTree(data2, columnGroup, option = {}) {
10827
+ function renderColumnTree(data, columnGroup, option = {}) {
10782
10828
  var _b;
10783
10829
  const _a = columnGroup, {
10784
10830
  key,
@@ -10807,7 +10853,7 @@ function renderColumnTree(data2, columnGroup, option = {}) {
10807
10853
  ]);
10808
10854
  const { keyPropName = "key", titlePropName = "title", keyPrefix = "", parents = [] } = option;
10809
10855
  if (keyProp) {
10810
- let columnUniqData = ((_b = _.uniqBy(data2, columnGroup.keyProp)) == null ? void 0 : _b.filter((item) => !isNil(item[columnGroup.keyProp]))) || [];
10856
+ let columnUniqData = ((_b = _.uniqBy(data, columnGroup.keyProp)) == null ? void 0 : _b.filter((item) => !isNil(item[columnGroup.keyProp]))) || [];
10811
10857
  if (sortProp) {
10812
10858
  const unSortData = columnUniqData.filter((item) => isNil(item[sortProp]));
10813
10859
  const sortData = columnUniqData.filter((item) => !isNil(item[sortProp]));
@@ -10818,7 +10864,7 @@ function renderColumnTree(data2, columnGroup, option = {}) {
10818
10864
  if (children && children.length) {
10819
10865
  const prefix = `${keyPrefix}${keyProp}${VALUE_SEP}${item[keyProp]}${GROUP_SEP}`;
10820
10866
  const columnChildren = children.map((child) => {
10821
- let nextData = isLimitChildren ? data2.filter((temp) => temp[keyProp] === item[keyProp]) : data2;
10867
+ let nextData = isLimitChildren ? data.filter((temp) => temp[keyProp] === item[keyProp]) : data;
10822
10868
  return renderColumnTree(nextData, child, __spreadProps(__spreadValues({}, option), {
10823
10869
  keyPrefix: prefix,
10824
10870
  parents: [...parents, item]
@@ -10857,7 +10903,7 @@ function renderColumnTree(data2, columnGroup, option = {}) {
10857
10903
  if (children && children.length) {
10858
10904
  const prefix = `${keyPrefix}${key || ""}`;
10859
10905
  const columnChildren = children.map((child) => {
10860
- return renderColumnTree(data2, child, __spreadProps(__spreadValues({}, option), { keyPrefix: prefix }));
10906
+ return renderColumnTree(data, child, __spreadProps(__spreadValues({}, option), { keyPrefix: prefix }));
10861
10907
  });
10862
10908
  return __spreadProps(__spreadValues({}, args), {
10863
10909
  [titlePropName]: title,
@@ -10882,7 +10928,7 @@ function getLeafColumns(columns = []) {
10882
10928
  }
10883
10929
  }, []);
10884
10930
  }
10885
- function renderRowData(data2, keys) {
10931
+ function renderRowData(data, keys) {
10886
10932
  var _a;
10887
10933
  if (!keys.length)
10888
10934
  return;
@@ -10890,13 +10936,13 @@ function renderRowData(data2, keys) {
10890
10936
  keys = keys.slice(1);
10891
10937
  if (key.includes(VALUE_SEP) && keys.length) {
10892
10938
  const [keyProp, keyValue] = key.split(VALUE_SEP);
10893
- const matchData = _.filter(data2, { [keyProp]: keyValue });
10939
+ const matchData = _.filter(data, { [keyProp]: keyValue });
10894
10940
  return renderRowData(matchData, keys);
10895
10941
  }
10896
10942
  if (keys.length) {
10897
10943
  console.error("\u600E\u4E48\u4F1A\u4E0D\u662F\u6700\u540E\u4E00\u5C42\u5206\u7EC4\u5462\uFF0C\u8BF7\u8054\u7CFB\u5F00\u53D1\u4EBA\u5458\u67E5\u770B\uFF01");
10898
10944
  }
10899
- const value = (_a = data2 == null ? void 0 : data2[0]) == null ? void 0 : _a[key];
10945
+ const value = (_a = data == null ? void 0 : data[0]) == null ? void 0 : _a[key];
10900
10946
  return value;
10901
10947
  }
10902
10948
  function getRowKeyValue(item, rowKey) {
@@ -10936,19 +10982,19 @@ function renderSumColumns({ sumColumnDefs }) {
10936
10982
  }
10937
10983
  return columns;
10938
10984
  }
10939
- function row2column(data2 = [], columnGroups = [], rowKey, option = {}) {
10985
+ function row2column(data = [], columnGroups = [], rowKey, option = {}) {
10940
10986
  var _a;
10941
10987
  const columns = [];
10942
10988
  if (option.sumColumnDefs && option.sumColumnDefs.length) {
10943
10989
  columns.push(...renderSumColumns(option));
10944
10990
  }
10945
- const groupColumns = _.flatten(columnGroups.map((group) => renderColumnTree(data2, group, option))) || [];
10991
+ const groupColumns = _.flatten(columnGroups.map((group) => renderColumnTree(data, group, option))) || [];
10946
10992
  columns.push(...groupColumns);
10947
10993
  const leafColumns = getLeafColumns(columns);
10948
- const rowKeyUniqData = ((_a = _.uniqBy(data2, (item) => getRowKeyValue(item, rowKey))) == null ? void 0 : _a.filter(
10994
+ const rowKeyUniqData = ((_a = _.uniqBy(data, (item) => getRowKeyValue(item, rowKey))) == null ? void 0 : _a.filter(
10949
10995
  (item) => !isNil(getRowKeyValue(item, rowKey))
10950
10996
  )) || [];
10951
- const groupData = _.groupBy(data2, (item) => getRowKeyValue(item, rowKey));
10997
+ const groupData = _.groupBy(data, (item) => getRowKeyValue(item, rowKey));
10952
10998
  const rltData = rowKeyUniqData.map((item) => {
10953
10999
  const rowKeyValue = getRowKeyValue(item, rowKey);
10954
11000
  const rowGroupData = groupData[rowKeyValue] || [];
@@ -11008,9 +11054,9 @@ function flattenRowData(rowData = {}, leafColumns = [], option = {}) {
11008
11054
  });
11009
11055
  return rlt;
11010
11056
  }
11011
- function flattenRow2ColumnData(data2 = [], columns = [], option = {}) {
11057
+ function flattenRow2ColumnData(data = [], columns = [], option = {}) {
11012
11058
  const leafColumns = getLeafColumns(columns);
11013
- return data2.reduce(
11059
+ return data.reduce(
11014
11060
  (rlt, rowData) => [...rlt, ...flattenRowData(rowData, leafColumns, option)],
11015
11061
  []
11016
11062
  );
@@ -11154,8 +11200,8 @@ const DICT_KEY = "ind-dict_";
11154
11200
  function getDictCache(dictId) {
11155
11201
  return getSessionStorage(`${DICT_KEY}${dictId}`);
11156
11202
  }
11157
- function setDictCache(dictId, data2) {
11158
- setSessionStorage(`${DICT_KEY}${dictId}`, data2);
11203
+ function setDictCache(dictId, data) {
11204
+ setSessionStorage(`${DICT_KEY}${dictId}`, data);
11159
11205
  }
11160
11206
  const CONTEXT$5 = config.authServerContext;
11161
11207
  function getDictsMapApi(dictId) {
@@ -11171,9 +11217,9 @@ function getDictApi(dictId) {
11171
11217
  return dictValue;
11172
11218
  }
11173
11219
  try {
11174
- const { data: data2 } = yield instance.get(`${CONTEXT$5}/dict/getDicts`, { params: { dictId } });
11175
- setDictCache(dictId, data2);
11176
- return data2;
11220
+ const { data } = yield instance.get(`${CONTEXT$5}/dict/getDicts`, { params: { dictId } });
11221
+ setDictCache(dictId, data);
11222
+ return data;
11177
11223
  } catch (error) {
11178
11224
  console.error(`getDict error dictId=${dictId}`, error);
11179
11225
  }
@@ -11258,6 +11304,167 @@ function getPreviewUrlApi(fileId) {
11258
11304
  axiosConfig
11259
11305
  );
11260
11306
  }
11307
+ function downLoadScDcApi(fileId, fileName) {
11308
+ return __async(this, null, function* () {
11309
+ const ua = navigator.userAgent;
11310
+ if (/miniProgram/i.test(ua)) {
11311
+ window.wx.miniProgram.navigateTo({
11312
+ url: `/pages/download/index?downloadFileId=${fileId}`
11313
+ });
11314
+ } else {
11315
+ const downloadUrl = `${(location.pathname.includes("scyxweb") ? "/scyxgateway" : "") + "/ind-uc-ext-server"}/oss/file/get/${fileId}`;
11316
+ const token = getToken();
11317
+ const response = yield fetch(downloadUrl, {
11318
+ headers: {
11319
+ token: token + ""
11320
+ }
11321
+ });
11322
+ if (!response.ok) {
11323
+ throw new Error(`\u4E0B\u8F7D\u5931\u8D25: ${response.status}`);
11324
+ }
11325
+ const blob = yield response.blob();
11326
+ if (!fileName) {
11327
+ fileName = getFilenameFromResponse(response);
11328
+ }
11329
+ let mimeType = "application/octet-stream";
11330
+ const name2 = fileName == null ? void 0 : fileName.toLowerCase();
11331
+ const match = name2.match(/\.([a-z0-9]+)$/);
11332
+ const extension = match == null ? void 0 : match[1];
11333
+ if (MIME_TYPE[extension]) {
11334
+ mimeType = MIME_TYPE[extension];
11335
+ }
11336
+ const fileBlob = new Blob([blob], { type: mimeType });
11337
+ const url = window.URL.createObjectURL(fileBlob);
11338
+ const link = document.createElement("a");
11339
+ link.href = url;
11340
+ link.download = fileName;
11341
+ link.style.display = "none";
11342
+ link.target = "_blank";
11343
+ document.body.appendChild(link);
11344
+ link.click();
11345
+ document.body.removeChild(link);
11346
+ }
11347
+ });
11348
+ }
11349
+ function parseContentDisposition(contentDisposition) {
11350
+ if (!contentDisposition)
11351
+ return null;
11352
+ console.log("\u539F\u59CB Content-Disposition:", contentDisposition);
11353
+ const utf8FilenameMatch = contentDisposition.match(/filename\*=(?:UTF-8''|UTF-8\s*'')([^;]+)/i);
11354
+ if (utf8FilenameMatch && utf8FilenameMatch[1]) {
11355
+ try {
11356
+ const decoded = decodeURIComponent(utf8FilenameMatch[1].trim());
11357
+ console.log("\u89E3\u6790 RFC 5987 \u6587\u4EF6\u540D:", decoded);
11358
+ return decoded;
11359
+ } catch (e) {
11360
+ console.warn("RFC 5987 \u89E3\u7801\u5931\u8D25:", e);
11361
+ }
11362
+ }
11363
+ const filenameStarMatch = contentDisposition.match(/filename\*=([^;]+)/i);
11364
+ if (filenameStarMatch && filenameStarMatch[1]) {
11365
+ const encoded = filenameStarMatch[1].trim();
11366
+ if (encoded.includes("''")) {
11367
+ const parts = encoded.split("''");
11368
+ if (parts.length === 2) {
11369
+ try {
11370
+ const decoded = decodeURIComponent(parts[1]);
11371
+ console.log("\u89E3\u6790 filename* \u6587\u4EF6\u540D:", decoded);
11372
+ return decoded;
11373
+ } catch (e) {
11374
+ console.warn("filename* \u89E3\u7801\u5931\u8D25:", e);
11375
+ }
11376
+ }
11377
+ }
11378
+ }
11379
+ const quotedFilenameMatch = contentDisposition.match(/filename="([^"]+)"/i);
11380
+ if (quotedFilenameMatch && quotedFilenameMatch[1]) {
11381
+ console.log("\u89E3\u6790\u5F15\u53F7\u5185\u6587\u4EF6\u540D:", quotedFilenameMatch[1]);
11382
+ return quotedFilenameMatch[1];
11383
+ }
11384
+ const unquotedFilenameMatch = contentDisposition.match(/filename=([^;]+)/i);
11385
+ if (unquotedFilenameMatch && unquotedFilenameMatch[1]) {
11386
+ const filename = unquotedFilenameMatch[1].trim();
11387
+ console.log("\u89E3\u6790\u65E0\u5F15\u53F7\u6587\u4EF6\u540D:", filename);
11388
+ return filename;
11389
+ }
11390
+ console.log("\u672A\u627E\u5230\u6709\u6548\u7684\u6587\u4EF6\u540D");
11391
+ return null;
11392
+ }
11393
+ function getFilenameFromResponse(response) {
11394
+ const contentDisposition = response.headers.get("Content-Disposition");
11395
+ console.log("Content-Disposition \u5934:", contentDisposition);
11396
+ let filename = null;
11397
+ if (contentDisposition) {
11398
+ filename = parseContentDisposition(contentDisposition);
11399
+ console.log("\u89E3\u6790\u5230\u7684\u6587\u4EF6\u540D:", filename);
11400
+ }
11401
+ if (!filename && response.url) {
11402
+ filename = extractFilenameFromUrl(response.url);
11403
+ console.log("\u4ECE URL \u63D0\u53D6\u7684\u6587\u4EF6\u540D:", filename);
11404
+ }
11405
+ if (!filename) {
11406
+ filename = "download";
11407
+ console.log("\u4F7F\u7528\u9ED8\u8BA4\u6587\u4EF6\u540D:", filename);
11408
+ }
11409
+ filename = ensureFileExtension(filename, response.headers.get("Content-Type"));
11410
+ return filename;
11411
+ }
11412
+ function getExtensionFromContentType(contentType) {
11413
+ if (!contentType)
11414
+ return "";
11415
+ const contentTypeToExtension = {
11416
+ "image/jpeg": ".jpg",
11417
+ "image/jpg": ".jpg",
11418
+ "image/png": ".png",
11419
+ "image/gif": ".gif",
11420
+ "image/webp": ".webp",
11421
+ "image/svg+xml": ".svg",
11422
+ "image/bmp": ".bmp",
11423
+ "application/pdf": ".pdf",
11424
+ "application/msword": ".doc",
11425
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document": ".docx",
11426
+ "application/vnd.ms-excel": ".xls",
11427
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": ".xlsx",
11428
+ "application/vnd.ms-powerpoint": ".ppt",
11429
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation": ".pptx",
11430
+ "text/plain": ".txt",
11431
+ "text/html": ".html",
11432
+ "text/css": ".css",
11433
+ "text/javascript": ".js",
11434
+ "application/json": ".json",
11435
+ "text/csv": ".csv",
11436
+ "text/xml": ".xml",
11437
+ "application/zip": ".zip",
11438
+ "application/x-rar-compressed": ".rar",
11439
+ "application/x-7z-compressed": ".7z",
11440
+ "application/gzip": ".gz",
11441
+ "application/octet-stream": ".bin"
11442
+ };
11443
+ const mainType = contentType.split(";")[0].trim();
11444
+ return contentTypeToExtension[mainType] || "";
11445
+ }
11446
+ function ensureFileExtension(filename, contentType) {
11447
+ if (filename.includes(".")) {
11448
+ return filename;
11449
+ }
11450
+ const extension = getExtensionFromContentType(contentType);
11451
+ if (extension) {
11452
+ return filename + extension;
11453
+ }
11454
+ return filename;
11455
+ }
11456
+ function extractFilenameFromUrl(url) {
11457
+ try {
11458
+ const urlObj = new URL(url);
11459
+ const pathname = urlObj.pathname;
11460
+ const lastSegment = pathname.split("/").pop();
11461
+ const filename = lastSegment.split("?")[0].split("#")[0];
11462
+ return filename || null;
11463
+ } catch (e) {
11464
+ console.warn("\u4ECE URL \u63D0\u53D6\u6587\u4EF6\u540D\u5931\u8D25:", e);
11465
+ return null;
11466
+ }
11467
+ }
11261
11468
  let Base64 = {
11262
11469
  Base64Chars: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@*-",
11263
11470
  encode: function(s) {
@@ -11350,8 +11557,8 @@ function loginApi({ userName, password, validCodeId, validCodeInput }) {
11350
11557
  let nodeRSA = new window.NodeRSA(publicKey, "pkcs8-public");
11351
11558
  let rsaPaswword = nodeRSA.encrypt(password, "base64");
11352
11559
  let upw = Base64.encode(rsaPaswword);
11353
- const data2 = { usn: userName, upw, validCodeId, validCodeInput };
11354
- return instance.formPost(CONTEXT$2 + "/sso/auth/login", data2);
11560
+ const data = { usn: userName, upw, validCodeId, validCodeInput };
11561
+ return instance.formPost(CONTEXT$2 + "/sso/auth/login", data);
11355
11562
  }
11356
11563
  function getUserInfoApi() {
11357
11564
  return instance.get(`${CONTEXT$2}/manage/user/getCurrentInfo`);
@@ -11359,8 +11566,8 @@ function getUserInfoApi() {
11359
11566
  function getGlobalPolicyApi() {
11360
11567
  return instance.get(`${CONTEXT$2}/anon/user/getGlobalPolicy`);
11361
11568
  }
11362
- function updatePasswordApi(data2) {
11363
- return instance.post(`${CONTEXT$2}/manage/user/updatePassword`, data2);
11569
+ function updatePasswordApi(data) {
11570
+ return instance.post(`${CONTEXT$2}/manage/user/updatePassword`, data);
11364
11571
  }
11365
11572
  function getCaptchaURL(validCodeId) {
11366
11573
  return `${CONTEXT$2}/anon/user/getCaptcha/` + validCodeId;
@@ -11368,6 +11575,18 @@ function getCaptchaURL(validCodeId) {
11368
11575
  function logoutApi() {
11369
11576
  return instance.get(`${CONTEXT$2}/sso/logout`);
11370
11577
  }
11578
+ const GLOBAL_CACHE_KEY = "global-cache";
11579
+ const getGlobalConfig = () => __async(void 0, null, function* () {
11580
+ if (getSessionStorage(GLOBAL_CACHE_KEY)) {
11581
+ return getSessionStorage(GLOBAL_CACHE_KEY);
11582
+ } else {
11583
+ let url = location.protocol + "//" + location.host + "/ibp-sc/manage/global?t=" + new Date().getTime();
11584
+ return axios.get(url).then(({ data }) => {
11585
+ setSessionStorage(GLOBAL_CACHE_KEY, data);
11586
+ return data;
11587
+ });
11588
+ }
11589
+ });
11371
11590
  const CONTEXT$1 = config.ismAmServerContext;
11372
11591
  function listComTreeApi(params) {
11373
11592
  if (config.useDddComItemTree) {
@@ -11395,11 +11614,17 @@ function getItem(params) {
11395
11614
  return instance.get(`${CONTEXT}/basic/getItem`, { params });
11396
11615
  }
11397
11616
  const UC_CONTEXT$1 = config.ucExtServerContext;
11398
- const DATAVERSION_KEY$1 = "ind-cache-dataVersion-applicationTree";
11399
11617
  function getApplicationTreeApi(params) {
11400
11618
  return __async(this, null, function* () {
11401
- var _a;
11402
- const cachedData = getLocalStorage(DATAVERSION_KEY$1);
11619
+ var _a, _b;
11620
+ const DATAVERSION_KEY = "ind-cache-dataVersion-applicationTree" + ((_a = getUserInfoCache()) == null ? void 0 : _a.manageUnitId);
11621
+ const globalConfigData = yield getGlobalConfig();
11622
+ if (!(globalConfigData == null ? void 0 : globalConfigData.enableTreeLocalCache) || (globalConfigData == null ? void 0 : globalConfigData.enableTreeLocalCache) !== "1") {
11623
+ return instance.formPost(`${UC_CONTEXT$1}/tree/uc-application/getApplicationTree`, {
11624
+ params
11625
+ });
11626
+ }
11627
+ const cachedData = getLocalStorage(DATAVERSION_KEY);
11403
11628
  const dataVersionList = yield instance.get(`${UC_CONTEXT$1}/cacheManage/getCacheDataVersion`, {});
11404
11629
  const serverVersion = dataVersionList.data["applicationTree"];
11405
11630
  if ((cachedData == null ? void 0 : cachedData.dataVersion) !== serverVersion) {
@@ -11410,16 +11635,20 @@ function getApplicationTreeApi(params) {
11410
11635
  dataVersion: serverVersion,
11411
11636
  response
11412
11637
  };
11413
- setLocalStorage(DATAVERSION_KEY$1, dataValue);
11638
+ setLocalStorage(DATAVERSION_KEY, dataValue);
11414
11639
  }
11415
- return (_a = getLocalStorage(DATAVERSION_KEY$1)) == null ? void 0 : _a.response;
11640
+ return (_b = getLocalStorage(DATAVERSION_KEY)) == null ? void 0 : _b.response;
11416
11641
  });
11417
11642
  }
11418
11643
  const UC_CONTEXT = config.ucExtServerContext;
11419
- const DATAVERSION_KEY = "ind-cache-dataVersion-organTree";
11420
11644
  function listUserTreeApi(params) {
11421
11645
  return __async(this, null, function* () {
11422
- var _a;
11646
+ var _a, _b;
11647
+ const DATAVERSION_KEY = "ind-cache-dataVersion-organTree" + ((_a = getUserInfoCache()) == null ? void 0 : _a.manageUnitId);
11648
+ const globalConfigData = yield getGlobalConfig();
11649
+ if (!(globalConfigData == null ? void 0 : globalConfigData.enableTreeLocalCache) || (globalConfigData == null ? void 0 : globalConfigData.enableTreeLocalCache) !== "1") {
11650
+ return instance.get(`${UC_CONTEXT}/tree/uc-user/listUserTree`, { params });
11651
+ }
11423
11652
  const cachedData = getLocalStorage(DATAVERSION_KEY);
11424
11653
  const dataVersionList = yield instance.get(`${UC_CONTEXT}/cacheManage/getCacheDataVersion`, {});
11425
11654
  const serverVersion = dataVersionList.data["organTree"];
@@ -11431,7 +11660,7 @@ function listUserTreeApi(params) {
11431
11660
  };
11432
11661
  setLocalStorage(DATAVERSION_KEY, dataValue);
11433
11662
  }
11434
- return (_a = getLocalStorage(DATAVERSION_KEY)) == null ? void 0 : _a.response;
11663
+ return (_b = getLocalStorage(DATAVERSION_KEY)) == null ? void 0 : _b.response;
11435
11664
  });
11436
11665
  }
11437
- export { Base64ForLogin, CONTENT_TYPE, IS_OR_NOT_ENUM, IS_OR_NOT_ENUM_KEY, IS_OR_NOT_ENUM_LIST, MIME_TYPE, UC_ENUM, addMenuCollectApi, instance as axios, base64ToBlob, blobToBase64, checkIdCard, checkPhone, checkTel, checkVehicleNo, clearIndexDescCache, clearPermissionCache, clearSessionStorage, clearUserInfoCache, config, cryptor, deleteMenuCollectApi, deleteMenuHistoryApi, exportJsonToExcel, flattenRow2ColumnData, formatDate, formatDateChinese, formatDecimal, formatHalfYear, formatQuarter, getAppListApi, getApplicationTreeApi, getCaptchaURL, getContentType, getDictApi, getDictMapApi, getDictsMapApi, getExcelColumnIdx, getGlobalPolicyApi, getHalfYear, getHalfYearBeginMonth, getHalfYearEndMonth, getHalfYearNum, getIndexDescCache, getItem, getLocalStorage, getMaxTabNumValueApi, getMenuCollectApi, getMenuHistoryApi, getOssFileApi, getOssFileUrl, getPermissionApi, getPermissionCache, getPreviewUrlApi, getPriceInfo, getQuarter, getQuarterBeginMonth, getQuarterEndMonth, getQuarterNum, getSessionStorage, getToken, getType, getUrlParams, getUserInfoApi, getUserInfoCache, guid, importJsonFromExcel, isArguments, isArray, isArrayLike, isBoolean, isDate, isDecimal, isElement, isEmpty, isEqual, isEqualWith, isError, isEven, isFinite$1 as isFinite, isFunction, isInteger, isNegative, isNil, isNull, isNumber, isNumberEqual, isObject, isObjectLike, isOdd, isPlainObject, isPositive, isPromise, isPrototype, isRegExp2 as isRegExp, isString, isType, isUndefined, listComTreeApi, listIndexDescApi, listItemTreeApi, listUserTreeApi, loginApi, logoutApi, menuHistoryApi, numToChineseNumerals, numToDX, off, on, preventDefault, putOssFileApi, putOssFileUrl, quarter2Chinese, removeLocalStorage, removeMenuCollectApi, removeSessionStorage, renderColumnEnums, renderEnumData, renderEnumList, renderFieldEnums, responseInterceptors, round, row2column, setConfig, setContentType, setIndexDescCache, setLocalStorage, setPermissionCache, setSessionStorage, setToken, setUserInfoCache, stopPropagation, str2Date, toChies, toFixed, toThousands, updatePasswordApi, useConfig, uuid, wrapApi };
11666
+ export { Base64ForLogin, CONTENT_TYPE, IS_OR_NOT_ENUM, IS_OR_NOT_ENUM_KEY, IS_OR_NOT_ENUM_LIST, MIME_TYPE, UC_ENUM, addMenuCollectApi, instance as axios, base64ToBlob, blobToBase64, checkIdCard, checkPhone, checkTel, checkVehicleNo, clearIndexDescCache, clearPermissionCache, clearSessionStorage, clearUserInfoCache, config, cryptor, deleteMenuCollectApi, deleteMenuHistoryApi, downLoadScDcApi, exportJsonToExcel, flattenRow2ColumnData, formatDate, formatDateChinese, formatDecimal, formatHalfYear, formatQuarter, getAppListApi, getApplicationTreeApi, getCaptchaURL, getContentType, getDictApi, getDictMapApi, getDictsMapApi, getExcelColumnIdx, getGlobalConfig, getGlobalPolicyApi, getHalfYear, getHalfYearBeginMonth, getHalfYearEndMonth, getHalfYearNum, getIndexDescCache, getItem, getLocalStorage, getMaxTabNumValueApi, getMenuCollectApi, getMenuHistoryApi, getOssFileApi, getOssFileUrl, getPermissionApi, getPermissionCache, getPreviewUrlApi, getPriceInfo, getQuarter, getQuarterBeginMonth, getQuarterEndMonth, getQuarterNum, getSessionStorage, getToken, getType, getUrlParams, getUserInfoApi, getUserInfoCache, guid, importJsonFromExcel, isArguments, isArray, isArrayLike, isBoolean, isDate, isDecimal, isElement, isEmpty, isEqual, isEqualWith, isError, isEven, isFinite$1 as isFinite, isFunction, isInteger, isNegative, isNil, isNull, isNumber, isNumberEqual, isObject, isObjectLike, isOdd, isPlainObject, isPositive, isPromise, isPrototype, isRegExp2 as isRegExp, isString, isType, isUndefined, listComTreeApi, listIndexDescApi, listItemTreeApi, listUserTreeApi, loginApi, logoutApi, menuHistoryApi, numToChineseNumerals, numToDX, off, on, preventDefault, putOssFileApi, putOssFileUrl, quarter2Chinese, removeLocalStorage, removeMenuCollectApi, removeSessionStorage, renderColumnEnums, renderEnumData, renderEnumList, renderFieldEnums, responseInterceptors, round, row2column, setConfig, setContentType, setIndexDescCache, setLocalStorage, setPermissionCache, setSessionStorage, setToken, setUserInfoCache, stopPropagation, str2Date, toChies, toFixed, toThousands, updatePasswordApi, useConfig, uuid, wrapApi };