|
|
@ -124,7 +124,7 @@ __webpack_require__.r(__webpack_exports__); |
|
|
|
getComponent |
|
|
|
) { |
|
|
|
return template( |
|
|
|
'<div expr2="expr2" class="field-error"></div>', |
|
|
|
'<div expr0="expr0" class="field-error"></div>', |
|
|
|
[ |
|
|
|
{ |
|
|
|
'type': bindingTypes.IF, |
|
|
@ -135,11 +135,11 @@ __webpack_require__.r(__webpack_exports__); |
|
|
|
return _scope.state.errors.length > 0; |
|
|
|
}, |
|
|
|
|
|
|
|
'redundantAttribute': 'expr2', |
|
|
|
'selector': '[expr2]', |
|
|
|
'redundantAttribute': 'expr0', |
|
|
|
'selector': '[expr0]', |
|
|
|
|
|
|
|
'template': template( |
|
|
|
'<ul><li expr3="expr3"></li></ul>', |
|
|
|
'<ul><li expr1="expr1"></li></ul>', |
|
|
|
[ |
|
|
|
{ |
|
|
|
'type': bindingTypes.EACH, |
|
|
@ -170,8 +170,8 @@ __webpack_require__.r(__webpack_exports__); |
|
|
|
] |
|
|
|
), |
|
|
|
|
|
|
|
'redundantAttribute': 'expr3', |
|
|
|
'selector': '[expr3]', |
|
|
|
'redundantAttribute': 'expr1', |
|
|
|
'selector': '[expr1]', |
|
|
|
'itemName': 'error', |
|
|
|
'indexName': null, |
|
|
|
|
|
|
@ -215,7 +215,7 @@ __webpack_require__.r(__webpack_exports__); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
riot__WEBPACK_IMPORTED_MODULE_3__.register('field-error', _field_error_riot__WEBPACK_IMPORTED_MODULE_2__.default) |
|
|
|
riot__WEBPACK_IMPORTED_MODULE_3__.register('field-error', _field_error_riot__WEBPACK_IMPORTED_MODULE_2__["default"]) |
|
|
|
riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error') |
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ |
|
|
@ -242,7 +242,7 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error') |
|
|
|
onMounted(props, state) { |
|
|
|
|
|
|
|
// create form validation
|
|
|
|
const formValidation = new _FormValidator__WEBPACK_IMPORTED_MODULE_1__.default('form', { |
|
|
|
const formValidation = new _FormValidator__WEBPACK_IMPORTED_MODULE_1__["default"]('form', { |
|
|
|
'title': { |
|
|
|
'length': { |
|
|
|
'maximum': 255 |
|
|
@ -289,7 +289,7 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error') |
|
|
|
getComponent |
|
|
|
) { |
|
|
|
return template( |
|
|
|
'<div class="note-form"><div class="panel"><div class="panel__body"><form id="form" novalidate><input expr13="expr13" type="hidden" name="_id"/><div class="field-group"><label class="field-label">\n title\n <input type="text" class="field-text" name="title"/></label></div><div class="field-group"><label class="field-label">\n content\n <textarea name="content" class="field-text"></textarea></label></div><div class><div class="tabs"></div></div><div><button expr14="expr14" class="button"></button><button expr15="expr15" class="button" type="submit"></button></div></form></div></div></div>', |
|
|
|
'<div class="note-form"><div class="panel"><div class="panel__body"><form id="form" novalidate><input expr20="expr20" type="hidden" name="_id"/><div class="field-group"><label class="field-label">\n title\n <input type="text" class="field-text" name="title"/></label></div><div class="field-group"><label class="field-label">\n content\n <textarea name="content" class="field-text"></textarea></label></div><div class><div class="tabs"></div></div><div><button expr21="expr21" class="button"></button><button expr22="expr22" class="button" type="submit"></button></div></form></div></div></div>', |
|
|
|
[ |
|
|
|
{ |
|
|
|
'type': bindingTypes.IF, |
|
|
@ -300,8 +300,8 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error') |
|
|
|
return _scope.state.note && _scope.state.note._id; |
|
|
|
}, |
|
|
|
|
|
|
|
'redundantAttribute': 'expr13', |
|
|
|
'selector': '[expr13]', |
|
|
|
'redundantAttribute': 'expr20', |
|
|
|
'selector': '[expr20]', |
|
|
|
|
|
|
|
'template': template( |
|
|
|
null, |
|
|
@ -332,8 +332,8 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error') |
|
|
|
return !_scope.state.note || (_scope.state.note && !_scope.state.note._id); |
|
|
|
}, |
|
|
|
|
|
|
|
'redundantAttribute': 'expr14', |
|
|
|
'selector': '[expr14]', |
|
|
|
'redundantAttribute': 'expr21', |
|
|
|
'selector': '[expr21]', |
|
|
|
|
|
|
|
'template': template( |
|
|
|
'\n Create\n ', |
|
|
@ -349,8 +349,8 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error') |
|
|
|
return _scope.state.note && _scope.state.note._id; |
|
|
|
}, |
|
|
|
|
|
|
|
'redundantAttribute': 'expr15', |
|
|
|
'selector': '[expr15]', |
|
|
|
'redundantAttribute': 'expr22', |
|
|
|
'selector': '[expr22]', |
|
|
|
|
|
|
|
'template': template( |
|
|
|
'\n Save\n ', |
|
|
@ -398,6 +398,7 @@ module.exports = function xhrAdapter(config) { |
|
|
|
return new Promise(function dispatchXhrRequest(resolve, reject) { |
|
|
|
var requestData = config.data; |
|
|
|
var requestHeaders = config.headers; |
|
|
|
var responseType = config.responseType; |
|
|
|
|
|
|
|
if (utils.isFormData(requestData)) { |
|
|
|
delete requestHeaders['Content-Type']; // Let the browser set it
|
|
|
@ -418,23 +419,14 @@ module.exports = function xhrAdapter(config) { |
|
|
|
// Set the request timeout in MS
|
|
|
|
request.timeout = config.timeout; |
|
|
|
|
|
|
|
// Listen for ready state
|
|
|
|
request.onreadystatechange = function handleLoad() { |
|
|
|
if (!request || request.readyState !== 4) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// The request errored out and we didn't get a response, this will be
|
|
|
|
// handled by onerror instead
|
|
|
|
// With one exception: request that using file: protocol, most browsers
|
|
|
|
// will return status as 0 even though it's a successful request
|
|
|
|
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { |
|
|
|
function onloadend() { |
|
|
|
if (!request) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// Prepare the response
|
|
|
|
var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; |
|
|
|
var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; |
|
|
|
var responseData = !responseType || responseType === 'text' || responseType === 'json' ? |
|
|
|
request.responseText : request.response; |
|
|
|
var response = { |
|
|
|
data: responseData, |
|
|
|
status: request.status, |
|
|
@ -448,7 +440,30 @@ module.exports = function xhrAdapter(config) { |
|
|
|
|
|
|
|
// Clean up request
|
|
|
|
request = null; |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
if ('onloadend' in request) { |
|
|
|
// Use onloadend if available
|
|
|
|
request.onloadend = onloadend; |
|
|
|
} else { |
|
|
|
// Listen for ready state to emulate onloadend
|
|
|
|
request.onreadystatechange = function handleLoad() { |
|
|
|
if (!request || request.readyState !== 4) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// The request errored out and we didn't get a response, this will be
|
|
|
|
// handled by onerror instead
|
|
|
|
// With one exception: request that using file: protocol, most browsers
|
|
|
|
// will return status as 0 even though it's a successful request
|
|
|
|
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { |
|
|
|
return; |
|
|
|
} |
|
|
|
// readystate handler is calling before onerror or ontimeout handlers,
|
|
|
|
// so we should call onloadend on the next 'tick'
|
|
|
|
setTimeout(onloadend); |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
// Handle browser request cancellation (as opposed to a manual cancellation)
|
|
|
|
request.onabort = function handleAbort() { |
|
|
@ -478,7 +493,10 @@ module.exports = function xhrAdapter(config) { |
|
|
|
if (config.timeoutErrorMessage) { |
|
|
|
timeoutErrorMessage = config.timeoutErrorMessage; |
|
|
|
} |
|
|
|
reject(createError(timeoutErrorMessage, config, 'ECONNABORTED', |
|
|
|
reject(createError( |
|
|
|
timeoutErrorMessage, |
|
|
|
config, |
|
|
|
config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED', |
|
|
|
request)); |
|
|
|
|
|
|
|
// Clean up request
|
|
|
@ -518,16 +536,8 @@ module.exports = function xhrAdapter(config) { |
|
|
|
} |
|
|
|
|
|
|
|
// Add responseType to request if needed
|
|
|
|
if (config.responseType) { |
|
|
|
try { |
|
|
|
request.responseType = config.responseType; |
|
|
|
} catch (e) { |
|
|
|
// Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.
|
|
|
|
// But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.
|
|
|
|
if (config.responseType !== 'json') { |
|
|
|
throw e; |
|
|
|
} |
|
|
|
} |
|
|
|
if (responseType && responseType !== 'json') { |
|
|
|
request.responseType = config.responseType; |
|
|
|
} |
|
|
|
|
|
|
|
// Handle progress if needed
|
|
|
@ -628,7 +638,7 @@ axios.isAxiosError = __webpack_require__(/*! ./helpers/isAxiosError */ "./node_m |
|
|
|
module.exports = axios; |
|
|
|
|
|
|
|
// Allow use of default import syntax in TypeScript
|
|
|
|
module.exports.default = axios; |
|
|
|
module.exports["default"] = axios; |
|
|
|
|
|
|
|
|
|
|
|
/***/ }), |
|
|
@ -761,7 +771,9 @@ var buildURL = __webpack_require__(/*! ../helpers/buildURL */ "./node_modules/ax |
|
|
|
var InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ "./node_modules/axios/lib/core/InterceptorManager.js"); |
|
|
|
var dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ "./node_modules/axios/lib/core/dispatchRequest.js"); |
|
|
|
var mergeConfig = __webpack_require__(/*! ./mergeConfig */ "./node_modules/axios/lib/core/mergeConfig.js"); |
|
|
|
var validator = __webpack_require__(/*! ../helpers/validator */ "./node_modules/axios/lib/helpers/validator.js"); |
|
|
|
|
|
|
|
var validators = validator.validators; |
|
|
|
/** |
|
|
|
* Create a new instance of Axios |
|
|
|
* |
|
|
@ -801,20 +813,71 @@ Axios.prototype.request = function request(config) { |
|
|
|
config.method = 'get'; |
|
|
|
} |
|
|
|
|
|
|
|
// Hook up interceptors middleware
|
|
|
|
var chain = [dispatchRequest, undefined]; |
|
|
|
var promise = Promise.resolve(config); |
|
|
|
var transitional = config.transitional; |
|
|
|
|
|
|
|
if (transitional !== undefined) { |
|
|
|
validator.assertOptions(transitional, { |
|
|
|
silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'), |
|
|
|
forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'), |
|
|
|
clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0') |
|
|
|
}, false); |
|
|
|
} |
|
|
|
|
|
|
|
// filter out skipped interceptors
|
|
|
|
var requestInterceptorChain = []; |
|
|
|
var synchronousRequestInterceptors = true; |
|
|
|
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { |
|
|
|
chain.unshift(interceptor.fulfilled, interceptor.rejected); |
|
|
|
if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; |
|
|
|
|
|
|
|
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); |
|
|
|
}); |
|
|
|
|
|
|
|
var responseInterceptorChain = []; |
|
|
|
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { |
|
|
|
chain.push(interceptor.fulfilled, interceptor.rejected); |
|
|
|
responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); |
|
|
|
}); |
|
|
|
|
|
|
|
while (chain.length) { |
|
|
|
promise = promise.then(chain.shift(), chain.shift()); |
|
|
|
var promise; |
|
|
|
|
|
|
|
if (!synchronousRequestInterceptors) { |
|
|
|
var chain = [dispatchRequest, undefined]; |
|
|
|
|
|
|
|
Array.prototype.unshift.apply(chain, requestInterceptorChain); |
|
|
|
chain = chain.concat(responseInterceptorChain); |
|
|
|
|
|
|
|
promise = Promise.resolve(config); |
|
|
|
while (chain.length) { |
|
|
|
promise = promise.then(chain.shift(), chain.shift()); |
|
|
|
} |
|
|
|
|
|
|
|
return promise; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var newConfig = config; |
|
|
|
while (requestInterceptorChain.length) { |
|
|
|
var onFulfilled = requestInterceptorChain.shift(); |
|
|
|
var onRejected = requestInterceptorChain.shift(); |
|
|
|
try { |
|
|
|
newConfig = onFulfilled(newConfig); |
|
|
|
} catch (error) { |
|
|
|
onRejected(error); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
promise = dispatchRequest(newConfig); |
|
|
|
} catch (error) { |
|
|
|
return Promise.reject(error); |
|
|
|
} |
|
|
|
|
|
|
|
while (responseInterceptorChain.length) { |
|
|
|
promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift()); |
|
|
|
} |
|
|
|
|
|
|
|
return promise; |
|
|
@ -876,10 +939,12 @@ function InterceptorManager() { |
|
|
|
* |
|
|
|
* @return {Number} An ID used to remove interceptor later |
|
|
|
*/ |
|
|
|
InterceptorManager.prototype.use = function use(fulfilled, rejected) { |
|
|
|
InterceptorManager.prototype.use = function use(fulfilled, rejected, options) { |
|
|
|
this.handlers.push({ |
|
|
|
fulfilled: fulfilled, |
|
|
|
rejected: rejected |
|
|
|
rejected: rejected, |
|
|
|
synchronous: options ? options.synchronous : false, |
|
|
|
runWhen: options ? options.runWhen : null |
|
|
|
}); |
|
|
|
return this.handlers.length - 1; |
|
|
|
}; |
|
|
@ -1012,7 +1077,8 @@ module.exports = function dispatchRequest(config) { |
|
|
|
config.headers = config.headers || {}; |
|
|
|
|
|
|
|
// Transform request data
|
|
|
|
config.data = transformData( |
|
|
|
config.data = transformData.call( |
|
|
|
config, |
|
|
|
config.data, |
|
|
|
config.headers, |
|
|
|
config.transformRequest |
|
|
@ -1038,7 +1104,8 @@ module.exports = function dispatchRequest(config) { |
|
|
|
throwIfCancellationRequested(config); |
|
|
|
|
|
|
|
// Transform response data
|
|
|
|
response.data = transformData( |
|
|
|
response.data = transformData.call( |
|
|
|
config, |
|
|
|
response.data, |
|
|
|
response.headers, |
|
|
|
config.transformResponse |
|
|
@ -1051,7 +1118,8 @@ module.exports = function dispatchRequest(config) { |
|
|
|
|
|
|
|
// Transform response data
|
|
|
|
if (reason && reason.response) { |
|
|
|
reason.response.data = transformData( |
|
|
|
reason.response.data = transformData.call( |
|
|
|
config, |
|
|
|
reason.response.data, |
|
|
|
reason.response.headers, |
|
|
|
config.transformResponse |
|
|
@ -1263,6 +1331,7 @@ module.exports = function settle(resolve, reject, response) { |
|
|
|
|
|
|
|
|
|
|
|
var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); |
|
|
|
var defaults = __webpack_require__(/*! ./../defaults */ "./node_modules/axios/lib/defaults.js"); |
|
|
|
|
|
|
|
/** |
|
|
|
* Transform the data for a request or a response |
|
|
@ -1273,9 +1342,10 @@ var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/util |
|
|
|
* @returns {*} The resulting transformed data |
|
|
|
*/ |
|
|
|
module.exports = function transformData(data, headers, fns) { |
|
|
|
var context = this || defaults; |
|
|
|
/*eslint no-param-reassign:0*/ |
|
|
|
utils.forEach(fns, function transform(fn) { |
|
|
|
data = fn(data, headers); |
|
|
|
data = fn.call(context, data, headers); |
|
|
|
}); |
|
|
|
|
|
|
|
return data; |
|
|
@ -1296,6 +1366,7 @@ module.exports = function transformData(data, headers, fns) { |
|
|
|
|
|
|
|
var utils = __webpack_require__(/*! ./utils */ "./node_modules/axios/lib/utils.js"); |
|
|
|
var normalizeHeaderName = __webpack_require__(/*! ./helpers/normalizeHeaderName */ "./node_modules/axios/lib/helpers/normalizeHeaderName.js"); |
|
|
|
var enhanceError = __webpack_require__(/*! ./core/enhanceError */ "./node_modules/axios/lib/core/enhanceError.js"); |
|
|
|
|
|
|
|
var DEFAULT_CONTENT_TYPE = { |
|
|
|
'Content-Type': 'application/x-www-form-urlencoded' |
|
|
@ -1319,12 +1390,35 @@ function getDefaultAdapter() { |
|
|
|
return adapter; |
|
|
|
} |
|
|
|
|
|
|
|
function stringifySafely(rawValue, parser, encoder) { |
|
|
|
if (utils.isString(rawValue)) { |
|
|
|
try { |
|
|
|
(parser || JSON.parse)(rawValue); |
|
|
|
return utils.trim(rawValue); |
|
|
|
} catch (e) { |
|
|
|
if (e.name !== 'SyntaxError') { |
|
|
|
throw e; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return (encoder || JSON.stringify)(rawValue); |
|
|
|
} |
|
|
|
|
|
|
|
var defaults = { |
|
|
|
|
|
|
|
transitional: { |
|
|
|
silentJSONParsing: true, |
|
|
|
forcedJSONParsing: true, |
|
|
|
clarifyTimeoutError: false |
|
|
|
}, |
|
|
|
|
|
|
|
adapter: getDefaultAdapter(), |
|
|
|
|
|
|
|
transformRequest: [function transformRequest(data, headers) { |
|
|
|
normalizeHeaderName(headers, 'Accept'); |
|
|
|
normalizeHeaderName(headers, 'Content-Type'); |
|
|
|
|
|
|
|
if (utils.isFormData(data) || |
|
|
|
utils.isArrayBuffer(data) || |
|
|
|
utils.isBuffer(data) || |
|
|
@ -1341,20 +1435,32 @@ var defaults = { |
|
|
|
setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); |
|
|
|
return data.toString(); |
|
|
|
} |
|
|
|
if (utils.isObject(data)) { |
|
|
|
setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); |
|
|
|
return JSON.stringify(data); |
|
|
|
if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) { |
|
|
|
setContentTypeIfUnset(headers, 'application/json'); |
|
|
|
return stringifySafely(data); |
|
|
|
} |
|
|
|
return data; |
|
|
|
}], |
|
|
|
|
|
|
|
transformResponse: [function transformResponse(data) { |
|
|
|
/*eslint no-param-reassign:0*/ |
|
|
|
if (typeof data === 'string') { |
|
|
|
var transitional = this.transitional; |
|
|
|
var silentJSONParsing = transitional && transitional.silentJSONParsing; |
|
|
|
var forcedJSONParsing = transitional && transitional.forcedJSONParsing; |
|
|
|
var strictJSONParsing = !silentJSONParsing && this.responseType === 'json'; |
|
|
|
|
|
|
|
if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) { |
|
|
|
try { |
|
|
|
data = JSON.parse(data); |
|
|
|
} catch (e) { /* Ignore */ } |
|
|
|
return JSON.parse(data); |
|
|
|
} catch (e) { |
|
|
|
if (strictJSONParsing) { |
|
|
|
if (e.name === 'SyntaxError') { |
|
|
|
throw enhanceError(e, this, 'E_JSON_PARSE'); |
|
|
|
} |
|
|
|
throw e; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return data; |
|
|
|
}], |
|
|
|
|
|
|
@ -1835,6 +1941,122 @@ module.exports = function spread(callback) { |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/***/ }), |
|
|
|
|
|
|
|
/***/ "./node_modules/axios/lib/helpers/validator.js": |
|
|
|
/*!*****************************************************!*\ |
|
|
|
!*** ./node_modules/axios/lib/helpers/validator.js ***! |
|
|
|
\*****************************************************/ |
|
|
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
|
|
|
|
|
|
|
"use strict"; |
|
|
|
|
|
|
|
|
|
|
|
var pkg = __webpack_require__(/*! ./../../package.json */ "./node_modules/axios/package.json"); |
|
|
|
|
|
|
|
var validators = {}; |
|
|
|
|
|
|
|
// eslint-disable-next-line func-names
|
|
|
|
['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) { |
|
|
|
validators[type] = function validator(thing) { |
|
|
|
return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; |
|
|
|
}; |
|
|
|
}); |
|
|
|
|
|
|
|
var deprecatedWarnings = {}; |
|
|
|
var currentVerArr = pkg.version.split('.'); |
|
|
|
|
|
|
|
/** |
|
|
|
* Compare package versions |
|
|
|
* @param {string} version |
|
|
|
* @param {string?} thanVersion |
|
|
|
* @returns {boolean} |
|
|
|
*/ |
|
|
|
function isOlderVersion(version, thanVersion) { |
|
|
|
var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr; |
|
|
|
var destVer = version.split('.'); |
|
|
|
for (var i = 0; i < 3; i++) { |
|
|
|
if (pkgVersionArr[i] > destVer[i]) { |
|
|
|
return true; |
|
|
|
} else if (pkgVersionArr[i] < destVer[i]) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Transitional option validator |
|
|
|
* @param {function|boolean?} validator |
|
|
|
* @param {string?} version |
|
|
|
* @param {string} message |
|
|
|
* @returns {function} |
|
|
|
*/ |
|
|
|
validators.transitional = function transitional(validator, version, message) { |
|
|
|
var isDeprecated = version && isOlderVersion(version); |
|
|
|
|
|
|
|
function formatMessage(opt, desc) { |
|
|
|
return '[Axios v' + pkg.version + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); |
|
|
|
} |
|
|
|
|
|
|
|
// eslint-disable-next-line func-names
|
|
|
|
return function(value, opt, opts) { |
|
|
|
if (validator === false) { |
|
|
|
throw new Error(formatMessage(opt, ' has been removed in ' + version)); |
|
|
|
} |
|
|
|
|
|
|
|
if (isDeprecated && !deprecatedWarnings[opt]) { |
|
|
|
deprecatedWarnings[opt] = true; |
|
|
|
// eslint-disable-next-line no-console
|
|
|
|
console.warn( |
|
|
|
formatMessage( |
|
|
|
opt, |
|
|
|
' has been deprecated since v' + version + ' and will be removed in the near future' |
|
|
|
) |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
return validator ? validator(value, opt, opts) : true; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
/** |
|
|
|
* Assert object's properties type |
|
|
|
* @param {object} options |
|
|
|
* @param {object} schema |
|
|
|
* @param {boolean?} allowUnknown |
|
|
|
*/ |
|
|
|
|
|
|
|
function assertOptions(options, schema, allowUnknown) { |
|
|
|
if (typeof options !== 'object') { |
|
|
|
throw new TypeError('options must be an object'); |
|
|
|
} |
|
|
|
var keys = Object.keys(options); |
|
|
|
var i = keys.length; |
|
|
|
while (i-- > 0) { |
|
|
|
var opt = keys[i]; |
|
|
|
var validator = schema[opt]; |
|
|
|
if (validator) { |
|
|
|
var value = options[opt]; |
|
|
|
var result = value === undefined || validator(value, opt, options); |
|
|
|
if (result !== true) { |
|
|
|
throw new TypeError('option ' + opt + ' must be ' + result); |
|
|
|
} |
|
|
|
continue; |
|
|
|
} |
|
|
|
if (allowUnknown !== true) { |
|
|
|
throw Error('Unknown option ' + opt); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
module.exports = { |
|
|
|
isOlderVersion: isOlderVersion, |
|
|
|
assertOptions: assertOptions, |
|
|
|
validators: validators |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/***/ }), |
|
|
|
|
|
|
|
/***/ "./node_modules/axios/lib/utils.js": |
|
|
@ -1848,8 +2070,6 @@ module.exports = function spread(callback) { |
|
|
|
|
|
|
|
var bind = __webpack_require__(/*! ./helpers/bind */ "./node_modules/axios/lib/helpers/bind.js"); |
|
|
|
|
|
|
|
/*global toString:true*/ |
|
|
|
|
|
|
|
// utils is a library of generic helper functions non-specific to axios
|
|
|
|
|
|
|
|
var toString = Object.prototype.toString; |
|
|
@ -2033,7 +2253,7 @@ function isURLSearchParams(val) { |
|
|
|
* @returns {String} The String freed of excess whitespace |
|
|
|
*/ |
|
|
|
function trim(str) { |
|
|
|
return str.replace(/^\s*/, '').replace(/\s*$/, ''); |
|
|
|
return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, ''); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -2296,15 +2516,20 @@ var FormValidator = /*#__PURE__*/function () { |
|
|
|
var _this2 = this; |
|
|
|
|
|
|
|
event.preventDefault(); |
|
|
|
var errors = validate_js__WEBPACK_IMPORTED_MODULE_0___default()(form_serialize__WEBPACK_IMPORTED_MODULE_1___default()(event.target, { |
|
|
|
console.log(this.constraits, event.target, form_serialize__WEBPACK_IMPORTED_MODULE_1___default()(event.target, { |
|
|
|
hash: true |
|
|
|
})); |
|
|
|
var errors = validate_js__WEBPACK_IMPORTED_MODULE_0___default().async(form_serialize__WEBPACK_IMPORTED_MODULE_1___default()(event.target, { |
|
|
|
hash: true |
|
|
|
}), this.constraits, { |
|
|
|
fullMessages: false |
|
|
|
}); |
|
|
|
|
|
|
|
if (errors) { |
|
|
|
}).then(function () { |
|
|
|
_this2.onSuccess(event, form_serialize__WEBPACK_IMPORTED_MODULE_1___default()(event.target, { |
|
|
|
hash: true |
|
|
|
})); |
|
|
|
}, function (errors) { |
|
|
|
// send each element a event
|
|
|
|
this.elements.forEach(function (element) { |
|
|
|
_this2.elements.forEach(function (element) { |
|
|
|
var elementErrors = false; // check for errors by name
|
|
|
|
|
|
|
|
if (errors[element.attributes.name.nodeValue]) { |
|
|
@ -2313,11 +2538,7 @@ var FormValidator = /*#__PURE__*/function () { |
|
|
|
|
|
|
|
_this2.dispatchCustomEvent(elementErrors, element); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
this.onSuccess(event, form_serialize__WEBPACK_IMPORTED_MODULE_1___default()(event.target, { |
|
|
|
hash: true |
|
|
|
})); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
/** |
|
|
|
* |
|
|
@ -2860,7 +3081,7 @@ __webpack_require__.r(__webpack_exports__); |
|
|
|
/* harmony export */ "version": () => (/* binding */ version), |
|
|
|
/* harmony export */ "withTypes": () => (/* binding */ withTypes) |
|
|
|
/* harmony export */ }); |
|
|
|
/* Riot v6.0.1, @license MIT */ |
|
|
|
/* Riot v6.0.3, @license MIT */ |
|
|
|
/** |
|
|
|
* Convert a string from camel case to dash-case |
|
|
|
* @param {string} string - probably a component tag name |
|
|
@ -3275,92 +3496,92 @@ var udomdiff = ((a, b, get, before) => { |
|
|
|
while (bStart < bEnd) insertBefore(get(b[bStart++], 1), node); |
|
|
|
} // remove head or tail: fast path
|
|
|
|
else if (bEnd === bStart) { |
|
|
|
while (aStart < aEnd) { |
|
|
|
// remove the node only if it's unknown or not live
|
|
|
|
if (!map || !map.has(a[aStart])) removeChild(get(a[aStart], -1)); |
|
|
|
aStart++; |
|
|
|
} |
|
|
|
} // same node: fast path
|
|
|
|
else if (a[aStart] === b[bStart]) { |
|
|
|
aStart++; |
|
|
|
bStart++; |
|
|
|
} // same tail: fast path
|
|
|
|
else if (a[aEnd - 1] === b[bEnd - 1]) { |
|
|
|
aEnd--; |
|
|
|
bEnd--; |
|
|
|
} // The once here single last swap "fast path" has been removed in v1.1.0
|
|
|
|
// https://github.com/WebReflection/udomdiff/blob/single-final-swap/esm/index.js#L69-L85
|
|
|
|
// reverse swap: also fast path
|
|
|
|
else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) { |
|
|
|
// this is a "shrink" operation that could happen in these cases:
|
|
|
|
// [1, 2, 3, 4, 5]
|
|
|
|
// [1, 4, 3, 2, 5]
|
|
|
|
// or asymmetric too
|
|
|
|
// [1, 2, 3, 4, 5]
|
|
|
|
// [1, 2, 3, 5, 6, 4]
|
|
|
|
const node = get(a[--aEnd], -1).nextSibling; |
|
|
|
insertBefore(get(b[bStart++], 1), get(a[aStart++], -1).nextSibling); |
|
|
|
insertBefore(get(b[--bEnd], 1), node); // mark the future index as identical (yeah, it's dirty, but cheap 👍)
|
|
|
|
// The main reason to do this, is that when a[aEnd] will be reached,
|
|
|
|
// the loop will likely be on the fast path, as identical to b[bEnd].
|
|
|
|
// In the best case scenario, the next loop will skip the tail,
|
|
|
|
// but in the worst one, this node will be considered as already
|
|
|
|
// processed, bailing out pretty quickly from the map index check
|
|
|
|
|
|
|
|
a[aEnd] = b[bEnd]; |
|
|
|
} // map based fallback, "slow" path
|
|
|
|
else { |
|
|
|
// the map requires an O(bEnd - bStart) operation once
|
|
|
|
// to store all future nodes indexes for later purposes.
|
|
|
|
// In the worst case scenario, this is a full O(N) cost,
|
|
|
|
// and such scenario happens at least when all nodes are different,
|
|
|
|
// but also if both first and last items of the lists are different
|
|
|
|
if (!map) { |
|
|
|
map = new Map(); |
|
|
|
let i = bStart; |
|
|
|
|
|
|
|
while (i < bEnd) map.set(b[i], i++); |
|
|
|
} // if it's a future node, hence it needs some handling
|
|
|
|
|
|
|
|
|
|
|
|
if (map.has(a[aStart])) { |
|
|
|
// grab the index of such node, 'cause it might have been processed
|
|
|
|
const index = map.get(a[aStart]); // if it's not already processed, look on demand for the next LCS
|
|
|
|
|
|
|
|
if (bStart < index && index < bEnd) { |
|
|
|
let i = aStart; // counts the amount of nodes that are the same in the future
|
|
|
|
|
|
|
|
let sequence = 1; |
|
|
|
|
|
|
|
while (++i < aEnd && i < bEnd && map.get(a[i]) === index + sequence) sequence++; // effort decision here: if the sequence is longer than replaces
|
|
|
|
// needed to reach such sequence, which would brings again this loop
|
|
|
|
// to the fast path, prepend the difference before a sequence,
|
|
|
|
// and move only the future list index forward, so that aStart
|
|
|
|
// and bStart will be aligned again, hence on the fast path.
|
|
|
|
// An example considering aStart and bStart are both 0:
|
|
|
|
// a: [1, 2, 3, 4]
|
|
|
|
// b: [7, 1, 2, 3, 6]
|
|
|
|
// this would place 7 before 1 and, from that time on, 1, 2, and 3
|
|
|
|
// will be processed at zero cost
|
|
|
|
|
|
|
|
|
|
|
|
if (sequence > index - bStart) { |
|
|
|
const node = get(a[aStart], 0); |
|
|
|
|
|
|
|
while (bStart < index) insertBefore(get(b[bStart++], 1), node); |
|
|
|
} // if the effort wasn't good enough, fallback to a replace,
|
|
|
|
// moving both source and target indexes forward, hoping that some
|
|
|
|
// similar node will be found later on, to go back to the fast path
|
|
|
|
else { |
|
|
|
replaceChild(get(b[bStart++], 1), get(a[aStart++], -1)); |
|
|
|
} |
|
|
|
} // otherwise move the source forward, 'cause there's nothing to do
|
|
|
|
else aStart++; |
|
|
|
} // this node has no meaning in the future list, so it's more than safe
|
|
|
|
// to remove it, and check the next live node out instead, meaning
|
|
|
|
// that only the live list index should be forwarded
|
|
|
|
else removeChild(get(a[aStart++], -1)); |
|
|
|
} |
|
|
|
while (aStart < aEnd) { |
|
|
|
// remove the node only if it's unknown or not live
|
|
|
|
if (!map || !map.has(a[aStart])) removeChild(get(a[aStart], -1)); |
|
|
|
aStart++; |
|
|
|
} |
|
|
|
} // same node: fast path
|
|
|
|
else if (a[aStart] === b[bStart]) { |
|
|
|
aStart++; |
|
|
|
bStart++; |
|
|
|
} // same tail: fast path
|
|
|
|
else if (a[aEnd - 1] === b[bEnd - 1]) { |
|
|
|
aEnd--; |
|
|
|
bEnd--; |
|
|
|
} // The once here single last swap "fast path" has been removed in v1.1.0
|
|
|
|
// https://github.com/WebReflection/udomdiff/blob/single-final-swap/esm/index.js#L69-L85
|
|
|
|
// reverse swap: also fast path
|
|
|
|
else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) { |
|
|
|
// this is a "shrink" operation that could happen in these cases:
|
|
|
|
// [1, 2, 3, 4, 5]
|
|
|
|
// [1, 4, 3, 2, 5]
|
|
|
|
// or asymmetric too
|
|
|
|
// [1, 2, 3, 4, 5]
|
|
|
|
// [1, 2, 3, 5, 6, 4]
|
|
|
|
const node = get(a[--aEnd], -1).nextSibling; |
|
|
|
insertBefore(get(b[bStart++], 1), get(a[aStart++], -1).nextSibling); |
|
|
|
insertBefore(get(b[--bEnd], 1), node); // mark the future index as identical (yeah, it's dirty, but cheap 👍)
|
|
|
|
// The main reason to do this, is that when a[aEnd] will be reached,
|
|
|
|
// the loop will likely be on the fast path, as identical to b[bEnd].
|
|
|
|
// In the best case scenario, the next loop will skip the tail,
|
|
|
|
// but in the worst one, this node will be considered as already
|
|
|
|
// processed, bailing out pretty quickly from the map index check
|
|
|
|
|
|
|
|
a[aEnd] = b[bEnd]; |
|
|
|
} // map based fallback, "slow" path
|
|
|
|
else { |
|
|
|
// the map requires an O(bEnd - bStart) operation once
|
|
|
|
// to store all future nodes indexes for later purposes.
|
|
|
|
// In the worst case scenario, this is a full O(N) cost,
|
|
|
|
// and such scenario happens at least when all nodes are different,
|
|
|
|
// but also if both first and last items of the lists are different
|
|
|
|
if (!map) { |
|
|
|
map = new Map(); |
|
|
|
let i = bStart; |
|
|
|
|
|
|
|
while (i < bEnd) map.set(b[i], i++); |
|
|
|
} // if it's a future node, hence it needs some handling
|
|
|
|
|
|
|
|
|
|
|
|
if (map.has(a[aStart])) { |
|
|
|
// grab the index of such node, 'cause it might have been processed
|
|
|
|
const index = map.get(a[aStart]); // if it's not already processed, look on demand for the next LCS
|
|
|
|
|
|
|
|
if (bStart < index && index < bEnd) { |
|
|
|
let i = aStart; // counts the amount of nodes that are the same in the future
|
|
|
|
|
|
|
|
let sequence = 1; |
|
|
|
|
|
|
|
while (++i < aEnd && i < bEnd && map.get(a[i]) === index + sequence) sequence++; // effort decision here: if the sequence is longer than replaces
|
|
|
|
// needed to reach such sequence, which would brings again this loop
|
|
|
|
// to the fast path, prepend the difference before a sequence,
|
|
|
|
// and move only the future list index forward, so that aStart
|
|
|
|
// and bStart will be aligned again, hence on the fast path.
|
|
|
|
// An example considering aStart and bStart are both 0:
|
|
|
|
// a: [1, 2, 3, 4]
|
|
|
|
// b: [7, 1, 2, 3, 6]
|
|
|
|
// this would place 7 before 1 and, from that time on, 1, 2, and 3
|
|
|
|
// will be processed at zero cost
|
|
|
|
|
|
|
|
|
|
|
|
if (sequence > index - bStart) { |
|
|
|
const node = get(a[aStart], 0); |
|
|
|
|
|
|
|
while (bStart < index) insertBefore(get(b[bStart++], 1), node); |
|
|
|
} // if the effort wasn't good enough, fallback to a replace,
|
|
|
|
// moving both source and target indexes forward, hoping that some
|
|
|
|
// similar node will be found later on, to go back to the fast path
|
|
|
|
else { |
|
|
|
replaceChild(get(b[bStart++], 1), get(a[aStart++], -1)); |
|
|
|
} |
|
|
|
} // otherwise move the source forward, 'cause there's nothing to do
|
|
|
|
else aStart++; |
|
|
|
} // this node has no meaning in the future list, so it's more than safe
|
|
|
|
// to remove it, and check the next live node out instead, meaning
|
|
|
|
// that only the live list index should be forwarded
|
|
|
|
else removeChild(get(a[aStart++], -1)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return b; |
|
|
@ -4974,10 +5195,10 @@ function createPureComponent(pureFactoryFunction, _ref) { |
|
|
|
// intercept the mount calls to bind the DOM node to the pure object created
|
|
|
|
// see also https://github.com/riot/riot/issues/2806
|
|
|
|
if (method === MOUNT_METHOD_KEY) { |
|
|
|
const [el] = args; // mark this node as pure element
|
|
|
|
const [element] = args; // mark this node as pure element
|
|
|
|
|
|
|
|
el[IS_PURE_SYMBOL] = true; |
|
|
|
bindDOMNodeToComponentObject(el, component); |
|
|
|
defineProperty(element, IS_PURE_SYMBOL, true); |
|
|
|
bindDOMNodeToComponentObject(element, component); |
|
|
|
} |
|
|
|
|
|
|
|
component[method](...args); |
|
|
@ -5172,6 +5393,8 @@ function enhanceComponentAPI(component, _ref5) { |
|
|
|
state = {}; |
|
|
|
} |
|
|
|
|
|
|
|
// any element mounted passing through this function can't be a pure component
|
|
|
|
defineProperty(element, IS_PURE_SYMBOL, false); |
|
|
|
this[PARENT_KEY_SYMBOL] = parentScope; |
|
|
|
this[ATTRIBUTES_KEY_SYMBOL] = createAttributeBindings(element, attributes).mount(parentScope); |
|
|
|
defineProperty(this, PROPS_KEY, Object.freeze(Object.assign({}, evaluateInitialProps(element, props), evaluateAttributeExpressions(this[ATTRIBUTES_KEY_SYMBOL].expressions)))); |
|
|
@ -5407,7 +5630,7 @@ function pure(func) { |
|
|
|
const withTypes = component => component; |
|
|
|
/** @type {string} current riot version */ |
|
|
|
|
|
|
|
const version = 'v6.0.1'; // expose some internal stuff that might be used from external tools
|
|
|
|
const version = 'v6.0.3'; // expose some internal stuff that might be used from external tools
|
|
|
|
|
|
|
|
const __ = { |
|
|
|
cssManager, |
|
|
@ -6684,6 +6907,17 @@ const __ = { |
|
|
|
__webpack_require__.amdD); |
|
|
|
|
|
|
|
|
|
|
|
/***/ }), |
|
|
|
|
|
|
|
/***/ "./node_modules/axios/package.json": |
|
|
|
/*!*****************************************!*\ |
|
|
|
!*** ./node_modules/axios/package.json ***! |
|
|
|
\*****************************************/ |
|
|
|
/***/ ((module) => { |
|
|
|
|
|
|
|
"use strict"; |
|
|
|
module.exports = JSON.parse('{"_from":"axios@^0.21.1","_id":"axios@0.21.4","_inBundle":false,"_integrity":"sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==","_location":"/axios","_phantomChildren":{},"_requested":{"type":"range","registry":true,"raw":"axios@^0.21.1","name":"axios","escapedName":"axios","rawSpec":"^0.21.1","saveSpec":null,"fetchSpec":"^0.21.1"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/axios/-/axios-0.21.4.tgz","_shasum":"c67b90dc0568e5c1cf2b0b858c43ba28e2eda575","_spec":"axios@^0.21.1","_where":"/home/herrhase/Workspace/herrhase/nano-buckets","author":{"name":"Matt Zabriskie"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"bugs":{"url":"https://github.com/axios/axios/issues"},"bundleDependencies":false,"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}],"dependencies":{"follow-redirects":"^1.14.0"},"deprecated":false,"description":"Promise based HTTP client for the browser and node.js","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"homepage":"https://axios-http.com","jsdelivr":"dist/axios.min.js","keywords":["xhr","http","ajax","promise","node"],"license":"MIT","main":"index.js","name":"axios","repository":{"type":"git","url":"git+https://github.com/axios/axios.git"},"scripts":{"build":"NODE_ENV=production grunt build","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","examples":"node ./examples/server.js","fix":"eslint --fix lib/**/*.js","postversion":"git push && git push --tags","preversion":"npm test","start":"node ./sandbox/server.js","test":"grunt test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},"typings":"./index.d.ts","unpkg":"dist/axios.min.js","version":"0.21.4"}'); |
|
|
|
|
|
|
|
/***/ }) |
|
|
|
|
|
|
|
/******/ }); |
|
|
@ -6785,7 +7019,7 @@ __webpack_require__.r(__webpack_exports__); |
|
|
|
/* harmony import */ var _components_note_form_riot__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/note-form.riot */ "./resources/js/components/note-form.riot"); |
|
|
|
|
|
|
|
|
|
|
|
riot__WEBPACK_IMPORTED_MODULE_1__.register('note-form', _components_note_form_riot__WEBPACK_IMPORTED_MODULE_0__.default); |
|
|
|
riot__WEBPACK_IMPORTED_MODULE_1__.register('note-form', _components_note_form_riot__WEBPACK_IMPORTED_MODULE_0__["default"]); |
|
|
|
riot__WEBPACK_IMPORTED_MODULE_1__.mount('note-form'); |
|
|
|
})(); |
|
|
|
|
|
|
|