mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-20 13:04:23 +02:00
bundle
This commit is contained in:
2
lnbits/static/bundle.min.js
vendored
2
lnbits/static/bundle.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
|||||||
// update cache version every time there is a new deployment
|
// update cache version every time there is a new deployment
|
||||||
// so the service worker reinitializes the cache
|
// so the service worker reinitializes the cache
|
||||||
const CACHE_VERSION = 69
|
const CACHE_VERSION = 70
|
||||||
const CURRENT_CACHE = `lnbits-${CACHE_VERSION}-`
|
const CURRENT_CACHE = `lnbits-${CACHE_VERSION}-`
|
||||||
|
|
||||||
const getApiKey = request => {
|
const getApiKey = request => {
|
||||||
|
129
lnbits/static/vendor/axios.js
vendored
129
lnbits/static/vendor/axios.js
vendored
@@ -1,4 +1,4 @@
|
|||||||
// Axios v1.3.4 Copyright (c) 2023 Matt Zabriskie and contributors
|
// Axios v1.6.0 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||||
typeof define === 'function' && define.amd ? define(factory) :
|
typeof define === 'function' && define.amd ? define(factory) :
|
||||||
@@ -283,8 +283,10 @@
|
|||||||
* @returns {boolean} True if value is an FormData, otherwise false
|
* @returns {boolean} True if value is an FormData, otherwise false
|
||||||
*/
|
*/
|
||||||
var isFormData = function isFormData(thing) {
|
var isFormData = function isFormData(thing) {
|
||||||
var pattern = '[object FormData]';
|
var kind;
|
||||||
return thing && (typeof FormData === 'function' && thing instanceof FormData || toString.call(thing) === pattern || isFunction(thing.toString) && thing.toString() === pattern);
|
return thing && (typeof FormData === 'function' && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === 'formdata' ||
|
||||||
|
// detect form-data instance
|
||||||
|
kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]'));
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -623,8 +625,9 @@
|
|||||||
var descriptors = Object.getOwnPropertyDescriptors(obj);
|
var descriptors = Object.getOwnPropertyDescriptors(obj);
|
||||||
var reducedDescriptors = {};
|
var reducedDescriptors = {};
|
||||||
forEach(descriptors, function (descriptor, name) {
|
forEach(descriptors, function (descriptor, name) {
|
||||||
if (reducer(descriptor, name, obj) !== false) {
|
var ret;
|
||||||
reducedDescriptors[name] = descriptor;
|
if ((ret = reducer(descriptor, name, obj)) !== false) {
|
||||||
|
reducedDescriptors[name] = ret || descriptor;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Object.defineProperties(obj, reducedDescriptors);
|
Object.defineProperties(obj, reducedDescriptors);
|
||||||
@@ -720,6 +723,10 @@
|
|||||||
};
|
};
|
||||||
return visit(obj, 0);
|
return visit(obj, 0);
|
||||||
};
|
};
|
||||||
|
var isAsyncFn = kindOfTest('AsyncFunction');
|
||||||
|
var isThenable = function isThenable(thing) {
|
||||||
|
return thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing["catch"]);
|
||||||
|
};
|
||||||
var utils = {
|
var utils = {
|
||||||
isArray: isArray,
|
isArray: isArray,
|
||||||
isArrayBuffer: isArrayBuffer,
|
isArrayBuffer: isArrayBuffer,
|
||||||
@@ -770,7 +777,9 @@
|
|||||||
ALPHABET: ALPHABET,
|
ALPHABET: ALPHABET,
|
||||||
generateString: generateString,
|
generateString: generateString,
|
||||||
isSpecCompliantForm: isSpecCompliantForm,
|
isSpecCompliantForm: isSpecCompliantForm,
|
||||||
toJSONObject: toJSONObject
|
toJSONObject: toJSONObject,
|
||||||
|
isAsyncFn: isAsyncFn,
|
||||||
|
isThenable: isThenable
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1353,10 +1362,6 @@
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var DEFAULT_CONTENT_TYPE = {
|
|
||||||
'Content-Type': undefined
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
||||||
* of the input
|
* of the input
|
||||||
@@ -1463,16 +1468,14 @@
|
|||||||
},
|
},
|
||||||
headers: {
|
headers: {
|
||||||
common: {
|
common: {
|
||||||
'Accept': 'application/json, text/plain, */*'
|
'Accept': 'application/json, text/plain, */*',
|
||||||
|
'Content-Type': undefined
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
|
utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], function (method) {
|
||||||
defaults.headers[method] = {};
|
defaults.headers[method] = {};
|
||||||
});
|
});
|
||||||
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
||||||
defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
|
|
||||||
});
|
|
||||||
var defaults$1 = defaults;
|
var defaults$1 = defaults;
|
||||||
|
|
||||||
// RawAxiosHeaders whose duplicates are ignored by node
|
// RawAxiosHeaders whose duplicates are ignored by node
|
||||||
@@ -1537,9 +1540,9 @@
|
|||||||
}
|
}
|
||||||
return tokens;
|
return tokens;
|
||||||
}
|
}
|
||||||
function isValidHeaderName(str) {
|
var isValidHeaderName = function isValidHeaderName(str) {
|
||||||
return /^[-_a-zA-Z]+$/.test(str.trim());
|
return /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
||||||
}
|
};
|
||||||
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
||||||
if (utils.isFunction(filter)) {
|
if (utils.isFunction(filter)) {
|
||||||
return filter.call(this, value, header);
|
return filter.call(this, value, header);
|
||||||
@@ -1773,7 +1776,20 @@
|
|||||||
return AxiosHeaders;
|
return AxiosHeaders;
|
||||||
}(Symbol.iterator, Symbol.toStringTag);
|
}(Symbol.iterator, Symbol.toStringTag);
|
||||||
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
||||||
utils.freezeMethods(AxiosHeaders.prototype);
|
|
||||||
|
// reserved names hotfix
|
||||||
|
utils.reduceDescriptors(AxiosHeaders.prototype, function (_ref3, key) {
|
||||||
|
var value = _ref3.value;
|
||||||
|
var mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
||||||
|
return {
|
||||||
|
get: function get() {
|
||||||
|
return value;
|
||||||
|
},
|
||||||
|
set: function set(headerValue) {
|
||||||
|
this[mapped] = headerValue;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
utils.freezeMethods(AxiosHeaders);
|
utils.freezeMethods(AxiosHeaders);
|
||||||
var AxiosHeaders$1 = AxiosHeaders;
|
var AxiosHeaders$1 = AxiosHeaders;
|
||||||
|
|
||||||
@@ -2059,10 +2075,17 @@
|
|||||||
config.signal.removeEventListener('abort', onCanceled);
|
config.signal.removeEventListener('abort', onCanceled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (utils.isFormData(requestData) && (platform.isStandardBrowserEnv || platform.isStandardBrowserWebWorkerEnv)) {
|
var contentType;
|
||||||
requestHeaders.setContentType(false); // Let the browser set it
|
if (utils.isFormData(requestData)) {
|
||||||
|
if (platform.isStandardBrowserEnv || platform.isStandardBrowserWebWorkerEnv) {
|
||||||
|
requestHeaders.setContentType(false); // Let the browser set it
|
||||||
|
} else if (!requestHeaders.getContentType(/^\s*multipart\/form-data/)) {
|
||||||
|
requestHeaders.setContentType('multipart/form-data'); // mobile/desktop app frameworks
|
||||||
|
} else if (utils.isString(contentType = requestHeaders.getContentType())) {
|
||||||
|
// fix semicolon duplication issue for ReactNative FormData implementation
|
||||||
|
requestHeaders.setContentType(contentType.replace(/^\s*(multipart\/form-data);+/, '$1'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var request = new XMLHttpRequest();
|
var request = new XMLHttpRequest();
|
||||||
|
|
||||||
// HTTP basic authentication
|
// HTTP basic authentication
|
||||||
@@ -2164,7 +2187,8 @@
|
|||||||
// Specifically not if we're in a web worker, or react-native.
|
// Specifically not if we're in a web worker, or react-native.
|
||||||
if (platform.isStandardBrowserEnv) {
|
if (platform.isStandardBrowserEnv) {
|
||||||
// Add xsrf header
|
// Add xsrf header
|
||||||
var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
|
// regarding CVE-2023-45857 config.withCredentials condition was removed temporarily
|
||||||
|
var xsrfValue = isURLSameOrigin(fullPath) && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
|
||||||
if (xsrfValue) {
|
if (xsrfValue) {
|
||||||
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
||||||
}
|
}
|
||||||
@@ -2244,6 +2268,12 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
var renderReason = function renderReason(reason) {
|
||||||
|
return "- ".concat(reason);
|
||||||
|
};
|
||||||
|
var isResolvedHandle = function isResolvedHandle(adapter) {
|
||||||
|
return utils.isFunction(adapter) || adapter === null || adapter === false;
|
||||||
|
};
|
||||||
var adapters = {
|
var adapters = {
|
||||||
getAdapter: function getAdapter(adapters) {
|
getAdapter: function getAdapter(adapters) {
|
||||||
adapters = utils.isArray(adapters) ? adapters : [adapters];
|
adapters = utils.isArray(adapters) ? adapters : [adapters];
|
||||||
@@ -2251,20 +2281,31 @@
|
|||||||
length = _adapters.length;
|
length = _adapters.length;
|
||||||
var nameOrAdapter;
|
var nameOrAdapter;
|
||||||
var adapter;
|
var adapter;
|
||||||
|
var rejectedReasons = {};
|
||||||
for (var i = 0; i < length; i++) {
|
for (var i = 0; i < length; i++) {
|
||||||
nameOrAdapter = adapters[i];
|
nameOrAdapter = adapters[i];
|
||||||
if (adapter = utils.isString(nameOrAdapter) ? knownAdapters[nameOrAdapter.toLowerCase()] : nameOrAdapter) {
|
var id = void 0;
|
||||||
|
adapter = nameOrAdapter;
|
||||||
|
if (!isResolvedHandle(nameOrAdapter)) {
|
||||||
|
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
||||||
|
if (adapter === undefined) {
|
||||||
|
throw new AxiosError("Unknown adapter '".concat(id, "'"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (adapter) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
rejectedReasons[id || '#' + i] = adapter;
|
||||||
}
|
}
|
||||||
if (!adapter) {
|
if (!adapter) {
|
||||||
if (adapter === false) {
|
var reasons = Object.entries(rejectedReasons).map(function (_ref) {
|
||||||
throw new AxiosError("Adapter ".concat(nameOrAdapter, " is not supported by the environment"), 'ERR_NOT_SUPPORT');
|
var _ref2 = _slicedToArray(_ref, 2),
|
||||||
}
|
id = _ref2[0],
|
||||||
throw new Error(utils.hasOwnProp(knownAdapters, nameOrAdapter) ? "Adapter '".concat(nameOrAdapter, "' is not available in the build") : "Unknown adapter '".concat(nameOrAdapter, "'"));
|
state = _ref2[1];
|
||||||
}
|
return "adapter ".concat(id, " ") + (state === false ? 'is not supported by the environment' : 'is not available in the build');
|
||||||
if (!utils.isFunction(adapter)) {
|
});
|
||||||
throw new TypeError('adapter is not a function');
|
var s = length ? reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0]) : 'as no adapter specified';
|
||||||
|
throw new AxiosError("There is no suitable adapter to dispatch the request " + s, 'ERR_NOT_SUPPORT');
|
||||||
}
|
}
|
||||||
return adapter;
|
return adapter;
|
||||||
},
|
},
|
||||||
@@ -2420,7 +2461,7 @@
|
|||||||
return mergeDeepProperties(headersToObject(a), headersToObject(b), true);
|
return mergeDeepProperties(headersToObject(a), headersToObject(b), true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
|
utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
||||||
var merge = mergeMap[prop] || mergeDeepProperties;
|
var merge = mergeMap[prop] || mergeDeepProperties;
|
||||||
var configValue = merge(config1[prop], config2[prop], prop);
|
var configValue = merge(config1[prop], config2[prop], prop);
|
||||||
utils.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
|
utils.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
|
||||||
@@ -2428,7 +2469,7 @@
|
|||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
var VERSION = "1.3.4";
|
var VERSION = "1.6.0";
|
||||||
|
|
||||||
var validators$1 = {};
|
var validators$1 = {};
|
||||||
|
|
||||||
@@ -2555,20 +2596,25 @@
|
|||||||
clarifyTimeoutError: validators.transitional(validators["boolean"])
|
clarifyTimeoutError: validators.transitional(validators["boolean"])
|
||||||
}, false);
|
}, false);
|
||||||
}
|
}
|
||||||
if (paramsSerializer !== undefined) {
|
if (paramsSerializer != null) {
|
||||||
validator.assertOptions(paramsSerializer, {
|
if (utils.isFunction(paramsSerializer)) {
|
||||||
encode: validators["function"],
|
config.paramsSerializer = {
|
||||||
serialize: validators["function"]
|
serialize: paramsSerializer
|
||||||
}, true);
|
};
|
||||||
|
} else {
|
||||||
|
validator.assertOptions(paramsSerializer, {
|
||||||
|
encode: validators["function"],
|
||||||
|
serialize: validators["function"]
|
||||||
|
}, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set config.method
|
// Set config.method
|
||||||
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
||||||
var contextHeaders;
|
|
||||||
|
|
||||||
// Flatten headers
|
// Flatten headers
|
||||||
contextHeaders = headers && utils.merge(headers.common, headers[config.method]);
|
var contextHeaders = headers && utils.merge(headers.common, headers[config.method]);
|
||||||
contextHeaders && utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function (method) {
|
headers && utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function (method) {
|
||||||
delete headers[method];
|
delete headers[method];
|
||||||
});
|
});
|
||||||
config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
|
config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
|
||||||
@@ -2955,6 +3001,7 @@
|
|||||||
axios.formToJSON = function (thing) {
|
axios.formToJSON = function (thing) {
|
||||||
return formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
|
return formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
|
||||||
};
|
};
|
||||||
|
axios.getAdapter = adapters.getAdapter;
|
||||||
axios.HttpStatusCode = HttpStatusCode$1;
|
axios.HttpStatusCode = HttpStatusCode$1;
|
||||||
axios["default"] = axios;
|
axios["default"] = axios;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user