@verdocs/web-sdk 6.1.4 → 6.1.5

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.
Files changed (65) hide show
  1. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +286 -213
  2. package/dist/cjs/verdocs-contact-picker.cjs.entry.js.map +1 -1
  3. package/dist/cjs/verdocs-contact-picker.entry.cjs.js.map +1 -1
  4. package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
  5. package/dist/cjs/verdocs-sign.entry.cjs.js.map +1 -1
  6. package/dist/cjs/verdocs-status-indicator.cjs.entry.js +5 -6
  7. package/dist/cjs/verdocs-status-indicator.cjs.entry.js.map +1 -1
  8. package/dist/cjs/verdocs-status-indicator.entry.cjs.js.map +1 -1
  9. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +2 -2
  10. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
  11. package/dist/components/{p-Dt5I6d_s.js → p-6D0qDyV-.js} +7 -8
  12. package/dist/components/p-6D0qDyV-.js.map +1 -0
  13. package/dist/components/{p-CSQjgm9n.js → p-CeTLcymJ.js} +288 -215
  14. package/dist/components/p-CeTLcymJ.js.map +1 -0
  15. package/dist/components/{p-CSpoYxdI.js → p-DeoKKq-r.js} +3 -3
  16. package/dist/components/{p-CSpoYxdI.js.map → p-DeoKKq-r.js.map} +1 -1
  17. package/dist/components/verdocs-build.js +2 -2
  18. package/dist/components/verdocs-contact-picker.js +1 -1
  19. package/dist/components/verdocs-envelopes-list.js +1 -1
  20. package/dist/components/verdocs-send.js +1 -1
  21. package/dist/components/verdocs-sign.js.map +1 -1
  22. package/dist/components/verdocs-status-indicator.js +1 -1
  23. package/dist/esm/verdocs-contact-picker.entry.js +286 -213
  24. package/dist/esm/verdocs-contact-picker.entry.js.map +1 -1
  25. package/dist/esm/verdocs-sign.entry.js.map +1 -1
  26. package/dist/esm/verdocs-status-indicator.entry.js +5 -6
  27. package/dist/esm/verdocs-status-indicator.entry.js.map +1 -1
  28. package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
  29. package/dist/esm-es5/verdocs-contact-picker.entry.js.map +1 -1
  30. package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
  31. package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
  32. package/dist/esm-es5/verdocs-status-indicator.entry.js.map +1 -1
  33. package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +2 -2
  34. package/dist/types/components.d.ts +8 -8
  35. package/dist/verdocs-web-sdk/p-09c1c487.entry.js.map +1 -1
  36. package/dist/verdocs-web-sdk/p-2514f675.entry.js +3 -0
  37. package/dist/verdocs-web-sdk/p-2514f675.entry.js.map +1 -0
  38. package/dist/verdocs-web-sdk/p-8cf14826.entry.js +2 -0
  39. package/dist/verdocs-web-sdk/p-8cf14826.entry.js.map +1 -0
  40. package/dist/verdocs-web-sdk/p-BR9Rz5QR.system.js.map +1 -0
  41. package/dist/verdocs-web-sdk/p-C5fciylu.system.js.map +1 -1
  42. package/dist/verdocs-web-sdk/p-PqjR4yYk.system.js.map +1 -0
  43. package/dist/verdocs-web-sdk/p-RlE9Yh59.system.js +1 -1
  44. package/dist/verdocs-web-sdk/p-f8be4637.system.entry.js +4 -0
  45. package/dist/verdocs-web-sdk/p-f8be4637.system.entry.js.map +1 -0
  46. package/dist/verdocs-web-sdk/p-f94dd543.system.entry.js.map +1 -1
  47. package/dist/verdocs-web-sdk/p-ff46c002.system.entry.js +2 -0
  48. package/dist/verdocs-web-sdk/p-ff46c002.system.entry.js.map +1 -0
  49. package/dist/verdocs-web-sdk/verdocs-contact-picker.entry.esm.js.map +1 -1
  50. package/dist/verdocs-web-sdk/verdocs-sign.entry.esm.js.map +1 -1
  51. package/dist/verdocs-web-sdk/verdocs-status-indicator.entry.esm.js.map +1 -1
  52. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  53. package/package.json +4 -4
  54. package/dist/components/p-CSQjgm9n.js.map +0 -1
  55. package/dist/components/p-Dt5I6d_s.js.map +0 -1
  56. package/dist/verdocs-web-sdk/p-21da2b89.entry.js +0 -3
  57. package/dist/verdocs-web-sdk/p-21da2b89.entry.js.map +0 -1
  58. package/dist/verdocs-web-sdk/p-751beab0.entry.js +0 -2
  59. package/dist/verdocs-web-sdk/p-751beab0.entry.js.map +0 -1
  60. package/dist/verdocs-web-sdk/p-8835c006.system.entry.js +0 -2
  61. package/dist/verdocs-web-sdk/p-8835c006.system.entry.js.map +0 -1
  62. package/dist/verdocs-web-sdk/p-Cts9LOkJ.system.js.map +0 -1
  63. package/dist/verdocs-web-sdk/p-Dp4d4aXG.system.js.map +0 -1
  64. package/dist/verdocs-web-sdk/p-e962f3e2.system.entry.js +0 -4
  65. package/dist/verdocs-web-sdk/p-e962f3e2.system.entry.js.map +0 -1
@@ -7,7 +7,7 @@ import { d as defineCustomElement$3 } from './p-BNrp2UP2.js';
7
7
  import { d as defineCustomElement$2 } from './p-wYGYhfrp.js';
8
8
  import { d as defineCustomElement$1 } from './p-Boia1Nbz.js';
9
9
 
10
- /*! Axios v1.11.0 Copyright (c) 2025 Matt Zabriskie and contributors */
10
+ /*! Axios v1.12.2 Copyright (c) 2025 Matt Zabriskie and contributors */
11
11
 
12
12
  var axios_1;
13
13
  var hasRequiredAxios;
@@ -67,7 +67,7 @@ function requireAxios () {
67
67
  */
68
68
  function isBuffer(val) {
69
69
  return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
70
- && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
70
+ && isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
71
71
  }
72
72
 
73
73
  /**
@@ -112,7 +112,7 @@ function requireAxios () {
112
112
  * @param {*} val The value to test
113
113
  * @returns {boolean} True if value is a Function, otherwise false
114
114
  */
115
- const isFunction = typeOfTest('function');
115
+ const isFunction$1 = typeOfTest('function');
116
116
 
117
117
  /**
118
118
  * Determine if a value is a Number
@@ -168,7 +168,7 @@ function requireAxios () {
168
168
  if (!isObject(val) || isBuffer(val)) {
169
169
  return false;
170
170
  }
171
-
171
+
172
172
  try {
173
173
  return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
174
174
  } catch (e) {
@@ -220,7 +220,7 @@ function requireAxios () {
220
220
  *
221
221
  * @returns {boolean} True if value is a Stream, otherwise false
222
222
  */
223
- const isStream = (val) => isObject(val) && isFunction(val.pipe);
223
+ const isStream = (val) => isObject(val) && isFunction$1(val.pipe);
224
224
 
225
225
  /**
226
226
  * Determine if a value is a FormData
@@ -233,10 +233,10 @@ function requireAxios () {
233
233
  let kind;
234
234
  return thing && (
235
235
  (typeof FormData === 'function' && thing instanceof FormData) || (
236
- isFunction(thing.append) && (
236
+ isFunction$1(thing.append) && (
237
237
  (kind = kindOf(thing)) === 'formdata' ||
238
238
  // detect form-data instance
239
- (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
239
+ (kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]')
240
240
  )
241
241
  )
242
242
  )
@@ -361,7 +361,7 @@ function requireAxios () {
361
361
  * @returns {Object} Result of all merge properties
362
362
  */
363
363
  function merge(/* obj1, obj2, obj3, ... */) {
364
- const {caseless} = isContextDefined(this) && this || {};
364
+ const {caseless, skipUndefined} = isContextDefined(this) && this || {};
365
365
  const result = {};
366
366
  const assignValue = (val, key) => {
367
367
  const targetKey = caseless && findKey(result, key) || key;
@@ -371,7 +371,7 @@ function requireAxios () {
371
371
  result[targetKey] = merge({}, val);
372
372
  } else if (isArray(val)) {
373
373
  result[targetKey] = val.slice();
374
- } else {
374
+ } else if (!skipUndefined || !isUndefined(val)) {
375
375
  result[targetKey] = val;
376
376
  }
377
377
  };
@@ -394,7 +394,7 @@ function requireAxios () {
394
394
  */
395
395
  const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
396
396
  forEach(b, (val, key) => {
397
- if (thisArg && isFunction(val)) {
397
+ if (thisArg && isFunction$1(val)) {
398
398
  a[key] = bind(val, thisArg);
399
399
  } else {
400
400
  a[key] = val;
@@ -610,13 +610,13 @@ function requireAxios () {
610
610
  const freezeMethods = (obj) => {
611
611
  reduceDescriptors(obj, (descriptor, name) => {
612
612
  // skip restricted props in strict mode
613
- if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
613
+ if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
614
614
  return false;
615
615
  }
616
616
 
617
617
  const value = obj[name];
618
618
 
619
- if (!isFunction(value)) return;
619
+ if (!isFunction$1(value)) return;
620
620
 
621
621
  descriptor.enumerable = false;
622
622
 
@@ -653,6 +653,8 @@ function requireAxios () {
653
653
  return value != null && Number.isFinite(value = +value) ? value : defaultValue;
654
654
  };
655
655
 
656
+
657
+
656
658
  /**
657
659
  * If the thing is a FormData object, return true, otherwise return false.
658
660
  *
@@ -661,7 +663,7 @@ function requireAxios () {
661
663
  * @returns {boolean}
662
664
  */
663
665
  function isSpecCompliantForm(thing) {
664
- return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
666
+ return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
665
667
  }
666
668
 
667
669
  const toJSONObject = (obj) => {
@@ -703,7 +705,7 @@ function requireAxios () {
703
705
  const isAsyncFn = kindOfTest('AsyncFunction');
704
706
 
705
707
  const isThenable = (thing) =>
706
- thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
708
+ thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
707
709
 
708
710
  // original code
709
711
  // https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
@@ -727,7 +729,7 @@ function requireAxios () {
727
729
  })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
728
730
  })(
729
731
  typeof setImmediate === 'function',
730
- isFunction(_global.postMessage)
732
+ isFunction$1(_global.postMessage)
731
733
  );
732
734
 
733
735
  const asap = typeof queueMicrotask !== 'undefined' ?
@@ -736,7 +738,7 @@ function requireAxios () {
736
738
  // *********************
737
739
 
738
740
 
739
- const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
741
+ const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
740
742
 
741
743
 
742
744
  var utils$1 = {
@@ -760,7 +762,7 @@ function requireAxios () {
760
762
  isFile,
761
763
  isBlob,
762
764
  isRegExp,
763
- isFunction,
765
+ isFunction: isFunction$1,
764
766
  isStream,
765
767
  isURLSearchParams,
766
768
  isTypedArray,
@@ -886,11 +888,18 @@ function requireAxios () {
886
888
  return prop !== 'isAxiosError';
887
889
  });
888
890
 
889
- AxiosError.call(axiosError, error.message, code, config, request, response);
891
+ const msg = error && error.message ? error.message : 'Error';
892
+
893
+ // Prefer explicit code; otherwise copy the low-level error's code (e.g. ECONNREFUSED)
894
+ const errCode = code == null && error ? error.code : code;
895
+ AxiosError.call(axiosError, msg, errCode, config, request, response);
890
896
 
891
- axiosError.cause = error;
897
+ // Chain the original error on the standard field; non-enumerable to avoid JSON noise
898
+ if (error && axiosError.cause == null) {
899
+ Object.defineProperty(axiosError, 'cause', { value: error, configurable: true });
900
+ }
892
901
 
893
- axiosError.name = error.name;
902
+ axiosError.name = (error && error.name) || 'Error';
894
903
 
895
904
  customProps && Object.assign(axiosError, customProps);
896
905
 
@@ -1181,9 +1190,7 @@ function requireAxios () {
1181
1190
  replace(/%3A/gi, ':').
1182
1191
  replace(/%24/g, '$').
1183
1192
  replace(/%2C/gi, ',').
1184
- replace(/%20/g, '+').
1185
- replace(/%5B/gi, '[').
1186
- replace(/%5D/gi, ']');
1193
+ replace(/%20/g, '+');
1187
1194
  }
1188
1195
 
1189
1196
  /**
@@ -1588,7 +1595,7 @@ function requireAxios () {
1588
1595
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
1589
1596
 
1590
1597
  try {
1591
- return JSON.parse(data);
1598
+ return JSON.parse(data, this.parseReviver);
1592
1599
  } catch (e) {
1593
1600
  if (strictJSONParsing) {
1594
1601
  if (e.name === 'SyntaxError') {
@@ -2413,7 +2420,7 @@ function requireAxios () {
2413
2420
  var resolveConfig = (config) => {
2414
2421
  const newConfig = mergeConfig({}, config);
2415
2422
 
2416
- let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
2423
+ let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
2417
2424
 
2418
2425
  newConfig.headers = headers = AxiosHeaders$1.from(headers);
2419
2426
 
@@ -2426,17 +2433,21 @@ function requireAxios () {
2426
2433
  );
2427
2434
  }
2428
2435
 
2429
- let contentType;
2430
-
2431
2436
  if (utils$1.isFormData(data)) {
2432
2437
  if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
2433
- headers.setContentType(undefined); // Let the browser set it
2434
- } else if ((contentType = headers.getContentType()) !== false) {
2435
- // fix semicolon duplication issue for ReactNative FormData implementation
2436
- const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
2437
- headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
2438
+ headers.setContentType(undefined); // browser handles it
2439
+ } else if (utils$1.isFunction(data.getHeaders)) {
2440
+ // Node.js FormData (like form-data package)
2441
+ const formHeaders = data.getHeaders();
2442
+ // Only set safe headers to avoid overwriting security headers
2443
+ const allowedHeaders = ['content-type', 'content-length'];
2444
+ Object.entries(formHeaders).forEach(([key, val]) => {
2445
+ if (allowedHeaders.includes(key.toLowerCase())) {
2446
+ headers.set(key, val);
2447
+ }
2448
+ });
2438
2449
  }
2439
- }
2450
+ }
2440
2451
 
2441
2452
  // Add xsrf header
2442
2453
  // This is only done if running in a standard browser environment.
@@ -2553,15 +2564,18 @@ function requireAxios () {
2553
2564
  };
2554
2565
 
2555
2566
  // Handle low level network errors
2556
- request.onerror = function handleError() {
2557
- // Real errors are hidden from us by the browser
2558
- // onerror should only fire if it's a network error
2559
- reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));
2560
-
2561
- // Clean up request
2562
- request = null;
2567
+ request.onerror = function handleError(event) {
2568
+ // Browsers deliver a ProgressEvent in XHR onerror
2569
+ // (message may be empty; when present, surface it)
2570
+ // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
2571
+ const msg = event && event.message ? event.message : 'Network Error';
2572
+ const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);
2573
+ // attach the underlying event for consumers who want details
2574
+ err.event = event || null;
2575
+ reject(err);
2576
+ request = null;
2563
2577
  };
2564
-
2578
+
2565
2579
  // Handle timeout
2566
2580
  request.ontimeout = function handleTimeout() {
2567
2581
  let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
@@ -2777,14 +2791,18 @@ function requireAxios () {
2777
2791
  })
2778
2792
  };
2779
2793
 
2780
- const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';
2781
- const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';
2794
+ const DEFAULT_CHUNK_SIZE = 64 * 1024;
2795
+
2796
+ const {isFunction} = utils$1;
2797
+
2798
+ const globalFetchAPI = (({Request, Response}) => ({
2799
+ Request, Response
2800
+ }))(utils$1.global);
2801
+
2802
+ const {
2803
+ ReadableStream: ReadableStream$1, TextEncoder
2804
+ } = utils$1.global;
2782
2805
 
2783
- // used only inside the fetch adapter
2784
- const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
2785
- ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
2786
- async (str) => new Uint8Array(await new Response(str).arrayBuffer())
2787
- );
2788
2806
 
2789
2807
  const test = (fn, ...args) => {
2790
2808
  try {
@@ -2794,211 +2812,268 @@ function requireAxios () {
2794
2812
  }
2795
2813
  };
2796
2814
 
2797
- const supportsRequestStream = isReadableStreamSupported && test(() => {
2798
- let duplexAccessed = false;
2815
+ const factory = (env) => {
2816
+ env = utils$1.merge.call({
2817
+ skipUndefined: true
2818
+ }, globalFetchAPI, env);
2799
2819
 
2800
- const hasContentType = new Request(platform.origin, {
2801
- body: new ReadableStream(),
2802
- method: 'POST',
2803
- get duplex() {
2804
- duplexAccessed = true;
2805
- return 'half';
2806
- },
2807
- }).headers.has('Content-Type');
2820
+ const {fetch: envFetch, Request, Response} = env;
2821
+ const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
2822
+ const isRequestSupported = isFunction(Request);
2823
+ const isResponseSupported = isFunction(Response);
2808
2824
 
2809
- return duplexAccessed && !hasContentType;
2810
- });
2825
+ if (!isFetchSupported) {
2826
+ return false;
2827
+ }
2811
2828
 
2812
- const DEFAULT_CHUNK_SIZE = 64 * 1024;
2829
+ const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
2813
2830
 
2814
- const supportsResponseStream = isReadableStreamSupported &&
2815
- test(() => utils$1.isReadableStream(new Response('').body));
2831
+ const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
2832
+ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
2833
+ async (str) => new Uint8Array(await new Request(str).arrayBuffer())
2834
+ );
2816
2835
 
2836
+ const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
2837
+ let duplexAccessed = false;
2817
2838
 
2818
- const resolvers = {
2819
- stream: supportsResponseStream && ((res) => res.body)
2820
- };
2839
+ const hasContentType = new Request(platform.origin, {
2840
+ body: new ReadableStream$1(),
2841
+ method: 'POST',
2842
+ get duplex() {
2843
+ duplexAccessed = true;
2844
+ return 'half';
2845
+ },
2846
+ }).headers.has('Content-Type');
2821
2847
 
2822
- isFetchSupported && (((res) => {
2823
- ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
2824
- !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() :
2825
- (_, config) => {
2826
- throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
2827
- });
2848
+ return duplexAccessed && !hasContentType;
2828
2849
  });
2829
- })(new Response));
2830
2850
 
2831
- const getBodyLength = async (body) => {
2832
- if (body == null) {
2833
- return 0;
2834
- }
2851
+ const supportsResponseStream = isResponseSupported && isReadableStreamSupported &&
2852
+ test(() => utils$1.isReadableStream(new Response('').body));
2835
2853
 
2836
- if(utils$1.isBlob(body)) {
2837
- return body.size;
2838
- }
2854
+ const resolvers = {
2855
+ stream: supportsResponseStream && ((res) => res.body)
2856
+ };
2839
2857
 
2840
- if(utils$1.isSpecCompliantForm(body)) {
2841
- const _request = new Request(platform.origin, {
2842
- method: 'POST',
2843
- body,
2858
+ isFetchSupported && ((() => {
2859
+ ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
2860
+ !resolvers[type] && (resolvers[type] = (res, config) => {
2861
+ let method = res && res[type];
2862
+
2863
+ if (method) {
2864
+ return method.call(res);
2865
+ }
2866
+
2867
+ throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
2868
+ });
2844
2869
  });
2845
- return (await _request.arrayBuffer()).byteLength;
2846
- }
2870
+ })());
2847
2871
 
2848
- if(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
2849
- return body.byteLength;
2850
- }
2872
+ const getBodyLength = async (body) => {
2873
+ if (body == null) {
2874
+ return 0;
2875
+ }
2851
2876
 
2852
- if(utils$1.isURLSearchParams(body)) {
2853
- body = body + '';
2854
- }
2877
+ if (utils$1.isBlob(body)) {
2878
+ return body.size;
2879
+ }
2855
2880
 
2856
- if(utils$1.isString(body)) {
2857
- return (await encodeText(body)).byteLength;
2858
- }
2859
- };
2881
+ if (utils$1.isSpecCompliantForm(body)) {
2882
+ const _request = new Request(platform.origin, {
2883
+ method: 'POST',
2884
+ body,
2885
+ });
2886
+ return (await _request.arrayBuffer()).byteLength;
2887
+ }
2860
2888
 
2861
- const resolveBodyLength = async (headers, body) => {
2862
- const length = utils$1.toFiniteNumber(headers.getContentLength());
2889
+ if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
2890
+ return body.byteLength;
2891
+ }
2863
2892
 
2864
- return length == null ? getBodyLength(body) : length;
2865
- };
2893
+ if (utils$1.isURLSearchParams(body)) {
2894
+ body = body + '';
2895
+ }
2896
+
2897
+ if (utils$1.isString(body)) {
2898
+ return (await encodeText(body)).byteLength;
2899
+ }
2900
+ };
2901
+
2902
+ const resolveBodyLength = async (headers, body) => {
2903
+ const length = utils$1.toFiniteNumber(headers.getContentLength());
2904
+
2905
+ return length == null ? getBodyLength(body) : length;
2906
+ };
2907
+
2908
+ return async (config) => {
2909
+ let {
2910
+ url,
2911
+ method,
2912
+ data,
2913
+ signal,
2914
+ cancelToken,
2915
+ timeout,
2916
+ onDownloadProgress,
2917
+ onUploadProgress,
2918
+ responseType,
2919
+ headers,
2920
+ withCredentials = 'same-origin',
2921
+ fetchOptions
2922
+ } = resolveConfig(config);
2923
+
2924
+ let _fetch = envFetch || fetch;
2925
+
2926
+ responseType = responseType ? (responseType + '').toLowerCase() : 'text';
2927
+
2928
+ let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
2866
2929
 
2867
- var fetchAdapter = isFetchSupported && (async (config) => {
2868
- let {
2869
- url,
2870
- method,
2871
- data,
2872
- signal,
2873
- cancelToken,
2874
- timeout,
2875
- onDownloadProgress,
2876
- onUploadProgress,
2877
- responseType,
2878
- headers,
2879
- withCredentials = 'same-origin',
2880
- fetchOptions
2881
- } = resolveConfig(config);
2882
-
2883
- responseType = responseType ? (responseType + '').toLowerCase() : 'text';
2884
-
2885
- let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
2886
-
2887
- let request;
2888
-
2889
- const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
2930
+ let request = null;
2931
+
2932
+ const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
2890
2933
  composedSignal.unsubscribe();
2891
- });
2934
+ });
2892
2935
 
2893
- let requestContentLength;
2936
+ let requestContentLength;
2894
2937
 
2895
- try {
2896
- if (
2897
- onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
2898
- (requestContentLength = await resolveBodyLength(headers, data)) !== 0
2899
- ) {
2900
- let _request = new Request(url, {
2901
- method: 'POST',
2902
- body: data,
2903
- duplex: "half"
2904
- });
2938
+ try {
2939
+ if (
2940
+ onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
2941
+ (requestContentLength = await resolveBodyLength(headers, data)) !== 0
2942
+ ) {
2943
+ let _request = new Request(url, {
2944
+ method: 'POST',
2945
+ body: data,
2946
+ duplex: "half"
2947
+ });
2905
2948
 
2906
- let contentTypeHeader;
2949
+ let contentTypeHeader;
2907
2950
 
2908
- if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
2909
- headers.setContentType(contentTypeHeader);
2910
- }
2951
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
2952
+ headers.setContentType(contentTypeHeader);
2953
+ }
2911
2954
 
2912
- if (_request.body) {
2913
- const [onProgress, flush] = progressEventDecorator(
2914
- requestContentLength,
2915
- progressEventReducer(asyncDecorator(onUploadProgress))
2916
- );
2955
+ if (_request.body) {
2956
+ const [onProgress, flush] = progressEventDecorator(
2957
+ requestContentLength,
2958
+ progressEventReducer(asyncDecorator(onUploadProgress))
2959
+ );
2917
2960
 
2918
- data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
2961
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
2962
+ }
2919
2963
  }
2920
- }
2921
2964
 
2922
- if (!utils$1.isString(withCredentials)) {
2923
- withCredentials = withCredentials ? 'include' : 'omit';
2924
- }
2965
+ if (!utils$1.isString(withCredentials)) {
2966
+ withCredentials = withCredentials ? 'include' : 'omit';
2967
+ }
2925
2968
 
2926
- // Cloudflare Workers throws when credentials are defined
2927
- // see https://github.com/cloudflare/workerd/issues/902
2928
- const isCredentialsSupported = "credentials" in Request.prototype;
2929
- request = new Request(url, {
2930
- ...fetchOptions,
2931
- signal: composedSignal,
2932
- method: method.toUpperCase(),
2933
- headers: headers.normalize().toJSON(),
2934
- body: data,
2935
- duplex: "half",
2936
- credentials: isCredentialsSupported ? withCredentials : undefined
2937
- });
2969
+ // Cloudflare Workers throws when credentials are defined
2970
+ // see https://github.com/cloudflare/workerd/issues/902
2971
+ const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
2938
2972
 
2939
- let response = await fetch(request, fetchOptions);
2973
+ const resolvedOptions = {
2974
+ ...fetchOptions,
2975
+ signal: composedSignal,
2976
+ method: method.toUpperCase(),
2977
+ headers: headers.normalize().toJSON(),
2978
+ body: data,
2979
+ duplex: "half",
2980
+ credentials: isCredentialsSupported ? withCredentials : undefined
2981
+ };
2940
2982
 
2941
- const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
2983
+ request = isRequestSupported && new Request(url, resolvedOptions);
2942
2984
 
2943
- if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
2944
- const options = {};
2985
+ let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
2945
2986
 
2946
- ['status', 'statusText', 'headers'].forEach(prop => {
2947
- options[prop] = response[prop];
2948
- });
2987
+ const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
2949
2988
 
2950
- const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
2989
+ if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
2990
+ const options = {};
2951
2991
 
2952
- const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
2953
- responseContentLength,
2954
- progressEventReducer(asyncDecorator(onDownloadProgress), true)
2955
- ) || [];
2992
+ ['status', 'statusText', 'headers'].forEach(prop => {
2993
+ options[prop] = response[prop];
2994
+ });
2956
2995
 
2957
- response = new Response(
2958
- trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
2959
- flush && flush();
2960
- unsubscribe && unsubscribe();
2961
- }),
2962
- options
2963
- );
2964
- }
2996
+ const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
2965
2997
 
2966
- responseType = responseType || 'text';
2998
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
2999
+ responseContentLength,
3000
+ progressEventReducer(asyncDecorator(onDownloadProgress), true)
3001
+ ) || [];
2967
3002
 
2968
- let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
3003
+ response = new Response(
3004
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
3005
+ flush && flush();
3006
+ unsubscribe && unsubscribe();
3007
+ }),
3008
+ options
3009
+ );
3010
+ }
2969
3011
 
2970
- !isStreamResponse && unsubscribe && unsubscribe();
3012
+ responseType = responseType || 'text';
2971
3013
 
2972
- return await new Promise((resolve, reject) => {
2973
- settle(resolve, reject, {
2974
- data: responseData,
2975
- headers: AxiosHeaders$1.from(response.headers),
2976
- status: response.status,
2977
- statusText: response.statusText,
2978
- config,
2979
- request
2980
- });
2981
- })
2982
- } catch (err) {
2983
- unsubscribe && unsubscribe();
2984
-
2985
- if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
2986
- throw Object.assign(
2987
- new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
2988
- {
2989
- cause: err.cause || err
2990
- }
2991
- )
3014
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
3015
+
3016
+ !isStreamResponse && unsubscribe && unsubscribe();
3017
+
3018
+ return await new Promise((resolve, reject) => {
3019
+ settle(resolve, reject, {
3020
+ data: responseData,
3021
+ headers: AxiosHeaders$1.from(response.headers),
3022
+ status: response.status,
3023
+ statusText: response.statusText,
3024
+ config,
3025
+ request
3026
+ });
3027
+ })
3028
+ } catch (err) {
3029
+ unsubscribe && unsubscribe();
3030
+
3031
+ if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
3032
+ throw Object.assign(
3033
+ new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
3034
+ {
3035
+ cause: err.cause || err
3036
+ }
3037
+ )
3038
+ }
3039
+
3040
+ throw AxiosError.from(err, err && err.code, config, request);
2992
3041
  }
3042
+ }
3043
+ };
3044
+
3045
+ const seedCache = new Map();
3046
+
3047
+ const getFetch = (config) => {
3048
+ let env = config ? config.env : {};
3049
+ const {fetch, Request, Response} = env;
3050
+ const seeds = [
3051
+ Request, Response, fetch
3052
+ ];
3053
+
3054
+ let len = seeds.length, i = len,
3055
+ seed, target, map = seedCache;
3056
+
3057
+ while (i--) {
3058
+ seed = seeds[i];
3059
+ target = map.get(seed);
3060
+
3061
+ target === undefined && map.set(seed, target = (i ? new Map() : factory(env)));
2993
3062
 
2994
- throw AxiosError.from(err, err && err.code, config, request);
3063
+ map = target;
2995
3064
  }
2996
- });
3065
+
3066
+ return target;
3067
+ };
3068
+
3069
+ getFetch();
2997
3070
 
2998
3071
  const knownAdapters = {
2999
3072
  http: httpAdapter,
3000
3073
  xhr: xhrAdapter,
3001
- fetch: fetchAdapter
3074
+ fetch: {
3075
+ get: getFetch,
3076
+ }
3002
3077
  };
3003
3078
 
3004
3079
  utils$1.forEach(knownAdapters, (fn, value) => {
@@ -3017,7 +3092,7 @@ function requireAxios () {
3017
3092
  const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
3018
3093
 
3019
3094
  var adapters = {
3020
- getAdapter: (adapters) => {
3095
+ getAdapter: (adapters, config) => {
3021
3096
  adapters = utils$1.isArray(adapters) ? adapters : [adapters];
3022
3097
 
3023
3098
  const {length} = adapters;
@@ -3040,7 +3115,7 @@ function requireAxios () {
3040
3115
  }
3041
3116
  }
3042
3117
 
3043
- if (adapter) {
3118
+ if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
3044
3119
  break;
3045
3120
  }
3046
3121
 
@@ -3108,7 +3183,7 @@ function requireAxios () {
3108
3183
  config.headers.setContentType('application/x-www-form-urlencoded', false);
3109
3184
  }
3110
3185
 
3111
- const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);
3186
+ const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter, config);
3112
3187
 
3113
3188
  return adapter(config).then(function onAdapterResolution(response) {
3114
3189
  throwIfCancellationRequested(config);
@@ -3142,7 +3217,7 @@ function requireAxios () {
3142
3217
  });
3143
3218
  }
3144
3219
 
3145
- const VERSION = "1.11.0";
3220
+ const VERSION = "1.12.2";
3146
3221
 
3147
3222
  const validators$1 = {};
3148
3223
 
@@ -3398,8 +3473,6 @@ function requireAxios () {
3398
3473
 
3399
3474
  let newConfig = config;
3400
3475
 
3401
- i = 0;
3402
-
3403
3476
  while (i < len) {
3404
3477
  const onFulfilled = requestInterceptorChain[i++];
3405
3478
  const onRejected = requestInterceptorChain[i++];
@@ -4028,6 +4101,6 @@ function defineCustomElement() {
4028
4101
  }
4029
4102
 
4030
4103
  export { VerdocsContactPicker as V, defineCustomElement as d };
4031
- //# sourceMappingURL=p-CSQjgm9n.js.map
4104
+ //# sourceMappingURL=p-CeTLcymJ.js.map
4032
4105
 
4033
- //# sourceMappingURL=p-CSQjgm9n.js.map
4106
+ //# sourceMappingURL=p-CeTLcymJ.js.map