60855 lines
2.4 MiB
Vendored
60855 lines
2.4 MiB
Vendored
/******/ (() => { // webpackBootstrap
|
|
/******/ var __webpack_modules__ = ({
|
|
|
|
/***/ "./node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js":
|
|
/*!***************************************************************************!*\
|
|
!*** ./node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js ***!
|
|
\***************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ BASE_TRANSITION: () => (/* binding */ BASE_TRANSITION),
|
|
/* harmony export */ CAMELIZE: () => (/* binding */ CAMELIZE),
|
|
/* harmony export */ CAPITALIZE: () => (/* binding */ CAPITALIZE),
|
|
/* harmony export */ CREATE_BLOCK: () => (/* binding */ CREATE_BLOCK),
|
|
/* harmony export */ CREATE_COMMENT: () => (/* binding */ CREATE_COMMENT),
|
|
/* harmony export */ CREATE_ELEMENT_BLOCK: () => (/* binding */ CREATE_ELEMENT_BLOCK),
|
|
/* harmony export */ CREATE_ELEMENT_VNODE: () => (/* binding */ CREATE_ELEMENT_VNODE),
|
|
/* harmony export */ CREATE_SLOTS: () => (/* binding */ CREATE_SLOTS),
|
|
/* harmony export */ CREATE_STATIC: () => (/* binding */ CREATE_STATIC),
|
|
/* harmony export */ CREATE_TEXT: () => (/* binding */ CREATE_TEXT),
|
|
/* harmony export */ CREATE_VNODE: () => (/* binding */ CREATE_VNODE),
|
|
/* harmony export */ FRAGMENT: () => (/* binding */ FRAGMENT),
|
|
/* harmony export */ GUARD_REACTIVE_PROPS: () => (/* binding */ GUARD_REACTIVE_PROPS),
|
|
/* harmony export */ IS_MEMO_SAME: () => (/* binding */ IS_MEMO_SAME),
|
|
/* harmony export */ IS_REF: () => (/* binding */ IS_REF),
|
|
/* harmony export */ KEEP_ALIVE: () => (/* binding */ KEEP_ALIVE),
|
|
/* harmony export */ MERGE_PROPS: () => (/* binding */ MERGE_PROPS),
|
|
/* harmony export */ NORMALIZE_CLASS: () => (/* binding */ NORMALIZE_CLASS),
|
|
/* harmony export */ NORMALIZE_PROPS: () => (/* binding */ NORMALIZE_PROPS),
|
|
/* harmony export */ NORMALIZE_STYLE: () => (/* binding */ NORMALIZE_STYLE),
|
|
/* harmony export */ OPEN_BLOCK: () => (/* binding */ OPEN_BLOCK),
|
|
/* harmony export */ POP_SCOPE_ID: () => (/* binding */ POP_SCOPE_ID),
|
|
/* harmony export */ PUSH_SCOPE_ID: () => (/* binding */ PUSH_SCOPE_ID),
|
|
/* harmony export */ RENDER_LIST: () => (/* binding */ RENDER_LIST),
|
|
/* harmony export */ RENDER_SLOT: () => (/* binding */ RENDER_SLOT),
|
|
/* harmony export */ RESOLVE_COMPONENT: () => (/* binding */ RESOLVE_COMPONENT),
|
|
/* harmony export */ RESOLVE_DIRECTIVE: () => (/* binding */ RESOLVE_DIRECTIVE),
|
|
/* harmony export */ RESOLVE_DYNAMIC_COMPONENT: () => (/* binding */ RESOLVE_DYNAMIC_COMPONENT),
|
|
/* harmony export */ RESOLVE_FILTER: () => (/* binding */ RESOLVE_FILTER),
|
|
/* harmony export */ SET_BLOCK_TRACKING: () => (/* binding */ SET_BLOCK_TRACKING),
|
|
/* harmony export */ SUSPENSE: () => (/* binding */ SUSPENSE),
|
|
/* harmony export */ TELEPORT: () => (/* binding */ TELEPORT),
|
|
/* harmony export */ TO_DISPLAY_STRING: () => (/* binding */ TO_DISPLAY_STRING),
|
|
/* harmony export */ TO_HANDLERS: () => (/* binding */ TO_HANDLERS),
|
|
/* harmony export */ TO_HANDLER_KEY: () => (/* binding */ TO_HANDLER_KEY),
|
|
/* harmony export */ TS_NODE_TYPES: () => (/* binding */ TS_NODE_TYPES),
|
|
/* harmony export */ UNREF: () => (/* binding */ UNREF),
|
|
/* harmony export */ WITH_CTX: () => (/* binding */ WITH_CTX),
|
|
/* harmony export */ WITH_DIRECTIVES: () => (/* binding */ WITH_DIRECTIVES),
|
|
/* harmony export */ WITH_MEMO: () => (/* binding */ WITH_MEMO),
|
|
/* harmony export */ advancePositionWithClone: () => (/* binding */ advancePositionWithClone),
|
|
/* harmony export */ advancePositionWithMutation: () => (/* binding */ advancePositionWithMutation),
|
|
/* harmony export */ assert: () => (/* binding */ assert),
|
|
/* harmony export */ baseCompile: () => (/* binding */ baseCompile),
|
|
/* harmony export */ baseParse: () => (/* binding */ baseParse),
|
|
/* harmony export */ buildDirectiveArgs: () => (/* binding */ buildDirectiveArgs),
|
|
/* harmony export */ buildProps: () => (/* binding */ buildProps),
|
|
/* harmony export */ buildSlots: () => (/* binding */ buildSlots),
|
|
/* harmony export */ checkCompatEnabled: () => (/* binding */ checkCompatEnabled),
|
|
/* harmony export */ convertToBlock: () => (/* binding */ convertToBlock),
|
|
/* harmony export */ createArrayExpression: () => (/* binding */ createArrayExpression),
|
|
/* harmony export */ createAssignmentExpression: () => (/* binding */ createAssignmentExpression),
|
|
/* harmony export */ createBlockStatement: () => (/* binding */ createBlockStatement),
|
|
/* harmony export */ createCacheExpression: () => (/* binding */ createCacheExpression),
|
|
/* harmony export */ createCallExpression: () => (/* binding */ createCallExpression),
|
|
/* harmony export */ createCompilerError: () => (/* binding */ createCompilerError),
|
|
/* harmony export */ createCompoundExpression: () => (/* binding */ createCompoundExpression),
|
|
/* harmony export */ createConditionalExpression: () => (/* binding */ createConditionalExpression),
|
|
/* harmony export */ createForLoopParams: () => (/* binding */ createForLoopParams),
|
|
/* harmony export */ createFunctionExpression: () => (/* binding */ createFunctionExpression),
|
|
/* harmony export */ createIfStatement: () => (/* binding */ createIfStatement),
|
|
/* harmony export */ createInterpolation: () => (/* binding */ createInterpolation),
|
|
/* harmony export */ createObjectExpression: () => (/* binding */ createObjectExpression),
|
|
/* harmony export */ createObjectProperty: () => (/* binding */ createObjectProperty),
|
|
/* harmony export */ createReturnStatement: () => (/* binding */ createReturnStatement),
|
|
/* harmony export */ createRoot: () => (/* binding */ createRoot),
|
|
/* harmony export */ createSequenceExpression: () => (/* binding */ createSequenceExpression),
|
|
/* harmony export */ createSimpleExpression: () => (/* binding */ createSimpleExpression),
|
|
/* harmony export */ createStructuralDirectiveTransform: () => (/* binding */ createStructuralDirectiveTransform),
|
|
/* harmony export */ createTemplateLiteral: () => (/* binding */ createTemplateLiteral),
|
|
/* harmony export */ createTransformContext: () => (/* binding */ createTransformContext),
|
|
/* harmony export */ createVNodeCall: () => (/* binding */ createVNodeCall),
|
|
/* harmony export */ extractIdentifiers: () => (/* binding */ extractIdentifiers),
|
|
/* harmony export */ findDir: () => (/* binding */ findDir),
|
|
/* harmony export */ findProp: () => (/* binding */ findProp),
|
|
/* harmony export */ generate: () => (/* binding */ generate),
|
|
/* harmony export */ generateCodeFrame: () => (/* reexport safe */ _vue_shared__WEBPACK_IMPORTED_MODULE_0__.generateCodeFrame),
|
|
/* harmony export */ getBaseTransformPreset: () => (/* binding */ getBaseTransformPreset),
|
|
/* harmony export */ getConstantType: () => (/* binding */ getConstantType),
|
|
/* harmony export */ getInnerRange: () => (/* binding */ getInnerRange),
|
|
/* harmony export */ getMemoedVNodeCall: () => (/* binding */ getMemoedVNodeCall),
|
|
/* harmony export */ getVNodeBlockHelper: () => (/* binding */ getVNodeBlockHelper),
|
|
/* harmony export */ getVNodeHelper: () => (/* binding */ getVNodeHelper),
|
|
/* harmony export */ hasDynamicKeyVBind: () => (/* binding */ hasDynamicKeyVBind),
|
|
/* harmony export */ hasScopeRef: () => (/* binding */ hasScopeRef),
|
|
/* harmony export */ helperNameMap: () => (/* binding */ helperNameMap),
|
|
/* harmony export */ injectProp: () => (/* binding */ injectProp),
|
|
/* harmony export */ isBuiltInType: () => (/* binding */ isBuiltInType),
|
|
/* harmony export */ isCoreComponent: () => (/* binding */ isCoreComponent),
|
|
/* harmony export */ isFunctionType: () => (/* binding */ isFunctionType),
|
|
/* harmony export */ isInDestructureAssignment: () => (/* binding */ isInDestructureAssignment),
|
|
/* harmony export */ isMemberExpression: () => (/* binding */ isMemberExpression),
|
|
/* harmony export */ isMemberExpressionBrowser: () => (/* binding */ isMemberExpressionBrowser),
|
|
/* harmony export */ isMemberExpressionNode: () => (/* binding */ isMemberExpressionNode),
|
|
/* harmony export */ isReferencedIdentifier: () => (/* binding */ isReferencedIdentifier),
|
|
/* harmony export */ isSimpleIdentifier: () => (/* binding */ isSimpleIdentifier),
|
|
/* harmony export */ isSlotOutlet: () => (/* binding */ isSlotOutlet),
|
|
/* harmony export */ isStaticArgOf: () => (/* binding */ isStaticArgOf),
|
|
/* harmony export */ isStaticExp: () => (/* binding */ isStaticExp),
|
|
/* harmony export */ isStaticProperty: () => (/* binding */ isStaticProperty),
|
|
/* harmony export */ isStaticPropertyKey: () => (/* binding */ isStaticPropertyKey),
|
|
/* harmony export */ isTemplateNode: () => (/* binding */ isTemplateNode),
|
|
/* harmony export */ isText: () => (/* binding */ isText$1),
|
|
/* harmony export */ isVSlot: () => (/* binding */ isVSlot),
|
|
/* harmony export */ locStub: () => (/* binding */ locStub),
|
|
/* harmony export */ noopDirectiveTransform: () => (/* binding */ noopDirectiveTransform),
|
|
/* harmony export */ processExpression: () => (/* binding */ processExpression),
|
|
/* harmony export */ processFor: () => (/* binding */ processFor),
|
|
/* harmony export */ processIf: () => (/* binding */ processIf),
|
|
/* harmony export */ processSlotOutlet: () => (/* binding */ processSlotOutlet),
|
|
/* harmony export */ registerRuntimeHelpers: () => (/* binding */ registerRuntimeHelpers),
|
|
/* harmony export */ resolveComponentType: () => (/* binding */ resolveComponentType),
|
|
/* harmony export */ stringifyExpression: () => (/* binding */ stringifyExpression),
|
|
/* harmony export */ toValidAssetId: () => (/* binding */ toValidAssetId),
|
|
/* harmony export */ trackSlotScopes: () => (/* binding */ trackSlotScopes),
|
|
/* harmony export */ trackVForSlotScopes: () => (/* binding */ trackVForSlotScopes),
|
|
/* harmony export */ transform: () => (/* binding */ transform),
|
|
/* harmony export */ transformBind: () => (/* binding */ transformBind),
|
|
/* harmony export */ transformElement: () => (/* binding */ transformElement),
|
|
/* harmony export */ transformExpression: () => (/* binding */ transformExpression),
|
|
/* harmony export */ transformModel: () => (/* binding */ transformModel),
|
|
/* harmony export */ transformOn: () => (/* binding */ transformOn),
|
|
/* harmony export */ traverseNode: () => (/* binding */ traverseNode),
|
|
/* harmony export */ walkBlockDeclarations: () => (/* binding */ walkBlockDeclarations),
|
|
/* harmony export */ walkFunctionParams: () => (/* binding */ walkFunctionParams),
|
|
/* harmony export */ walkIdentifiers: () => (/* binding */ walkIdentifiers),
|
|
/* harmony export */ warnDeprecation: () => (/* binding */ warnDeprecation)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _vue_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/shared */ "./node_modules/@vue/shared/dist/shared.esm-bundler.js");
|
|
|
|
|
|
|
|
function defaultOnError(error) {
|
|
throw error;
|
|
}
|
|
function defaultOnWarn(msg) {
|
|
true && console.warn(`[Vue warn] ${msg.message}`);
|
|
}
|
|
function createCompilerError(code, loc, messages, additionalMessage) {
|
|
const msg = true ? (messages || errorMessages)[code] + (additionalMessage || ``) : 0;
|
|
const error = new SyntaxError(String(msg));
|
|
error.code = code;
|
|
error.loc = loc;
|
|
return error;
|
|
}
|
|
const errorMessages = {
|
|
// parse errors
|
|
[0]: "Illegal comment.",
|
|
[1]: "CDATA section is allowed only in XML context.",
|
|
[2]: "Duplicate attribute.",
|
|
[3]: "End tag cannot have attributes.",
|
|
[4]: "Illegal '/' in tags.",
|
|
[5]: "Unexpected EOF in tag.",
|
|
[6]: "Unexpected EOF in CDATA section.",
|
|
[7]: "Unexpected EOF in comment.",
|
|
[8]: "Unexpected EOF in script.",
|
|
[9]: "Unexpected EOF in tag.",
|
|
[10]: "Incorrectly closed comment.",
|
|
[11]: "Incorrectly opened comment.",
|
|
[12]: "Illegal tag name. Use '<' to print '<'.",
|
|
[13]: "Attribute value was expected.",
|
|
[14]: "End tag name was expected.",
|
|
[15]: "Whitespace was expected.",
|
|
[16]: "Unexpected '<!--' in comment.",
|
|
[17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`,
|
|
[18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",
|
|
[19]: "Attribute name cannot start with '='.",
|
|
[21]: "'<?' is allowed only in XML context.",
|
|
[20]: `Unexpected null character.`,
|
|
[22]: "Illegal '/' in tags.",
|
|
// Vue-specific parse errors
|
|
[23]: "Invalid end tag.",
|
|
[24]: "Element is missing end tag.",
|
|
[25]: "Interpolation end sign was not found.",
|
|
[27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",
|
|
[26]: "Legal directive name was expected.",
|
|
// transform errors
|
|
[28]: `v-if/v-else-if is missing expression.`,
|
|
[29]: `v-if/else branches must use unique keys.`,
|
|
[30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`,
|
|
[31]: `v-for is missing expression.`,
|
|
[32]: `v-for has invalid expression.`,
|
|
[33]: `<template v-for> key should be placed on the <template> tag.`,
|
|
[34]: `v-bind is missing expression.`,
|
|
[35]: `v-on is missing expression.`,
|
|
[36]: `Unexpected custom directive on <slot> outlet.`,
|
|
[37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`,
|
|
[38]: `Duplicate slot names found. `,
|
|
[39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`,
|
|
[40]: `v-slot can only be used on components or <template> tags.`,
|
|
[41]: `v-model is missing expression.`,
|
|
[42]: `v-model value must be a valid JavaScript member expression.`,
|
|
[43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
|
|
[44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
|
|
Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
|
|
[45]: `Error parsing JavaScript expression: `,
|
|
[46]: `<KeepAlive> expects exactly one child component.`,
|
|
// generic errors
|
|
[47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
|
|
[48]: `ES module mode is not supported in this build of compiler.`,
|
|
[49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
|
|
[50]: `"scopeId" option is only supported in module mode.`,
|
|
// deprecations
|
|
[51]: `@vnode-* hooks in templates are deprecated. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support will be removed in 3.4.`,
|
|
[52]: `v-is="component-name" has been deprecated. Use is="vue:component-name" instead. v-is support will be removed in 3.4.`,
|
|
// just to fulfill types
|
|
[53]: ``
|
|
};
|
|
|
|
const FRAGMENT = Symbol( true ? `Fragment` : 0);
|
|
const TELEPORT = Symbol( true ? `Teleport` : 0);
|
|
const SUSPENSE = Symbol( true ? `Suspense` : 0);
|
|
const KEEP_ALIVE = Symbol( true ? `KeepAlive` : 0);
|
|
const BASE_TRANSITION = Symbol( true ? `BaseTransition` : 0);
|
|
const OPEN_BLOCK = Symbol( true ? `openBlock` : 0);
|
|
const CREATE_BLOCK = Symbol( true ? `createBlock` : 0);
|
|
const CREATE_ELEMENT_BLOCK = Symbol( true ? `createElementBlock` : 0);
|
|
const CREATE_VNODE = Symbol( true ? `createVNode` : 0);
|
|
const CREATE_ELEMENT_VNODE = Symbol( true ? `createElementVNode` : 0);
|
|
const CREATE_COMMENT = Symbol( true ? `createCommentVNode` : 0);
|
|
const CREATE_TEXT = Symbol( true ? `createTextVNode` : 0);
|
|
const CREATE_STATIC = Symbol( true ? `createStaticVNode` : 0);
|
|
const RESOLVE_COMPONENT = Symbol( true ? `resolveComponent` : 0);
|
|
const RESOLVE_DYNAMIC_COMPONENT = Symbol(
|
|
true ? `resolveDynamicComponent` : 0
|
|
);
|
|
const RESOLVE_DIRECTIVE = Symbol( true ? `resolveDirective` : 0);
|
|
const RESOLVE_FILTER = Symbol( true ? `resolveFilter` : 0);
|
|
const WITH_DIRECTIVES = Symbol( true ? `withDirectives` : 0);
|
|
const RENDER_LIST = Symbol( true ? `renderList` : 0);
|
|
const RENDER_SLOT = Symbol( true ? `renderSlot` : 0);
|
|
const CREATE_SLOTS = Symbol( true ? `createSlots` : 0);
|
|
const TO_DISPLAY_STRING = Symbol( true ? `toDisplayString` : 0);
|
|
const MERGE_PROPS = Symbol( true ? `mergeProps` : 0);
|
|
const NORMALIZE_CLASS = Symbol( true ? `normalizeClass` : 0);
|
|
const NORMALIZE_STYLE = Symbol( true ? `normalizeStyle` : 0);
|
|
const NORMALIZE_PROPS = Symbol( true ? `normalizeProps` : 0);
|
|
const GUARD_REACTIVE_PROPS = Symbol( true ? `guardReactiveProps` : 0);
|
|
const TO_HANDLERS = Symbol( true ? `toHandlers` : 0);
|
|
const CAMELIZE = Symbol( true ? `camelize` : 0);
|
|
const CAPITALIZE = Symbol( true ? `capitalize` : 0);
|
|
const TO_HANDLER_KEY = Symbol( true ? `toHandlerKey` : 0);
|
|
const SET_BLOCK_TRACKING = Symbol( true ? `setBlockTracking` : 0);
|
|
const PUSH_SCOPE_ID = Symbol( true ? `pushScopeId` : 0);
|
|
const POP_SCOPE_ID = Symbol( true ? `popScopeId` : 0);
|
|
const WITH_CTX = Symbol( true ? `withCtx` : 0);
|
|
const UNREF = Symbol( true ? `unref` : 0);
|
|
const IS_REF = Symbol( true ? `isRef` : 0);
|
|
const WITH_MEMO = Symbol( true ? `withMemo` : 0);
|
|
const IS_MEMO_SAME = Symbol( true ? `isMemoSame` : 0);
|
|
const helperNameMap = {
|
|
[FRAGMENT]: `Fragment`,
|
|
[TELEPORT]: `Teleport`,
|
|
[SUSPENSE]: `Suspense`,
|
|
[KEEP_ALIVE]: `KeepAlive`,
|
|
[BASE_TRANSITION]: `BaseTransition`,
|
|
[OPEN_BLOCK]: `openBlock`,
|
|
[CREATE_BLOCK]: `createBlock`,
|
|
[CREATE_ELEMENT_BLOCK]: `createElementBlock`,
|
|
[CREATE_VNODE]: `createVNode`,
|
|
[CREATE_ELEMENT_VNODE]: `createElementVNode`,
|
|
[CREATE_COMMENT]: `createCommentVNode`,
|
|
[CREATE_TEXT]: `createTextVNode`,
|
|
[CREATE_STATIC]: `createStaticVNode`,
|
|
[RESOLVE_COMPONENT]: `resolveComponent`,
|
|
[RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`,
|
|
[RESOLVE_DIRECTIVE]: `resolveDirective`,
|
|
[RESOLVE_FILTER]: `resolveFilter`,
|
|
[WITH_DIRECTIVES]: `withDirectives`,
|
|
[RENDER_LIST]: `renderList`,
|
|
[RENDER_SLOT]: `renderSlot`,
|
|
[CREATE_SLOTS]: `createSlots`,
|
|
[TO_DISPLAY_STRING]: `toDisplayString`,
|
|
[MERGE_PROPS]: `mergeProps`,
|
|
[NORMALIZE_CLASS]: `normalizeClass`,
|
|
[NORMALIZE_STYLE]: `normalizeStyle`,
|
|
[NORMALIZE_PROPS]: `normalizeProps`,
|
|
[GUARD_REACTIVE_PROPS]: `guardReactiveProps`,
|
|
[TO_HANDLERS]: `toHandlers`,
|
|
[CAMELIZE]: `camelize`,
|
|
[CAPITALIZE]: `capitalize`,
|
|
[TO_HANDLER_KEY]: `toHandlerKey`,
|
|
[SET_BLOCK_TRACKING]: `setBlockTracking`,
|
|
[PUSH_SCOPE_ID]: `pushScopeId`,
|
|
[POP_SCOPE_ID]: `popScopeId`,
|
|
[WITH_CTX]: `withCtx`,
|
|
[UNREF]: `unref`,
|
|
[IS_REF]: `isRef`,
|
|
[WITH_MEMO]: `withMemo`,
|
|
[IS_MEMO_SAME]: `isMemoSame`
|
|
};
|
|
function registerRuntimeHelpers(helpers) {
|
|
Object.getOwnPropertySymbols(helpers).forEach((s) => {
|
|
helperNameMap[s] = helpers[s];
|
|
});
|
|
}
|
|
|
|
const locStub = {
|
|
source: "",
|
|
start: { line: 1, column: 1, offset: 0 },
|
|
end: { line: 1, column: 1, offset: 0 }
|
|
};
|
|
function createRoot(children, loc = locStub) {
|
|
return {
|
|
type: 0,
|
|
children,
|
|
helpers: /* @__PURE__ */ new Set(),
|
|
components: [],
|
|
directives: [],
|
|
hoists: [],
|
|
imports: [],
|
|
cached: 0,
|
|
temps: 0,
|
|
codegenNode: void 0,
|
|
loc
|
|
};
|
|
}
|
|
function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) {
|
|
if (context) {
|
|
if (isBlock) {
|
|
context.helper(OPEN_BLOCK);
|
|
context.helper(getVNodeBlockHelper(context.inSSR, isComponent));
|
|
} else {
|
|
context.helper(getVNodeHelper(context.inSSR, isComponent));
|
|
}
|
|
if (directives) {
|
|
context.helper(WITH_DIRECTIVES);
|
|
}
|
|
}
|
|
return {
|
|
type: 13,
|
|
tag,
|
|
props,
|
|
children,
|
|
patchFlag,
|
|
dynamicProps,
|
|
directives,
|
|
isBlock,
|
|
disableTracking,
|
|
isComponent,
|
|
loc
|
|
};
|
|
}
|
|
function createArrayExpression(elements, loc = locStub) {
|
|
return {
|
|
type: 17,
|
|
loc,
|
|
elements
|
|
};
|
|
}
|
|
function createObjectExpression(properties, loc = locStub) {
|
|
return {
|
|
type: 15,
|
|
loc,
|
|
properties
|
|
};
|
|
}
|
|
function createObjectProperty(key, value) {
|
|
return {
|
|
type: 16,
|
|
loc: locStub,
|
|
key: (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(key) ? createSimpleExpression(key, true) : key,
|
|
value
|
|
};
|
|
}
|
|
function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) {
|
|
return {
|
|
type: 4,
|
|
loc,
|
|
content,
|
|
isStatic,
|
|
constType: isStatic ? 3 : constType
|
|
};
|
|
}
|
|
function createInterpolation(content, loc) {
|
|
return {
|
|
type: 5,
|
|
loc,
|
|
content: (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(content) ? createSimpleExpression(content, false, loc) : content
|
|
};
|
|
}
|
|
function createCompoundExpression(children, loc = locStub) {
|
|
return {
|
|
type: 8,
|
|
loc,
|
|
children
|
|
};
|
|
}
|
|
function createCallExpression(callee, args = [], loc = locStub) {
|
|
return {
|
|
type: 14,
|
|
loc,
|
|
callee,
|
|
arguments: args
|
|
};
|
|
}
|
|
function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) {
|
|
return {
|
|
type: 18,
|
|
params,
|
|
returns,
|
|
newline,
|
|
isSlot,
|
|
loc
|
|
};
|
|
}
|
|
function createConditionalExpression(test, consequent, alternate, newline = true) {
|
|
return {
|
|
type: 19,
|
|
test,
|
|
consequent,
|
|
alternate,
|
|
newline,
|
|
loc: locStub
|
|
};
|
|
}
|
|
function createCacheExpression(index, value, isVNode = false) {
|
|
return {
|
|
type: 20,
|
|
index,
|
|
value,
|
|
isVNode,
|
|
loc: locStub
|
|
};
|
|
}
|
|
function createBlockStatement(body) {
|
|
return {
|
|
type: 21,
|
|
body,
|
|
loc: locStub
|
|
};
|
|
}
|
|
function createTemplateLiteral(elements) {
|
|
return {
|
|
type: 22,
|
|
elements,
|
|
loc: locStub
|
|
};
|
|
}
|
|
function createIfStatement(test, consequent, alternate) {
|
|
return {
|
|
type: 23,
|
|
test,
|
|
consequent,
|
|
alternate,
|
|
loc: locStub
|
|
};
|
|
}
|
|
function createAssignmentExpression(left, right) {
|
|
return {
|
|
type: 24,
|
|
left,
|
|
right,
|
|
loc: locStub
|
|
};
|
|
}
|
|
function createSequenceExpression(expressions) {
|
|
return {
|
|
type: 25,
|
|
expressions,
|
|
loc: locStub
|
|
};
|
|
}
|
|
function createReturnStatement(returns) {
|
|
return {
|
|
type: 26,
|
|
returns,
|
|
loc: locStub
|
|
};
|
|
}
|
|
function getVNodeHelper(ssr, isComponent) {
|
|
return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
|
|
}
|
|
function getVNodeBlockHelper(ssr, isComponent) {
|
|
return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK;
|
|
}
|
|
function convertToBlock(node, { helper, removeHelper, inSSR }) {
|
|
if (!node.isBlock) {
|
|
node.isBlock = true;
|
|
removeHelper(getVNodeHelper(inSSR, node.isComponent));
|
|
helper(OPEN_BLOCK);
|
|
helper(getVNodeBlockHelper(inSSR, node.isComponent));
|
|
}
|
|
}
|
|
|
|
const isStaticExp = (p) => p.type === 4 && p.isStatic;
|
|
const isBuiltInType = (tag, expected) => tag === expected || tag === (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hyphenate)(expected);
|
|
function isCoreComponent(tag) {
|
|
if (isBuiltInType(tag, "Teleport")) {
|
|
return TELEPORT;
|
|
} else if (isBuiltInType(tag, "Suspense")) {
|
|
return SUSPENSE;
|
|
} else if (isBuiltInType(tag, "KeepAlive")) {
|
|
return KEEP_ALIVE;
|
|
} else if (isBuiltInType(tag, "BaseTransition")) {
|
|
return BASE_TRANSITION;
|
|
}
|
|
}
|
|
const nonIdentifierRE = /^\d|[^\$\w]/;
|
|
const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
|
|
const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
|
|
const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
|
|
const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g;
|
|
const isMemberExpressionBrowser = (path) => {
|
|
path = path.trim().replace(whitespaceRE, (s) => s.trim());
|
|
let state = 0 /* inMemberExp */;
|
|
let stateStack = [];
|
|
let currentOpenBracketCount = 0;
|
|
let currentOpenParensCount = 0;
|
|
let currentStringType = null;
|
|
for (let i = 0; i < path.length; i++) {
|
|
const char = path.charAt(i);
|
|
switch (state) {
|
|
case 0 /* inMemberExp */:
|
|
if (char === "[") {
|
|
stateStack.push(state);
|
|
state = 1 /* inBrackets */;
|
|
currentOpenBracketCount++;
|
|
} else if (char === "(") {
|
|
stateStack.push(state);
|
|
state = 2 /* inParens */;
|
|
currentOpenParensCount++;
|
|
} else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) {
|
|
return false;
|
|
}
|
|
break;
|
|
case 1 /* inBrackets */:
|
|
if (char === `'` || char === `"` || char === "`") {
|
|
stateStack.push(state);
|
|
state = 3 /* inString */;
|
|
currentStringType = char;
|
|
} else if (char === `[`) {
|
|
currentOpenBracketCount++;
|
|
} else if (char === `]`) {
|
|
if (!--currentOpenBracketCount) {
|
|
state = stateStack.pop();
|
|
}
|
|
}
|
|
break;
|
|
case 2 /* inParens */:
|
|
if (char === `'` || char === `"` || char === "`") {
|
|
stateStack.push(state);
|
|
state = 3 /* inString */;
|
|
currentStringType = char;
|
|
} else if (char === `(`) {
|
|
currentOpenParensCount++;
|
|
} else if (char === `)`) {
|
|
if (i === path.length - 1) {
|
|
return false;
|
|
}
|
|
if (!--currentOpenParensCount) {
|
|
state = stateStack.pop();
|
|
}
|
|
}
|
|
break;
|
|
case 3 /* inString */:
|
|
if (char === currentStringType) {
|
|
state = stateStack.pop();
|
|
currentStringType = null;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
return !currentOpenBracketCount && !currentOpenParensCount;
|
|
};
|
|
const isMemberExpressionNode = _vue_shared__WEBPACK_IMPORTED_MODULE_0__.NOOP ;
|
|
const isMemberExpression = isMemberExpressionBrowser ;
|
|
function getInnerRange(loc, offset, length) {
|
|
const source = loc.source.slice(offset, offset + length);
|
|
const newLoc = {
|
|
source,
|
|
start: advancePositionWithClone(loc.start, loc.source, offset),
|
|
end: loc.end
|
|
};
|
|
if (length != null) {
|
|
newLoc.end = advancePositionWithClone(
|
|
loc.start,
|
|
loc.source,
|
|
offset + length
|
|
);
|
|
}
|
|
return newLoc;
|
|
}
|
|
function advancePositionWithClone(pos, source, numberOfCharacters = source.length) {
|
|
return advancePositionWithMutation(
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)({}, pos),
|
|
source,
|
|
numberOfCharacters
|
|
);
|
|
}
|
|
function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) {
|
|
let linesCount = 0;
|
|
let lastNewLinePos = -1;
|
|
for (let i = 0; i < numberOfCharacters; i++) {
|
|
if (source.charCodeAt(i) === 10) {
|
|
linesCount++;
|
|
lastNewLinePos = i;
|
|
}
|
|
}
|
|
pos.offset += numberOfCharacters;
|
|
pos.line += linesCount;
|
|
pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos;
|
|
return pos;
|
|
}
|
|
function assert(condition, msg) {
|
|
if (!condition) {
|
|
throw new Error(msg || `unexpected compiler condition`);
|
|
}
|
|
}
|
|
function findDir(node, name, allowEmpty = false) {
|
|
for (let i = 0; i < node.props.length; i++) {
|
|
const p = node.props[i];
|
|
if (p.type === 7 && (allowEmpty || p.exp) && ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(name) ? p.name === name : name.test(p.name))) {
|
|
return p;
|
|
}
|
|
}
|
|
}
|
|
function findProp(node, name, dynamicOnly = false, allowEmpty = false) {
|
|
for (let i = 0; i < node.props.length; i++) {
|
|
const p = node.props[i];
|
|
if (p.type === 6) {
|
|
if (dynamicOnly)
|
|
continue;
|
|
if (p.name === name && (p.value || allowEmpty)) {
|
|
return p;
|
|
}
|
|
} else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) {
|
|
return p;
|
|
}
|
|
}
|
|
}
|
|
function isStaticArgOf(arg, name) {
|
|
return !!(arg && isStaticExp(arg) && arg.content === name);
|
|
}
|
|
function hasDynamicKeyVBind(node) {
|
|
return node.props.some(
|
|
(p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj"
|
|
p.arg.type !== 4 || // v-bind:[_ctx.foo]
|
|
!p.arg.isStatic)
|
|
// v-bind:[foo]
|
|
);
|
|
}
|
|
function isText$1(node) {
|
|
return node.type === 5 || node.type === 2;
|
|
}
|
|
function isVSlot(p) {
|
|
return p.type === 7 && p.name === "slot";
|
|
}
|
|
function isTemplateNode(node) {
|
|
return node.type === 1 && node.tagType === 3;
|
|
}
|
|
function isSlotOutlet(node) {
|
|
return node.type === 1 && node.tagType === 2;
|
|
}
|
|
const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);
|
|
function getUnnormalizedProps(props, callPath = []) {
|
|
if (props && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(props) && props.type === 14) {
|
|
const callee = props.callee;
|
|
if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(callee) && propsHelperSet.has(callee)) {
|
|
return getUnnormalizedProps(
|
|
props.arguments[0],
|
|
callPath.concat(props)
|
|
);
|
|
}
|
|
}
|
|
return [props, callPath];
|
|
}
|
|
function injectProp(node, prop, context) {
|
|
let propsWithInjection;
|
|
let props = node.type === 13 ? node.props : node.arguments[2];
|
|
let callPath = [];
|
|
let parentCall;
|
|
if (props && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(props) && props.type === 14) {
|
|
const ret = getUnnormalizedProps(props);
|
|
props = ret[0];
|
|
callPath = ret[1];
|
|
parentCall = callPath[callPath.length - 1];
|
|
}
|
|
if (props == null || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(props)) {
|
|
propsWithInjection = createObjectExpression([prop]);
|
|
} else if (props.type === 14) {
|
|
const first = props.arguments[0];
|
|
if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(first) && first.type === 15) {
|
|
if (!hasProp(prop, first)) {
|
|
first.properties.unshift(prop);
|
|
}
|
|
} else {
|
|
if (props.callee === TO_HANDLERS) {
|
|
propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [
|
|
createObjectExpression([prop]),
|
|
props
|
|
]);
|
|
} else {
|
|
props.arguments.unshift(createObjectExpression([prop]));
|
|
}
|
|
}
|
|
!propsWithInjection && (propsWithInjection = props);
|
|
} else if (props.type === 15) {
|
|
if (!hasProp(prop, props)) {
|
|
props.properties.unshift(prop);
|
|
}
|
|
propsWithInjection = props;
|
|
} else {
|
|
propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [
|
|
createObjectExpression([prop]),
|
|
props
|
|
]);
|
|
if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) {
|
|
parentCall = callPath[callPath.length - 2];
|
|
}
|
|
}
|
|
if (node.type === 13) {
|
|
if (parentCall) {
|
|
parentCall.arguments[0] = propsWithInjection;
|
|
} else {
|
|
node.props = propsWithInjection;
|
|
}
|
|
} else {
|
|
if (parentCall) {
|
|
parentCall.arguments[0] = propsWithInjection;
|
|
} else {
|
|
node.arguments[2] = propsWithInjection;
|
|
}
|
|
}
|
|
}
|
|
function hasProp(prop, props) {
|
|
let result = false;
|
|
if (prop.key.type === 4) {
|
|
const propKeyName = prop.key.content;
|
|
result = props.properties.some(
|
|
(p) => p.key.type === 4 && p.key.content === propKeyName
|
|
);
|
|
}
|
|
return result;
|
|
}
|
|
function toValidAssetId(name, type) {
|
|
return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => {
|
|
return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString();
|
|
})}`;
|
|
}
|
|
function hasScopeRef(node, ids) {
|
|
if (!node || Object.keys(ids).length === 0) {
|
|
return false;
|
|
}
|
|
switch (node.type) {
|
|
case 1:
|
|
for (let i = 0; i < node.props.length; i++) {
|
|
const p = node.props[i];
|
|
if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) {
|
|
return true;
|
|
}
|
|
}
|
|
return node.children.some((c) => hasScopeRef(c, ids));
|
|
case 11:
|
|
if (hasScopeRef(node.source, ids)) {
|
|
return true;
|
|
}
|
|
return node.children.some((c) => hasScopeRef(c, ids));
|
|
case 9:
|
|
return node.branches.some((b) => hasScopeRef(b, ids));
|
|
case 10:
|
|
if (hasScopeRef(node.condition, ids)) {
|
|
return true;
|
|
}
|
|
return node.children.some((c) => hasScopeRef(c, ids));
|
|
case 4:
|
|
return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content];
|
|
case 8:
|
|
return node.children.some((c) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isObject)(c) && hasScopeRef(c, ids));
|
|
case 5:
|
|
case 12:
|
|
return hasScopeRef(node.content, ids);
|
|
case 2:
|
|
case 3:
|
|
return false;
|
|
default:
|
|
if (true) ;
|
|
return false;
|
|
}
|
|
}
|
|
function getMemoedVNodeCall(node) {
|
|
if (node.type === 14 && node.callee === WITH_MEMO) {
|
|
return node.arguments[1].returns;
|
|
} else {
|
|
return node;
|
|
}
|
|
}
|
|
|
|
const deprecationData = {
|
|
["COMPILER_IS_ON_ELEMENT"]: {
|
|
message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`,
|
|
link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html`
|
|
},
|
|
["COMPILER_V_BIND_SYNC"]: {
|
|
message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`,
|
|
link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html`
|
|
},
|
|
["COMPILER_V_BIND_PROP"]: {
|
|
message: `.prop modifier for v-bind has been removed and no longer necessary. Vue 3 will automatically set a binding as DOM property when appropriate.`
|
|
},
|
|
["COMPILER_V_BIND_OBJECT_ORDER"]: {
|
|
message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`,
|
|
link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html`
|
|
},
|
|
["COMPILER_V_ON_NATIVE"]: {
|
|
message: `.native modifier for v-on has been removed as is no longer necessary.`,
|
|
link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html`
|
|
},
|
|
["COMPILER_V_IF_V_FOR_PRECEDENCE"]: {
|
|
message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`,
|
|
link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html`
|
|
},
|
|
["COMPILER_NATIVE_TEMPLATE"]: {
|
|
message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.`
|
|
},
|
|
["COMPILER_INLINE_TEMPLATE"]: {
|
|
message: `"inline-template" has been removed in Vue 3.`,
|
|
link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html`
|
|
},
|
|
["COMPILER_FILTER"]: {
|
|
message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`,
|
|
link: `https://v3-migration.vuejs.org/breaking-changes/filters.html`
|
|
}
|
|
};
|
|
function getCompatValue(key, context) {
|
|
const config = context.options ? context.options.compatConfig : context.compatConfig;
|
|
const value = config && config[key];
|
|
if (key === "MODE") {
|
|
return value || 3;
|
|
} else {
|
|
return value;
|
|
}
|
|
}
|
|
function isCompatEnabled(key, context) {
|
|
const mode = getCompatValue("MODE", context);
|
|
const value = getCompatValue(key, context);
|
|
return mode === 3 ? value === true : value !== false;
|
|
}
|
|
function checkCompatEnabled(key, context, loc, ...args) {
|
|
const enabled = isCompatEnabled(key, context);
|
|
if ( true && enabled) {
|
|
warnDeprecation(key, context, loc, ...args);
|
|
}
|
|
return enabled;
|
|
}
|
|
function warnDeprecation(key, context, loc, ...args) {
|
|
const val = getCompatValue(key, context);
|
|
if (val === "suppress-warning") {
|
|
return;
|
|
}
|
|
const { message, link } = deprecationData[key];
|
|
const msg = `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? `
|
|
Details: ${link}` : ``}`;
|
|
const err = new SyntaxError(msg);
|
|
err.code = key;
|
|
if (loc)
|
|
err.loc = loc;
|
|
context.onWarn(err);
|
|
}
|
|
|
|
const decodeRE = /&(gt|lt|amp|apos|quot);/g;
|
|
const decodeMap = {
|
|
gt: ">",
|
|
lt: "<",
|
|
amp: "&",
|
|
apos: "'",
|
|
quot: '"'
|
|
};
|
|
const defaultParserOptions = {
|
|
delimiters: [`{{`, `}}`],
|
|
getNamespace: () => 0,
|
|
getTextMode: () => 0,
|
|
isVoidTag: _vue_shared__WEBPACK_IMPORTED_MODULE_0__.NO,
|
|
isPreTag: _vue_shared__WEBPACK_IMPORTED_MODULE_0__.NO,
|
|
isCustomElement: _vue_shared__WEBPACK_IMPORTED_MODULE_0__.NO,
|
|
decodeEntities: (rawText) => rawText.replace(decodeRE, (_, p1) => decodeMap[p1]),
|
|
onError: defaultOnError,
|
|
onWarn: defaultOnWarn,
|
|
comments: !!("development" !== "production")
|
|
};
|
|
function baseParse(content, options = {}) {
|
|
const context = createParserContext(content, options);
|
|
const start = getCursor(context);
|
|
return createRoot(
|
|
parseChildren(context, 0, []),
|
|
getSelection(context, start)
|
|
);
|
|
}
|
|
function createParserContext(content, rawOptions) {
|
|
const options = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)({}, defaultParserOptions);
|
|
let key;
|
|
for (key in rawOptions) {
|
|
options[key] = rawOptions[key] === void 0 ? defaultParserOptions[key] : rawOptions[key];
|
|
}
|
|
return {
|
|
options,
|
|
column: 1,
|
|
line: 1,
|
|
offset: 0,
|
|
originalSource: content,
|
|
source: content,
|
|
inPre: false,
|
|
inVPre: false,
|
|
onWarn: options.onWarn
|
|
};
|
|
}
|
|
function parseChildren(context, mode, ancestors) {
|
|
const parent = last(ancestors);
|
|
const ns = parent ? parent.ns : 0;
|
|
const nodes = [];
|
|
while (!isEnd(context, mode, ancestors)) {
|
|
const s = context.source;
|
|
let node = void 0;
|
|
if (mode === 0 || mode === 1) {
|
|
if (!context.inVPre && startsWith(s, context.options.delimiters[0])) {
|
|
node = parseInterpolation(context, mode);
|
|
} else if (mode === 0 && s[0] === "<") {
|
|
if (s.length === 1) {
|
|
emitError(context, 5, 1);
|
|
} else if (s[1] === "!") {
|
|
if (startsWith(s, "<!--")) {
|
|
node = parseComment(context);
|
|
} else if (startsWith(s, "<!DOCTYPE")) {
|
|
node = parseBogusComment(context);
|
|
} else if (startsWith(s, "<![CDATA[")) {
|
|
if (ns !== 0) {
|
|
node = parseCDATA(context, ancestors);
|
|
} else {
|
|
emitError(context, 1);
|
|
node = parseBogusComment(context);
|
|
}
|
|
} else {
|
|
emitError(context, 11);
|
|
node = parseBogusComment(context);
|
|
}
|
|
} else if (s[1] === "/") {
|
|
if (s.length === 2) {
|
|
emitError(context, 5, 2);
|
|
} else if (s[2] === ">") {
|
|
emitError(context, 14, 2);
|
|
advanceBy(context, 3);
|
|
continue;
|
|
} else if (/[a-z]/i.test(s[2])) {
|
|
emitError(context, 23);
|
|
parseTag(context, TagType.End, parent);
|
|
continue;
|
|
} else {
|
|
emitError(
|
|
context,
|
|
12,
|
|
2
|
|
);
|
|
node = parseBogusComment(context);
|
|
}
|
|
} else if (/[a-z]/i.test(s[1])) {
|
|
node = parseElement(context, ancestors);
|
|
if (isCompatEnabled(
|
|
"COMPILER_NATIVE_TEMPLATE",
|
|
context
|
|
) && node && node.tag === "template" && !node.props.some(
|
|
(p) => p.type === 7 && isSpecialTemplateDirective(p.name)
|
|
)) {
|
|
true && warnDeprecation(
|
|
"COMPILER_NATIVE_TEMPLATE",
|
|
context,
|
|
node.loc
|
|
);
|
|
node = node.children;
|
|
}
|
|
} else if (s[1] === "?") {
|
|
emitError(
|
|
context,
|
|
21,
|
|
1
|
|
);
|
|
node = parseBogusComment(context);
|
|
} else {
|
|
emitError(context, 12, 1);
|
|
}
|
|
}
|
|
}
|
|
if (!node) {
|
|
node = parseText(context, mode);
|
|
}
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(node)) {
|
|
for (let i = 0; i < node.length; i++) {
|
|
pushNode(nodes, node[i]);
|
|
}
|
|
} else {
|
|
pushNode(nodes, node);
|
|
}
|
|
}
|
|
let removedWhitespace = false;
|
|
if (mode !== 2 && mode !== 1) {
|
|
const shouldCondense = context.options.whitespace !== "preserve";
|
|
for (let i = 0; i < nodes.length; i++) {
|
|
const node = nodes[i];
|
|
if (node.type === 2) {
|
|
if (!context.inPre) {
|
|
if (!/[^\t\r\n\f ]/.test(node.content)) {
|
|
const prev = nodes[i - 1];
|
|
const next = nodes[i + 1];
|
|
if (!prev || !next || shouldCondense && (prev.type === 3 && next.type === 3 || prev.type === 3 && next.type === 1 || prev.type === 1 && next.type === 3 || prev.type === 1 && next.type === 1 && /[\r\n]/.test(node.content))) {
|
|
removedWhitespace = true;
|
|
nodes[i] = null;
|
|
} else {
|
|
node.content = " ";
|
|
}
|
|
} else if (shouldCondense) {
|
|
node.content = node.content.replace(/[\t\r\n\f ]+/g, " ");
|
|
}
|
|
} else {
|
|
node.content = node.content.replace(/\r\n/g, "\n");
|
|
}
|
|
} else if (node.type === 3 && !context.options.comments) {
|
|
removedWhitespace = true;
|
|
nodes[i] = null;
|
|
}
|
|
}
|
|
if (context.inPre && parent && context.options.isPreTag(parent.tag)) {
|
|
const first = nodes[0];
|
|
if (first && first.type === 2) {
|
|
first.content = first.content.replace(/^\r?\n/, "");
|
|
}
|
|
}
|
|
}
|
|
return removedWhitespace ? nodes.filter(Boolean) : nodes;
|
|
}
|
|
function pushNode(nodes, node) {
|
|
if (node.type === 2) {
|
|
const prev = last(nodes);
|
|
if (prev && prev.type === 2 && prev.loc.end.offset === node.loc.start.offset) {
|
|
prev.content += node.content;
|
|
prev.loc.end = node.loc.end;
|
|
prev.loc.source += node.loc.source;
|
|
return;
|
|
}
|
|
}
|
|
nodes.push(node);
|
|
}
|
|
function parseCDATA(context, ancestors) {
|
|
advanceBy(context, 9);
|
|
const nodes = parseChildren(context, 3, ancestors);
|
|
if (context.source.length === 0) {
|
|
emitError(context, 6);
|
|
} else {
|
|
advanceBy(context, 3);
|
|
}
|
|
return nodes;
|
|
}
|
|
function parseComment(context) {
|
|
const start = getCursor(context);
|
|
let content;
|
|
const match = /--(\!)?>/.exec(context.source);
|
|
if (!match) {
|
|
content = context.source.slice(4);
|
|
advanceBy(context, context.source.length);
|
|
emitError(context, 7);
|
|
} else {
|
|
if (match.index <= 3) {
|
|
emitError(context, 0);
|
|
}
|
|
if (match[1]) {
|
|
emitError(context, 10);
|
|
}
|
|
content = context.source.slice(4, match.index);
|
|
const s = context.source.slice(0, match.index);
|
|
let prevIndex = 1, nestedIndex = 0;
|
|
while ((nestedIndex = s.indexOf("<!--", prevIndex)) !== -1) {
|
|
advanceBy(context, nestedIndex - prevIndex + 1);
|
|
if (nestedIndex + 4 < s.length) {
|
|
emitError(context, 16);
|
|
}
|
|
prevIndex = nestedIndex + 1;
|
|
}
|
|
advanceBy(context, match.index + match[0].length - prevIndex + 1);
|
|
}
|
|
return {
|
|
type: 3,
|
|
content,
|
|
loc: getSelection(context, start)
|
|
};
|
|
}
|
|
function parseBogusComment(context) {
|
|
const start = getCursor(context);
|
|
const contentStart = context.source[1] === "?" ? 1 : 2;
|
|
let content;
|
|
const closeIndex = context.source.indexOf(">");
|
|
if (closeIndex === -1) {
|
|
content = context.source.slice(contentStart);
|
|
advanceBy(context, context.source.length);
|
|
} else {
|
|
content = context.source.slice(contentStart, closeIndex);
|
|
advanceBy(context, closeIndex + 1);
|
|
}
|
|
return {
|
|
type: 3,
|
|
content,
|
|
loc: getSelection(context, start)
|
|
};
|
|
}
|
|
function parseElement(context, ancestors) {
|
|
const wasInPre = context.inPre;
|
|
const wasInVPre = context.inVPre;
|
|
const parent = last(ancestors);
|
|
const element = parseTag(context, TagType.Start, parent);
|
|
const isPreBoundary = context.inPre && !wasInPre;
|
|
const isVPreBoundary = context.inVPre && !wasInVPre;
|
|
if (element.isSelfClosing || context.options.isVoidTag(element.tag)) {
|
|
if (isPreBoundary) {
|
|
context.inPre = false;
|
|
}
|
|
if (isVPreBoundary) {
|
|
context.inVPre = false;
|
|
}
|
|
return element;
|
|
}
|
|
ancestors.push(element);
|
|
const mode = context.options.getTextMode(element, parent);
|
|
const children = parseChildren(context, mode, ancestors);
|
|
ancestors.pop();
|
|
{
|
|
const inlineTemplateProp = element.props.find(
|
|
(p) => p.type === 6 && p.name === "inline-template"
|
|
);
|
|
if (inlineTemplateProp && checkCompatEnabled(
|
|
"COMPILER_INLINE_TEMPLATE",
|
|
context,
|
|
inlineTemplateProp.loc
|
|
)) {
|
|
const loc = getSelection(context, element.loc.end);
|
|
inlineTemplateProp.value = {
|
|
type: 2,
|
|
content: loc.source,
|
|
loc
|
|
};
|
|
}
|
|
}
|
|
element.children = children;
|
|
if (startsWithEndTagOpen(context.source, element.tag)) {
|
|
parseTag(context, TagType.End, parent);
|
|
} else {
|
|
emitError(context, 24, 0, element.loc.start);
|
|
if (context.source.length === 0 && element.tag.toLowerCase() === "script") {
|
|
const first = children[0];
|
|
if (first && startsWith(first.loc.source, "<!--")) {
|
|
emitError(context, 8);
|
|
}
|
|
}
|
|
}
|
|
element.loc = getSelection(context, element.loc.start);
|
|
if (isPreBoundary) {
|
|
context.inPre = false;
|
|
}
|
|
if (isVPreBoundary) {
|
|
context.inVPre = false;
|
|
}
|
|
return element;
|
|
}
|
|
var TagType = /* @__PURE__ */ ((TagType2) => {
|
|
TagType2[TagType2["Start"] = 0] = "Start";
|
|
TagType2[TagType2["End"] = 1] = "End";
|
|
return TagType2;
|
|
})(TagType || {});
|
|
const isSpecialTemplateDirective = /* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.makeMap)(
|
|
`if,else,else-if,for,slot`
|
|
);
|
|
function parseTag(context, type, parent) {
|
|
const start = getCursor(context);
|
|
const match = /^<\/?([a-z][^\t\r\n\f />]*)/i.exec(context.source);
|
|
const tag = match[1];
|
|
const ns = context.options.getNamespace(tag, parent);
|
|
advanceBy(context, match[0].length);
|
|
advanceSpaces(context);
|
|
const cursor = getCursor(context);
|
|
const currentSource = context.source;
|
|
if (context.options.isPreTag(tag)) {
|
|
context.inPre = true;
|
|
}
|
|
let props = parseAttributes(context, type);
|
|
if (type === 0 /* Start */ && !context.inVPre && props.some((p) => p.type === 7 && p.name === "pre")) {
|
|
context.inVPre = true;
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)(context, cursor);
|
|
context.source = currentSource;
|
|
props = parseAttributes(context, type).filter((p) => p.name !== "v-pre");
|
|
}
|
|
let isSelfClosing = false;
|
|
if (context.source.length === 0) {
|
|
emitError(context, 9);
|
|
} else {
|
|
isSelfClosing = startsWith(context.source, "/>");
|
|
if (type === 1 /* End */ && isSelfClosing) {
|
|
emitError(context, 4);
|
|
}
|
|
advanceBy(context, isSelfClosing ? 2 : 1);
|
|
}
|
|
if (type === 1 /* End */) {
|
|
return;
|
|
}
|
|
if ( true && isCompatEnabled(
|
|
"COMPILER_V_IF_V_FOR_PRECEDENCE",
|
|
context
|
|
)) {
|
|
let hasIf = false;
|
|
let hasFor = false;
|
|
for (let i = 0; i < props.length; i++) {
|
|
const p = props[i];
|
|
if (p.type === 7) {
|
|
if (p.name === "if") {
|
|
hasIf = true;
|
|
} else if (p.name === "for") {
|
|
hasFor = true;
|
|
}
|
|
}
|
|
if (hasIf && hasFor) {
|
|
warnDeprecation(
|
|
"COMPILER_V_IF_V_FOR_PRECEDENCE",
|
|
context,
|
|
getSelection(context, start)
|
|
);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
let tagType = 0;
|
|
if (!context.inVPre) {
|
|
if (tag === "slot") {
|
|
tagType = 2;
|
|
} else if (tag === "template") {
|
|
if (props.some(
|
|
(p) => p.type === 7 && isSpecialTemplateDirective(p.name)
|
|
)) {
|
|
tagType = 3;
|
|
}
|
|
} else if (isComponent(tag, props, context)) {
|
|
tagType = 1;
|
|
}
|
|
}
|
|
return {
|
|
type: 1,
|
|
ns,
|
|
tag,
|
|
tagType,
|
|
props,
|
|
isSelfClosing,
|
|
children: [],
|
|
loc: getSelection(context, start),
|
|
codegenNode: void 0
|
|
// to be created during transform phase
|
|
};
|
|
}
|
|
function isComponent(tag, props, context) {
|
|
const options = context.options;
|
|
if (options.isCustomElement(tag)) {
|
|
return false;
|
|
}
|
|
if (tag === "component" || /^[A-Z]/.test(tag) || isCoreComponent(tag) || options.isBuiltInComponent && options.isBuiltInComponent(tag) || options.isNativeTag && !options.isNativeTag(tag)) {
|
|
return true;
|
|
}
|
|
for (let i = 0; i < props.length; i++) {
|
|
const p = props[i];
|
|
if (p.type === 6) {
|
|
if (p.name === "is" && p.value) {
|
|
if (p.value.content.startsWith("vue:")) {
|
|
return true;
|
|
} else if (checkCompatEnabled(
|
|
"COMPILER_IS_ON_ELEMENT",
|
|
context,
|
|
p.loc
|
|
)) {
|
|
return true;
|
|
}
|
|
}
|
|
} else {
|
|
if (p.name === "is") {
|
|
return true;
|
|
} else if (
|
|
// :is on plain element - only treat as component in compat mode
|
|
p.name === "bind" && isStaticArgOf(p.arg, "is") && true && checkCompatEnabled(
|
|
"COMPILER_IS_ON_ELEMENT",
|
|
context,
|
|
p.loc
|
|
)
|
|
) {
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function parseAttributes(context, type) {
|
|
const props = [];
|
|
const attributeNames = /* @__PURE__ */ new Set();
|
|
while (context.source.length > 0 && !startsWith(context.source, ">") && !startsWith(context.source, "/>")) {
|
|
if (startsWith(context.source, "/")) {
|
|
emitError(context, 22);
|
|
advanceBy(context, 1);
|
|
advanceSpaces(context);
|
|
continue;
|
|
}
|
|
if (type === 1 /* End */) {
|
|
emitError(context, 3);
|
|
}
|
|
const attr = parseAttribute(context, attributeNames);
|
|
if (attr.type === 6 && attr.value && attr.name === "class") {
|
|
attr.value.content = attr.value.content.replace(/\s+/g, " ").trim();
|
|
}
|
|
if (type === 0 /* Start */) {
|
|
props.push(attr);
|
|
}
|
|
if (/^[^\t\r\n\f />]/.test(context.source)) {
|
|
emitError(context, 15);
|
|
}
|
|
advanceSpaces(context);
|
|
}
|
|
return props;
|
|
}
|
|
function parseAttribute(context, nameSet) {
|
|
var _a;
|
|
const start = getCursor(context);
|
|
const match = /^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(context.source);
|
|
const name = match[0];
|
|
if (nameSet.has(name)) {
|
|
emitError(context, 2);
|
|
}
|
|
nameSet.add(name);
|
|
if (name[0] === "=") {
|
|
emitError(context, 19);
|
|
}
|
|
{
|
|
const pattern = /["'<]/g;
|
|
let m;
|
|
while (m = pattern.exec(name)) {
|
|
emitError(
|
|
context,
|
|
17,
|
|
m.index
|
|
);
|
|
}
|
|
}
|
|
advanceBy(context, name.length);
|
|
let value = void 0;
|
|
if (/^[\t\r\n\f ]*=/.test(context.source)) {
|
|
advanceSpaces(context);
|
|
advanceBy(context, 1);
|
|
advanceSpaces(context);
|
|
value = parseAttributeValue(context);
|
|
if (!value) {
|
|
emitError(context, 13);
|
|
}
|
|
}
|
|
const loc = getSelection(context, start);
|
|
if (!context.inVPre && /^(v-[A-Za-z0-9-]|:|\.|@|#)/.test(name)) {
|
|
const match2 = /(?:^v-([a-z0-9-]+))?(?:(?::|^\.|^@|^#)(\[[^\]]+\]|[^\.]+))?(.+)?$/i.exec(
|
|
name
|
|
);
|
|
let isPropShorthand = startsWith(name, ".");
|
|
let dirName = match2[1] || (isPropShorthand || startsWith(name, ":") ? "bind" : startsWith(name, "@") ? "on" : "slot");
|
|
let arg;
|
|
if (match2[2]) {
|
|
const isSlot = dirName === "slot";
|
|
const startOffset = name.lastIndexOf(
|
|
match2[2],
|
|
name.length - (((_a = match2[3]) == null ? void 0 : _a.length) || 0)
|
|
);
|
|
const loc2 = getSelection(
|
|
context,
|
|
getNewPosition(context, start, startOffset),
|
|
getNewPosition(
|
|
context,
|
|
start,
|
|
startOffset + match2[2].length + (isSlot && match2[3] || "").length
|
|
)
|
|
);
|
|
let content = match2[2];
|
|
let isStatic = true;
|
|
if (content.startsWith("[")) {
|
|
isStatic = false;
|
|
if (!content.endsWith("]")) {
|
|
emitError(
|
|
context,
|
|
27
|
|
);
|
|
content = content.slice(1);
|
|
} else {
|
|
content = content.slice(1, content.length - 1);
|
|
}
|
|
} else if (isSlot) {
|
|
content += match2[3] || "";
|
|
}
|
|
arg = {
|
|
type: 4,
|
|
content,
|
|
isStatic,
|
|
constType: isStatic ? 3 : 0,
|
|
loc: loc2
|
|
};
|
|
}
|
|
if (value && value.isQuoted) {
|
|
const valueLoc = value.loc;
|
|
valueLoc.start.offset++;
|
|
valueLoc.start.column++;
|
|
valueLoc.end = advancePositionWithClone(valueLoc.start, value.content);
|
|
valueLoc.source = valueLoc.source.slice(1, -1);
|
|
}
|
|
const modifiers = match2[3] ? match2[3].slice(1).split(".") : [];
|
|
if (isPropShorthand)
|
|
modifiers.push("prop");
|
|
if (dirName === "bind" && arg) {
|
|
if (modifiers.includes("sync") && checkCompatEnabled(
|
|
"COMPILER_V_BIND_SYNC",
|
|
context,
|
|
loc,
|
|
arg.loc.source
|
|
)) {
|
|
dirName = "model";
|
|
modifiers.splice(modifiers.indexOf("sync"), 1);
|
|
}
|
|
if ( true && modifiers.includes("prop")) {
|
|
checkCompatEnabled(
|
|
"COMPILER_V_BIND_PROP",
|
|
context,
|
|
loc
|
|
);
|
|
}
|
|
}
|
|
return {
|
|
type: 7,
|
|
name: dirName,
|
|
exp: value && {
|
|
type: 4,
|
|
content: value.content,
|
|
isStatic: false,
|
|
// Treat as non-constant by default. This can be potentially set to
|
|
// other values by `transformExpression` to make it eligible for hoisting.
|
|
constType: 0,
|
|
loc: value.loc
|
|
},
|
|
arg,
|
|
modifiers,
|
|
loc
|
|
};
|
|
}
|
|
if (!context.inVPre && startsWith(name, "v-")) {
|
|
emitError(context, 26);
|
|
}
|
|
return {
|
|
type: 6,
|
|
name,
|
|
value: value && {
|
|
type: 2,
|
|
content: value.content,
|
|
loc: value.loc
|
|
},
|
|
loc
|
|
};
|
|
}
|
|
function parseAttributeValue(context) {
|
|
const start = getCursor(context);
|
|
let content;
|
|
const quote = context.source[0];
|
|
const isQuoted = quote === `"` || quote === `'`;
|
|
if (isQuoted) {
|
|
advanceBy(context, 1);
|
|
const endIndex = context.source.indexOf(quote);
|
|
if (endIndex === -1) {
|
|
content = parseTextData(
|
|
context,
|
|
context.source.length,
|
|
4
|
|
);
|
|
} else {
|
|
content = parseTextData(context, endIndex, 4);
|
|
advanceBy(context, 1);
|
|
}
|
|
} else {
|
|
const match = /^[^\t\r\n\f >]+/.exec(context.source);
|
|
if (!match) {
|
|
return void 0;
|
|
}
|
|
const unexpectedChars = /["'<=`]/g;
|
|
let m;
|
|
while (m = unexpectedChars.exec(match[0])) {
|
|
emitError(
|
|
context,
|
|
18,
|
|
m.index
|
|
);
|
|
}
|
|
content = parseTextData(context, match[0].length, 4);
|
|
}
|
|
return { content, isQuoted, loc: getSelection(context, start) };
|
|
}
|
|
function parseInterpolation(context, mode) {
|
|
const [open, close] = context.options.delimiters;
|
|
const closeIndex = context.source.indexOf(close, open.length);
|
|
if (closeIndex === -1) {
|
|
emitError(context, 25);
|
|
return void 0;
|
|
}
|
|
const start = getCursor(context);
|
|
advanceBy(context, open.length);
|
|
const innerStart = getCursor(context);
|
|
const innerEnd = getCursor(context);
|
|
const rawContentLength = closeIndex - open.length;
|
|
const rawContent = context.source.slice(0, rawContentLength);
|
|
const preTrimContent = parseTextData(context, rawContentLength, mode);
|
|
const content = preTrimContent.trim();
|
|
const startOffset = preTrimContent.indexOf(content);
|
|
if (startOffset > 0) {
|
|
advancePositionWithMutation(innerStart, rawContent, startOffset);
|
|
}
|
|
const endOffset = rawContentLength - (preTrimContent.length - content.length - startOffset);
|
|
advancePositionWithMutation(innerEnd, rawContent, endOffset);
|
|
advanceBy(context, close.length);
|
|
return {
|
|
type: 5,
|
|
content: {
|
|
type: 4,
|
|
isStatic: false,
|
|
// Set `isConstant` to false by default and will decide in transformExpression
|
|
constType: 0,
|
|
content,
|
|
loc: getSelection(context, innerStart, innerEnd)
|
|
},
|
|
loc: getSelection(context, start)
|
|
};
|
|
}
|
|
function parseText(context, mode) {
|
|
const endTokens = mode === 3 ? ["]]>"] : ["<", context.options.delimiters[0]];
|
|
let endIndex = context.source.length;
|
|
for (let i = 0; i < endTokens.length; i++) {
|
|
const index = context.source.indexOf(endTokens[i], 1);
|
|
if (index !== -1 && endIndex > index) {
|
|
endIndex = index;
|
|
}
|
|
}
|
|
const start = getCursor(context);
|
|
const content = parseTextData(context, endIndex, mode);
|
|
return {
|
|
type: 2,
|
|
content,
|
|
loc: getSelection(context, start)
|
|
};
|
|
}
|
|
function parseTextData(context, length, mode) {
|
|
const rawText = context.source.slice(0, length);
|
|
advanceBy(context, length);
|
|
if (mode === 2 || mode === 3 || !rawText.includes("&")) {
|
|
return rawText;
|
|
} else {
|
|
return context.options.decodeEntities(
|
|
rawText,
|
|
mode === 4
|
|
);
|
|
}
|
|
}
|
|
function getCursor(context) {
|
|
const { column, line, offset } = context;
|
|
return { column, line, offset };
|
|
}
|
|
function getSelection(context, start, end) {
|
|
end = end || getCursor(context);
|
|
return {
|
|
start,
|
|
end,
|
|
source: context.originalSource.slice(start.offset, end.offset)
|
|
};
|
|
}
|
|
function last(xs) {
|
|
return xs[xs.length - 1];
|
|
}
|
|
function startsWith(source, searchString) {
|
|
return source.startsWith(searchString);
|
|
}
|
|
function advanceBy(context, numberOfCharacters) {
|
|
const { source } = context;
|
|
advancePositionWithMutation(context, source, numberOfCharacters);
|
|
context.source = source.slice(numberOfCharacters);
|
|
}
|
|
function advanceSpaces(context) {
|
|
const match = /^[\t\r\n\f ]+/.exec(context.source);
|
|
if (match) {
|
|
advanceBy(context, match[0].length);
|
|
}
|
|
}
|
|
function getNewPosition(context, start, numberOfCharacters) {
|
|
return advancePositionWithClone(
|
|
start,
|
|
context.originalSource.slice(start.offset, numberOfCharacters),
|
|
numberOfCharacters
|
|
);
|
|
}
|
|
function emitError(context, code, offset, loc = getCursor(context)) {
|
|
if (offset) {
|
|
loc.offset += offset;
|
|
loc.column += offset;
|
|
}
|
|
context.options.onError(
|
|
createCompilerError(code, {
|
|
start: loc,
|
|
end: loc,
|
|
source: ""
|
|
})
|
|
);
|
|
}
|
|
function isEnd(context, mode, ancestors) {
|
|
const s = context.source;
|
|
switch (mode) {
|
|
case 0:
|
|
if (startsWith(s, "</")) {
|
|
for (let i = ancestors.length - 1; i >= 0; --i) {
|
|
if (startsWithEndTagOpen(s, ancestors[i].tag)) {
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
case 1:
|
|
case 2: {
|
|
const parent = last(ancestors);
|
|
if (parent && startsWithEndTagOpen(s, parent.tag)) {
|
|
return true;
|
|
}
|
|
break;
|
|
}
|
|
case 3:
|
|
if (startsWith(s, "]]>")) {
|
|
return true;
|
|
}
|
|
break;
|
|
}
|
|
return !s;
|
|
}
|
|
function startsWithEndTagOpen(source, tag) {
|
|
return startsWith(source, "</") && source.slice(2, 2 + tag.length).toLowerCase() === tag.toLowerCase() && /[\t\r\n\f />]/.test(source[2 + tag.length] || ">");
|
|
}
|
|
|
|
function hoistStatic(root, context) {
|
|
walk(
|
|
root,
|
|
context,
|
|
// Root node is unfortunately non-hoistable due to potential parent
|
|
// fallthrough attributes.
|
|
isSingleElementRoot(root, root.children[0])
|
|
);
|
|
}
|
|
function isSingleElementRoot(root, child) {
|
|
const { children } = root;
|
|
return children.length === 1 && child.type === 1 && !isSlotOutlet(child);
|
|
}
|
|
function walk(node, context, doNotHoistNode = false) {
|
|
const { children } = node;
|
|
const originalCount = children.length;
|
|
let hoistedCount = 0;
|
|
for (let i = 0; i < children.length; i++) {
|
|
const child = children[i];
|
|
if (child.type === 1 && child.tagType === 0) {
|
|
const constantType = doNotHoistNode ? 0 : getConstantType(child, context);
|
|
if (constantType > 0) {
|
|
if (constantType >= 2) {
|
|
child.codegenNode.patchFlag = -1 + ( true ? ` /* HOISTED */` : 0);
|
|
child.codegenNode = context.hoist(child.codegenNode);
|
|
hoistedCount++;
|
|
continue;
|
|
}
|
|
} else {
|
|
const codegenNode = child.codegenNode;
|
|
if (codegenNode.type === 13) {
|
|
const flag = getPatchFlag(codegenNode);
|
|
if ((!flag || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) {
|
|
const props = getNodeProps(child);
|
|
if (props) {
|
|
codegenNode.props = context.hoist(props);
|
|
}
|
|
}
|
|
if (codegenNode.dynamicProps) {
|
|
codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (child.type === 1) {
|
|
const isComponent = child.tagType === 1;
|
|
if (isComponent) {
|
|
context.scopes.vSlot++;
|
|
}
|
|
walk(child, context);
|
|
if (isComponent) {
|
|
context.scopes.vSlot--;
|
|
}
|
|
} else if (child.type === 11) {
|
|
walk(child, context, child.children.length === 1);
|
|
} else if (child.type === 9) {
|
|
for (let i2 = 0; i2 < child.branches.length; i2++) {
|
|
walk(
|
|
child.branches[i2],
|
|
context,
|
|
child.branches[i2].children.length === 1
|
|
);
|
|
}
|
|
}
|
|
}
|
|
if (hoistedCount && context.transformHoist) {
|
|
context.transformHoist(children, context, node);
|
|
}
|
|
if (hoistedCount && hoistedCount === originalCount && node.type === 1 && node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(node.codegenNode.children)) {
|
|
node.codegenNode.children = context.hoist(
|
|
createArrayExpression(node.codegenNode.children)
|
|
);
|
|
}
|
|
}
|
|
function getConstantType(node, context) {
|
|
const { constantCache } = context;
|
|
switch (node.type) {
|
|
case 1:
|
|
if (node.tagType !== 0) {
|
|
return 0;
|
|
}
|
|
const cached = constantCache.get(node);
|
|
if (cached !== void 0) {
|
|
return cached;
|
|
}
|
|
const codegenNode = node.codegenNode;
|
|
if (codegenNode.type !== 13) {
|
|
return 0;
|
|
}
|
|
if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject") {
|
|
return 0;
|
|
}
|
|
const flag = getPatchFlag(codegenNode);
|
|
if (!flag) {
|
|
let returnType2 = 3;
|
|
const generatedPropsType = getGeneratedPropsConstantType(node, context);
|
|
if (generatedPropsType === 0) {
|
|
constantCache.set(node, 0);
|
|
return 0;
|
|
}
|
|
if (generatedPropsType < returnType2) {
|
|
returnType2 = generatedPropsType;
|
|
}
|
|
for (let i = 0; i < node.children.length; i++) {
|
|
const childType = getConstantType(node.children[i], context);
|
|
if (childType === 0) {
|
|
constantCache.set(node, 0);
|
|
return 0;
|
|
}
|
|
if (childType < returnType2) {
|
|
returnType2 = childType;
|
|
}
|
|
}
|
|
if (returnType2 > 1) {
|
|
for (let i = 0; i < node.props.length; i++) {
|
|
const p = node.props[i];
|
|
if (p.type === 7 && p.name === "bind" && p.exp) {
|
|
const expType = getConstantType(p.exp, context);
|
|
if (expType === 0) {
|
|
constantCache.set(node, 0);
|
|
return 0;
|
|
}
|
|
if (expType < returnType2) {
|
|
returnType2 = expType;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (codegenNode.isBlock) {
|
|
for (let i = 0; i < node.props.length; i++) {
|
|
const p = node.props[i];
|
|
if (p.type === 7) {
|
|
constantCache.set(node, 0);
|
|
return 0;
|
|
}
|
|
}
|
|
context.removeHelper(OPEN_BLOCK);
|
|
context.removeHelper(
|
|
getVNodeBlockHelper(context.inSSR, codegenNode.isComponent)
|
|
);
|
|
codegenNode.isBlock = false;
|
|
context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent));
|
|
}
|
|
constantCache.set(node, returnType2);
|
|
return returnType2;
|
|
} else {
|
|
constantCache.set(node, 0);
|
|
return 0;
|
|
}
|
|
case 2:
|
|
case 3:
|
|
return 3;
|
|
case 9:
|
|
case 11:
|
|
case 10:
|
|
return 0;
|
|
case 5:
|
|
case 12:
|
|
return getConstantType(node.content, context);
|
|
case 4:
|
|
return node.constType;
|
|
case 8:
|
|
let returnType = 3;
|
|
for (let i = 0; i < node.children.length; i++) {
|
|
const child = node.children[i];
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(child) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(child)) {
|
|
continue;
|
|
}
|
|
const childType = getConstantType(child, context);
|
|
if (childType === 0) {
|
|
return 0;
|
|
} else if (childType < returnType) {
|
|
returnType = childType;
|
|
}
|
|
}
|
|
return returnType;
|
|
default:
|
|
if (true) ;
|
|
return 0;
|
|
}
|
|
}
|
|
const allowHoistedHelperSet = /* @__PURE__ */ new Set([
|
|
NORMALIZE_CLASS,
|
|
NORMALIZE_STYLE,
|
|
NORMALIZE_PROPS,
|
|
GUARD_REACTIVE_PROPS
|
|
]);
|
|
function getConstantTypeOfHelperCall(value, context) {
|
|
if (value.type === 14 && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(value.callee) && allowHoistedHelperSet.has(value.callee)) {
|
|
const arg = value.arguments[0];
|
|
if (arg.type === 4) {
|
|
return getConstantType(arg, context);
|
|
} else if (arg.type === 14) {
|
|
return getConstantTypeOfHelperCall(arg, context);
|
|
}
|
|
}
|
|
return 0;
|
|
}
|
|
function getGeneratedPropsConstantType(node, context) {
|
|
let returnType = 3;
|
|
const props = getNodeProps(node);
|
|
if (props && props.type === 15) {
|
|
const { properties } = props;
|
|
for (let i = 0; i < properties.length; i++) {
|
|
const { key, value } = properties[i];
|
|
const keyType = getConstantType(key, context);
|
|
if (keyType === 0) {
|
|
return keyType;
|
|
}
|
|
if (keyType < returnType) {
|
|
returnType = keyType;
|
|
}
|
|
let valueType;
|
|
if (value.type === 4) {
|
|
valueType = getConstantType(value, context);
|
|
} else if (value.type === 14) {
|
|
valueType = getConstantTypeOfHelperCall(value, context);
|
|
} else {
|
|
valueType = 0;
|
|
}
|
|
if (valueType === 0) {
|
|
return valueType;
|
|
}
|
|
if (valueType < returnType) {
|
|
returnType = valueType;
|
|
}
|
|
}
|
|
}
|
|
return returnType;
|
|
}
|
|
function getNodeProps(node) {
|
|
const codegenNode = node.codegenNode;
|
|
if (codegenNode.type === 13) {
|
|
return codegenNode.props;
|
|
}
|
|
}
|
|
function getPatchFlag(node) {
|
|
const flag = node.patchFlag;
|
|
return flag ? parseInt(flag, 10) : void 0;
|
|
}
|
|
|
|
function createTransformContext(root, {
|
|
filename = "",
|
|
prefixIdentifiers = false,
|
|
hoistStatic: hoistStatic2 = false,
|
|
cacheHandlers = false,
|
|
nodeTransforms = [],
|
|
directiveTransforms = {},
|
|
transformHoist = null,
|
|
isBuiltInComponent = _vue_shared__WEBPACK_IMPORTED_MODULE_0__.NOOP,
|
|
isCustomElement = _vue_shared__WEBPACK_IMPORTED_MODULE_0__.NOOP,
|
|
expressionPlugins = [],
|
|
scopeId = null,
|
|
slotted = true,
|
|
ssr = false,
|
|
inSSR = false,
|
|
ssrCssVars = ``,
|
|
bindingMetadata = _vue_shared__WEBPACK_IMPORTED_MODULE_0__.EMPTY_OBJ,
|
|
inline = false,
|
|
isTS = false,
|
|
onError = defaultOnError,
|
|
onWarn = defaultOnWarn,
|
|
compatConfig
|
|
}) {
|
|
const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/);
|
|
const context = {
|
|
// options
|
|
selfName: nameMatch && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.capitalize)((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.camelize)(nameMatch[1])),
|
|
prefixIdentifiers,
|
|
hoistStatic: hoistStatic2,
|
|
cacheHandlers,
|
|
nodeTransforms,
|
|
directiveTransforms,
|
|
transformHoist,
|
|
isBuiltInComponent,
|
|
isCustomElement,
|
|
expressionPlugins,
|
|
scopeId,
|
|
slotted,
|
|
ssr,
|
|
inSSR,
|
|
ssrCssVars,
|
|
bindingMetadata,
|
|
inline,
|
|
isTS,
|
|
onError,
|
|
onWarn,
|
|
compatConfig,
|
|
// state
|
|
root,
|
|
helpers: /* @__PURE__ */ new Map(),
|
|
components: /* @__PURE__ */ new Set(),
|
|
directives: /* @__PURE__ */ new Set(),
|
|
hoists: [],
|
|
imports: [],
|
|
constantCache: /* @__PURE__ */ new Map(),
|
|
temps: 0,
|
|
cached: 0,
|
|
identifiers: /* @__PURE__ */ Object.create(null),
|
|
scopes: {
|
|
vFor: 0,
|
|
vSlot: 0,
|
|
vPre: 0,
|
|
vOnce: 0
|
|
},
|
|
parent: null,
|
|
currentNode: root,
|
|
childIndex: 0,
|
|
inVOnce: false,
|
|
// methods
|
|
helper(name) {
|
|
const count = context.helpers.get(name) || 0;
|
|
context.helpers.set(name, count + 1);
|
|
return name;
|
|
},
|
|
removeHelper(name) {
|
|
const count = context.helpers.get(name);
|
|
if (count) {
|
|
const currentCount = count - 1;
|
|
if (!currentCount) {
|
|
context.helpers.delete(name);
|
|
} else {
|
|
context.helpers.set(name, currentCount);
|
|
}
|
|
}
|
|
},
|
|
helperString(name) {
|
|
return `_${helperNameMap[context.helper(name)]}`;
|
|
},
|
|
replaceNode(node) {
|
|
if (true) {
|
|
if (!context.currentNode) {
|
|
throw new Error(`Node being replaced is already removed.`);
|
|
}
|
|
if (!context.parent) {
|
|
throw new Error(`Cannot replace root node.`);
|
|
}
|
|
}
|
|
context.parent.children[context.childIndex] = context.currentNode = node;
|
|
},
|
|
removeNode(node) {
|
|
if ( true && !context.parent) {
|
|
throw new Error(`Cannot remove root node.`);
|
|
}
|
|
const list = context.parent.children;
|
|
const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1;
|
|
if ( true && removalIndex < 0) {
|
|
throw new Error(`node being removed is not a child of current parent`);
|
|
}
|
|
if (!node || node === context.currentNode) {
|
|
context.currentNode = null;
|
|
context.onNodeRemoved();
|
|
} else {
|
|
if (context.childIndex > removalIndex) {
|
|
context.childIndex--;
|
|
context.onNodeRemoved();
|
|
}
|
|
}
|
|
context.parent.children.splice(removalIndex, 1);
|
|
},
|
|
onNodeRemoved: () => {
|
|
},
|
|
addIdentifiers(exp) {
|
|
},
|
|
removeIdentifiers(exp) {
|
|
},
|
|
hoist(exp) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(exp))
|
|
exp = createSimpleExpression(exp);
|
|
context.hoists.push(exp);
|
|
const identifier = createSimpleExpression(
|
|
`_hoisted_${context.hoists.length}`,
|
|
false,
|
|
exp.loc,
|
|
2
|
|
);
|
|
identifier.hoisted = exp;
|
|
return identifier;
|
|
},
|
|
cache(exp, isVNode = false) {
|
|
return createCacheExpression(context.cached++, exp, isVNode);
|
|
}
|
|
};
|
|
{
|
|
context.filters = /* @__PURE__ */ new Set();
|
|
}
|
|
return context;
|
|
}
|
|
function transform(root, options) {
|
|
const context = createTransformContext(root, options);
|
|
traverseNode(root, context);
|
|
if (options.hoistStatic) {
|
|
hoistStatic(root, context);
|
|
}
|
|
if (!options.ssr) {
|
|
createRootCodegen(root, context);
|
|
}
|
|
root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]);
|
|
root.components = [...context.components];
|
|
root.directives = [...context.directives];
|
|
root.imports = context.imports;
|
|
root.hoists = context.hoists;
|
|
root.temps = context.temps;
|
|
root.cached = context.cached;
|
|
{
|
|
root.filters = [...context.filters];
|
|
}
|
|
}
|
|
function createRootCodegen(root, context) {
|
|
const { helper } = context;
|
|
const { children } = root;
|
|
if (children.length === 1) {
|
|
const child = children[0];
|
|
if (isSingleElementRoot(root, child) && child.codegenNode) {
|
|
const codegenNode = child.codegenNode;
|
|
if (codegenNode.type === 13) {
|
|
convertToBlock(codegenNode, context);
|
|
}
|
|
root.codegenNode = codegenNode;
|
|
} else {
|
|
root.codegenNode = child;
|
|
}
|
|
} else if (children.length > 1) {
|
|
let patchFlag = 64;
|
|
let patchFlagText = _vue_shared__WEBPACK_IMPORTED_MODULE_0__.PatchFlagNames[64];
|
|
if ( true && children.filter((c) => c.type !== 3).length === 1) {
|
|
patchFlag |= 2048;
|
|
patchFlagText += `, ${_vue_shared__WEBPACK_IMPORTED_MODULE_0__.PatchFlagNames[2048]}`;
|
|
}
|
|
root.codegenNode = createVNodeCall(
|
|
context,
|
|
helper(FRAGMENT),
|
|
void 0,
|
|
root.children,
|
|
patchFlag + ( true ? ` /* ${patchFlagText} */` : 0),
|
|
void 0,
|
|
void 0,
|
|
true,
|
|
void 0,
|
|
false
|
|
/* isComponent */
|
|
);
|
|
} else ;
|
|
}
|
|
function traverseChildren(parent, context) {
|
|
let i = 0;
|
|
const nodeRemoved = () => {
|
|
i--;
|
|
};
|
|
for (; i < parent.children.length; i++) {
|
|
const child = parent.children[i];
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(child))
|
|
continue;
|
|
context.parent = parent;
|
|
context.childIndex = i;
|
|
context.onNodeRemoved = nodeRemoved;
|
|
traverseNode(child, context);
|
|
}
|
|
}
|
|
function traverseNode(node, context) {
|
|
context.currentNode = node;
|
|
const { nodeTransforms } = context;
|
|
const exitFns = [];
|
|
for (let i2 = 0; i2 < nodeTransforms.length; i2++) {
|
|
const onExit = nodeTransforms[i2](node, context);
|
|
if (onExit) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(onExit)) {
|
|
exitFns.push(...onExit);
|
|
} else {
|
|
exitFns.push(onExit);
|
|
}
|
|
}
|
|
if (!context.currentNode) {
|
|
return;
|
|
} else {
|
|
node = context.currentNode;
|
|
}
|
|
}
|
|
switch (node.type) {
|
|
case 3:
|
|
if (!context.ssr) {
|
|
context.helper(CREATE_COMMENT);
|
|
}
|
|
break;
|
|
case 5:
|
|
if (!context.ssr) {
|
|
context.helper(TO_DISPLAY_STRING);
|
|
}
|
|
break;
|
|
case 9:
|
|
for (let i2 = 0; i2 < node.branches.length; i2++) {
|
|
traverseNode(node.branches[i2], context);
|
|
}
|
|
break;
|
|
case 10:
|
|
case 11:
|
|
case 1:
|
|
case 0:
|
|
traverseChildren(node, context);
|
|
break;
|
|
}
|
|
context.currentNode = node;
|
|
let i = exitFns.length;
|
|
while (i--) {
|
|
exitFns[i]();
|
|
}
|
|
}
|
|
function createStructuralDirectiveTransform(name, fn) {
|
|
const matches = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(name) ? (n) => n === name : (n) => name.test(n);
|
|
return (node, context) => {
|
|
if (node.type === 1) {
|
|
const { props } = node;
|
|
if (node.tagType === 3 && props.some(isVSlot)) {
|
|
return;
|
|
}
|
|
const exitFns = [];
|
|
for (let i = 0; i < props.length; i++) {
|
|
const prop = props[i];
|
|
if (prop.type === 7 && matches(prop.name)) {
|
|
props.splice(i, 1);
|
|
i--;
|
|
const onExit = fn(node, prop, context);
|
|
if (onExit)
|
|
exitFns.push(onExit);
|
|
}
|
|
}
|
|
return exitFns;
|
|
}
|
|
};
|
|
}
|
|
|
|
const PURE_ANNOTATION = `/*#__PURE__*/`;
|
|
const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`;
|
|
function createCodegenContext(ast, {
|
|
mode = "function",
|
|
prefixIdentifiers = mode === "module",
|
|
sourceMap = false,
|
|
filename = `template.vue.html`,
|
|
scopeId = null,
|
|
optimizeImports = false,
|
|
runtimeGlobalName = `Vue`,
|
|
runtimeModuleName = `vue`,
|
|
ssrRuntimeModuleName = "vue/server-renderer",
|
|
ssr = false,
|
|
isTS = false,
|
|
inSSR = false
|
|
}) {
|
|
const context = {
|
|
mode,
|
|
prefixIdentifiers,
|
|
sourceMap,
|
|
filename,
|
|
scopeId,
|
|
optimizeImports,
|
|
runtimeGlobalName,
|
|
runtimeModuleName,
|
|
ssrRuntimeModuleName,
|
|
ssr,
|
|
isTS,
|
|
inSSR,
|
|
source: ast.loc.source,
|
|
code: ``,
|
|
column: 1,
|
|
line: 1,
|
|
offset: 0,
|
|
indentLevel: 0,
|
|
pure: false,
|
|
map: void 0,
|
|
helper(key) {
|
|
return `_${helperNameMap[key]}`;
|
|
},
|
|
push(code, node) {
|
|
context.code += code;
|
|
},
|
|
indent() {
|
|
newline(++context.indentLevel);
|
|
},
|
|
deindent(withoutNewLine = false) {
|
|
if (withoutNewLine) {
|
|
--context.indentLevel;
|
|
} else {
|
|
newline(--context.indentLevel);
|
|
}
|
|
},
|
|
newline() {
|
|
newline(context.indentLevel);
|
|
}
|
|
};
|
|
function newline(n) {
|
|
context.push("\n" + ` `.repeat(n));
|
|
}
|
|
return context;
|
|
}
|
|
function generate(ast, options = {}) {
|
|
const context = createCodegenContext(ast, options);
|
|
if (options.onContextCreated)
|
|
options.onContextCreated(context);
|
|
const {
|
|
mode,
|
|
push,
|
|
prefixIdentifiers,
|
|
indent,
|
|
deindent,
|
|
newline,
|
|
scopeId,
|
|
ssr
|
|
} = context;
|
|
const helpers = Array.from(ast.helpers);
|
|
const hasHelpers = helpers.length > 0;
|
|
const useWithBlock = !prefixIdentifiers && mode !== "module";
|
|
const isSetupInlined = false;
|
|
const preambleContext = isSetupInlined ? createCodegenContext(ast, options) : context;
|
|
{
|
|
genFunctionPreamble(ast, preambleContext);
|
|
}
|
|
const functionName = ssr ? `ssrRender` : `render`;
|
|
const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"];
|
|
const signature = args.join(", ");
|
|
{
|
|
push(`function ${functionName}(${signature}) {`);
|
|
}
|
|
indent();
|
|
if (useWithBlock) {
|
|
push(`with (_ctx) {`);
|
|
indent();
|
|
if (hasHelpers) {
|
|
push(`const { ${helpers.map(aliasHelper).join(", ")} } = _Vue`);
|
|
push(`
|
|
`);
|
|
newline();
|
|
}
|
|
}
|
|
if (ast.components.length) {
|
|
genAssets(ast.components, "component", context);
|
|
if (ast.directives.length || ast.temps > 0) {
|
|
newline();
|
|
}
|
|
}
|
|
if (ast.directives.length) {
|
|
genAssets(ast.directives, "directive", context);
|
|
if (ast.temps > 0) {
|
|
newline();
|
|
}
|
|
}
|
|
if (ast.filters && ast.filters.length) {
|
|
newline();
|
|
genAssets(ast.filters, "filter", context);
|
|
newline();
|
|
}
|
|
if (ast.temps > 0) {
|
|
push(`let `);
|
|
for (let i = 0; i < ast.temps; i++) {
|
|
push(`${i > 0 ? `, ` : ``}_temp${i}`);
|
|
}
|
|
}
|
|
if (ast.components.length || ast.directives.length || ast.temps) {
|
|
push(`
|
|
`);
|
|
newline();
|
|
}
|
|
if (!ssr) {
|
|
push(`return `);
|
|
}
|
|
if (ast.codegenNode) {
|
|
genNode(ast.codegenNode, context);
|
|
} else {
|
|
push(`null`);
|
|
}
|
|
if (useWithBlock) {
|
|
deindent();
|
|
push(`}`);
|
|
}
|
|
deindent();
|
|
push(`}`);
|
|
return {
|
|
ast,
|
|
code: context.code,
|
|
preamble: isSetupInlined ? preambleContext.code : ``,
|
|
// SourceMapGenerator does have toJSON() method but it's not in the types
|
|
map: context.map ? context.map.toJSON() : void 0
|
|
};
|
|
}
|
|
function genFunctionPreamble(ast, context) {
|
|
const {
|
|
ssr,
|
|
prefixIdentifiers,
|
|
push,
|
|
newline,
|
|
runtimeModuleName,
|
|
runtimeGlobalName,
|
|
ssrRuntimeModuleName
|
|
} = context;
|
|
const VueBinding = runtimeGlobalName;
|
|
const helpers = Array.from(ast.helpers);
|
|
if (helpers.length > 0) {
|
|
{
|
|
push(`const _Vue = ${VueBinding}
|
|
`);
|
|
if (ast.hoists.length) {
|
|
const staticHelpers = [
|
|
CREATE_VNODE,
|
|
CREATE_ELEMENT_VNODE,
|
|
CREATE_COMMENT,
|
|
CREATE_TEXT,
|
|
CREATE_STATIC
|
|
].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", ");
|
|
push(`const { ${staticHelpers} } = _Vue
|
|
`);
|
|
}
|
|
}
|
|
}
|
|
genHoists(ast.hoists, context);
|
|
newline();
|
|
push(`return `);
|
|
}
|
|
function genAssets(assets, type, { helper, push, newline, isTS }) {
|
|
const resolver = helper(
|
|
type === "filter" ? RESOLVE_FILTER : type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE
|
|
);
|
|
for (let i = 0; i < assets.length; i++) {
|
|
let id = assets[i];
|
|
const maybeSelfReference = id.endsWith("__self");
|
|
if (maybeSelfReference) {
|
|
id = id.slice(0, -6);
|
|
}
|
|
push(
|
|
`const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}`
|
|
);
|
|
if (i < assets.length - 1) {
|
|
newline();
|
|
}
|
|
}
|
|
}
|
|
function genHoists(hoists, context) {
|
|
if (!hoists.length) {
|
|
return;
|
|
}
|
|
context.pure = true;
|
|
const { push, newline, helper, scopeId, mode } = context;
|
|
newline();
|
|
for (let i = 0; i < hoists.length; i++) {
|
|
const exp = hoists[i];
|
|
if (exp) {
|
|
push(
|
|
`const _hoisted_${i + 1} = ${``}`
|
|
);
|
|
genNode(exp, context);
|
|
newline();
|
|
}
|
|
}
|
|
context.pure = false;
|
|
}
|
|
function isText(n) {
|
|
return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8;
|
|
}
|
|
function genNodeListAsArray(nodes, context) {
|
|
const multilines = nodes.length > 3 || true && nodes.some((n) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(n) || !isText(n));
|
|
context.push(`[`);
|
|
multilines && context.indent();
|
|
genNodeList(nodes, context, multilines);
|
|
multilines && context.deindent();
|
|
context.push(`]`);
|
|
}
|
|
function genNodeList(nodes, context, multilines = false, comma = true) {
|
|
const { push, newline } = context;
|
|
for (let i = 0; i < nodes.length; i++) {
|
|
const node = nodes[i];
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(node)) {
|
|
push(node);
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(node)) {
|
|
genNodeListAsArray(node, context);
|
|
} else {
|
|
genNode(node, context);
|
|
}
|
|
if (i < nodes.length - 1) {
|
|
if (multilines) {
|
|
comma && push(",");
|
|
newline();
|
|
} else {
|
|
comma && push(", ");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function genNode(node, context) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(node)) {
|
|
context.push(node);
|
|
return;
|
|
}
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(node)) {
|
|
context.push(context.helper(node));
|
|
return;
|
|
}
|
|
switch (node.type) {
|
|
case 1:
|
|
case 9:
|
|
case 11:
|
|
true && assert(
|
|
node.codegenNode != null,
|
|
`Codegen node is missing for element/if/for node. Apply appropriate transforms first.`
|
|
);
|
|
genNode(node.codegenNode, context);
|
|
break;
|
|
case 2:
|
|
genText(node, context);
|
|
break;
|
|
case 4:
|
|
genExpression(node, context);
|
|
break;
|
|
case 5:
|
|
genInterpolation(node, context);
|
|
break;
|
|
case 12:
|
|
genNode(node.codegenNode, context);
|
|
break;
|
|
case 8:
|
|
genCompoundExpression(node, context);
|
|
break;
|
|
case 3:
|
|
genComment(node, context);
|
|
break;
|
|
case 13:
|
|
genVNodeCall(node, context);
|
|
break;
|
|
case 14:
|
|
genCallExpression(node, context);
|
|
break;
|
|
case 15:
|
|
genObjectExpression(node, context);
|
|
break;
|
|
case 17:
|
|
genArrayExpression(node, context);
|
|
break;
|
|
case 18:
|
|
genFunctionExpression(node, context);
|
|
break;
|
|
case 19:
|
|
genConditionalExpression(node, context);
|
|
break;
|
|
case 20:
|
|
genCacheExpression(node, context);
|
|
break;
|
|
case 21:
|
|
genNodeList(node.body, context, true, false);
|
|
break;
|
|
case 22:
|
|
break;
|
|
case 23:
|
|
break;
|
|
case 24:
|
|
break;
|
|
case 25:
|
|
break;
|
|
case 26:
|
|
break;
|
|
case 10:
|
|
break;
|
|
default:
|
|
if (true) {
|
|
assert(false, `unhandled codegen node type: ${node.type}`);
|
|
const exhaustiveCheck = node;
|
|
return exhaustiveCheck;
|
|
}
|
|
}
|
|
}
|
|
function genText(node, context) {
|
|
context.push(JSON.stringify(node.content), node);
|
|
}
|
|
function genExpression(node, context) {
|
|
const { content, isStatic } = node;
|
|
context.push(isStatic ? JSON.stringify(content) : content, node);
|
|
}
|
|
function genInterpolation(node, context) {
|
|
const { push, helper, pure } = context;
|
|
if (pure)
|
|
push(PURE_ANNOTATION);
|
|
push(`${helper(TO_DISPLAY_STRING)}(`);
|
|
genNode(node.content, context);
|
|
push(`)`);
|
|
}
|
|
function genCompoundExpression(node, context) {
|
|
for (let i = 0; i < node.children.length; i++) {
|
|
const child = node.children[i];
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(child)) {
|
|
context.push(child);
|
|
} else {
|
|
genNode(child, context);
|
|
}
|
|
}
|
|
}
|
|
function genExpressionAsPropertyKey(node, context) {
|
|
const { push } = context;
|
|
if (node.type === 8) {
|
|
push(`[`);
|
|
genCompoundExpression(node, context);
|
|
push(`]`);
|
|
} else if (node.isStatic) {
|
|
const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content);
|
|
push(text, node);
|
|
} else {
|
|
push(`[${node.content}]`, node);
|
|
}
|
|
}
|
|
function genComment(node, context) {
|
|
const { push, helper, pure } = context;
|
|
if (pure) {
|
|
push(PURE_ANNOTATION);
|
|
}
|
|
push(`${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, node);
|
|
}
|
|
function genVNodeCall(node, context) {
|
|
const { push, helper, pure } = context;
|
|
const {
|
|
tag,
|
|
props,
|
|
children,
|
|
patchFlag,
|
|
dynamicProps,
|
|
directives,
|
|
isBlock,
|
|
disableTracking,
|
|
isComponent
|
|
} = node;
|
|
if (directives) {
|
|
push(helper(WITH_DIRECTIVES) + `(`);
|
|
}
|
|
if (isBlock) {
|
|
push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `);
|
|
}
|
|
if (pure) {
|
|
push(PURE_ANNOTATION);
|
|
}
|
|
const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent);
|
|
push(helper(callHelper) + `(`, node);
|
|
genNodeList(
|
|
genNullableArgs([tag, props, children, patchFlag, dynamicProps]),
|
|
context
|
|
);
|
|
push(`)`);
|
|
if (isBlock) {
|
|
push(`)`);
|
|
}
|
|
if (directives) {
|
|
push(`, `);
|
|
genNode(directives, context);
|
|
push(`)`);
|
|
}
|
|
}
|
|
function genNullableArgs(args) {
|
|
let i = args.length;
|
|
while (i--) {
|
|
if (args[i] != null)
|
|
break;
|
|
}
|
|
return args.slice(0, i + 1).map((arg) => arg || `null`);
|
|
}
|
|
function genCallExpression(node, context) {
|
|
const { push, helper, pure } = context;
|
|
const callee = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(node.callee) ? node.callee : helper(node.callee);
|
|
if (pure) {
|
|
push(PURE_ANNOTATION);
|
|
}
|
|
push(callee + `(`, node);
|
|
genNodeList(node.arguments, context);
|
|
push(`)`);
|
|
}
|
|
function genObjectExpression(node, context) {
|
|
const { push, indent, deindent, newline } = context;
|
|
const { properties } = node;
|
|
if (!properties.length) {
|
|
push(`{}`, node);
|
|
return;
|
|
}
|
|
const multilines = properties.length > 1 || true && properties.some((p) => p.value.type !== 4);
|
|
push(multilines ? `{` : `{ `);
|
|
multilines && indent();
|
|
for (let i = 0; i < properties.length; i++) {
|
|
const { key, value } = properties[i];
|
|
genExpressionAsPropertyKey(key, context);
|
|
push(`: `);
|
|
genNode(value, context);
|
|
if (i < properties.length - 1) {
|
|
push(`,`);
|
|
newline();
|
|
}
|
|
}
|
|
multilines && deindent();
|
|
push(multilines ? `}` : ` }`);
|
|
}
|
|
function genArrayExpression(node, context) {
|
|
genNodeListAsArray(node.elements, context);
|
|
}
|
|
function genFunctionExpression(node, context) {
|
|
const { push, indent, deindent } = context;
|
|
const { params, returns, body, newline, isSlot } = node;
|
|
if (isSlot) {
|
|
push(`_${helperNameMap[WITH_CTX]}(`);
|
|
}
|
|
push(`(`, node);
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(params)) {
|
|
genNodeList(params, context);
|
|
} else if (params) {
|
|
genNode(params, context);
|
|
}
|
|
push(`) => `);
|
|
if (newline || body) {
|
|
push(`{`);
|
|
indent();
|
|
}
|
|
if (returns) {
|
|
if (newline) {
|
|
push(`return `);
|
|
}
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(returns)) {
|
|
genNodeListAsArray(returns, context);
|
|
} else {
|
|
genNode(returns, context);
|
|
}
|
|
} else if (body) {
|
|
genNode(body, context);
|
|
}
|
|
if (newline || body) {
|
|
deindent();
|
|
push(`}`);
|
|
}
|
|
if (isSlot) {
|
|
if (node.isNonScopedSlot) {
|
|
push(`, undefined, true`);
|
|
}
|
|
push(`)`);
|
|
}
|
|
}
|
|
function genConditionalExpression(node, context) {
|
|
const { test, consequent, alternate, newline: needNewline } = node;
|
|
const { push, indent, deindent, newline } = context;
|
|
if (test.type === 4) {
|
|
const needsParens = !isSimpleIdentifier(test.content);
|
|
needsParens && push(`(`);
|
|
genExpression(test, context);
|
|
needsParens && push(`)`);
|
|
} else {
|
|
push(`(`);
|
|
genNode(test, context);
|
|
push(`)`);
|
|
}
|
|
needNewline && indent();
|
|
context.indentLevel++;
|
|
needNewline || push(` `);
|
|
push(`? `);
|
|
genNode(consequent, context);
|
|
context.indentLevel--;
|
|
needNewline && newline();
|
|
needNewline || push(` `);
|
|
push(`: `);
|
|
const isNested = alternate.type === 19;
|
|
if (!isNested) {
|
|
context.indentLevel++;
|
|
}
|
|
genNode(alternate, context);
|
|
if (!isNested) {
|
|
context.indentLevel--;
|
|
}
|
|
needNewline && deindent(
|
|
true
|
|
/* without newline */
|
|
);
|
|
}
|
|
function genCacheExpression(node, context) {
|
|
const { push, helper, indent, deindent, newline } = context;
|
|
push(`_cache[${node.index}] || (`);
|
|
if (node.isVNode) {
|
|
indent();
|
|
push(`${helper(SET_BLOCK_TRACKING)}(-1),`);
|
|
newline();
|
|
}
|
|
push(`_cache[${node.index}] = `);
|
|
genNode(node.value, context);
|
|
if (node.isVNode) {
|
|
push(`,`);
|
|
newline();
|
|
push(`${helper(SET_BLOCK_TRACKING)}(1),`);
|
|
newline();
|
|
push(`_cache[${node.index}]`);
|
|
deindent();
|
|
}
|
|
push(`)`);
|
|
}
|
|
|
|
function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) {
|
|
{
|
|
return;
|
|
}
|
|
}
|
|
function isReferencedIdentifier(id, parent, parentStack) {
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
function isInDestructureAssignment(parent, parentStack) {
|
|
if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) {
|
|
let i = parentStack.length;
|
|
while (i--) {
|
|
const p = parentStack[i];
|
|
if (p.type === "AssignmentExpression") {
|
|
return true;
|
|
} else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
function walkFunctionParams(node, onIdent) {
|
|
for (const p of node.params) {
|
|
for (const id of extractIdentifiers(p)) {
|
|
onIdent(id);
|
|
}
|
|
}
|
|
}
|
|
function walkBlockDeclarations(block, onIdent) {
|
|
for (const stmt of block.body) {
|
|
if (stmt.type === "VariableDeclaration") {
|
|
if (stmt.declare)
|
|
continue;
|
|
for (const decl of stmt.declarations) {
|
|
for (const id of extractIdentifiers(decl.id)) {
|
|
onIdent(id);
|
|
}
|
|
}
|
|
} else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") {
|
|
if (stmt.declare || !stmt.id)
|
|
continue;
|
|
onIdent(stmt.id);
|
|
}
|
|
}
|
|
}
|
|
function extractIdentifiers(param, nodes = []) {
|
|
switch (param.type) {
|
|
case "Identifier":
|
|
nodes.push(param);
|
|
break;
|
|
case "MemberExpression":
|
|
let object = param;
|
|
while (object.type === "MemberExpression") {
|
|
object = object.object;
|
|
}
|
|
nodes.push(object);
|
|
break;
|
|
case "ObjectPattern":
|
|
for (const prop of param.properties) {
|
|
if (prop.type === "RestElement") {
|
|
extractIdentifiers(prop.argument, nodes);
|
|
} else {
|
|
extractIdentifiers(prop.value, nodes);
|
|
}
|
|
}
|
|
break;
|
|
case "ArrayPattern":
|
|
param.elements.forEach((element) => {
|
|
if (element)
|
|
extractIdentifiers(element, nodes);
|
|
});
|
|
break;
|
|
case "RestElement":
|
|
extractIdentifiers(param.argument, nodes);
|
|
break;
|
|
case "AssignmentPattern":
|
|
extractIdentifiers(param.left, nodes);
|
|
break;
|
|
}
|
|
return nodes;
|
|
}
|
|
const isFunctionType = (node) => {
|
|
return /Function(?:Expression|Declaration)$|Method$/.test(node.type);
|
|
};
|
|
const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed;
|
|
const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node;
|
|
const TS_NODE_TYPES = [
|
|
"TSAsExpression",
|
|
// foo as number
|
|
"TSTypeAssertion",
|
|
// (<number>foo)
|
|
"TSNonNullExpression",
|
|
// foo!
|
|
"TSInstantiationExpression",
|
|
// foo<string>
|
|
"TSSatisfiesExpression"
|
|
// foo satisfies T
|
|
];
|
|
|
|
const prohibitedKeywordRE = new RegExp(
|
|
"\\b" + "arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b") + "\\b"
|
|
);
|
|
const stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;
|
|
function validateBrowserExpression(node, context, asParams = false, asRawStatements = false) {
|
|
const exp = node.content;
|
|
if (!exp.trim()) {
|
|
return;
|
|
}
|
|
try {
|
|
new Function(
|
|
asRawStatements ? ` ${exp} ` : `return ${asParams ? `(${exp}) => {}` : `(${exp})`}`
|
|
);
|
|
} catch (e) {
|
|
let message = e.message;
|
|
const keywordMatch = exp.replace(stripStringRE, "").match(prohibitedKeywordRE);
|
|
if (keywordMatch) {
|
|
message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`;
|
|
}
|
|
context.onError(
|
|
createCompilerError(
|
|
45,
|
|
node.loc,
|
|
void 0,
|
|
message
|
|
)
|
|
);
|
|
}
|
|
}
|
|
|
|
const transformExpression = (node, context) => {
|
|
if (node.type === 5) {
|
|
node.content = processExpression(
|
|
node.content,
|
|
context
|
|
);
|
|
} else if (node.type === 1) {
|
|
for (let i = 0; i < node.props.length; i++) {
|
|
const dir = node.props[i];
|
|
if (dir.type === 7 && dir.name !== "for") {
|
|
const exp = dir.exp;
|
|
const arg = dir.arg;
|
|
if (exp && exp.type === 4 && !(dir.name === "on" && arg)) {
|
|
dir.exp = processExpression(
|
|
exp,
|
|
context,
|
|
// slot args must be processed as function params
|
|
dir.name === "slot"
|
|
);
|
|
}
|
|
if (arg && arg.type === 4 && !arg.isStatic) {
|
|
dir.arg = processExpression(arg, context);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) {
|
|
{
|
|
if (true) {
|
|
validateBrowserExpression(node, context, asParams, asRawStatements);
|
|
}
|
|
return node;
|
|
}
|
|
}
|
|
function stringifyExpression(exp) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(exp)) {
|
|
return exp;
|
|
} else if (exp.type === 4) {
|
|
return exp.content;
|
|
} else {
|
|
return exp.children.map(stringifyExpression).join("");
|
|
}
|
|
}
|
|
|
|
const transformIf = createStructuralDirectiveTransform(
|
|
/^(if|else|else-if)$/,
|
|
(node, dir, context) => {
|
|
return processIf(node, dir, context, (ifNode, branch, isRoot) => {
|
|
const siblings = context.parent.children;
|
|
let i = siblings.indexOf(ifNode);
|
|
let key = 0;
|
|
while (i-- >= 0) {
|
|
const sibling = siblings[i];
|
|
if (sibling && sibling.type === 9) {
|
|
key += sibling.branches.length;
|
|
}
|
|
}
|
|
return () => {
|
|
if (isRoot) {
|
|
ifNode.codegenNode = createCodegenNodeForBranch(
|
|
branch,
|
|
key,
|
|
context
|
|
);
|
|
} else {
|
|
const parentCondition = getParentCondition(ifNode.codegenNode);
|
|
parentCondition.alternate = createCodegenNodeForBranch(
|
|
branch,
|
|
key + ifNode.branches.length - 1,
|
|
context
|
|
);
|
|
}
|
|
};
|
|
});
|
|
}
|
|
);
|
|
function processIf(node, dir, context, processCodegen) {
|
|
if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) {
|
|
const loc = dir.exp ? dir.exp.loc : node.loc;
|
|
context.onError(
|
|
createCompilerError(28, dir.loc)
|
|
);
|
|
dir.exp = createSimpleExpression(`true`, false, loc);
|
|
}
|
|
if ( true && dir.exp) {
|
|
validateBrowserExpression(dir.exp, context);
|
|
}
|
|
if (dir.name === "if") {
|
|
const branch = createIfBranch(node, dir);
|
|
const ifNode = {
|
|
type: 9,
|
|
loc: node.loc,
|
|
branches: [branch]
|
|
};
|
|
context.replaceNode(ifNode);
|
|
if (processCodegen) {
|
|
return processCodegen(ifNode, branch, true);
|
|
}
|
|
} else {
|
|
const siblings = context.parent.children;
|
|
const comments = [];
|
|
let i = siblings.indexOf(node);
|
|
while (i-- >= -1) {
|
|
const sibling = siblings[i];
|
|
if (sibling && sibling.type === 3) {
|
|
context.removeNode(sibling);
|
|
true && comments.unshift(sibling);
|
|
continue;
|
|
}
|
|
if (sibling && sibling.type === 2 && !sibling.content.trim().length) {
|
|
context.removeNode(sibling);
|
|
continue;
|
|
}
|
|
if (sibling && sibling.type === 9) {
|
|
if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) {
|
|
context.onError(
|
|
createCompilerError(30, node.loc)
|
|
);
|
|
}
|
|
context.removeNode();
|
|
const branch = createIfBranch(node, dir);
|
|
if ( true && comments.length && // #3619 ignore comments if the v-if is direct child of <transition>
|
|
!(context.parent && context.parent.type === 1 && isBuiltInType(context.parent.tag, "transition"))) {
|
|
branch.children = [...comments, ...branch.children];
|
|
}
|
|
if (true) {
|
|
const key = branch.userKey;
|
|
if (key) {
|
|
sibling.branches.forEach(({ userKey }) => {
|
|
if (isSameKey(userKey, key)) {
|
|
context.onError(
|
|
createCompilerError(
|
|
29,
|
|
branch.userKey.loc
|
|
)
|
|
);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
sibling.branches.push(branch);
|
|
const onExit = processCodegen && processCodegen(sibling, branch, false);
|
|
traverseNode(branch, context);
|
|
if (onExit)
|
|
onExit();
|
|
context.currentNode = null;
|
|
} else {
|
|
context.onError(
|
|
createCompilerError(30, node.loc)
|
|
);
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
function createIfBranch(node, dir) {
|
|
const isTemplateIf = node.tagType === 3;
|
|
return {
|
|
type: 10,
|
|
loc: node.loc,
|
|
condition: dir.name === "else" ? void 0 : dir.exp,
|
|
children: isTemplateIf && !findDir(node, "for") ? node.children : [node],
|
|
userKey: findProp(node, `key`),
|
|
isTemplateIf
|
|
};
|
|
}
|
|
function createCodegenNodeForBranch(branch, keyIndex, context) {
|
|
if (branch.condition) {
|
|
return createConditionalExpression(
|
|
branch.condition,
|
|
createChildrenCodegenNode(branch, keyIndex, context),
|
|
// make sure to pass in asBlock: true so that the comment node call
|
|
// closes the current block.
|
|
createCallExpression(context.helper(CREATE_COMMENT), [
|
|
true ? '"v-if"' : 0,
|
|
"true"
|
|
])
|
|
);
|
|
} else {
|
|
return createChildrenCodegenNode(branch, keyIndex, context);
|
|
}
|
|
}
|
|
function createChildrenCodegenNode(branch, keyIndex, context) {
|
|
const { helper } = context;
|
|
const keyProperty = createObjectProperty(
|
|
`key`,
|
|
createSimpleExpression(
|
|
`${keyIndex}`,
|
|
false,
|
|
locStub,
|
|
2
|
|
)
|
|
);
|
|
const { children } = branch;
|
|
const firstChild = children[0];
|
|
const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1;
|
|
if (needFragmentWrapper) {
|
|
if (children.length === 1 && firstChild.type === 11) {
|
|
const vnodeCall = firstChild.codegenNode;
|
|
injectProp(vnodeCall, keyProperty, context);
|
|
return vnodeCall;
|
|
} else {
|
|
let patchFlag = 64;
|
|
let patchFlagText = _vue_shared__WEBPACK_IMPORTED_MODULE_0__.PatchFlagNames[64];
|
|
if ( true && !branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) {
|
|
patchFlag |= 2048;
|
|
patchFlagText += `, ${_vue_shared__WEBPACK_IMPORTED_MODULE_0__.PatchFlagNames[2048]}`;
|
|
}
|
|
return createVNodeCall(
|
|
context,
|
|
helper(FRAGMENT),
|
|
createObjectExpression([keyProperty]),
|
|
children,
|
|
patchFlag + ( true ? ` /* ${patchFlagText} */` : 0),
|
|
void 0,
|
|
void 0,
|
|
true,
|
|
false,
|
|
false,
|
|
branch.loc
|
|
);
|
|
}
|
|
} else {
|
|
const ret = firstChild.codegenNode;
|
|
const vnodeCall = getMemoedVNodeCall(ret);
|
|
if (vnodeCall.type === 13) {
|
|
convertToBlock(vnodeCall, context);
|
|
}
|
|
injectProp(vnodeCall, keyProperty, context);
|
|
return ret;
|
|
}
|
|
}
|
|
function isSameKey(a, b) {
|
|
if (!a || a.type !== b.type) {
|
|
return false;
|
|
}
|
|
if (a.type === 6) {
|
|
if (a.value.content !== b.value.content) {
|
|
return false;
|
|
}
|
|
} else {
|
|
const exp = a.exp;
|
|
const branchExp = b.exp;
|
|
if (exp.type !== branchExp.type) {
|
|
return false;
|
|
}
|
|
if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
function getParentCondition(node) {
|
|
while (true) {
|
|
if (node.type === 19) {
|
|
if (node.alternate.type === 19) {
|
|
node = node.alternate;
|
|
} else {
|
|
return node;
|
|
}
|
|
} else if (node.type === 20) {
|
|
node = node.value;
|
|
}
|
|
}
|
|
}
|
|
|
|
const transformFor = createStructuralDirectiveTransform(
|
|
"for",
|
|
(node, dir, context) => {
|
|
const { helper, removeHelper } = context;
|
|
return processFor(node, dir, context, (forNode) => {
|
|
const renderExp = createCallExpression(helper(RENDER_LIST), [
|
|
forNode.source
|
|
]);
|
|
const isTemplate = isTemplateNode(node);
|
|
const memo = findDir(node, "memo");
|
|
const keyProp = findProp(node, `key`);
|
|
const keyExp = keyProp && (keyProp.type === 6 ? createSimpleExpression(keyProp.value.content, true) : keyProp.exp);
|
|
const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null;
|
|
const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
|
|
const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
|
|
forNode.codegenNode = createVNodeCall(
|
|
context,
|
|
helper(FRAGMENT),
|
|
void 0,
|
|
renderExp,
|
|
fragmentFlag + ( true ? ` /* ${_vue_shared__WEBPACK_IMPORTED_MODULE_0__.PatchFlagNames[fragmentFlag]} */` : 0),
|
|
void 0,
|
|
void 0,
|
|
true,
|
|
!isStableFragment,
|
|
false,
|
|
node.loc
|
|
);
|
|
return () => {
|
|
let childBlock;
|
|
const { children } = forNode;
|
|
if (( true) && isTemplate) {
|
|
node.children.some((c) => {
|
|
if (c.type === 1) {
|
|
const key = findProp(c, "key");
|
|
if (key) {
|
|
context.onError(
|
|
createCompilerError(
|
|
33,
|
|
key.loc
|
|
)
|
|
);
|
|
return true;
|
|
}
|
|
}
|
|
});
|
|
}
|
|
const needFragmentWrapper = children.length !== 1 || children[0].type !== 1;
|
|
const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null;
|
|
if (slotOutlet) {
|
|
childBlock = slotOutlet.codegenNode;
|
|
if (isTemplate && keyProperty) {
|
|
injectProp(childBlock, keyProperty, context);
|
|
}
|
|
} else if (needFragmentWrapper) {
|
|
childBlock = createVNodeCall(
|
|
context,
|
|
helper(FRAGMENT),
|
|
keyProperty ? createObjectExpression([keyProperty]) : void 0,
|
|
node.children,
|
|
64 + ( true ? ` /* ${_vue_shared__WEBPACK_IMPORTED_MODULE_0__.PatchFlagNames[64]} */` : 0),
|
|
void 0,
|
|
void 0,
|
|
true,
|
|
void 0,
|
|
false
|
|
/* isComponent */
|
|
);
|
|
} else {
|
|
childBlock = children[0].codegenNode;
|
|
if (isTemplate && keyProperty) {
|
|
injectProp(childBlock, keyProperty, context);
|
|
}
|
|
if (childBlock.isBlock !== !isStableFragment) {
|
|
if (childBlock.isBlock) {
|
|
removeHelper(OPEN_BLOCK);
|
|
removeHelper(
|
|
getVNodeBlockHelper(context.inSSR, childBlock.isComponent)
|
|
);
|
|
} else {
|
|
removeHelper(
|
|
getVNodeHelper(context.inSSR, childBlock.isComponent)
|
|
);
|
|
}
|
|
}
|
|
childBlock.isBlock = !isStableFragment;
|
|
if (childBlock.isBlock) {
|
|
helper(OPEN_BLOCK);
|
|
helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent));
|
|
} else {
|
|
helper(getVNodeHelper(context.inSSR, childBlock.isComponent));
|
|
}
|
|
}
|
|
if (memo) {
|
|
const loop = createFunctionExpression(
|
|
createForLoopParams(forNode.parseResult, [
|
|
createSimpleExpression(`_cached`)
|
|
])
|
|
);
|
|
loop.body = createBlockStatement([
|
|
createCompoundExpression([`const _memo = (`, memo.exp, `)`]),
|
|
createCompoundExpression([
|
|
`if (_cached`,
|
|
...keyExp ? [` && _cached.key === `, keyExp] : [],
|
|
` && ${context.helperString(
|
|
IS_MEMO_SAME
|
|
)}(_cached, _memo)) return _cached`
|
|
]),
|
|
createCompoundExpression([`const _item = `, childBlock]),
|
|
createSimpleExpression(`_item.memo = _memo`),
|
|
createSimpleExpression(`return _item`)
|
|
]);
|
|
renderExp.arguments.push(
|
|
loop,
|
|
createSimpleExpression(`_cache`),
|
|
createSimpleExpression(String(context.cached++))
|
|
);
|
|
} else {
|
|
renderExp.arguments.push(
|
|
createFunctionExpression(
|
|
createForLoopParams(forNode.parseResult),
|
|
childBlock,
|
|
true
|
|
/* force newline */
|
|
)
|
|
);
|
|
}
|
|
};
|
|
});
|
|
}
|
|
);
|
|
function processFor(node, dir, context, processCodegen) {
|
|
if (!dir.exp) {
|
|
context.onError(
|
|
createCompilerError(31, dir.loc)
|
|
);
|
|
return;
|
|
}
|
|
const parseResult = parseForExpression(
|
|
// can only be simple expression because vFor transform is applied
|
|
// before expression transform.
|
|
dir.exp,
|
|
context
|
|
);
|
|
if (!parseResult) {
|
|
context.onError(
|
|
createCompilerError(32, dir.loc)
|
|
);
|
|
return;
|
|
}
|
|
const { addIdentifiers, removeIdentifiers, scopes } = context;
|
|
const { source, value, key, index } = parseResult;
|
|
const forNode = {
|
|
type: 11,
|
|
loc: dir.loc,
|
|
source,
|
|
valueAlias: value,
|
|
keyAlias: key,
|
|
objectIndexAlias: index,
|
|
parseResult,
|
|
children: isTemplateNode(node) ? node.children : [node]
|
|
};
|
|
context.replaceNode(forNode);
|
|
scopes.vFor++;
|
|
const onExit = processCodegen && processCodegen(forNode);
|
|
return () => {
|
|
scopes.vFor--;
|
|
if (onExit)
|
|
onExit();
|
|
};
|
|
}
|
|
const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
|
|
const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
|
|
const stripParensRE = /^\(|\)$/g;
|
|
function parseForExpression(input, context) {
|
|
const loc = input.loc;
|
|
const exp = input.content;
|
|
const inMatch = exp.match(forAliasRE);
|
|
if (!inMatch)
|
|
return;
|
|
const [, LHS, RHS] = inMatch;
|
|
const result = {
|
|
source: createAliasExpression(
|
|
loc,
|
|
RHS.trim(),
|
|
exp.indexOf(RHS, LHS.length)
|
|
),
|
|
value: void 0,
|
|
key: void 0,
|
|
index: void 0
|
|
};
|
|
if (true) {
|
|
validateBrowserExpression(result.source, context);
|
|
}
|
|
let valueContent = LHS.trim().replace(stripParensRE, "").trim();
|
|
const trimmedOffset = LHS.indexOf(valueContent);
|
|
const iteratorMatch = valueContent.match(forIteratorRE);
|
|
if (iteratorMatch) {
|
|
valueContent = valueContent.replace(forIteratorRE, "").trim();
|
|
const keyContent = iteratorMatch[1].trim();
|
|
let keyOffset;
|
|
if (keyContent) {
|
|
keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length);
|
|
result.key = createAliasExpression(loc, keyContent, keyOffset);
|
|
if (true) {
|
|
validateBrowserExpression(
|
|
result.key,
|
|
context,
|
|
true
|
|
);
|
|
}
|
|
}
|
|
if (iteratorMatch[2]) {
|
|
const indexContent = iteratorMatch[2].trim();
|
|
if (indexContent) {
|
|
result.index = createAliasExpression(
|
|
loc,
|
|
indexContent,
|
|
exp.indexOf(
|
|
indexContent,
|
|
result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length
|
|
)
|
|
);
|
|
if (true) {
|
|
validateBrowserExpression(
|
|
result.index,
|
|
context,
|
|
true
|
|
);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (valueContent) {
|
|
result.value = createAliasExpression(loc, valueContent, trimmedOffset);
|
|
if (true) {
|
|
validateBrowserExpression(
|
|
result.value,
|
|
context,
|
|
true
|
|
);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
function createAliasExpression(range, content, offset) {
|
|
return createSimpleExpression(
|
|
content,
|
|
false,
|
|
getInnerRange(range, offset, content.length)
|
|
);
|
|
}
|
|
function createForLoopParams({ value, key, index }, memoArgs = []) {
|
|
return createParamsList([value, key, index, ...memoArgs]);
|
|
}
|
|
function createParamsList(args) {
|
|
let i = args.length;
|
|
while (i--) {
|
|
if (args[i])
|
|
break;
|
|
}
|
|
return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false));
|
|
}
|
|
|
|
const defaultFallback = createSimpleExpression(`undefined`, false);
|
|
const trackSlotScopes = (node, context) => {
|
|
if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) {
|
|
const vSlot = findDir(node, "slot");
|
|
if (vSlot) {
|
|
vSlot.exp;
|
|
context.scopes.vSlot++;
|
|
return () => {
|
|
context.scopes.vSlot--;
|
|
};
|
|
}
|
|
}
|
|
};
|
|
const trackVForSlotScopes = (node, context) => {
|
|
let vFor;
|
|
if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, "for"))) {
|
|
const result = vFor.parseResult = parseForExpression(
|
|
vFor.exp,
|
|
context
|
|
);
|
|
if (result) {
|
|
const { value, key, index } = result;
|
|
const { addIdentifiers, removeIdentifiers } = context;
|
|
value && addIdentifiers(value);
|
|
key && addIdentifiers(key);
|
|
index && addIdentifiers(index);
|
|
return () => {
|
|
value && removeIdentifiers(value);
|
|
key && removeIdentifiers(key);
|
|
index && removeIdentifiers(index);
|
|
};
|
|
}
|
|
}
|
|
};
|
|
const buildClientSlotFn = (props, children, loc) => createFunctionExpression(
|
|
props,
|
|
children,
|
|
false,
|
|
true,
|
|
children.length ? children[0].loc : loc
|
|
);
|
|
function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
context.helper(WITH_CTX);
|
|
const { children, loc } = node;
|
|
const slotsProperties = [];
|
|
const dynamicSlots = [];
|
|
let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0;
|
|
const onComponentSlot = findDir(node, "slot", true);
|
|
if (onComponentSlot) {
|
|
const { arg, exp } = onComponentSlot;
|
|
if (arg && !isStaticExp(arg)) {
|
|
hasDynamicSlots = true;
|
|
}
|
|
slotsProperties.push(
|
|
createObjectProperty(
|
|
arg || createSimpleExpression("default", true),
|
|
buildSlotFn(exp, children, loc)
|
|
)
|
|
);
|
|
}
|
|
let hasTemplateSlots = false;
|
|
let hasNamedDefaultSlot = false;
|
|
const implicitDefaultChildren = [];
|
|
const seenSlotNames = /* @__PURE__ */ new Set();
|
|
let conditionalBranchIndex = 0;
|
|
for (let i = 0; i < children.length; i++) {
|
|
const slotElement = children[i];
|
|
let slotDir;
|
|
if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) {
|
|
if (slotElement.type !== 3) {
|
|
implicitDefaultChildren.push(slotElement);
|
|
}
|
|
continue;
|
|
}
|
|
if (onComponentSlot) {
|
|
context.onError(
|
|
createCompilerError(37, slotDir.loc)
|
|
);
|
|
break;
|
|
}
|
|
hasTemplateSlots = true;
|
|
const { children: slotChildren, loc: slotLoc } = slotElement;
|
|
const {
|
|
arg: slotName = createSimpleExpression(`default`, true),
|
|
exp: slotProps,
|
|
loc: dirLoc
|
|
} = slotDir;
|
|
let staticSlotName;
|
|
if (isStaticExp(slotName)) {
|
|
staticSlotName = slotName ? slotName.content : `default`;
|
|
} else {
|
|
hasDynamicSlots = true;
|
|
}
|
|
const slotFunction = buildSlotFn(slotProps, slotChildren, slotLoc);
|
|
let vIf;
|
|
let vElse;
|
|
let vFor;
|
|
if (vIf = findDir(slotElement, "if")) {
|
|
hasDynamicSlots = true;
|
|
dynamicSlots.push(
|
|
createConditionalExpression(
|
|
vIf.exp,
|
|
buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++),
|
|
defaultFallback
|
|
)
|
|
);
|
|
} else if (vElse = findDir(
|
|
slotElement,
|
|
/^else(-if)?$/,
|
|
true
|
|
/* allowEmpty */
|
|
)) {
|
|
let j = i;
|
|
let prev;
|
|
while (j--) {
|
|
prev = children[j];
|
|
if (prev.type !== 3) {
|
|
break;
|
|
}
|
|
}
|
|
if (prev && isTemplateNode(prev) && findDir(prev, "if")) {
|
|
children.splice(i, 1);
|
|
i--;
|
|
let conditional = dynamicSlots[dynamicSlots.length - 1];
|
|
while (conditional.alternate.type === 19) {
|
|
conditional = conditional.alternate;
|
|
}
|
|
conditional.alternate = vElse.exp ? createConditionalExpression(
|
|
vElse.exp,
|
|
buildDynamicSlot(
|
|
slotName,
|
|
slotFunction,
|
|
conditionalBranchIndex++
|
|
),
|
|
defaultFallback
|
|
) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++);
|
|
} else {
|
|
context.onError(
|
|
createCompilerError(30, vElse.loc)
|
|
);
|
|
}
|
|
} else if (vFor = findDir(slotElement, "for")) {
|
|
hasDynamicSlots = true;
|
|
const parseResult = vFor.parseResult || parseForExpression(vFor.exp, context);
|
|
if (parseResult) {
|
|
dynamicSlots.push(
|
|
createCallExpression(context.helper(RENDER_LIST), [
|
|
parseResult.source,
|
|
createFunctionExpression(
|
|
createForLoopParams(parseResult),
|
|
buildDynamicSlot(slotName, slotFunction),
|
|
true
|
|
/* force newline */
|
|
)
|
|
])
|
|
);
|
|
} else {
|
|
context.onError(
|
|
createCompilerError(32, vFor.loc)
|
|
);
|
|
}
|
|
} else {
|
|
if (staticSlotName) {
|
|
if (seenSlotNames.has(staticSlotName)) {
|
|
context.onError(
|
|
createCompilerError(
|
|
38,
|
|
dirLoc
|
|
)
|
|
);
|
|
continue;
|
|
}
|
|
seenSlotNames.add(staticSlotName);
|
|
if (staticSlotName === "default") {
|
|
hasNamedDefaultSlot = true;
|
|
}
|
|
}
|
|
slotsProperties.push(createObjectProperty(slotName, slotFunction));
|
|
}
|
|
}
|
|
if (!onComponentSlot) {
|
|
const buildDefaultSlotProperty = (props, children2) => {
|
|
const fn = buildSlotFn(props, children2, loc);
|
|
if (context.compatConfig) {
|
|
fn.isNonScopedSlot = true;
|
|
}
|
|
return createObjectProperty(`default`, fn);
|
|
};
|
|
if (!hasTemplateSlots) {
|
|
slotsProperties.push(buildDefaultSlotProperty(void 0, children));
|
|
} else if (implicitDefaultChildren.length && // #3766
|
|
// with whitespace: 'preserve', whitespaces between slots will end up in
|
|
// implicitDefaultChildren. Ignore if all implicit children are whitespaces.
|
|
implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) {
|
|
if (hasNamedDefaultSlot) {
|
|
context.onError(
|
|
createCompilerError(
|
|
39,
|
|
implicitDefaultChildren[0].loc
|
|
)
|
|
);
|
|
} else {
|
|
slotsProperties.push(
|
|
buildDefaultSlotProperty(void 0, implicitDefaultChildren)
|
|
);
|
|
}
|
|
}
|
|
}
|
|
const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1;
|
|
let slots = createObjectExpression(
|
|
slotsProperties.concat(
|
|
createObjectProperty(
|
|
`_`,
|
|
// 2 = compiled but dynamic = can skip normalization, but must run diff
|
|
// 1 = compiled and static = can skip normalization AND diff as optimized
|
|
createSimpleExpression(
|
|
slotFlag + ( true ? ` /* ${_vue_shared__WEBPACK_IMPORTED_MODULE_0__.slotFlagsText[slotFlag]} */` : 0),
|
|
false
|
|
)
|
|
)
|
|
),
|
|
loc
|
|
);
|
|
if (dynamicSlots.length) {
|
|
slots = createCallExpression(context.helper(CREATE_SLOTS), [
|
|
slots,
|
|
createArrayExpression(dynamicSlots)
|
|
]);
|
|
}
|
|
return {
|
|
slots,
|
|
hasDynamicSlots
|
|
};
|
|
}
|
|
function buildDynamicSlot(name, fn, index) {
|
|
const props = [
|
|
createObjectProperty(`name`, name),
|
|
createObjectProperty(`fn`, fn)
|
|
];
|
|
if (index != null) {
|
|
props.push(
|
|
createObjectProperty(`key`, createSimpleExpression(String(index), true))
|
|
);
|
|
}
|
|
return createObjectExpression(props);
|
|
}
|
|
function hasForwardedSlots(children) {
|
|
for (let i = 0; i < children.length; i++) {
|
|
const child = children[i];
|
|
switch (child.type) {
|
|
case 1:
|
|
if (child.tagType === 2 || hasForwardedSlots(child.children)) {
|
|
return true;
|
|
}
|
|
break;
|
|
case 9:
|
|
if (hasForwardedSlots(child.branches))
|
|
return true;
|
|
break;
|
|
case 10:
|
|
case 11:
|
|
if (hasForwardedSlots(child.children))
|
|
return true;
|
|
break;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
function isNonWhitespaceContent(node) {
|
|
if (node.type !== 2 && node.type !== 12)
|
|
return true;
|
|
return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content);
|
|
}
|
|
|
|
const directiveImportMap = /* @__PURE__ */ new WeakMap();
|
|
const transformElement = (node, context) => {
|
|
return function postTransformElement() {
|
|
node = context.currentNode;
|
|
if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) {
|
|
return;
|
|
}
|
|
const { tag, props } = node;
|
|
const isComponent = node.tagType === 1;
|
|
let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`;
|
|
const isDynamicComponent = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isObject)(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT;
|
|
let vnodeProps;
|
|
let vnodeChildren;
|
|
let vnodePatchFlag;
|
|
let patchFlag = 0;
|
|
let vnodeDynamicProps;
|
|
let dynamicPropNames;
|
|
let vnodeDirectives;
|
|
let shouldUseBlock = (
|
|
// dynamic component may resolve to plain elements
|
|
isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block
|
|
// updates inside get proper isSVG flag at runtime. (#639, #643)
|
|
// This is technically web-specific, but splitting the logic out of core
|
|
// leads to too much unnecessary complexity.
|
|
(tag === "svg" || tag === "foreignObject")
|
|
);
|
|
if (props.length > 0) {
|
|
const propsBuildResult = buildProps(
|
|
node,
|
|
context,
|
|
void 0,
|
|
isComponent,
|
|
isDynamicComponent
|
|
);
|
|
vnodeProps = propsBuildResult.props;
|
|
patchFlag = propsBuildResult.patchFlag;
|
|
dynamicPropNames = propsBuildResult.dynamicPropNames;
|
|
const directives = propsBuildResult.directives;
|
|
vnodeDirectives = directives && directives.length ? createArrayExpression(
|
|
directives.map((dir) => buildDirectiveArgs(dir, context))
|
|
) : void 0;
|
|
if (propsBuildResult.shouldUseBlock) {
|
|
shouldUseBlock = true;
|
|
}
|
|
}
|
|
if (node.children.length > 0) {
|
|
if (vnodeTag === KEEP_ALIVE) {
|
|
shouldUseBlock = true;
|
|
patchFlag |= 1024;
|
|
if ( true && node.children.length > 1) {
|
|
context.onError(
|
|
createCompilerError(46, {
|
|
start: node.children[0].loc.start,
|
|
end: node.children[node.children.length - 1].loc.end,
|
|
source: ""
|
|
})
|
|
);
|
|
}
|
|
}
|
|
const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling
|
|
vnodeTag !== TELEPORT && // explained above.
|
|
vnodeTag !== KEEP_ALIVE;
|
|
if (shouldBuildAsSlots) {
|
|
const { slots, hasDynamicSlots } = buildSlots(node, context);
|
|
vnodeChildren = slots;
|
|
if (hasDynamicSlots) {
|
|
patchFlag |= 1024;
|
|
}
|
|
} else if (node.children.length === 1 && vnodeTag !== TELEPORT) {
|
|
const child = node.children[0];
|
|
const type = child.type;
|
|
const hasDynamicTextChild = type === 5 || type === 8;
|
|
if (hasDynamicTextChild && getConstantType(child, context) === 0) {
|
|
patchFlag |= 1;
|
|
}
|
|
if (hasDynamicTextChild || type === 2) {
|
|
vnodeChildren = child;
|
|
} else {
|
|
vnodeChildren = node.children;
|
|
}
|
|
} else {
|
|
vnodeChildren = node.children;
|
|
}
|
|
}
|
|
if (patchFlag !== 0) {
|
|
if (true) {
|
|
if (patchFlag < 0) {
|
|
vnodePatchFlag = patchFlag + ` /* ${_vue_shared__WEBPACK_IMPORTED_MODULE_0__.PatchFlagNames[patchFlag]} */`;
|
|
} else {
|
|
const flagNames = Object.keys(_vue_shared__WEBPACK_IMPORTED_MODULE_0__.PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => _vue_shared__WEBPACK_IMPORTED_MODULE_0__.PatchFlagNames[n]).join(`, `);
|
|
vnodePatchFlag = patchFlag + ` /* ${flagNames} */`;
|
|
}
|
|
} else {}
|
|
if (dynamicPropNames && dynamicPropNames.length) {
|
|
vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames);
|
|
}
|
|
}
|
|
node.codegenNode = createVNodeCall(
|
|
context,
|
|
vnodeTag,
|
|
vnodeProps,
|
|
vnodeChildren,
|
|
vnodePatchFlag,
|
|
vnodeDynamicProps,
|
|
vnodeDirectives,
|
|
!!shouldUseBlock,
|
|
false,
|
|
isComponent,
|
|
node.loc
|
|
);
|
|
};
|
|
};
|
|
function resolveComponentType(node, context, ssr = false) {
|
|
let { tag } = node;
|
|
const isExplicitDynamic = isComponentTag(tag);
|
|
const isProp = findProp(node, "is");
|
|
if (isProp) {
|
|
if (isExplicitDynamic || isCompatEnabled(
|
|
"COMPILER_IS_ON_ELEMENT",
|
|
context
|
|
)) {
|
|
const exp = isProp.type === 6 ? isProp.value && createSimpleExpression(isProp.value.content, true) : isProp.exp;
|
|
if (exp) {
|
|
return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [
|
|
exp
|
|
]);
|
|
}
|
|
} else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) {
|
|
tag = isProp.value.content.slice(4);
|
|
}
|
|
}
|
|
const isDir = !isExplicitDynamic && findDir(node, "is");
|
|
if (isDir && isDir.exp) {
|
|
if (true) {
|
|
context.onWarn(
|
|
createCompilerError(52, isDir.loc)
|
|
);
|
|
}
|
|
return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [
|
|
isDir.exp
|
|
]);
|
|
}
|
|
const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag);
|
|
if (builtIn) {
|
|
if (!ssr)
|
|
context.helper(builtIn);
|
|
return builtIn;
|
|
}
|
|
context.helper(RESOLVE_COMPONENT);
|
|
context.components.add(tag);
|
|
return toValidAssetId(tag, `component`);
|
|
}
|
|
function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) {
|
|
const { tag, loc: elementLoc, children } = node;
|
|
let properties = [];
|
|
const mergeArgs = [];
|
|
const runtimeDirectives = [];
|
|
const hasChildren = children.length > 0;
|
|
let shouldUseBlock = false;
|
|
let patchFlag = 0;
|
|
let hasRef = false;
|
|
let hasClassBinding = false;
|
|
let hasStyleBinding = false;
|
|
let hasHydrationEventBinding = false;
|
|
let hasDynamicKeys = false;
|
|
let hasVnodeHook = false;
|
|
const dynamicPropNames = [];
|
|
const pushMergeArg = (arg) => {
|
|
if (properties.length) {
|
|
mergeArgs.push(
|
|
createObjectExpression(dedupeProperties(properties), elementLoc)
|
|
);
|
|
properties = [];
|
|
}
|
|
if (arg)
|
|
mergeArgs.push(arg);
|
|
};
|
|
const analyzePatchFlag = ({ key, value }) => {
|
|
if (isStaticExp(key)) {
|
|
const name = key.content;
|
|
const isEventHandler = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isOn)(name);
|
|
if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click
|
|
// dedicated fast path.
|
|
name.toLowerCase() !== "onclick" && // omit v-model handlers
|
|
name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks
|
|
!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isReservedProp)(name)) {
|
|
hasHydrationEventBinding = true;
|
|
}
|
|
if (isEventHandler && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isReservedProp)(name)) {
|
|
hasVnodeHook = true;
|
|
}
|
|
if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) {
|
|
return;
|
|
}
|
|
if (name === "ref") {
|
|
hasRef = true;
|
|
} else if (name === "class") {
|
|
hasClassBinding = true;
|
|
} else if (name === "style") {
|
|
hasStyleBinding = true;
|
|
} else if (name !== "key" && !dynamicPropNames.includes(name)) {
|
|
dynamicPropNames.push(name);
|
|
}
|
|
if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) {
|
|
dynamicPropNames.push(name);
|
|
}
|
|
} else {
|
|
hasDynamicKeys = true;
|
|
}
|
|
};
|
|
for (let i = 0; i < props.length; i++) {
|
|
const prop = props[i];
|
|
if (prop.type === 6) {
|
|
const { loc, name, value } = prop;
|
|
let isStatic = true;
|
|
if (name === "ref") {
|
|
hasRef = true;
|
|
if (context.scopes.vFor > 0) {
|
|
properties.push(
|
|
createObjectProperty(
|
|
createSimpleExpression("ref_for", true),
|
|
createSimpleExpression("true")
|
|
)
|
|
);
|
|
}
|
|
}
|
|
if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || isCompatEnabled(
|
|
"COMPILER_IS_ON_ELEMENT",
|
|
context
|
|
))) {
|
|
continue;
|
|
}
|
|
properties.push(
|
|
createObjectProperty(
|
|
createSimpleExpression(
|
|
name,
|
|
true,
|
|
getInnerRange(loc, 0, name.length)
|
|
),
|
|
createSimpleExpression(
|
|
value ? value.content : "",
|
|
isStatic,
|
|
value ? value.loc : loc
|
|
)
|
|
)
|
|
);
|
|
} else {
|
|
const { name, arg, exp, loc } = prop;
|
|
const isVBind = name === "bind";
|
|
const isVOn = name === "on";
|
|
if (name === "slot") {
|
|
if (!isComponent) {
|
|
context.onError(
|
|
createCompilerError(40, loc)
|
|
);
|
|
}
|
|
continue;
|
|
}
|
|
if (name === "once" || name === "memo") {
|
|
continue;
|
|
}
|
|
if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || isCompatEnabled(
|
|
"COMPILER_IS_ON_ELEMENT",
|
|
context
|
|
))) {
|
|
continue;
|
|
}
|
|
if (isVOn && ssr) {
|
|
continue;
|
|
}
|
|
if (
|
|
// #938: elements with dynamic keys should be forced into blocks
|
|
isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked
|
|
// before children
|
|
isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update")
|
|
) {
|
|
shouldUseBlock = true;
|
|
}
|
|
if (isVBind && isStaticArgOf(arg, "ref") && context.scopes.vFor > 0) {
|
|
properties.push(
|
|
createObjectProperty(
|
|
createSimpleExpression("ref_for", true),
|
|
createSimpleExpression("true")
|
|
)
|
|
);
|
|
}
|
|
if (!arg && (isVBind || isVOn)) {
|
|
hasDynamicKeys = true;
|
|
if (exp) {
|
|
if (isVBind) {
|
|
pushMergeArg();
|
|
{
|
|
if (true) {
|
|
const hasOverridableKeys = mergeArgs.some((arg2) => {
|
|
if (arg2.type === 15) {
|
|
return arg2.properties.some(({ key }) => {
|
|
if (key.type !== 4 || !key.isStatic) {
|
|
return true;
|
|
}
|
|
return key.content !== "class" && key.content !== "style" && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isOn)(key.content);
|
|
});
|
|
} else {
|
|
return true;
|
|
}
|
|
});
|
|
if (hasOverridableKeys) {
|
|
checkCompatEnabled(
|
|
"COMPILER_V_BIND_OBJECT_ORDER",
|
|
context,
|
|
loc
|
|
);
|
|
}
|
|
}
|
|
if (isCompatEnabled(
|
|
"COMPILER_V_BIND_OBJECT_ORDER",
|
|
context
|
|
)) {
|
|
mergeArgs.unshift(exp);
|
|
continue;
|
|
}
|
|
}
|
|
mergeArgs.push(exp);
|
|
} else {
|
|
pushMergeArg({
|
|
type: 14,
|
|
loc,
|
|
callee: context.helper(TO_HANDLERS),
|
|
arguments: isComponent ? [exp] : [exp, `true`]
|
|
});
|
|
}
|
|
} else {
|
|
context.onError(
|
|
createCompilerError(
|
|
isVBind ? 34 : 35,
|
|
loc
|
|
)
|
|
);
|
|
}
|
|
continue;
|
|
}
|
|
const directiveTransform = context.directiveTransforms[name];
|
|
if (directiveTransform) {
|
|
const { props: props2, needRuntime } = directiveTransform(prop, node, context);
|
|
!ssr && props2.forEach(analyzePatchFlag);
|
|
if (isVOn && arg && !isStaticExp(arg)) {
|
|
pushMergeArg(createObjectExpression(props2, elementLoc));
|
|
} else {
|
|
properties.push(...props2);
|
|
}
|
|
if (needRuntime) {
|
|
runtimeDirectives.push(prop);
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(needRuntime)) {
|
|
directiveImportMap.set(prop, needRuntime);
|
|
}
|
|
}
|
|
} else if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isBuiltInDirective)(name)) {
|
|
runtimeDirectives.push(prop);
|
|
if (hasChildren) {
|
|
shouldUseBlock = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let propsExpression = void 0;
|
|
if (mergeArgs.length) {
|
|
pushMergeArg();
|
|
if (mergeArgs.length > 1) {
|
|
propsExpression = createCallExpression(
|
|
context.helper(MERGE_PROPS),
|
|
mergeArgs,
|
|
elementLoc
|
|
);
|
|
} else {
|
|
propsExpression = mergeArgs[0];
|
|
}
|
|
} else if (properties.length) {
|
|
propsExpression = createObjectExpression(
|
|
dedupeProperties(properties),
|
|
elementLoc
|
|
);
|
|
}
|
|
if (hasDynamicKeys) {
|
|
patchFlag |= 16;
|
|
} else {
|
|
if (hasClassBinding && !isComponent) {
|
|
patchFlag |= 2;
|
|
}
|
|
if (hasStyleBinding && !isComponent) {
|
|
patchFlag |= 4;
|
|
}
|
|
if (dynamicPropNames.length) {
|
|
patchFlag |= 8;
|
|
}
|
|
if (hasHydrationEventBinding) {
|
|
patchFlag |= 32;
|
|
}
|
|
}
|
|
if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) {
|
|
patchFlag |= 512;
|
|
}
|
|
if (!context.inSSR && propsExpression) {
|
|
switch (propsExpression.type) {
|
|
case 15:
|
|
let classKeyIndex = -1;
|
|
let styleKeyIndex = -1;
|
|
let hasDynamicKey = false;
|
|
for (let i = 0; i < propsExpression.properties.length; i++) {
|
|
const key = propsExpression.properties[i].key;
|
|
if (isStaticExp(key)) {
|
|
if (key.content === "class") {
|
|
classKeyIndex = i;
|
|
} else if (key.content === "style") {
|
|
styleKeyIndex = i;
|
|
}
|
|
} else if (!key.isHandlerKey) {
|
|
hasDynamicKey = true;
|
|
}
|
|
}
|
|
const classProp = propsExpression.properties[classKeyIndex];
|
|
const styleProp = propsExpression.properties[styleKeyIndex];
|
|
if (!hasDynamicKey) {
|
|
if (classProp && !isStaticExp(classProp.value)) {
|
|
classProp.value = createCallExpression(
|
|
context.helper(NORMALIZE_CLASS),
|
|
[classProp.value]
|
|
);
|
|
}
|
|
if (styleProp && // the static style is compiled into an object,
|
|
// so use `hasStyleBinding` to ensure that it is a dynamic style binding
|
|
(hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist,
|
|
// v-bind:style with static literal object
|
|
styleProp.value.type === 17)) {
|
|
styleProp.value = createCallExpression(
|
|
context.helper(NORMALIZE_STYLE),
|
|
[styleProp.value]
|
|
);
|
|
}
|
|
} else {
|
|
propsExpression = createCallExpression(
|
|
context.helper(NORMALIZE_PROPS),
|
|
[propsExpression]
|
|
);
|
|
}
|
|
break;
|
|
case 14:
|
|
break;
|
|
default:
|
|
propsExpression = createCallExpression(
|
|
context.helper(NORMALIZE_PROPS),
|
|
[
|
|
createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [
|
|
propsExpression
|
|
])
|
|
]
|
|
);
|
|
break;
|
|
}
|
|
}
|
|
return {
|
|
props: propsExpression,
|
|
directives: runtimeDirectives,
|
|
patchFlag,
|
|
dynamicPropNames,
|
|
shouldUseBlock
|
|
};
|
|
}
|
|
function dedupeProperties(properties) {
|
|
const knownProps = /* @__PURE__ */ new Map();
|
|
const deduped = [];
|
|
for (let i = 0; i < properties.length; i++) {
|
|
const prop = properties[i];
|
|
if (prop.key.type === 8 || !prop.key.isStatic) {
|
|
deduped.push(prop);
|
|
continue;
|
|
}
|
|
const name = prop.key.content;
|
|
const existing = knownProps.get(name);
|
|
if (existing) {
|
|
if (name === "style" || name === "class" || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isOn)(name)) {
|
|
mergeAsArray(existing, prop);
|
|
}
|
|
} else {
|
|
knownProps.set(name, prop);
|
|
deduped.push(prop);
|
|
}
|
|
}
|
|
return deduped;
|
|
}
|
|
function mergeAsArray(existing, incoming) {
|
|
if (existing.value.type === 17) {
|
|
existing.value.elements.push(incoming.value);
|
|
} else {
|
|
existing.value = createArrayExpression(
|
|
[existing.value, incoming.value],
|
|
existing.loc
|
|
);
|
|
}
|
|
}
|
|
function buildDirectiveArgs(dir, context) {
|
|
const dirArgs = [];
|
|
const runtime = directiveImportMap.get(dir);
|
|
if (runtime) {
|
|
dirArgs.push(context.helperString(runtime));
|
|
} else {
|
|
{
|
|
context.helper(RESOLVE_DIRECTIVE);
|
|
context.directives.add(dir.name);
|
|
dirArgs.push(toValidAssetId(dir.name, `directive`));
|
|
}
|
|
}
|
|
const { loc } = dir;
|
|
if (dir.exp)
|
|
dirArgs.push(dir.exp);
|
|
if (dir.arg) {
|
|
if (!dir.exp) {
|
|
dirArgs.push(`void 0`);
|
|
}
|
|
dirArgs.push(dir.arg);
|
|
}
|
|
if (Object.keys(dir.modifiers).length) {
|
|
if (!dir.arg) {
|
|
if (!dir.exp) {
|
|
dirArgs.push(`void 0`);
|
|
}
|
|
dirArgs.push(`void 0`);
|
|
}
|
|
const trueExpression = createSimpleExpression(`true`, false, loc);
|
|
dirArgs.push(
|
|
createObjectExpression(
|
|
dir.modifiers.map(
|
|
(modifier) => createObjectProperty(modifier, trueExpression)
|
|
),
|
|
loc
|
|
)
|
|
);
|
|
}
|
|
return createArrayExpression(dirArgs, dir.loc);
|
|
}
|
|
function stringifyDynamicPropNames(props) {
|
|
let propsNamesString = `[`;
|
|
for (let i = 0, l = props.length; i < l; i++) {
|
|
propsNamesString += JSON.stringify(props[i]);
|
|
if (i < l - 1)
|
|
propsNamesString += ", ";
|
|
}
|
|
return propsNamesString + `]`;
|
|
}
|
|
function isComponentTag(tag) {
|
|
return tag === "component" || tag === "Component";
|
|
}
|
|
|
|
const transformSlotOutlet = (node, context) => {
|
|
if (isSlotOutlet(node)) {
|
|
const { children, loc } = node;
|
|
const { slotName, slotProps } = processSlotOutlet(node, context);
|
|
const slotArgs = [
|
|
context.prefixIdentifiers ? `_ctx.$slots` : `$slots`,
|
|
slotName,
|
|
"{}",
|
|
"undefined",
|
|
"true"
|
|
];
|
|
let expectedLen = 2;
|
|
if (slotProps) {
|
|
slotArgs[2] = slotProps;
|
|
expectedLen = 3;
|
|
}
|
|
if (children.length) {
|
|
slotArgs[3] = createFunctionExpression([], children, false, false, loc);
|
|
expectedLen = 4;
|
|
}
|
|
if (context.scopeId && !context.slotted) {
|
|
expectedLen = 5;
|
|
}
|
|
slotArgs.splice(expectedLen);
|
|
node.codegenNode = createCallExpression(
|
|
context.helper(RENDER_SLOT),
|
|
slotArgs,
|
|
loc
|
|
);
|
|
}
|
|
};
|
|
function processSlotOutlet(node, context) {
|
|
let slotName = `"default"`;
|
|
let slotProps = void 0;
|
|
const nonNameProps = [];
|
|
for (let i = 0; i < node.props.length; i++) {
|
|
const p = node.props[i];
|
|
if (p.type === 6) {
|
|
if (p.value) {
|
|
if (p.name === "name") {
|
|
slotName = JSON.stringify(p.value.content);
|
|
} else {
|
|
p.name = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.camelize)(p.name);
|
|
nonNameProps.push(p);
|
|
}
|
|
}
|
|
} else {
|
|
if (p.name === "bind" && isStaticArgOf(p.arg, "name")) {
|
|
if (p.exp)
|
|
slotName = p.exp;
|
|
} else {
|
|
if (p.name === "bind" && p.arg && isStaticExp(p.arg)) {
|
|
p.arg.content = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.camelize)(p.arg.content);
|
|
}
|
|
nonNameProps.push(p);
|
|
}
|
|
}
|
|
}
|
|
if (nonNameProps.length > 0) {
|
|
const { props, directives } = buildProps(
|
|
node,
|
|
context,
|
|
nonNameProps,
|
|
false,
|
|
false
|
|
);
|
|
slotProps = props;
|
|
if (directives.length) {
|
|
context.onError(
|
|
createCompilerError(
|
|
36,
|
|
directives[0].loc
|
|
)
|
|
);
|
|
}
|
|
}
|
|
return {
|
|
slotName,
|
|
slotProps
|
|
};
|
|
}
|
|
|
|
const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
const transformOn = (dir, node, context, augmentor) => {
|
|
const { loc, modifiers, arg } = dir;
|
|
if (!dir.exp && !modifiers.length) {
|
|
context.onError(createCompilerError(35, loc));
|
|
}
|
|
let eventName;
|
|
if (arg.type === 4) {
|
|
if (arg.isStatic) {
|
|
let rawName = arg.content;
|
|
if ( true && rawName.startsWith("vnode")) {
|
|
context.onWarn(
|
|
createCompilerError(51, arg.loc)
|
|
);
|
|
}
|
|
if (rawName.startsWith("vue:")) {
|
|
rawName = `vnode-${rawName.slice(4)}`;
|
|
}
|
|
const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? (
|
|
// for non-element and vnode lifecycle event listeners, auto convert
|
|
// it to camelCase. See issue #2249
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.toHandlerKey)((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.camelize)(rawName))
|
|
) : (
|
|
// preserve case for plain element listeners that have uppercase
|
|
// letters, as these may be custom elements' custom events
|
|
`on:${rawName}`
|
|
);
|
|
eventName = createSimpleExpression(eventString, true, arg.loc);
|
|
} else {
|
|
eventName = createCompoundExpression([
|
|
`${context.helperString(TO_HANDLER_KEY)}(`,
|
|
arg,
|
|
`)`
|
|
]);
|
|
}
|
|
} else {
|
|
eventName = arg;
|
|
eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`);
|
|
eventName.children.push(`)`);
|
|
}
|
|
let exp = dir.exp;
|
|
if (exp && !exp.content.trim()) {
|
|
exp = void 0;
|
|
}
|
|
let shouldCache = context.cacheHandlers && !exp && !context.inVOnce;
|
|
if (exp) {
|
|
const isMemberExp = isMemberExpression(exp.content);
|
|
const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content));
|
|
const hasMultipleStatements = exp.content.includes(`;`);
|
|
if (true) {
|
|
validateBrowserExpression(
|
|
exp,
|
|
context,
|
|
false,
|
|
hasMultipleStatements
|
|
);
|
|
}
|
|
if (isInlineStatement || shouldCache && isMemberExp) {
|
|
exp = createCompoundExpression([
|
|
`${isInlineStatement ? `$event` : `${``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`,
|
|
exp,
|
|
hasMultipleStatements ? `}` : `)`
|
|
]);
|
|
}
|
|
}
|
|
let ret = {
|
|
props: [
|
|
createObjectProperty(
|
|
eventName,
|
|
exp || createSimpleExpression(`() => {}`, false, loc)
|
|
)
|
|
]
|
|
};
|
|
if (augmentor) {
|
|
ret = augmentor(ret);
|
|
}
|
|
if (shouldCache) {
|
|
ret.props[0].value = context.cache(ret.props[0].value);
|
|
}
|
|
ret.props.forEach((p) => p.key.isHandlerKey = true);
|
|
return ret;
|
|
};
|
|
|
|
const transformBind = (dir, _node, context) => {
|
|
const { exp, modifiers, loc } = dir;
|
|
const arg = dir.arg;
|
|
if (arg.type !== 4) {
|
|
arg.children.unshift(`(`);
|
|
arg.children.push(`) || ""`);
|
|
} else if (!arg.isStatic) {
|
|
arg.content = `${arg.content} || ""`;
|
|
}
|
|
if (modifiers.includes("camel")) {
|
|
if (arg.type === 4) {
|
|
if (arg.isStatic) {
|
|
arg.content = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.camelize)(arg.content);
|
|
} else {
|
|
arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
|
|
}
|
|
} else {
|
|
arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
|
|
arg.children.push(`)`);
|
|
}
|
|
}
|
|
if (!context.inSSR) {
|
|
if (modifiers.includes("prop")) {
|
|
injectPrefix(arg, ".");
|
|
}
|
|
if (modifiers.includes("attr")) {
|
|
injectPrefix(arg, "^");
|
|
}
|
|
}
|
|
if (!exp || exp.type === 4 && !exp.content.trim()) {
|
|
context.onError(createCompilerError(34, loc));
|
|
return {
|
|
props: [createObjectProperty(arg, createSimpleExpression("", true, loc))]
|
|
};
|
|
}
|
|
return {
|
|
props: [createObjectProperty(arg, exp)]
|
|
};
|
|
};
|
|
const injectPrefix = (arg, prefix) => {
|
|
if (arg.type === 4) {
|
|
if (arg.isStatic) {
|
|
arg.content = prefix + arg.content;
|
|
} else {
|
|
arg.content = `\`${prefix}\${${arg.content}}\``;
|
|
}
|
|
} else {
|
|
arg.children.unshift(`'${prefix}' + (`);
|
|
arg.children.push(`)`);
|
|
}
|
|
};
|
|
|
|
const transformText = (node, context) => {
|
|
if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) {
|
|
return () => {
|
|
const children = node.children;
|
|
let currentContainer = void 0;
|
|
let hasText = false;
|
|
for (let i = 0; i < children.length; i++) {
|
|
const child = children[i];
|
|
if (isText$1(child)) {
|
|
hasText = true;
|
|
for (let j = i + 1; j < children.length; j++) {
|
|
const next = children[j];
|
|
if (isText$1(next)) {
|
|
if (!currentContainer) {
|
|
currentContainer = children[i] = createCompoundExpression(
|
|
[child],
|
|
child.loc
|
|
);
|
|
}
|
|
currentContainer.children.push(` + `, next);
|
|
children.splice(j, 1);
|
|
j--;
|
|
} else {
|
|
currentContainer = void 0;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (!hasText || // if this is a plain element with a single text child, leave it
|
|
// as-is since the runtime has dedicated fast path for this by directly
|
|
// setting textContent of the element.
|
|
// for component root it's always normalized anyway.
|
|
children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756
|
|
// custom directives can potentially add DOM elements arbitrarily,
|
|
// we need to avoid setting textContent of the element at runtime
|
|
// to avoid accidentally overwriting the DOM elements added
|
|
// by the user through custom directives.
|
|
!node.props.find(
|
|
(p) => p.type === 7 && !context.directiveTransforms[p.name]
|
|
) && // in compat mode, <template> tags with no special directives
|
|
// will be rendered as a fragment so its children must be
|
|
// converted into vnodes.
|
|
!(node.tag === "template"))) {
|
|
return;
|
|
}
|
|
for (let i = 0; i < children.length; i++) {
|
|
const child = children[i];
|
|
if (isText$1(child) || child.type === 8) {
|
|
const callArgs = [];
|
|
if (child.type !== 2 || child.content !== " ") {
|
|
callArgs.push(child);
|
|
}
|
|
if (!context.ssr && getConstantType(child, context) === 0) {
|
|
callArgs.push(
|
|
1 + ( true ? ` /* ${_vue_shared__WEBPACK_IMPORTED_MODULE_0__.PatchFlagNames[1]} */` : 0)
|
|
);
|
|
}
|
|
children[i] = {
|
|
type: 12,
|
|
content: child,
|
|
loc: child.loc,
|
|
codegenNode: createCallExpression(
|
|
context.helper(CREATE_TEXT),
|
|
callArgs
|
|
)
|
|
};
|
|
}
|
|
}
|
|
};
|
|
}
|
|
};
|
|
|
|
const seen$1 = /* @__PURE__ */ new WeakSet();
|
|
const transformOnce = (node, context) => {
|
|
if (node.type === 1 && findDir(node, "once", true)) {
|
|
if (seen$1.has(node) || context.inVOnce || context.inSSR) {
|
|
return;
|
|
}
|
|
seen$1.add(node);
|
|
context.inVOnce = true;
|
|
context.helper(SET_BLOCK_TRACKING);
|
|
return () => {
|
|
context.inVOnce = false;
|
|
const cur = context.currentNode;
|
|
if (cur.codegenNode) {
|
|
cur.codegenNode = context.cache(
|
|
cur.codegenNode,
|
|
true
|
|
/* isVNode */
|
|
);
|
|
}
|
|
};
|
|
}
|
|
};
|
|
|
|
const transformModel = (dir, node, context) => {
|
|
const { exp, arg } = dir;
|
|
if (!exp) {
|
|
context.onError(
|
|
createCompilerError(41, dir.loc)
|
|
);
|
|
return createTransformProps();
|
|
}
|
|
const rawExp = exp.loc.source;
|
|
const expString = exp.type === 4 ? exp.content : rawExp;
|
|
const bindingType = context.bindingMetadata[rawExp];
|
|
if (bindingType === "props" || bindingType === "props-aliased") {
|
|
context.onError(createCompilerError(44, exp.loc));
|
|
return createTransformProps();
|
|
}
|
|
const maybeRef = false;
|
|
if (!expString.trim() || !isMemberExpression(expString) && !maybeRef) {
|
|
context.onError(
|
|
createCompilerError(42, exp.loc)
|
|
);
|
|
return createTransformProps();
|
|
}
|
|
const propName = arg ? arg : createSimpleExpression("modelValue", true);
|
|
const eventName = arg ? isStaticExp(arg) ? `onUpdate:${(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.camelize)(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`;
|
|
let assignmentExp;
|
|
const eventArg = context.isTS ? `($event: any)` : `$event`;
|
|
{
|
|
assignmentExp = createCompoundExpression([
|
|
`${eventArg} => ((`,
|
|
exp,
|
|
`) = $event)`
|
|
]);
|
|
}
|
|
const props = [
|
|
// modelValue: foo
|
|
createObjectProperty(propName, dir.exp),
|
|
// "onUpdate:modelValue": $event => (foo = $event)
|
|
createObjectProperty(eventName, assignmentExp)
|
|
];
|
|
if (dir.modifiers.length && node.tagType === 1) {
|
|
const modifiers = dir.modifiers.map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `);
|
|
const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`;
|
|
props.push(
|
|
createObjectProperty(
|
|
modifiersKey,
|
|
createSimpleExpression(
|
|
`{ ${modifiers} }`,
|
|
false,
|
|
dir.loc,
|
|
2
|
|
)
|
|
)
|
|
);
|
|
}
|
|
return createTransformProps(props);
|
|
};
|
|
function createTransformProps(props = []) {
|
|
return { props };
|
|
}
|
|
|
|
const validDivisionCharRE = /[\w).+\-_$\]]/;
|
|
const transformFilter = (node, context) => {
|
|
if (!isCompatEnabled("COMPILER_FILTER", context)) {
|
|
return;
|
|
}
|
|
if (node.type === 5) {
|
|
rewriteFilter(node.content, context);
|
|
}
|
|
if (node.type === 1) {
|
|
node.props.forEach((prop) => {
|
|
if (prop.type === 7 && prop.name !== "for" && prop.exp) {
|
|
rewriteFilter(prop.exp, context);
|
|
}
|
|
});
|
|
}
|
|
};
|
|
function rewriteFilter(node, context) {
|
|
if (node.type === 4) {
|
|
parseFilter(node, context);
|
|
} else {
|
|
for (let i = 0; i < node.children.length; i++) {
|
|
const child = node.children[i];
|
|
if (typeof child !== "object")
|
|
continue;
|
|
if (child.type === 4) {
|
|
parseFilter(child, context);
|
|
} else if (child.type === 8) {
|
|
rewriteFilter(node, context);
|
|
} else if (child.type === 5) {
|
|
rewriteFilter(child.content, context);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function parseFilter(node, context) {
|
|
const exp = node.content;
|
|
let inSingle = false;
|
|
let inDouble = false;
|
|
let inTemplateString = false;
|
|
let inRegex = false;
|
|
let curly = 0;
|
|
let square = 0;
|
|
let paren = 0;
|
|
let lastFilterIndex = 0;
|
|
let c, prev, i, expression, filters = [];
|
|
for (i = 0; i < exp.length; i++) {
|
|
prev = c;
|
|
c = exp.charCodeAt(i);
|
|
if (inSingle) {
|
|
if (c === 39 && prev !== 92)
|
|
inSingle = false;
|
|
} else if (inDouble) {
|
|
if (c === 34 && prev !== 92)
|
|
inDouble = false;
|
|
} else if (inTemplateString) {
|
|
if (c === 96 && prev !== 92)
|
|
inTemplateString = false;
|
|
} else if (inRegex) {
|
|
if (c === 47 && prev !== 92)
|
|
inRegex = false;
|
|
} else if (c === 124 && // pipe
|
|
exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) {
|
|
if (expression === void 0) {
|
|
lastFilterIndex = i + 1;
|
|
expression = exp.slice(0, i).trim();
|
|
} else {
|
|
pushFilter();
|
|
}
|
|
} else {
|
|
switch (c) {
|
|
case 34:
|
|
inDouble = true;
|
|
break;
|
|
case 39:
|
|
inSingle = true;
|
|
break;
|
|
case 96:
|
|
inTemplateString = true;
|
|
break;
|
|
case 40:
|
|
paren++;
|
|
break;
|
|
case 41:
|
|
paren--;
|
|
break;
|
|
case 91:
|
|
square++;
|
|
break;
|
|
case 93:
|
|
square--;
|
|
break;
|
|
case 123:
|
|
curly++;
|
|
break;
|
|
case 125:
|
|
curly--;
|
|
break;
|
|
}
|
|
if (c === 47) {
|
|
let j = i - 1;
|
|
let p;
|
|
for (; j >= 0; j--) {
|
|
p = exp.charAt(j);
|
|
if (p !== " ")
|
|
break;
|
|
}
|
|
if (!p || !validDivisionCharRE.test(p)) {
|
|
inRegex = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (expression === void 0) {
|
|
expression = exp.slice(0, i).trim();
|
|
} else if (lastFilterIndex !== 0) {
|
|
pushFilter();
|
|
}
|
|
function pushFilter() {
|
|
filters.push(exp.slice(lastFilterIndex, i).trim());
|
|
lastFilterIndex = i + 1;
|
|
}
|
|
if (filters.length) {
|
|
true && warnDeprecation(
|
|
"COMPILER_FILTER",
|
|
context,
|
|
node.loc
|
|
);
|
|
for (i = 0; i < filters.length; i++) {
|
|
expression = wrapFilter(expression, filters[i], context);
|
|
}
|
|
node.content = expression;
|
|
}
|
|
}
|
|
function wrapFilter(exp, filter, context) {
|
|
context.helper(RESOLVE_FILTER);
|
|
const i = filter.indexOf("(");
|
|
if (i < 0) {
|
|
context.filters.add(filter);
|
|
return `${toValidAssetId(filter, "filter")}(${exp})`;
|
|
} else {
|
|
const name = filter.slice(0, i);
|
|
const args = filter.slice(i + 1);
|
|
context.filters.add(name);
|
|
return `${toValidAssetId(name, "filter")}(${exp}${args !== ")" ? "," + args : args}`;
|
|
}
|
|
}
|
|
|
|
const seen = /* @__PURE__ */ new WeakSet();
|
|
const transformMemo = (node, context) => {
|
|
if (node.type === 1) {
|
|
const dir = findDir(node, "memo");
|
|
if (!dir || seen.has(node)) {
|
|
return;
|
|
}
|
|
seen.add(node);
|
|
return () => {
|
|
const codegenNode = node.codegenNode || context.currentNode.codegenNode;
|
|
if (codegenNode && codegenNode.type === 13) {
|
|
if (node.tagType !== 1) {
|
|
convertToBlock(codegenNode, context);
|
|
}
|
|
node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [
|
|
dir.exp,
|
|
createFunctionExpression(void 0, codegenNode),
|
|
`_cache`,
|
|
String(context.cached++)
|
|
]);
|
|
}
|
|
};
|
|
}
|
|
};
|
|
|
|
function getBaseTransformPreset(prefixIdentifiers) {
|
|
return [
|
|
[
|
|
transformOnce,
|
|
transformIf,
|
|
transformMemo,
|
|
transformFor,
|
|
...[transformFilter] ,
|
|
... true ? [transformExpression] : 0,
|
|
transformSlotOutlet,
|
|
transformElement,
|
|
trackSlotScopes,
|
|
transformText
|
|
],
|
|
{
|
|
on: transformOn,
|
|
bind: transformBind,
|
|
model: transformModel
|
|
}
|
|
];
|
|
}
|
|
function baseCompile(template, options = {}) {
|
|
const onError = options.onError || defaultOnError;
|
|
const isModuleMode = options.mode === "module";
|
|
{
|
|
if (options.prefixIdentifiers === true) {
|
|
onError(createCompilerError(47));
|
|
} else if (isModuleMode) {
|
|
onError(createCompilerError(48));
|
|
}
|
|
}
|
|
const prefixIdentifiers = false;
|
|
if (options.cacheHandlers) {
|
|
onError(createCompilerError(49));
|
|
}
|
|
if (options.scopeId && !isModuleMode) {
|
|
onError(createCompilerError(50));
|
|
}
|
|
const ast = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(template) ? baseParse(template, options) : template;
|
|
const [nodeTransforms, directiveTransforms] = getBaseTransformPreset();
|
|
transform(
|
|
ast,
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)({}, options, {
|
|
prefixIdentifiers,
|
|
nodeTransforms: [
|
|
...nodeTransforms,
|
|
...options.nodeTransforms || []
|
|
// user transforms
|
|
],
|
|
directiveTransforms: (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)(
|
|
{},
|
|
directiveTransforms,
|
|
options.directiveTransforms || {}
|
|
// user transforms
|
|
)
|
|
})
|
|
);
|
|
return generate(
|
|
ast,
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)({}, options, {
|
|
prefixIdentifiers
|
|
})
|
|
);
|
|
}
|
|
|
|
const noopDirectiveTransform = () => ({ props: [] });
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js":
|
|
/*!*************************************************************************!*\
|
|
!*** ./node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js ***!
|
|
\*************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ BASE_TRANSITION: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.BASE_TRANSITION),
|
|
/* harmony export */ CAMELIZE: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.CAMELIZE),
|
|
/* harmony export */ CAPITALIZE: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.CAPITALIZE),
|
|
/* harmony export */ CREATE_BLOCK: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.CREATE_BLOCK),
|
|
/* harmony export */ CREATE_COMMENT: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.CREATE_COMMENT),
|
|
/* harmony export */ CREATE_ELEMENT_BLOCK: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.CREATE_ELEMENT_BLOCK),
|
|
/* harmony export */ CREATE_ELEMENT_VNODE: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.CREATE_ELEMENT_VNODE),
|
|
/* harmony export */ CREATE_SLOTS: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.CREATE_SLOTS),
|
|
/* harmony export */ CREATE_STATIC: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.CREATE_STATIC),
|
|
/* harmony export */ CREATE_TEXT: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.CREATE_TEXT),
|
|
/* harmony export */ CREATE_VNODE: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.CREATE_VNODE),
|
|
/* harmony export */ DOMDirectiveTransforms: () => (/* binding */ DOMDirectiveTransforms),
|
|
/* harmony export */ DOMNodeTransforms: () => (/* binding */ DOMNodeTransforms),
|
|
/* harmony export */ FRAGMENT: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.FRAGMENT),
|
|
/* harmony export */ GUARD_REACTIVE_PROPS: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.GUARD_REACTIVE_PROPS),
|
|
/* harmony export */ IS_MEMO_SAME: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.IS_MEMO_SAME),
|
|
/* harmony export */ IS_REF: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.IS_REF),
|
|
/* harmony export */ KEEP_ALIVE: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.KEEP_ALIVE),
|
|
/* harmony export */ MERGE_PROPS: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.MERGE_PROPS),
|
|
/* harmony export */ NORMALIZE_CLASS: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.NORMALIZE_CLASS),
|
|
/* harmony export */ NORMALIZE_PROPS: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.NORMALIZE_PROPS),
|
|
/* harmony export */ NORMALIZE_STYLE: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.NORMALIZE_STYLE),
|
|
/* harmony export */ OPEN_BLOCK: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.OPEN_BLOCK),
|
|
/* harmony export */ POP_SCOPE_ID: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.POP_SCOPE_ID),
|
|
/* harmony export */ PUSH_SCOPE_ID: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.PUSH_SCOPE_ID),
|
|
/* harmony export */ RENDER_LIST: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.RENDER_LIST),
|
|
/* harmony export */ RENDER_SLOT: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.RENDER_SLOT),
|
|
/* harmony export */ RESOLVE_COMPONENT: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.RESOLVE_COMPONENT),
|
|
/* harmony export */ RESOLVE_DIRECTIVE: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.RESOLVE_DIRECTIVE),
|
|
/* harmony export */ RESOLVE_DYNAMIC_COMPONENT: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.RESOLVE_DYNAMIC_COMPONENT),
|
|
/* harmony export */ RESOLVE_FILTER: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.RESOLVE_FILTER),
|
|
/* harmony export */ SET_BLOCK_TRACKING: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.SET_BLOCK_TRACKING),
|
|
/* harmony export */ SUSPENSE: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.SUSPENSE),
|
|
/* harmony export */ TELEPORT: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.TELEPORT),
|
|
/* harmony export */ TO_DISPLAY_STRING: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.TO_DISPLAY_STRING),
|
|
/* harmony export */ TO_HANDLERS: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.TO_HANDLERS),
|
|
/* harmony export */ TO_HANDLER_KEY: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.TO_HANDLER_KEY),
|
|
/* harmony export */ TRANSITION: () => (/* binding */ TRANSITION),
|
|
/* harmony export */ TRANSITION_GROUP: () => (/* binding */ TRANSITION_GROUP),
|
|
/* harmony export */ TS_NODE_TYPES: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.TS_NODE_TYPES),
|
|
/* harmony export */ UNREF: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.UNREF),
|
|
/* harmony export */ V_MODEL_CHECKBOX: () => (/* binding */ V_MODEL_CHECKBOX),
|
|
/* harmony export */ V_MODEL_DYNAMIC: () => (/* binding */ V_MODEL_DYNAMIC),
|
|
/* harmony export */ V_MODEL_RADIO: () => (/* binding */ V_MODEL_RADIO),
|
|
/* harmony export */ V_MODEL_SELECT: () => (/* binding */ V_MODEL_SELECT),
|
|
/* harmony export */ V_MODEL_TEXT: () => (/* binding */ V_MODEL_TEXT),
|
|
/* harmony export */ V_ON_WITH_KEYS: () => (/* binding */ V_ON_WITH_KEYS),
|
|
/* harmony export */ V_ON_WITH_MODIFIERS: () => (/* binding */ V_ON_WITH_MODIFIERS),
|
|
/* harmony export */ V_SHOW: () => (/* binding */ V_SHOW),
|
|
/* harmony export */ WITH_CTX: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.WITH_CTX),
|
|
/* harmony export */ WITH_DIRECTIVES: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.WITH_DIRECTIVES),
|
|
/* harmony export */ WITH_MEMO: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.WITH_MEMO),
|
|
/* harmony export */ advancePositionWithClone: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.advancePositionWithClone),
|
|
/* harmony export */ advancePositionWithMutation: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.advancePositionWithMutation),
|
|
/* harmony export */ assert: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.assert),
|
|
/* harmony export */ baseCompile: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.baseCompile),
|
|
/* harmony export */ baseParse: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.baseParse),
|
|
/* harmony export */ buildDirectiveArgs: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.buildDirectiveArgs),
|
|
/* harmony export */ buildProps: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.buildProps),
|
|
/* harmony export */ buildSlots: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.buildSlots),
|
|
/* harmony export */ checkCompatEnabled: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.checkCompatEnabled),
|
|
/* harmony export */ compile: () => (/* binding */ compile),
|
|
/* harmony export */ convertToBlock: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.convertToBlock),
|
|
/* harmony export */ createArrayExpression: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createArrayExpression),
|
|
/* harmony export */ createAssignmentExpression: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createAssignmentExpression),
|
|
/* harmony export */ createBlockStatement: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createBlockStatement),
|
|
/* harmony export */ createCacheExpression: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createCacheExpression),
|
|
/* harmony export */ createCallExpression: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createCallExpression),
|
|
/* harmony export */ createCompilerError: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createCompilerError),
|
|
/* harmony export */ createCompoundExpression: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createCompoundExpression),
|
|
/* harmony export */ createConditionalExpression: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createConditionalExpression),
|
|
/* harmony export */ createDOMCompilerError: () => (/* binding */ createDOMCompilerError),
|
|
/* harmony export */ createForLoopParams: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createForLoopParams),
|
|
/* harmony export */ createFunctionExpression: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createFunctionExpression),
|
|
/* harmony export */ createIfStatement: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createIfStatement),
|
|
/* harmony export */ createInterpolation: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createInterpolation),
|
|
/* harmony export */ createObjectExpression: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createObjectExpression),
|
|
/* harmony export */ createObjectProperty: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createObjectProperty),
|
|
/* harmony export */ createReturnStatement: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createReturnStatement),
|
|
/* harmony export */ createRoot: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createRoot),
|
|
/* harmony export */ createSequenceExpression: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createSequenceExpression),
|
|
/* harmony export */ createSimpleExpression: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createSimpleExpression),
|
|
/* harmony export */ createStructuralDirectiveTransform: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createStructuralDirectiveTransform),
|
|
/* harmony export */ createTemplateLiteral: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createTemplateLiteral),
|
|
/* harmony export */ createTransformContext: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createTransformContext),
|
|
/* harmony export */ createVNodeCall: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createVNodeCall),
|
|
/* harmony export */ extractIdentifiers: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.extractIdentifiers),
|
|
/* harmony export */ findDir: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.findDir),
|
|
/* harmony export */ findProp: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.findProp),
|
|
/* harmony export */ generate: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.generate),
|
|
/* harmony export */ generateCodeFrame: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.generateCodeFrame),
|
|
/* harmony export */ getBaseTransformPreset: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.getBaseTransformPreset),
|
|
/* harmony export */ getConstantType: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.getConstantType),
|
|
/* harmony export */ getInnerRange: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.getInnerRange),
|
|
/* harmony export */ getMemoedVNodeCall: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.getMemoedVNodeCall),
|
|
/* harmony export */ getVNodeBlockHelper: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.getVNodeBlockHelper),
|
|
/* harmony export */ getVNodeHelper: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.getVNodeHelper),
|
|
/* harmony export */ hasDynamicKeyVBind: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.hasDynamicKeyVBind),
|
|
/* harmony export */ hasScopeRef: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.hasScopeRef),
|
|
/* harmony export */ helperNameMap: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.helperNameMap),
|
|
/* harmony export */ injectProp: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.injectProp),
|
|
/* harmony export */ isBuiltInType: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isBuiltInType),
|
|
/* harmony export */ isCoreComponent: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isCoreComponent),
|
|
/* harmony export */ isFunctionType: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isFunctionType),
|
|
/* harmony export */ isInDestructureAssignment: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isInDestructureAssignment),
|
|
/* harmony export */ isMemberExpression: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isMemberExpression),
|
|
/* harmony export */ isMemberExpressionBrowser: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isMemberExpressionBrowser),
|
|
/* harmony export */ isMemberExpressionNode: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isMemberExpressionNode),
|
|
/* harmony export */ isReferencedIdentifier: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isReferencedIdentifier),
|
|
/* harmony export */ isSimpleIdentifier: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isSimpleIdentifier),
|
|
/* harmony export */ isSlotOutlet: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isSlotOutlet),
|
|
/* harmony export */ isStaticArgOf: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isStaticArgOf),
|
|
/* harmony export */ isStaticExp: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isStaticExp),
|
|
/* harmony export */ isStaticProperty: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isStaticProperty),
|
|
/* harmony export */ isStaticPropertyKey: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isStaticPropertyKey),
|
|
/* harmony export */ isTemplateNode: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isTemplateNode),
|
|
/* harmony export */ isText: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isText),
|
|
/* harmony export */ isVSlot: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isVSlot),
|
|
/* harmony export */ locStub: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.locStub),
|
|
/* harmony export */ noopDirectiveTransform: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.noopDirectiveTransform),
|
|
/* harmony export */ parse: () => (/* binding */ parse),
|
|
/* harmony export */ parserOptions: () => (/* binding */ parserOptions),
|
|
/* harmony export */ processExpression: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.processExpression),
|
|
/* harmony export */ processFor: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.processFor),
|
|
/* harmony export */ processIf: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.processIf),
|
|
/* harmony export */ processSlotOutlet: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.processSlotOutlet),
|
|
/* harmony export */ registerRuntimeHelpers: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.registerRuntimeHelpers),
|
|
/* harmony export */ resolveComponentType: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.resolveComponentType),
|
|
/* harmony export */ stringifyExpression: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.stringifyExpression),
|
|
/* harmony export */ toValidAssetId: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.toValidAssetId),
|
|
/* harmony export */ trackSlotScopes: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.trackSlotScopes),
|
|
/* harmony export */ trackVForSlotScopes: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.trackVForSlotScopes),
|
|
/* harmony export */ transform: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.transform),
|
|
/* harmony export */ transformBind: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.transformBind),
|
|
/* harmony export */ transformElement: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.transformElement),
|
|
/* harmony export */ transformExpression: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.transformExpression),
|
|
/* harmony export */ transformModel: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.transformModel),
|
|
/* harmony export */ transformOn: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.transformOn),
|
|
/* harmony export */ transformStyle: () => (/* binding */ transformStyle),
|
|
/* harmony export */ traverseNode: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.traverseNode),
|
|
/* harmony export */ walkBlockDeclarations: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.walkBlockDeclarations),
|
|
/* harmony export */ walkFunctionParams: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.walkFunctionParams),
|
|
/* harmony export */ walkIdentifiers: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.walkIdentifiers),
|
|
/* harmony export */ warnDeprecation: () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.warnDeprecation)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/compiler-core */ "./node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js");
|
|
/* harmony import */ var _vue_shared__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/shared */ "./node_modules/@vue/shared/dist/shared.esm-bundler.js");
|
|
|
|
|
|
|
|
|
|
const V_MODEL_RADIO = Symbol( true ? `vModelRadio` : 0);
|
|
const V_MODEL_CHECKBOX = Symbol( true ? `vModelCheckbox` : 0);
|
|
const V_MODEL_TEXT = Symbol( true ? `vModelText` : 0);
|
|
const V_MODEL_SELECT = Symbol( true ? `vModelSelect` : 0);
|
|
const V_MODEL_DYNAMIC = Symbol( true ? `vModelDynamic` : 0);
|
|
const V_ON_WITH_MODIFIERS = Symbol( true ? `vOnModifiersGuard` : 0);
|
|
const V_ON_WITH_KEYS = Symbol( true ? `vOnKeysGuard` : 0);
|
|
const V_SHOW = Symbol( true ? `vShow` : 0);
|
|
const TRANSITION = Symbol( true ? `Transition` : 0);
|
|
const TRANSITION_GROUP = Symbol( true ? `TransitionGroup` : 0);
|
|
(0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.registerRuntimeHelpers)({
|
|
[V_MODEL_RADIO]: `vModelRadio`,
|
|
[V_MODEL_CHECKBOX]: `vModelCheckbox`,
|
|
[V_MODEL_TEXT]: `vModelText`,
|
|
[V_MODEL_SELECT]: `vModelSelect`,
|
|
[V_MODEL_DYNAMIC]: `vModelDynamic`,
|
|
[V_ON_WITH_MODIFIERS]: `withModifiers`,
|
|
[V_ON_WITH_KEYS]: `withKeys`,
|
|
[V_SHOW]: `vShow`,
|
|
[TRANSITION]: `Transition`,
|
|
[TRANSITION_GROUP]: `TransitionGroup`
|
|
});
|
|
|
|
let decoder;
|
|
function decodeHtmlBrowser(raw, asAttr = false) {
|
|
if (!decoder) {
|
|
decoder = document.createElement("div");
|
|
}
|
|
if (asAttr) {
|
|
decoder.innerHTML = `<div foo="${raw.replace(/"/g, """)}">`;
|
|
return decoder.children[0].getAttribute("foo");
|
|
} else {
|
|
decoder.innerHTML = raw;
|
|
return decoder.textContent;
|
|
}
|
|
}
|
|
|
|
const isRawTextContainer = /* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.makeMap)(
|
|
"style,iframe,script,noscript",
|
|
true
|
|
);
|
|
const parserOptions = {
|
|
isVoidTag: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.isVoidTag,
|
|
isNativeTag: (tag) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isHTMLTag)(tag) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSVGTag)(tag),
|
|
isPreTag: (tag) => tag === "pre",
|
|
decodeEntities: decodeHtmlBrowser ,
|
|
isBuiltInComponent: (tag) => {
|
|
if ((0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isBuiltInType)(tag, `Transition`)) {
|
|
return TRANSITION;
|
|
} else if ((0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isBuiltInType)(tag, `TransitionGroup`)) {
|
|
return TRANSITION_GROUP;
|
|
}
|
|
},
|
|
// https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher
|
|
getNamespace(tag, parent) {
|
|
let ns = parent ? parent.ns : 0;
|
|
if (parent && ns === 2) {
|
|
if (parent.tag === "annotation-xml") {
|
|
if (tag === "svg") {
|
|
return 1;
|
|
}
|
|
if (parent.props.some(
|
|
(a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml")
|
|
)) {
|
|
ns = 0;
|
|
}
|
|
} else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") {
|
|
ns = 0;
|
|
}
|
|
} else if (parent && ns === 1) {
|
|
if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") {
|
|
ns = 0;
|
|
}
|
|
}
|
|
if (ns === 0) {
|
|
if (tag === "svg") {
|
|
return 1;
|
|
}
|
|
if (tag === "math") {
|
|
return 2;
|
|
}
|
|
}
|
|
return ns;
|
|
},
|
|
// https://html.spec.whatwg.org/multipage/parsing.html#parsing-html-fragments
|
|
getTextMode({ tag, ns }) {
|
|
if (ns === 0) {
|
|
if (tag === "textarea" || tag === "title") {
|
|
return 1;
|
|
}
|
|
if (isRawTextContainer(tag)) {
|
|
return 2;
|
|
}
|
|
}
|
|
return 0;
|
|
}
|
|
};
|
|
|
|
const transformStyle = (node) => {
|
|
if (node.type === 1) {
|
|
node.props.forEach((p, i) => {
|
|
if (p.type === 6 && p.name === "style" && p.value) {
|
|
node.props[i] = {
|
|
type: 7,
|
|
name: `bind`,
|
|
arg: (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createSimpleExpression)(`style`, true, p.loc),
|
|
exp: parseInlineCSS(p.value.content, p.loc),
|
|
modifiers: [],
|
|
loc: p.loc
|
|
};
|
|
}
|
|
});
|
|
}
|
|
};
|
|
const parseInlineCSS = (cssText, loc) => {
|
|
const normalized = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.parseStringStyle)(cssText);
|
|
return (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createSimpleExpression)(
|
|
JSON.stringify(normalized),
|
|
false,
|
|
loc,
|
|
3
|
|
);
|
|
};
|
|
|
|
function createDOMCompilerError(code, loc) {
|
|
return (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createCompilerError)(
|
|
code,
|
|
loc,
|
|
true ? DOMErrorMessages : 0
|
|
);
|
|
}
|
|
const DOMErrorMessages = {
|
|
[53]: `v-html is missing expression.`,
|
|
[54]: `v-html will override element children.`,
|
|
[55]: `v-text is missing expression.`,
|
|
[56]: `v-text will override element children.`,
|
|
[57]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
|
|
[58]: `v-model argument is not supported on plain elements.`,
|
|
[59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
|
|
[60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
|
|
[61]: `v-show is missing expression.`,
|
|
[62]: `<Transition> expects exactly one child element or component.`,
|
|
[63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
|
|
};
|
|
|
|
const transformVHtml = (dir, node, context) => {
|
|
const { exp, loc } = dir;
|
|
if (!exp) {
|
|
context.onError(
|
|
createDOMCompilerError(53, loc)
|
|
);
|
|
}
|
|
if (node.children.length) {
|
|
context.onError(
|
|
createDOMCompilerError(54, loc)
|
|
);
|
|
node.children.length = 0;
|
|
}
|
|
return {
|
|
props: [
|
|
(0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createObjectProperty)(
|
|
(0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createSimpleExpression)(`innerHTML`, true, loc),
|
|
exp || (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createSimpleExpression)("", true)
|
|
)
|
|
]
|
|
};
|
|
};
|
|
|
|
const transformVText = (dir, node, context) => {
|
|
const { exp, loc } = dir;
|
|
if (!exp) {
|
|
context.onError(
|
|
createDOMCompilerError(55, loc)
|
|
);
|
|
}
|
|
if (node.children.length) {
|
|
context.onError(
|
|
createDOMCompilerError(56, loc)
|
|
);
|
|
node.children.length = 0;
|
|
}
|
|
return {
|
|
props: [
|
|
(0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createObjectProperty)(
|
|
(0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createSimpleExpression)(`textContent`, true),
|
|
exp ? (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.getConstantType)(exp, context) > 0 ? exp : (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createCallExpression)(
|
|
context.helperString(_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.TO_DISPLAY_STRING),
|
|
[exp],
|
|
loc
|
|
) : (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createSimpleExpression)("", true)
|
|
)
|
|
]
|
|
};
|
|
};
|
|
|
|
const transformModel = (dir, node, context) => {
|
|
const baseResult = (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.transformModel)(dir, node, context);
|
|
if (!baseResult.props.length || node.tagType === 1) {
|
|
return baseResult;
|
|
}
|
|
if (dir.arg) {
|
|
context.onError(
|
|
createDOMCompilerError(
|
|
58,
|
|
dir.arg.loc
|
|
)
|
|
);
|
|
}
|
|
function checkDuplicatedValue() {
|
|
const value = (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.findProp)(node, "value");
|
|
if (value) {
|
|
context.onError(
|
|
createDOMCompilerError(
|
|
60,
|
|
value.loc
|
|
)
|
|
);
|
|
}
|
|
}
|
|
const { tag } = node;
|
|
const isCustomElement = context.isCustomElement(tag);
|
|
if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) {
|
|
let directiveToUse = V_MODEL_TEXT;
|
|
let isInvalidType = false;
|
|
if (tag === "input" || isCustomElement) {
|
|
const type = (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.findProp)(node, `type`);
|
|
if (type) {
|
|
if (type.type === 7) {
|
|
directiveToUse = V_MODEL_DYNAMIC;
|
|
} else if (type.value) {
|
|
switch (type.value.content) {
|
|
case "radio":
|
|
directiveToUse = V_MODEL_RADIO;
|
|
break;
|
|
case "checkbox":
|
|
directiveToUse = V_MODEL_CHECKBOX;
|
|
break;
|
|
case "file":
|
|
isInvalidType = true;
|
|
context.onError(
|
|
createDOMCompilerError(
|
|
59,
|
|
dir.loc
|
|
)
|
|
);
|
|
break;
|
|
default:
|
|
true && checkDuplicatedValue();
|
|
break;
|
|
}
|
|
}
|
|
} else if ((0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.hasDynamicKeyVBind)(node)) {
|
|
directiveToUse = V_MODEL_DYNAMIC;
|
|
} else {
|
|
true && checkDuplicatedValue();
|
|
}
|
|
} else if (tag === "select") {
|
|
directiveToUse = V_MODEL_SELECT;
|
|
} else {
|
|
true && checkDuplicatedValue();
|
|
}
|
|
if (!isInvalidType) {
|
|
baseResult.needRuntime = context.helper(directiveToUse);
|
|
}
|
|
} else {
|
|
context.onError(
|
|
createDOMCompilerError(
|
|
57,
|
|
dir.loc
|
|
)
|
|
);
|
|
}
|
|
baseResult.props = baseResult.props.filter(
|
|
(p) => !(p.key.type === 4 && p.key.content === "modelValue")
|
|
);
|
|
return baseResult;
|
|
};
|
|
|
|
const isEventOptionModifier = /* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.makeMap)(`passive,once,capture`);
|
|
const isNonKeyModifier = /* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.makeMap)(
|
|
// event propagation management
|
|
`stop,prevent,self,ctrl,shift,alt,meta,exact,middle`
|
|
);
|
|
const maybeKeyModifier = /* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.makeMap)("left,right");
|
|
const isKeyboardEvent = /* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.makeMap)(
|
|
`onkeyup,onkeydown,onkeypress`,
|
|
true
|
|
);
|
|
const resolveModifiers = (key, modifiers, context, loc) => {
|
|
const keyModifiers = [];
|
|
const nonKeyModifiers = [];
|
|
const eventOptionModifiers = [];
|
|
for (let i = 0; i < modifiers.length; i++) {
|
|
const modifier = modifiers[i];
|
|
if (modifier === "native" && (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.checkCompatEnabled)(
|
|
"COMPILER_V_ON_NATIVE",
|
|
context,
|
|
loc
|
|
)) {
|
|
eventOptionModifiers.push(modifier);
|
|
} else if (isEventOptionModifier(modifier)) {
|
|
eventOptionModifiers.push(modifier);
|
|
} else {
|
|
if (maybeKeyModifier(modifier)) {
|
|
if ((0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isStaticExp)(key)) {
|
|
if (isKeyboardEvent(key.content)) {
|
|
keyModifiers.push(modifier);
|
|
} else {
|
|
nonKeyModifiers.push(modifier);
|
|
}
|
|
} else {
|
|
keyModifiers.push(modifier);
|
|
nonKeyModifiers.push(modifier);
|
|
}
|
|
} else {
|
|
if (isNonKeyModifier(modifier)) {
|
|
nonKeyModifiers.push(modifier);
|
|
} else {
|
|
keyModifiers.push(modifier);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return {
|
|
keyModifiers,
|
|
nonKeyModifiers,
|
|
eventOptionModifiers
|
|
};
|
|
};
|
|
const transformClick = (key, event) => {
|
|
const isStaticClick = (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isStaticExp)(key) && key.content.toLowerCase() === "onclick";
|
|
return isStaticClick ? (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createSimpleExpression)(event, true) : key.type !== 4 ? (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createCompoundExpression)([
|
|
`(`,
|
|
key,
|
|
`) === "onClick" ? "${event}" : (`,
|
|
key,
|
|
`)`
|
|
]) : key;
|
|
};
|
|
const transformOn = (dir, node, context) => {
|
|
return (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.transformOn)(dir, node, context, (baseResult) => {
|
|
const { modifiers } = dir;
|
|
if (!modifiers.length)
|
|
return baseResult;
|
|
let { key, value: handlerExp } = baseResult.props[0];
|
|
const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc);
|
|
if (nonKeyModifiers.includes("right")) {
|
|
key = transformClick(key, `onContextmenu`);
|
|
}
|
|
if (nonKeyModifiers.includes("middle")) {
|
|
key = transformClick(key, `onMouseup`);
|
|
}
|
|
if (nonKeyModifiers.length) {
|
|
handlerExp = (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createCallExpression)(context.helper(V_ON_WITH_MODIFIERS), [
|
|
handlerExp,
|
|
JSON.stringify(nonKeyModifiers)
|
|
]);
|
|
}
|
|
if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard
|
|
(!(0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isStaticExp)(key) || isKeyboardEvent(key.content))) {
|
|
handlerExp = (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createCallExpression)(context.helper(V_ON_WITH_KEYS), [
|
|
handlerExp,
|
|
JSON.stringify(keyModifiers)
|
|
]);
|
|
}
|
|
if (eventOptionModifiers.length) {
|
|
const modifierPostfix = eventOptionModifiers.map(_vue_shared__WEBPACK_IMPORTED_MODULE_1__.capitalize).join("");
|
|
key = (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isStaticExp)(key) ? (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createSimpleExpression)(`${key.content}${modifierPostfix}`, true) : (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createCompoundExpression)([`(`, key, `) + "${modifierPostfix}"`]);
|
|
}
|
|
return {
|
|
props: [(0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createObjectProperty)(key, handlerExp)]
|
|
};
|
|
});
|
|
};
|
|
|
|
const transformShow = (dir, node, context) => {
|
|
const { exp, loc } = dir;
|
|
if (!exp) {
|
|
context.onError(
|
|
createDOMCompilerError(61, loc)
|
|
);
|
|
}
|
|
return {
|
|
props: [],
|
|
needRuntime: context.helper(V_SHOW)
|
|
};
|
|
};
|
|
|
|
const transformTransition = (node, context) => {
|
|
if (node.type === 1 && node.tagType === 1) {
|
|
const component = context.isBuiltInComponent(node.tag);
|
|
if (component === TRANSITION) {
|
|
return () => {
|
|
if (!node.children.length) {
|
|
return;
|
|
}
|
|
if (hasMultipleChildren(node)) {
|
|
context.onError(
|
|
createDOMCompilerError(
|
|
62,
|
|
{
|
|
start: node.children[0].loc.start,
|
|
end: node.children[node.children.length - 1].loc.end,
|
|
source: ""
|
|
}
|
|
)
|
|
);
|
|
}
|
|
const child = node.children[0];
|
|
if (child.type === 1) {
|
|
for (const p of child.props) {
|
|
if (p.type === 7 && p.name === "show") {
|
|
node.props.push({
|
|
type: 6,
|
|
name: "persisted",
|
|
value: void 0,
|
|
loc: node.loc
|
|
});
|
|
}
|
|
}
|
|
}
|
|
};
|
|
}
|
|
}
|
|
};
|
|
function hasMultipleChildren(node) {
|
|
const children = node.children = node.children.filter(
|
|
(c) => c.type !== 3 && !(c.type === 2 && !c.content.trim())
|
|
);
|
|
const child = children[0];
|
|
return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren);
|
|
}
|
|
|
|
const ignoreSideEffectTags = (node, context) => {
|
|
if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
|
|
true && context.onError(
|
|
createDOMCompilerError(
|
|
63,
|
|
node.loc
|
|
)
|
|
);
|
|
context.removeNode();
|
|
}
|
|
};
|
|
|
|
const DOMNodeTransforms = [
|
|
transformStyle,
|
|
... true ? [transformTransition] : 0
|
|
];
|
|
const DOMDirectiveTransforms = {
|
|
cloak: _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.noopDirectiveTransform,
|
|
html: transformVHtml,
|
|
text: transformVText,
|
|
model: transformModel,
|
|
// override compiler-core
|
|
on: transformOn,
|
|
// override compiler-core
|
|
show: transformShow
|
|
};
|
|
function compile(template, options = {}) {
|
|
return (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.baseCompile)(
|
|
template,
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, parserOptions, options, {
|
|
nodeTransforms: [
|
|
// ignore <script> and <tag>
|
|
// this is not put inside DOMNodeTransforms because that list is used
|
|
// by compiler-ssr to generate vnode fallback branches
|
|
ignoreSideEffectTags,
|
|
...DOMNodeTransforms,
|
|
...options.nodeTransforms || []
|
|
],
|
|
directiveTransforms: (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(
|
|
{},
|
|
DOMDirectiveTransforms,
|
|
options.directiveTransforms || {}
|
|
),
|
|
transformHoist: null
|
|
})
|
|
);
|
|
}
|
|
function parse(template, options = {}) {
|
|
return (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.baseParse)(template, (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, parserOptions, options));
|
|
}
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/@vue/devtools-api/lib/esm/const.js":
|
|
/*!*********************************************************!*\
|
|
!*** ./node_modules/@vue/devtools-api/lib/esm/const.js ***!
|
|
\*********************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ HOOK_PLUGIN_SETTINGS_SET: () => (/* binding */ HOOK_PLUGIN_SETTINGS_SET),
|
|
/* harmony export */ HOOK_SETUP: () => (/* binding */ HOOK_SETUP)
|
|
/* harmony export */ });
|
|
const HOOK_SETUP = 'devtools-plugin:setup';
|
|
const HOOK_PLUGIN_SETTINGS_SET = 'plugin:settings:set';
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/@vue/devtools-api/lib/esm/env.js":
|
|
/*!*******************************************************!*\
|
|
!*** ./node_modules/@vue/devtools-api/lib/esm/env.js ***!
|
|
\*******************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ getDevtoolsGlobalHook: () => (/* binding */ getDevtoolsGlobalHook),
|
|
/* harmony export */ getTarget: () => (/* binding */ getTarget),
|
|
/* harmony export */ isProxyAvailable: () => (/* binding */ isProxyAvailable)
|
|
/* harmony export */ });
|
|
function getDevtoolsGlobalHook() {
|
|
return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
}
|
|
function getTarget() {
|
|
// @ts-ignore
|
|
return (typeof navigator !== 'undefined' && typeof window !== 'undefined')
|
|
? window
|
|
: typeof __webpack_require__.g !== 'undefined'
|
|
? __webpack_require__.g
|
|
: {};
|
|
}
|
|
const isProxyAvailable = typeof Proxy === 'function';
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/@vue/devtools-api/lib/esm/index.js":
|
|
/*!*********************************************************!*\
|
|
!*** ./node_modules/@vue/devtools-api/lib/esm/index.js ***!
|
|
\*********************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ isPerformanceSupported: () => (/* reexport safe */ _time_js__WEBPACK_IMPORTED_MODULE_0__.isPerformanceSupported),
|
|
/* harmony export */ now: () => (/* reexport safe */ _time_js__WEBPACK_IMPORTED_MODULE_0__.now),
|
|
/* harmony export */ setupDevtoolsPlugin: () => (/* binding */ setupDevtoolsPlugin)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _env_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./env.js */ "./node_modules/@vue/devtools-api/lib/esm/env.js");
|
|
/* harmony import */ var _const_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./const.js */ "./node_modules/@vue/devtools-api/lib/esm/const.js");
|
|
/* harmony import */ var _proxy_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./proxy.js */ "./node_modules/@vue/devtools-api/lib/esm/proxy.js");
|
|
/* harmony import */ var _time_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./time.js */ "./node_modules/@vue/devtools-api/lib/esm/time.js");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function setupDevtoolsPlugin(pluginDescriptor, setupFn) {
|
|
const descriptor = pluginDescriptor;
|
|
const target = (0,_env_js__WEBPACK_IMPORTED_MODULE_1__.getTarget)();
|
|
const hook = (0,_env_js__WEBPACK_IMPORTED_MODULE_1__.getDevtoolsGlobalHook)();
|
|
const enableProxy = _env_js__WEBPACK_IMPORTED_MODULE_1__.isProxyAvailable && descriptor.enableEarlyProxy;
|
|
if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {
|
|
hook.emit(_const_js__WEBPACK_IMPORTED_MODULE_2__.HOOK_SETUP, pluginDescriptor, setupFn);
|
|
}
|
|
else {
|
|
const proxy = enableProxy ? new _proxy_js__WEBPACK_IMPORTED_MODULE_3__.ApiProxy(descriptor, hook) : null;
|
|
const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];
|
|
list.push({
|
|
pluginDescriptor: descriptor,
|
|
setupFn,
|
|
proxy,
|
|
});
|
|
if (proxy)
|
|
setupFn(proxy.proxiedTarget);
|
|
}
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/@vue/devtools-api/lib/esm/proxy.js":
|
|
/*!*********************************************************!*\
|
|
!*** ./node_modules/@vue/devtools-api/lib/esm/proxy.js ***!
|
|
\*********************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ ApiProxy: () => (/* binding */ ApiProxy)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _const_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./const.js */ "./node_modules/@vue/devtools-api/lib/esm/const.js");
|
|
/* harmony import */ var _time_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./time.js */ "./node_modules/@vue/devtools-api/lib/esm/time.js");
|
|
|
|
|
|
class ApiProxy {
|
|
constructor(plugin, hook) {
|
|
this.target = null;
|
|
this.targetQueue = [];
|
|
this.onQueue = [];
|
|
this.plugin = plugin;
|
|
this.hook = hook;
|
|
const defaultSettings = {};
|
|
if (plugin.settings) {
|
|
for (const id in plugin.settings) {
|
|
const item = plugin.settings[id];
|
|
defaultSettings[id] = item.defaultValue;
|
|
}
|
|
}
|
|
const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;
|
|
let currentSettings = Object.assign({}, defaultSettings);
|
|
try {
|
|
const raw = localStorage.getItem(localSettingsSaveId);
|
|
const data = JSON.parse(raw);
|
|
Object.assign(currentSettings, data);
|
|
}
|
|
catch (e) {
|
|
// noop
|
|
}
|
|
this.fallbacks = {
|
|
getSettings() {
|
|
return currentSettings;
|
|
},
|
|
setSettings(value) {
|
|
try {
|
|
localStorage.setItem(localSettingsSaveId, JSON.stringify(value));
|
|
}
|
|
catch (e) {
|
|
// noop
|
|
}
|
|
currentSettings = value;
|
|
},
|
|
now() {
|
|
return (0,_time_js__WEBPACK_IMPORTED_MODULE_0__.now)();
|
|
},
|
|
};
|
|
if (hook) {
|
|
hook.on(_const_js__WEBPACK_IMPORTED_MODULE_1__.HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {
|
|
if (pluginId === this.plugin.id) {
|
|
this.fallbacks.setSettings(value);
|
|
}
|
|
});
|
|
}
|
|
this.proxiedOn = new Proxy({}, {
|
|
get: (_target, prop) => {
|
|
if (this.target) {
|
|
return this.target.on[prop];
|
|
}
|
|
else {
|
|
return (...args) => {
|
|
this.onQueue.push({
|
|
method: prop,
|
|
args,
|
|
});
|
|
};
|
|
}
|
|
},
|
|
});
|
|
this.proxiedTarget = new Proxy({}, {
|
|
get: (_target, prop) => {
|
|
if (this.target) {
|
|
return this.target[prop];
|
|
}
|
|
else if (prop === 'on') {
|
|
return this.proxiedOn;
|
|
}
|
|
else if (Object.keys(this.fallbacks).includes(prop)) {
|
|
return (...args) => {
|
|
this.targetQueue.push({
|
|
method: prop,
|
|
args,
|
|
resolve: () => { },
|
|
});
|
|
return this.fallbacks[prop](...args);
|
|
};
|
|
}
|
|
else {
|
|
return (...args) => {
|
|
return new Promise(resolve => {
|
|
this.targetQueue.push({
|
|
method: prop,
|
|
args,
|
|
resolve,
|
|
});
|
|
});
|
|
};
|
|
}
|
|
},
|
|
});
|
|
}
|
|
async setRealTarget(target) {
|
|
this.target = target;
|
|
for (const item of this.onQueue) {
|
|
this.target.on[item.method](...item.args);
|
|
}
|
|
for (const item of this.targetQueue) {
|
|
item.resolve(await this.target[item.method](...item.args));
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/@vue/devtools-api/lib/esm/time.js":
|
|
/*!********************************************************!*\
|
|
!*** ./node_modules/@vue/devtools-api/lib/esm/time.js ***!
|
|
\********************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ isPerformanceSupported: () => (/* binding */ isPerformanceSupported),
|
|
/* harmony export */ now: () => (/* binding */ now)
|
|
/* harmony export */ });
|
|
let supported;
|
|
let perf;
|
|
function isPerformanceSupported() {
|
|
var _a;
|
|
if (supported !== undefined) {
|
|
return supported;
|
|
}
|
|
if (typeof window !== 'undefined' && window.performance) {
|
|
supported = true;
|
|
perf = window.performance;
|
|
}
|
|
else if (typeof __webpack_require__.g !== 'undefined' && ((_a = __webpack_require__.g.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {
|
|
supported = true;
|
|
perf = __webpack_require__.g.perf_hooks.performance;
|
|
}
|
|
else {
|
|
supported = false;
|
|
}
|
|
return supported;
|
|
}
|
|
function now() {
|
|
return isPerformanceSupported() ? perf.now() : Date.now();
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js":
|
|
/*!*********************************************************************!*\
|
|
!*** ./node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js ***!
|
|
\*********************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ EffectScope: () => (/* binding */ EffectScope),
|
|
/* harmony export */ ITERATE_KEY: () => (/* binding */ ITERATE_KEY),
|
|
/* harmony export */ ReactiveEffect: () => (/* binding */ ReactiveEffect),
|
|
/* harmony export */ computed: () => (/* binding */ computed),
|
|
/* harmony export */ customRef: () => (/* binding */ customRef),
|
|
/* harmony export */ deferredComputed: () => (/* binding */ deferredComputed),
|
|
/* harmony export */ effect: () => (/* binding */ effect),
|
|
/* harmony export */ effectScope: () => (/* binding */ effectScope),
|
|
/* harmony export */ enableTracking: () => (/* binding */ enableTracking),
|
|
/* harmony export */ getCurrentScope: () => (/* binding */ getCurrentScope),
|
|
/* harmony export */ isProxy: () => (/* binding */ isProxy),
|
|
/* harmony export */ isReactive: () => (/* binding */ isReactive),
|
|
/* harmony export */ isReadonly: () => (/* binding */ isReadonly),
|
|
/* harmony export */ isRef: () => (/* binding */ isRef),
|
|
/* harmony export */ isShallow: () => (/* binding */ isShallow),
|
|
/* harmony export */ markRaw: () => (/* binding */ markRaw),
|
|
/* harmony export */ onScopeDispose: () => (/* binding */ onScopeDispose),
|
|
/* harmony export */ pauseTracking: () => (/* binding */ pauseTracking),
|
|
/* harmony export */ proxyRefs: () => (/* binding */ proxyRefs),
|
|
/* harmony export */ reactive: () => (/* binding */ reactive),
|
|
/* harmony export */ readonly: () => (/* binding */ readonly),
|
|
/* harmony export */ ref: () => (/* binding */ ref),
|
|
/* harmony export */ resetTracking: () => (/* binding */ resetTracking),
|
|
/* harmony export */ shallowReactive: () => (/* binding */ shallowReactive),
|
|
/* harmony export */ shallowReadonly: () => (/* binding */ shallowReadonly),
|
|
/* harmony export */ shallowRef: () => (/* binding */ shallowRef),
|
|
/* harmony export */ stop: () => (/* binding */ stop),
|
|
/* harmony export */ toRaw: () => (/* binding */ toRaw),
|
|
/* harmony export */ toRef: () => (/* binding */ toRef),
|
|
/* harmony export */ toRefs: () => (/* binding */ toRefs),
|
|
/* harmony export */ toValue: () => (/* binding */ toValue),
|
|
/* harmony export */ track: () => (/* binding */ track),
|
|
/* harmony export */ trigger: () => (/* binding */ trigger),
|
|
/* harmony export */ triggerRef: () => (/* binding */ triggerRef),
|
|
/* harmony export */ unref: () => (/* binding */ unref)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _vue_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/shared */ "./node_modules/@vue/shared/dist/shared.esm-bundler.js");
|
|
|
|
|
|
function warn(msg, ...args) {
|
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
}
|
|
|
|
let activeEffectScope;
|
|
class EffectScope {
|
|
constructor(detached = false) {
|
|
this.detached = detached;
|
|
/**
|
|
* @internal
|
|
*/
|
|
this._active = true;
|
|
/**
|
|
* @internal
|
|
*/
|
|
this.effects = [];
|
|
/**
|
|
* @internal
|
|
*/
|
|
this.cleanups = [];
|
|
this.parent = activeEffectScope;
|
|
if (!detached && activeEffectScope) {
|
|
this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
|
|
this
|
|
) - 1;
|
|
}
|
|
}
|
|
get active() {
|
|
return this._active;
|
|
}
|
|
run(fn) {
|
|
if (this._active) {
|
|
const currentEffectScope = activeEffectScope;
|
|
try {
|
|
activeEffectScope = this;
|
|
return fn();
|
|
} finally {
|
|
activeEffectScope = currentEffectScope;
|
|
}
|
|
} else if (true) {
|
|
warn(`cannot run an inactive effect scope.`);
|
|
}
|
|
}
|
|
/**
|
|
* This should only be called on non-detached scopes
|
|
* @internal
|
|
*/
|
|
on() {
|
|
activeEffectScope = this;
|
|
}
|
|
/**
|
|
* This should only be called on non-detached scopes
|
|
* @internal
|
|
*/
|
|
off() {
|
|
activeEffectScope = this.parent;
|
|
}
|
|
stop(fromParent) {
|
|
if (this._active) {
|
|
let i, l;
|
|
for (i = 0, l = this.effects.length; i < l; i++) {
|
|
this.effects[i].stop();
|
|
}
|
|
for (i = 0, l = this.cleanups.length; i < l; i++) {
|
|
this.cleanups[i]();
|
|
}
|
|
if (this.scopes) {
|
|
for (i = 0, l = this.scopes.length; i < l; i++) {
|
|
this.scopes[i].stop(true);
|
|
}
|
|
}
|
|
if (!this.detached && this.parent && !fromParent) {
|
|
const last = this.parent.scopes.pop();
|
|
if (last && last !== this) {
|
|
this.parent.scopes[this.index] = last;
|
|
last.index = this.index;
|
|
}
|
|
}
|
|
this.parent = void 0;
|
|
this._active = false;
|
|
}
|
|
}
|
|
}
|
|
function effectScope(detached) {
|
|
return new EffectScope(detached);
|
|
}
|
|
function recordEffectScope(effect, scope = activeEffectScope) {
|
|
if (scope && scope.active) {
|
|
scope.effects.push(effect);
|
|
}
|
|
}
|
|
function getCurrentScope() {
|
|
return activeEffectScope;
|
|
}
|
|
function onScopeDispose(fn) {
|
|
if (activeEffectScope) {
|
|
activeEffectScope.cleanups.push(fn);
|
|
} else if (true) {
|
|
warn(
|
|
`onScopeDispose() is called when there is no active effect scope to be associated with.`
|
|
);
|
|
}
|
|
}
|
|
|
|
const createDep = (effects) => {
|
|
const dep = new Set(effects);
|
|
dep.w = 0;
|
|
dep.n = 0;
|
|
return dep;
|
|
};
|
|
const wasTracked = (dep) => (dep.w & trackOpBit) > 0;
|
|
const newTracked = (dep) => (dep.n & trackOpBit) > 0;
|
|
const initDepMarkers = ({ deps }) => {
|
|
if (deps.length) {
|
|
for (let i = 0; i < deps.length; i++) {
|
|
deps[i].w |= trackOpBit;
|
|
}
|
|
}
|
|
};
|
|
const finalizeDepMarkers = (effect) => {
|
|
const { deps } = effect;
|
|
if (deps.length) {
|
|
let ptr = 0;
|
|
for (let i = 0; i < deps.length; i++) {
|
|
const dep = deps[i];
|
|
if (wasTracked(dep) && !newTracked(dep)) {
|
|
dep.delete(effect);
|
|
} else {
|
|
deps[ptr++] = dep;
|
|
}
|
|
dep.w &= ~trackOpBit;
|
|
dep.n &= ~trackOpBit;
|
|
}
|
|
deps.length = ptr;
|
|
}
|
|
};
|
|
|
|
const targetMap = /* @__PURE__ */ new WeakMap();
|
|
let effectTrackDepth = 0;
|
|
let trackOpBit = 1;
|
|
const maxMarkerBits = 30;
|
|
let activeEffect;
|
|
const ITERATE_KEY = Symbol( true ? "iterate" : 0);
|
|
const MAP_KEY_ITERATE_KEY = Symbol( true ? "Map key iterate" : 0);
|
|
class ReactiveEffect {
|
|
constructor(fn, scheduler = null, scope) {
|
|
this.fn = fn;
|
|
this.scheduler = scheduler;
|
|
this.active = true;
|
|
this.deps = [];
|
|
this.parent = void 0;
|
|
recordEffectScope(this, scope);
|
|
}
|
|
run() {
|
|
if (!this.active) {
|
|
return this.fn();
|
|
}
|
|
let parent = activeEffect;
|
|
let lastShouldTrack = shouldTrack;
|
|
while (parent) {
|
|
if (parent === this) {
|
|
return;
|
|
}
|
|
parent = parent.parent;
|
|
}
|
|
try {
|
|
this.parent = activeEffect;
|
|
activeEffect = this;
|
|
shouldTrack = true;
|
|
trackOpBit = 1 << ++effectTrackDepth;
|
|
if (effectTrackDepth <= maxMarkerBits) {
|
|
initDepMarkers(this);
|
|
} else {
|
|
cleanupEffect(this);
|
|
}
|
|
return this.fn();
|
|
} finally {
|
|
if (effectTrackDepth <= maxMarkerBits) {
|
|
finalizeDepMarkers(this);
|
|
}
|
|
trackOpBit = 1 << --effectTrackDepth;
|
|
activeEffect = this.parent;
|
|
shouldTrack = lastShouldTrack;
|
|
this.parent = void 0;
|
|
if (this.deferStop) {
|
|
this.stop();
|
|
}
|
|
}
|
|
}
|
|
stop() {
|
|
if (activeEffect === this) {
|
|
this.deferStop = true;
|
|
} else if (this.active) {
|
|
cleanupEffect(this);
|
|
if (this.onStop) {
|
|
this.onStop();
|
|
}
|
|
this.active = false;
|
|
}
|
|
}
|
|
}
|
|
function cleanupEffect(effect2) {
|
|
const { deps } = effect2;
|
|
if (deps.length) {
|
|
for (let i = 0; i < deps.length; i++) {
|
|
deps[i].delete(effect2);
|
|
}
|
|
deps.length = 0;
|
|
}
|
|
}
|
|
function effect(fn, options) {
|
|
if (fn.effect) {
|
|
fn = fn.effect.fn;
|
|
}
|
|
const _effect = new ReactiveEffect(fn);
|
|
if (options) {
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)(_effect, options);
|
|
if (options.scope)
|
|
recordEffectScope(_effect, options.scope);
|
|
}
|
|
if (!options || !options.lazy) {
|
|
_effect.run();
|
|
}
|
|
const runner = _effect.run.bind(_effect);
|
|
runner.effect = _effect;
|
|
return runner;
|
|
}
|
|
function stop(runner) {
|
|
runner.effect.stop();
|
|
}
|
|
let shouldTrack = true;
|
|
const trackStack = [];
|
|
function pauseTracking() {
|
|
trackStack.push(shouldTrack);
|
|
shouldTrack = false;
|
|
}
|
|
function enableTracking() {
|
|
trackStack.push(shouldTrack);
|
|
shouldTrack = true;
|
|
}
|
|
function resetTracking() {
|
|
const last = trackStack.pop();
|
|
shouldTrack = last === void 0 ? true : last;
|
|
}
|
|
function track(target, type, key) {
|
|
if (shouldTrack && activeEffect) {
|
|
let depsMap = targetMap.get(target);
|
|
if (!depsMap) {
|
|
targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
|
|
}
|
|
let dep = depsMap.get(key);
|
|
if (!dep) {
|
|
depsMap.set(key, dep = createDep());
|
|
}
|
|
const eventInfo = true ? { effect: activeEffect, target, type, key } : 0;
|
|
trackEffects(dep, eventInfo);
|
|
}
|
|
}
|
|
function trackEffects(dep, debuggerEventExtraInfo) {
|
|
let shouldTrack2 = false;
|
|
if (effectTrackDepth <= maxMarkerBits) {
|
|
if (!newTracked(dep)) {
|
|
dep.n |= trackOpBit;
|
|
shouldTrack2 = !wasTracked(dep);
|
|
}
|
|
} else {
|
|
shouldTrack2 = !dep.has(activeEffect);
|
|
}
|
|
if (shouldTrack2) {
|
|
dep.add(activeEffect);
|
|
activeEffect.deps.push(dep);
|
|
if ( true && activeEffect.onTrack) {
|
|
activeEffect.onTrack(
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)(
|
|
{
|
|
effect: activeEffect
|
|
},
|
|
debuggerEventExtraInfo
|
|
)
|
|
);
|
|
}
|
|
}
|
|
}
|
|
function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
const depsMap = targetMap.get(target);
|
|
if (!depsMap) {
|
|
return;
|
|
}
|
|
let deps = [];
|
|
if (type === "clear") {
|
|
deps = [...depsMap.values()];
|
|
} else if (key === "length" && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(target)) {
|
|
const newLength = Number(newValue);
|
|
depsMap.forEach((dep, key2) => {
|
|
if (key2 === "length" || key2 >= newLength) {
|
|
deps.push(dep);
|
|
}
|
|
});
|
|
} else {
|
|
if (key !== void 0) {
|
|
deps.push(depsMap.get(key));
|
|
}
|
|
switch (type) {
|
|
case "add":
|
|
if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(target)) {
|
|
deps.push(depsMap.get(ITERATE_KEY));
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isMap)(target)) {
|
|
deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
}
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isIntegerKey)(key)) {
|
|
deps.push(depsMap.get("length"));
|
|
}
|
|
break;
|
|
case "delete":
|
|
if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(target)) {
|
|
deps.push(depsMap.get(ITERATE_KEY));
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isMap)(target)) {
|
|
deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
}
|
|
}
|
|
break;
|
|
case "set":
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isMap)(target)) {
|
|
deps.push(depsMap.get(ITERATE_KEY));
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
const eventInfo = true ? { target, type, key, newValue, oldValue, oldTarget } : 0;
|
|
if (deps.length === 1) {
|
|
if (deps[0]) {
|
|
if (true) {
|
|
triggerEffects(deps[0], eventInfo);
|
|
} else {}
|
|
}
|
|
} else {
|
|
const effects = [];
|
|
for (const dep of deps) {
|
|
if (dep) {
|
|
effects.push(...dep);
|
|
}
|
|
}
|
|
if (true) {
|
|
triggerEffects(createDep(effects), eventInfo);
|
|
} else {}
|
|
}
|
|
}
|
|
function triggerEffects(dep, debuggerEventExtraInfo) {
|
|
const effects = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(dep) ? dep : [...dep];
|
|
for (const effect2 of effects) {
|
|
if (effect2.computed) {
|
|
triggerEffect(effect2, debuggerEventExtraInfo);
|
|
}
|
|
}
|
|
for (const effect2 of effects) {
|
|
if (!effect2.computed) {
|
|
triggerEffect(effect2, debuggerEventExtraInfo);
|
|
}
|
|
}
|
|
}
|
|
function triggerEffect(effect2, debuggerEventExtraInfo) {
|
|
if (effect2 !== activeEffect || effect2.allowRecurse) {
|
|
if ( true && effect2.onTrigger) {
|
|
effect2.onTrigger((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)({ effect: effect2 }, debuggerEventExtraInfo));
|
|
}
|
|
if (effect2.scheduler) {
|
|
effect2.scheduler();
|
|
} else {
|
|
effect2.run();
|
|
}
|
|
}
|
|
}
|
|
function getDepFromReactive(object, key) {
|
|
var _a;
|
|
return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key);
|
|
}
|
|
|
|
const isNonTrackableKeys = /* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.makeMap)(`__proto__,__v_isRef,__isVue`);
|
|
const builtInSymbols = new Set(
|
|
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isSymbol)
|
|
);
|
|
const get$1 = /* @__PURE__ */ createGetter();
|
|
const shallowGet = /* @__PURE__ */ createGetter(false, true);
|
|
const readonlyGet = /* @__PURE__ */ createGetter(true);
|
|
const shallowReadonlyGet = /* @__PURE__ */ createGetter(true, true);
|
|
const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();
|
|
function createArrayInstrumentations() {
|
|
const instrumentations = {};
|
|
["includes", "indexOf", "lastIndexOf"].forEach((key) => {
|
|
instrumentations[key] = function(...args) {
|
|
const arr = toRaw(this);
|
|
for (let i = 0, l = this.length; i < l; i++) {
|
|
track(arr, "get", i + "");
|
|
}
|
|
const res = arr[key](...args);
|
|
if (res === -1 || res === false) {
|
|
return arr[key](...args.map(toRaw));
|
|
} else {
|
|
return res;
|
|
}
|
|
};
|
|
});
|
|
["push", "pop", "shift", "unshift", "splice"].forEach((key) => {
|
|
instrumentations[key] = function(...args) {
|
|
pauseTracking();
|
|
const res = toRaw(this)[key].apply(this, args);
|
|
resetTracking();
|
|
return res;
|
|
};
|
|
});
|
|
return instrumentations;
|
|
}
|
|
function hasOwnProperty(key) {
|
|
const obj = toRaw(this);
|
|
track(obj, "has", key);
|
|
return obj.hasOwnProperty(key);
|
|
}
|
|
function createGetter(isReadonly2 = false, shallow = false) {
|
|
return function get2(target, key, receiver) {
|
|
if (key === "__v_isReactive") {
|
|
return !isReadonly2;
|
|
} else if (key === "__v_isReadonly") {
|
|
return isReadonly2;
|
|
} else if (key === "__v_isShallow") {
|
|
return shallow;
|
|
} else if (key === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) {
|
|
return target;
|
|
}
|
|
const targetIsArray = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(target);
|
|
if (!isReadonly2) {
|
|
if (targetIsArray && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasOwn)(arrayInstrumentations, key)) {
|
|
return Reflect.get(arrayInstrumentations, key, receiver);
|
|
}
|
|
if (key === "hasOwnProperty") {
|
|
return hasOwnProperty;
|
|
}
|
|
}
|
|
const res = Reflect.get(target, key, receiver);
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
|
|
return res;
|
|
}
|
|
if (!isReadonly2) {
|
|
track(target, "get", key);
|
|
}
|
|
if (shallow) {
|
|
return res;
|
|
}
|
|
if (isRef(res)) {
|
|
return targetIsArray && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isIntegerKey)(key) ? res : res.value;
|
|
}
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isObject)(res)) {
|
|
return isReadonly2 ? readonly(res) : reactive(res);
|
|
}
|
|
return res;
|
|
};
|
|
}
|
|
const set$1 = /* @__PURE__ */ createSetter();
|
|
const shallowSet = /* @__PURE__ */ createSetter(true);
|
|
function createSetter(shallow = false) {
|
|
return function set2(target, key, value, receiver) {
|
|
let oldValue = target[key];
|
|
if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
|
|
return false;
|
|
}
|
|
if (!shallow) {
|
|
if (!isShallow(value) && !isReadonly(value)) {
|
|
oldValue = toRaw(oldValue);
|
|
value = toRaw(value);
|
|
}
|
|
if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(target) && isRef(oldValue) && !isRef(value)) {
|
|
oldValue.value = value;
|
|
return true;
|
|
}
|
|
}
|
|
const hadKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(target) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isIntegerKey)(key) ? Number(key) < target.length : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasOwn)(target, key);
|
|
const result = Reflect.set(target, key, value, receiver);
|
|
if (target === toRaw(receiver)) {
|
|
if (!hadKey) {
|
|
trigger(target, "add", key, value);
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasChanged)(value, oldValue)) {
|
|
trigger(target, "set", key, value, oldValue);
|
|
}
|
|
}
|
|
return result;
|
|
};
|
|
}
|
|
function deleteProperty(target, key) {
|
|
const hadKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasOwn)(target, key);
|
|
const oldValue = target[key];
|
|
const result = Reflect.deleteProperty(target, key);
|
|
if (result && hadKey) {
|
|
trigger(target, "delete", key, void 0, oldValue);
|
|
}
|
|
return result;
|
|
}
|
|
function has$1(target, key) {
|
|
const result = Reflect.has(target, key);
|
|
if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) || !builtInSymbols.has(key)) {
|
|
track(target, "has", key);
|
|
}
|
|
return result;
|
|
}
|
|
function ownKeys(target) {
|
|
track(target, "iterate", (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(target) ? "length" : ITERATE_KEY);
|
|
return Reflect.ownKeys(target);
|
|
}
|
|
const mutableHandlers = {
|
|
get: get$1,
|
|
set: set$1,
|
|
deleteProperty,
|
|
has: has$1,
|
|
ownKeys
|
|
};
|
|
const readonlyHandlers = {
|
|
get: readonlyGet,
|
|
set(target, key) {
|
|
if (true) {
|
|
warn(
|
|
`Set operation on key "${String(key)}" failed: target is readonly.`,
|
|
target
|
|
);
|
|
}
|
|
return true;
|
|
},
|
|
deleteProperty(target, key) {
|
|
if (true) {
|
|
warn(
|
|
`Delete operation on key "${String(key)}" failed: target is readonly.`,
|
|
target
|
|
);
|
|
}
|
|
return true;
|
|
}
|
|
};
|
|
const shallowReactiveHandlers = /* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)(
|
|
{},
|
|
mutableHandlers,
|
|
{
|
|
get: shallowGet,
|
|
set: shallowSet
|
|
}
|
|
);
|
|
const shallowReadonlyHandlers = /* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)(
|
|
{},
|
|
readonlyHandlers,
|
|
{
|
|
get: shallowReadonlyGet
|
|
}
|
|
);
|
|
|
|
const toShallow = (value) => value;
|
|
const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
function get(target, key, isReadonly = false, isShallow = false) {
|
|
target = target["__v_raw"];
|
|
const rawTarget = toRaw(target);
|
|
const rawKey = toRaw(key);
|
|
if (!isReadonly) {
|
|
if (key !== rawKey) {
|
|
track(rawTarget, "get", key);
|
|
}
|
|
track(rawTarget, "get", rawKey);
|
|
}
|
|
const { has: has2 } = getProto(rawTarget);
|
|
const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
|
|
if (has2.call(rawTarget, key)) {
|
|
return wrap(target.get(key));
|
|
} else if (has2.call(rawTarget, rawKey)) {
|
|
return wrap(target.get(rawKey));
|
|
} else if (target !== rawTarget) {
|
|
target.get(key);
|
|
}
|
|
}
|
|
function has(key, isReadonly = false) {
|
|
const target = this["__v_raw"];
|
|
const rawTarget = toRaw(target);
|
|
const rawKey = toRaw(key);
|
|
if (!isReadonly) {
|
|
if (key !== rawKey) {
|
|
track(rawTarget, "has", key);
|
|
}
|
|
track(rawTarget, "has", rawKey);
|
|
}
|
|
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
|
|
}
|
|
function size(target, isReadonly = false) {
|
|
target = target["__v_raw"];
|
|
!isReadonly && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
return Reflect.get(target, "size", target);
|
|
}
|
|
function add(value) {
|
|
value = toRaw(value);
|
|
const target = toRaw(this);
|
|
const proto = getProto(target);
|
|
const hadKey = proto.has.call(target, value);
|
|
if (!hadKey) {
|
|
target.add(value);
|
|
trigger(target, "add", value, value);
|
|
}
|
|
return this;
|
|
}
|
|
function set(key, value) {
|
|
value = toRaw(value);
|
|
const target = toRaw(this);
|
|
const { has: has2, get: get2 } = getProto(target);
|
|
let hadKey = has2.call(target, key);
|
|
if (!hadKey) {
|
|
key = toRaw(key);
|
|
hadKey = has2.call(target, key);
|
|
} else if (true) {
|
|
checkIdentityKeys(target, has2, key);
|
|
}
|
|
const oldValue = get2.call(target, key);
|
|
target.set(key, value);
|
|
if (!hadKey) {
|
|
trigger(target, "add", key, value);
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasChanged)(value, oldValue)) {
|
|
trigger(target, "set", key, value, oldValue);
|
|
}
|
|
return this;
|
|
}
|
|
function deleteEntry(key) {
|
|
const target = toRaw(this);
|
|
const { has: has2, get: get2 } = getProto(target);
|
|
let hadKey = has2.call(target, key);
|
|
if (!hadKey) {
|
|
key = toRaw(key);
|
|
hadKey = has2.call(target, key);
|
|
} else if (true) {
|
|
checkIdentityKeys(target, has2, key);
|
|
}
|
|
const oldValue = get2 ? get2.call(target, key) : void 0;
|
|
const result = target.delete(key);
|
|
if (hadKey) {
|
|
trigger(target, "delete", key, void 0, oldValue);
|
|
}
|
|
return result;
|
|
}
|
|
function clear() {
|
|
const target = toRaw(this);
|
|
const hadItems = target.size !== 0;
|
|
const oldTarget = true ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isMap)(target) ? new Map(target) : new Set(target) : 0;
|
|
const result = target.clear();
|
|
if (hadItems) {
|
|
trigger(target, "clear", void 0, void 0, oldTarget);
|
|
}
|
|
return result;
|
|
}
|
|
function createForEach(isReadonly, isShallow) {
|
|
return function forEach(callback, thisArg) {
|
|
const observed = this;
|
|
const target = observed["__v_raw"];
|
|
const rawTarget = toRaw(target);
|
|
const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
|
|
!isReadonly && track(rawTarget, "iterate", ITERATE_KEY);
|
|
return target.forEach((value, key) => {
|
|
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
});
|
|
};
|
|
}
|
|
function createIterableMethod(method, isReadonly, isShallow) {
|
|
return function(...args) {
|
|
const target = this["__v_raw"];
|
|
const rawTarget = toRaw(target);
|
|
const targetIsMap = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isMap)(rawTarget);
|
|
const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
|
|
const isKeyOnly = method === "keys" && targetIsMap;
|
|
const innerIterator = target[method](...args);
|
|
const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
|
|
!isReadonly && track(
|
|
rawTarget,
|
|
"iterate",
|
|
isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
|
|
);
|
|
return {
|
|
// iterator protocol
|
|
next() {
|
|
const { value, done } = innerIterator.next();
|
|
return done ? { value, done } : {
|
|
value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
|
|
done
|
|
};
|
|
},
|
|
// iterable protocol
|
|
[Symbol.iterator]() {
|
|
return this;
|
|
}
|
|
};
|
|
};
|
|
}
|
|
function createReadonlyMethod(type) {
|
|
return function(...args) {
|
|
if (true) {
|
|
const key = args[0] ? `on key "${args[0]}" ` : ``;
|
|
console.warn(
|
|
`${(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.capitalize)(type)} operation ${key}failed: target is readonly.`,
|
|
toRaw(this)
|
|
);
|
|
}
|
|
return type === "delete" ? false : this;
|
|
};
|
|
}
|
|
function createInstrumentations() {
|
|
const mutableInstrumentations2 = {
|
|
get(key) {
|
|
return get(this, key);
|
|
},
|
|
get size() {
|
|
return size(this);
|
|
},
|
|
has,
|
|
add,
|
|
set,
|
|
delete: deleteEntry,
|
|
clear,
|
|
forEach: createForEach(false, false)
|
|
};
|
|
const shallowInstrumentations2 = {
|
|
get(key) {
|
|
return get(this, key, false, true);
|
|
},
|
|
get size() {
|
|
return size(this);
|
|
},
|
|
has,
|
|
add,
|
|
set,
|
|
delete: deleteEntry,
|
|
clear,
|
|
forEach: createForEach(false, true)
|
|
};
|
|
const readonlyInstrumentations2 = {
|
|
get(key) {
|
|
return get(this, key, true);
|
|
},
|
|
get size() {
|
|
return size(this, true);
|
|
},
|
|
has(key) {
|
|
return has.call(this, key, true);
|
|
},
|
|
add: createReadonlyMethod("add"),
|
|
set: createReadonlyMethod("set"),
|
|
delete: createReadonlyMethod("delete"),
|
|
clear: createReadonlyMethod("clear"),
|
|
forEach: createForEach(true, false)
|
|
};
|
|
const shallowReadonlyInstrumentations2 = {
|
|
get(key) {
|
|
return get(this, key, true, true);
|
|
},
|
|
get size() {
|
|
return size(this, true);
|
|
},
|
|
has(key) {
|
|
return has.call(this, key, true);
|
|
},
|
|
add: createReadonlyMethod("add"),
|
|
set: createReadonlyMethod("set"),
|
|
delete: createReadonlyMethod("delete"),
|
|
clear: createReadonlyMethod("clear"),
|
|
forEach: createForEach(true, true)
|
|
};
|
|
const iteratorMethods = ["keys", "values", "entries", Symbol.iterator];
|
|
iteratorMethods.forEach((method) => {
|
|
mutableInstrumentations2[method] = createIterableMethod(
|
|
method,
|
|
false,
|
|
false
|
|
);
|
|
readonlyInstrumentations2[method] = createIterableMethod(
|
|
method,
|
|
true,
|
|
false
|
|
);
|
|
shallowInstrumentations2[method] = createIterableMethod(
|
|
method,
|
|
false,
|
|
true
|
|
);
|
|
shallowReadonlyInstrumentations2[method] = createIterableMethod(
|
|
method,
|
|
true,
|
|
true
|
|
);
|
|
});
|
|
return [
|
|
mutableInstrumentations2,
|
|
readonlyInstrumentations2,
|
|
shallowInstrumentations2,
|
|
shallowReadonlyInstrumentations2
|
|
];
|
|
}
|
|
const [
|
|
mutableInstrumentations,
|
|
readonlyInstrumentations,
|
|
shallowInstrumentations,
|
|
shallowReadonlyInstrumentations
|
|
] = /* @__PURE__ */ createInstrumentations();
|
|
function createInstrumentationGetter(isReadonly, shallow) {
|
|
const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations;
|
|
return (target, key, receiver) => {
|
|
if (key === "__v_isReactive") {
|
|
return !isReadonly;
|
|
} else if (key === "__v_isReadonly") {
|
|
return isReadonly;
|
|
} else if (key === "__v_raw") {
|
|
return target;
|
|
}
|
|
return Reflect.get(
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasOwn)(instrumentations, key) && key in target ? instrumentations : target,
|
|
key,
|
|
receiver
|
|
);
|
|
};
|
|
}
|
|
const mutableCollectionHandlers = {
|
|
get: /* @__PURE__ */ createInstrumentationGetter(false, false)
|
|
};
|
|
const shallowCollectionHandlers = {
|
|
get: /* @__PURE__ */ createInstrumentationGetter(false, true)
|
|
};
|
|
const readonlyCollectionHandlers = {
|
|
get: /* @__PURE__ */ createInstrumentationGetter(true, false)
|
|
};
|
|
const shallowReadonlyCollectionHandlers = {
|
|
get: /* @__PURE__ */ createInstrumentationGetter(true, true)
|
|
};
|
|
function checkIdentityKeys(target, has2, key) {
|
|
const rawKey = toRaw(key);
|
|
if (rawKey !== key && has2.call(target, rawKey)) {
|
|
const type = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.toRawType)(target);
|
|
console.warn(
|
|
`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
|
|
);
|
|
}
|
|
}
|
|
|
|
const reactiveMap = /* @__PURE__ */ new WeakMap();
|
|
const shallowReactiveMap = /* @__PURE__ */ new WeakMap();
|
|
const readonlyMap = /* @__PURE__ */ new WeakMap();
|
|
const shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
|
|
function targetTypeMap(rawType) {
|
|
switch (rawType) {
|
|
case "Object":
|
|
case "Array":
|
|
return 1 /* COMMON */;
|
|
case "Map":
|
|
case "Set":
|
|
case "WeakMap":
|
|
case "WeakSet":
|
|
return 2 /* COLLECTION */;
|
|
default:
|
|
return 0 /* INVALID */;
|
|
}
|
|
}
|
|
function getTargetType(value) {
|
|
return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.toRawType)(value));
|
|
}
|
|
function reactive(target) {
|
|
if (isReadonly(target)) {
|
|
return target;
|
|
}
|
|
return createReactiveObject(
|
|
target,
|
|
false,
|
|
mutableHandlers,
|
|
mutableCollectionHandlers,
|
|
reactiveMap
|
|
);
|
|
}
|
|
function shallowReactive(target) {
|
|
return createReactiveObject(
|
|
target,
|
|
false,
|
|
shallowReactiveHandlers,
|
|
shallowCollectionHandlers,
|
|
shallowReactiveMap
|
|
);
|
|
}
|
|
function readonly(target) {
|
|
return createReactiveObject(
|
|
target,
|
|
true,
|
|
readonlyHandlers,
|
|
readonlyCollectionHandlers,
|
|
readonlyMap
|
|
);
|
|
}
|
|
function shallowReadonly(target) {
|
|
return createReactiveObject(
|
|
target,
|
|
true,
|
|
shallowReadonlyHandlers,
|
|
shallowReadonlyCollectionHandlers,
|
|
shallowReadonlyMap
|
|
);
|
|
}
|
|
function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
|
|
if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isObject)(target)) {
|
|
if (true) {
|
|
console.warn(`value cannot be made reactive: ${String(target)}`);
|
|
}
|
|
return target;
|
|
}
|
|
if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
|
|
return target;
|
|
}
|
|
const existingProxy = proxyMap.get(target);
|
|
if (existingProxy) {
|
|
return existingProxy;
|
|
}
|
|
const targetType = getTargetType(target);
|
|
if (targetType === 0 /* INVALID */) {
|
|
return target;
|
|
}
|
|
const proxy = new Proxy(
|
|
target,
|
|
targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers
|
|
);
|
|
proxyMap.set(target, proxy);
|
|
return proxy;
|
|
}
|
|
function isReactive(value) {
|
|
if (isReadonly(value)) {
|
|
return isReactive(value["__v_raw"]);
|
|
}
|
|
return !!(value && value["__v_isReactive"]);
|
|
}
|
|
function isReadonly(value) {
|
|
return !!(value && value["__v_isReadonly"]);
|
|
}
|
|
function isShallow(value) {
|
|
return !!(value && value["__v_isShallow"]);
|
|
}
|
|
function isProxy(value) {
|
|
return isReactive(value) || isReadonly(value);
|
|
}
|
|
function toRaw(observed) {
|
|
const raw = observed && observed["__v_raw"];
|
|
return raw ? toRaw(raw) : observed;
|
|
}
|
|
function markRaw(value) {
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.def)(value, "__v_skip", true);
|
|
return value;
|
|
}
|
|
const toReactive = (value) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isObject)(value) ? reactive(value) : value;
|
|
const toReadonly = (value) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isObject)(value) ? readonly(value) : value;
|
|
|
|
function trackRefValue(ref2) {
|
|
if (shouldTrack && activeEffect) {
|
|
ref2 = toRaw(ref2);
|
|
if (true) {
|
|
trackEffects(ref2.dep || (ref2.dep = createDep()), {
|
|
target: ref2,
|
|
type: "get",
|
|
key: "value"
|
|
});
|
|
} else {}
|
|
}
|
|
}
|
|
function triggerRefValue(ref2, newVal) {
|
|
ref2 = toRaw(ref2);
|
|
const dep = ref2.dep;
|
|
if (dep) {
|
|
if (true) {
|
|
triggerEffects(dep, {
|
|
target: ref2,
|
|
type: "set",
|
|
key: "value",
|
|
newValue: newVal
|
|
});
|
|
} else {}
|
|
}
|
|
}
|
|
function isRef(r) {
|
|
return !!(r && r.__v_isRef === true);
|
|
}
|
|
function ref(value) {
|
|
return createRef(value, false);
|
|
}
|
|
function shallowRef(value) {
|
|
return createRef(value, true);
|
|
}
|
|
function createRef(rawValue, shallow) {
|
|
if (isRef(rawValue)) {
|
|
return rawValue;
|
|
}
|
|
return new RefImpl(rawValue, shallow);
|
|
}
|
|
class RefImpl {
|
|
constructor(value, __v_isShallow) {
|
|
this.__v_isShallow = __v_isShallow;
|
|
this.dep = void 0;
|
|
this.__v_isRef = true;
|
|
this._rawValue = __v_isShallow ? value : toRaw(value);
|
|
this._value = __v_isShallow ? value : toReactive(value);
|
|
}
|
|
get value() {
|
|
trackRefValue(this);
|
|
return this._value;
|
|
}
|
|
set value(newVal) {
|
|
const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);
|
|
newVal = useDirectValue ? newVal : toRaw(newVal);
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasChanged)(newVal, this._rawValue)) {
|
|
this._rawValue = newVal;
|
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
triggerRefValue(this, newVal);
|
|
}
|
|
}
|
|
}
|
|
function triggerRef(ref2) {
|
|
triggerRefValue(ref2, true ? ref2.value : 0);
|
|
}
|
|
function unref(ref2) {
|
|
return isRef(ref2) ? ref2.value : ref2;
|
|
}
|
|
function toValue(source) {
|
|
return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isFunction)(source) ? source() : unref(source);
|
|
}
|
|
const shallowUnwrapHandlers = {
|
|
get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),
|
|
set: (target, key, value, receiver) => {
|
|
const oldValue = target[key];
|
|
if (isRef(oldValue) && !isRef(value)) {
|
|
oldValue.value = value;
|
|
return true;
|
|
} else {
|
|
return Reflect.set(target, key, value, receiver);
|
|
}
|
|
}
|
|
};
|
|
function proxyRefs(objectWithRefs) {
|
|
return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
|
|
}
|
|
class CustomRefImpl {
|
|
constructor(factory) {
|
|
this.dep = void 0;
|
|
this.__v_isRef = true;
|
|
const { get, set } = factory(
|
|
() => trackRefValue(this),
|
|
() => triggerRefValue(this)
|
|
);
|
|
this._get = get;
|
|
this._set = set;
|
|
}
|
|
get value() {
|
|
return this._get();
|
|
}
|
|
set value(newVal) {
|
|
this._set(newVal);
|
|
}
|
|
}
|
|
function customRef(factory) {
|
|
return new CustomRefImpl(factory);
|
|
}
|
|
function toRefs(object) {
|
|
if ( true && !isProxy(object)) {
|
|
console.warn(`toRefs() expects a reactive object but received a plain one.`);
|
|
}
|
|
const ret = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(object) ? new Array(object.length) : {};
|
|
for (const key in object) {
|
|
ret[key] = propertyToRef(object, key);
|
|
}
|
|
return ret;
|
|
}
|
|
class ObjectRefImpl {
|
|
constructor(_object, _key, _defaultValue) {
|
|
this._object = _object;
|
|
this._key = _key;
|
|
this._defaultValue = _defaultValue;
|
|
this.__v_isRef = true;
|
|
}
|
|
get value() {
|
|
const val = this._object[this._key];
|
|
return val === void 0 ? this._defaultValue : val;
|
|
}
|
|
set value(newVal) {
|
|
this._object[this._key] = newVal;
|
|
}
|
|
get dep() {
|
|
return getDepFromReactive(toRaw(this._object), this._key);
|
|
}
|
|
}
|
|
class GetterRefImpl {
|
|
constructor(_getter) {
|
|
this._getter = _getter;
|
|
this.__v_isRef = true;
|
|
this.__v_isReadonly = true;
|
|
}
|
|
get value() {
|
|
return this._getter();
|
|
}
|
|
}
|
|
function toRef(source, key, defaultValue) {
|
|
if (isRef(source)) {
|
|
return source;
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isFunction)(source)) {
|
|
return new GetterRefImpl(source);
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isObject)(source) && arguments.length > 1) {
|
|
return propertyToRef(source, key, defaultValue);
|
|
} else {
|
|
return ref(source);
|
|
}
|
|
}
|
|
function propertyToRef(source, key, defaultValue) {
|
|
const val = source[key];
|
|
return isRef(val) ? val : new ObjectRefImpl(
|
|
source,
|
|
key,
|
|
defaultValue
|
|
);
|
|
}
|
|
|
|
class ComputedRefImpl {
|
|
constructor(getter, _setter, isReadonly, isSSR) {
|
|
this._setter = _setter;
|
|
this.dep = void 0;
|
|
this.__v_isRef = true;
|
|
this["__v_isReadonly"] = false;
|
|
this._dirty = true;
|
|
this.effect = new ReactiveEffect(getter, () => {
|
|
if (!this._dirty) {
|
|
this._dirty = true;
|
|
triggerRefValue(this);
|
|
}
|
|
});
|
|
this.effect.computed = this;
|
|
this.effect.active = this._cacheable = !isSSR;
|
|
this["__v_isReadonly"] = isReadonly;
|
|
}
|
|
get value() {
|
|
const self = toRaw(this);
|
|
trackRefValue(self);
|
|
if (self._dirty || !self._cacheable) {
|
|
self._dirty = false;
|
|
self._value = self.effect.run();
|
|
}
|
|
return self._value;
|
|
}
|
|
set value(newValue) {
|
|
this._setter(newValue);
|
|
}
|
|
}
|
|
function computed(getterOrOptions, debugOptions, isSSR = false) {
|
|
let getter;
|
|
let setter;
|
|
const onlyGetter = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isFunction)(getterOrOptions);
|
|
if (onlyGetter) {
|
|
getter = getterOrOptions;
|
|
setter = true ? () => {
|
|
console.warn("Write operation failed: computed value is readonly");
|
|
} : 0;
|
|
} else {
|
|
getter = getterOrOptions.get;
|
|
setter = getterOrOptions.set;
|
|
}
|
|
const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);
|
|
if ( true && debugOptions && !isSSR) {
|
|
cRef.effect.onTrack = debugOptions.onTrack;
|
|
cRef.effect.onTrigger = debugOptions.onTrigger;
|
|
}
|
|
return cRef;
|
|
}
|
|
|
|
const tick = /* @__PURE__ */ Promise.resolve();
|
|
const queue = [];
|
|
let queued = false;
|
|
const scheduler = (fn) => {
|
|
queue.push(fn);
|
|
if (!queued) {
|
|
queued = true;
|
|
tick.then(flush);
|
|
}
|
|
};
|
|
const flush = () => {
|
|
for (let i = 0; i < queue.length; i++) {
|
|
queue[i]();
|
|
}
|
|
queue.length = 0;
|
|
queued = false;
|
|
};
|
|
class DeferredComputedRefImpl {
|
|
constructor(getter) {
|
|
this.dep = void 0;
|
|
this._dirty = true;
|
|
this.__v_isRef = true;
|
|
this["__v_isReadonly"] = true;
|
|
let compareTarget;
|
|
let hasCompareTarget = false;
|
|
let scheduled = false;
|
|
this.effect = new ReactiveEffect(getter, (computedTrigger) => {
|
|
if (this.dep) {
|
|
if (computedTrigger) {
|
|
compareTarget = this._value;
|
|
hasCompareTarget = true;
|
|
} else if (!scheduled) {
|
|
const valueToCompare = hasCompareTarget ? compareTarget : this._value;
|
|
scheduled = true;
|
|
hasCompareTarget = false;
|
|
scheduler(() => {
|
|
if (this.effect.active && this._get() !== valueToCompare) {
|
|
triggerRefValue(this);
|
|
}
|
|
scheduled = false;
|
|
});
|
|
}
|
|
for (const e of this.dep) {
|
|
if (e.computed instanceof DeferredComputedRefImpl) {
|
|
e.scheduler(
|
|
true
|
|
/* computedTrigger */
|
|
);
|
|
}
|
|
}
|
|
}
|
|
this._dirty = true;
|
|
});
|
|
this.effect.computed = this;
|
|
}
|
|
_get() {
|
|
if (this._dirty) {
|
|
this._dirty = false;
|
|
return this._value = this.effect.run();
|
|
}
|
|
return this._value;
|
|
}
|
|
get value() {
|
|
trackRefValue(this);
|
|
return toRaw(this)._get();
|
|
}
|
|
}
|
|
function deferredComputed(getter) {
|
|
return new DeferredComputedRefImpl(getter);
|
|
}
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js":
|
|
/*!*************************************************************************!*\
|
|
!*** ./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js ***!
|
|
\*************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ BaseTransition: () => (/* binding */ BaseTransition),
|
|
/* harmony export */ BaseTransitionPropsValidators: () => (/* binding */ BaseTransitionPropsValidators),
|
|
/* harmony export */ Comment: () => (/* binding */ Comment),
|
|
/* harmony export */ EffectScope: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.EffectScope),
|
|
/* harmony export */ Fragment: () => (/* binding */ Fragment),
|
|
/* harmony export */ KeepAlive: () => (/* binding */ KeepAlive),
|
|
/* harmony export */ ReactiveEffect: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ReactiveEffect),
|
|
/* harmony export */ Static: () => (/* binding */ Static),
|
|
/* harmony export */ Suspense: () => (/* binding */ Suspense),
|
|
/* harmony export */ Teleport: () => (/* binding */ Teleport),
|
|
/* harmony export */ Text: () => (/* binding */ Text),
|
|
/* harmony export */ assertNumber: () => (/* binding */ assertNumber),
|
|
/* harmony export */ callWithAsyncErrorHandling: () => (/* binding */ callWithAsyncErrorHandling),
|
|
/* harmony export */ callWithErrorHandling: () => (/* binding */ callWithErrorHandling),
|
|
/* harmony export */ camelize: () => (/* reexport safe */ _vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize),
|
|
/* harmony export */ capitalize: () => (/* reexport safe */ _vue_shared__WEBPACK_IMPORTED_MODULE_1__.capitalize),
|
|
/* harmony export */ cloneVNode: () => (/* binding */ cloneVNode),
|
|
/* harmony export */ compatUtils: () => (/* binding */ compatUtils),
|
|
/* harmony export */ computed: () => (/* binding */ computed),
|
|
/* harmony export */ createBlock: () => (/* binding */ createBlock),
|
|
/* harmony export */ createCommentVNode: () => (/* binding */ createCommentVNode),
|
|
/* harmony export */ createElementBlock: () => (/* binding */ createElementBlock),
|
|
/* harmony export */ createElementVNode: () => (/* binding */ createBaseVNode),
|
|
/* harmony export */ createHydrationRenderer: () => (/* binding */ createHydrationRenderer),
|
|
/* harmony export */ createPropsRestProxy: () => (/* binding */ createPropsRestProxy),
|
|
/* harmony export */ createRenderer: () => (/* binding */ createRenderer),
|
|
/* harmony export */ createSlots: () => (/* binding */ createSlots),
|
|
/* harmony export */ createStaticVNode: () => (/* binding */ createStaticVNode),
|
|
/* harmony export */ createTextVNode: () => (/* binding */ createTextVNode),
|
|
/* harmony export */ createVNode: () => (/* binding */ createVNode),
|
|
/* harmony export */ customRef: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.customRef),
|
|
/* harmony export */ defineAsyncComponent: () => (/* binding */ defineAsyncComponent),
|
|
/* harmony export */ defineComponent: () => (/* binding */ defineComponent),
|
|
/* harmony export */ defineEmits: () => (/* binding */ defineEmits),
|
|
/* harmony export */ defineExpose: () => (/* binding */ defineExpose),
|
|
/* harmony export */ defineModel: () => (/* binding */ defineModel),
|
|
/* harmony export */ defineOptions: () => (/* binding */ defineOptions),
|
|
/* harmony export */ defineProps: () => (/* binding */ defineProps),
|
|
/* harmony export */ defineSlots: () => (/* binding */ defineSlots),
|
|
/* harmony export */ devtools: () => (/* binding */ devtools),
|
|
/* harmony export */ effect: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.effect),
|
|
/* harmony export */ effectScope: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.effectScope),
|
|
/* harmony export */ getCurrentInstance: () => (/* binding */ getCurrentInstance),
|
|
/* harmony export */ getCurrentScope: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.getCurrentScope),
|
|
/* harmony export */ getTransitionRawChildren: () => (/* binding */ getTransitionRawChildren),
|
|
/* harmony export */ guardReactiveProps: () => (/* binding */ guardReactiveProps),
|
|
/* harmony export */ h: () => (/* binding */ h),
|
|
/* harmony export */ handleError: () => (/* binding */ handleError),
|
|
/* harmony export */ hasInjectionContext: () => (/* binding */ hasInjectionContext),
|
|
/* harmony export */ initCustomFormatter: () => (/* binding */ initCustomFormatter),
|
|
/* harmony export */ inject: () => (/* binding */ inject),
|
|
/* harmony export */ isMemoSame: () => (/* binding */ isMemoSame),
|
|
/* harmony export */ isProxy: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isProxy),
|
|
/* harmony export */ isReactive: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReactive),
|
|
/* harmony export */ isReadonly: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReadonly),
|
|
/* harmony export */ isRef: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef),
|
|
/* harmony export */ isRuntimeOnly: () => (/* binding */ isRuntimeOnly),
|
|
/* harmony export */ isShallow: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isShallow),
|
|
/* harmony export */ isVNode: () => (/* binding */ isVNode),
|
|
/* harmony export */ markRaw: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.markRaw),
|
|
/* harmony export */ mergeDefaults: () => (/* binding */ mergeDefaults),
|
|
/* harmony export */ mergeModels: () => (/* binding */ mergeModels),
|
|
/* harmony export */ mergeProps: () => (/* binding */ mergeProps),
|
|
/* harmony export */ nextTick: () => (/* binding */ nextTick),
|
|
/* harmony export */ normalizeClass: () => (/* reexport safe */ _vue_shared__WEBPACK_IMPORTED_MODULE_1__.normalizeClass),
|
|
/* harmony export */ normalizeProps: () => (/* reexport safe */ _vue_shared__WEBPACK_IMPORTED_MODULE_1__.normalizeProps),
|
|
/* harmony export */ normalizeStyle: () => (/* reexport safe */ _vue_shared__WEBPACK_IMPORTED_MODULE_1__.normalizeStyle),
|
|
/* harmony export */ onActivated: () => (/* binding */ onActivated),
|
|
/* harmony export */ onBeforeMount: () => (/* binding */ onBeforeMount),
|
|
/* harmony export */ onBeforeUnmount: () => (/* binding */ onBeforeUnmount),
|
|
/* harmony export */ onBeforeUpdate: () => (/* binding */ onBeforeUpdate),
|
|
/* harmony export */ onDeactivated: () => (/* binding */ onDeactivated),
|
|
/* harmony export */ onErrorCaptured: () => (/* binding */ onErrorCaptured),
|
|
/* harmony export */ onMounted: () => (/* binding */ onMounted),
|
|
/* harmony export */ onRenderTracked: () => (/* binding */ onRenderTracked),
|
|
/* harmony export */ onRenderTriggered: () => (/* binding */ onRenderTriggered),
|
|
/* harmony export */ onScopeDispose: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.onScopeDispose),
|
|
/* harmony export */ onServerPrefetch: () => (/* binding */ onServerPrefetch),
|
|
/* harmony export */ onUnmounted: () => (/* binding */ onUnmounted),
|
|
/* harmony export */ onUpdated: () => (/* binding */ onUpdated),
|
|
/* harmony export */ openBlock: () => (/* binding */ openBlock),
|
|
/* harmony export */ popScopeId: () => (/* binding */ popScopeId),
|
|
/* harmony export */ provide: () => (/* binding */ provide),
|
|
/* harmony export */ proxyRefs: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.proxyRefs),
|
|
/* harmony export */ pushScopeId: () => (/* binding */ pushScopeId),
|
|
/* harmony export */ queuePostFlushCb: () => (/* binding */ queuePostFlushCb),
|
|
/* harmony export */ reactive: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.reactive),
|
|
/* harmony export */ readonly: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.readonly),
|
|
/* harmony export */ ref: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ref),
|
|
/* harmony export */ registerRuntimeCompiler: () => (/* binding */ registerRuntimeCompiler),
|
|
/* harmony export */ renderList: () => (/* binding */ renderList),
|
|
/* harmony export */ renderSlot: () => (/* binding */ renderSlot),
|
|
/* harmony export */ resolveComponent: () => (/* binding */ resolveComponent),
|
|
/* harmony export */ resolveDirective: () => (/* binding */ resolveDirective),
|
|
/* harmony export */ resolveDynamicComponent: () => (/* binding */ resolveDynamicComponent),
|
|
/* harmony export */ resolveFilter: () => (/* binding */ resolveFilter),
|
|
/* harmony export */ resolveTransitionHooks: () => (/* binding */ resolveTransitionHooks),
|
|
/* harmony export */ setBlockTracking: () => (/* binding */ setBlockTracking),
|
|
/* harmony export */ setDevtoolsHook: () => (/* binding */ setDevtoolsHook),
|
|
/* harmony export */ setTransitionHooks: () => (/* binding */ setTransitionHooks),
|
|
/* harmony export */ shallowReactive: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReactive),
|
|
/* harmony export */ shallowReadonly: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly),
|
|
/* harmony export */ shallowRef: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowRef),
|
|
/* harmony export */ ssrContextKey: () => (/* binding */ ssrContextKey),
|
|
/* harmony export */ ssrUtils: () => (/* binding */ ssrUtils),
|
|
/* harmony export */ stop: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.stop),
|
|
/* harmony export */ toDisplayString: () => (/* reexport safe */ _vue_shared__WEBPACK_IMPORTED_MODULE_1__.toDisplayString),
|
|
/* harmony export */ toHandlerKey: () => (/* reexport safe */ _vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey),
|
|
/* harmony export */ toHandlers: () => (/* binding */ toHandlers),
|
|
/* harmony export */ toRaw: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw),
|
|
/* harmony export */ toRef: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRef),
|
|
/* harmony export */ toRefs: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRefs),
|
|
/* harmony export */ toValue: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toValue),
|
|
/* harmony export */ transformVNodeArgs: () => (/* binding */ transformVNodeArgs),
|
|
/* harmony export */ triggerRef: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.triggerRef),
|
|
/* harmony export */ unref: () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.unref),
|
|
/* harmony export */ useAttrs: () => (/* binding */ useAttrs),
|
|
/* harmony export */ useModel: () => (/* binding */ useModel),
|
|
/* harmony export */ useSSRContext: () => (/* binding */ useSSRContext),
|
|
/* harmony export */ useSlots: () => (/* binding */ useSlots),
|
|
/* harmony export */ useTransitionState: () => (/* binding */ useTransitionState),
|
|
/* harmony export */ version: () => (/* binding */ version),
|
|
/* harmony export */ warn: () => (/* binding */ warn),
|
|
/* harmony export */ watch: () => (/* binding */ watch),
|
|
/* harmony export */ watchEffect: () => (/* binding */ watchEffect),
|
|
/* harmony export */ watchPostEffect: () => (/* binding */ watchPostEffect),
|
|
/* harmony export */ watchSyncEffect: () => (/* binding */ watchSyncEffect),
|
|
/* harmony export */ withAsyncContext: () => (/* binding */ withAsyncContext),
|
|
/* harmony export */ withCtx: () => (/* binding */ withCtx),
|
|
/* harmony export */ withDefaults: () => (/* binding */ withDefaults),
|
|
/* harmony export */ withDirectives: () => (/* binding */ withDirectives),
|
|
/* harmony export */ withMemo: () => (/* binding */ withMemo),
|
|
/* harmony export */ withScopeId: () => (/* binding */ withScopeId)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/reactivity */ "./node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js");
|
|
/* harmony import */ var _vue_shared__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/shared */ "./node_modules/@vue/shared/dist/shared.esm-bundler.js");
|
|
|
|
|
|
|
|
|
|
|
|
const stack = [];
|
|
function pushWarningContext(vnode) {
|
|
stack.push(vnode);
|
|
}
|
|
function popWarningContext() {
|
|
stack.pop();
|
|
}
|
|
function warn(msg, ...args) {
|
|
if (false)
|
|
{}
|
|
(0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.pauseTracking)();
|
|
const instance = stack.length ? stack[stack.length - 1].component : null;
|
|
const appWarnHandler = instance && instance.appContext.config.warnHandler;
|
|
const trace = getComponentTrace();
|
|
if (appWarnHandler) {
|
|
callWithErrorHandling(
|
|
appWarnHandler,
|
|
instance,
|
|
11,
|
|
[
|
|
msg + args.join(""),
|
|
instance && instance.proxy,
|
|
trace.map(
|
|
({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
|
|
).join("\n"),
|
|
trace
|
|
]
|
|
);
|
|
} else {
|
|
const warnArgs = [`[Vue warn]: ${msg}`, ...args];
|
|
if (trace.length && // avoid spamming console during tests
|
|
true) {
|
|
warnArgs.push(`
|
|
`, ...formatTrace(trace));
|
|
}
|
|
console.warn(...warnArgs);
|
|
}
|
|
(0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.resetTracking)();
|
|
}
|
|
function getComponentTrace() {
|
|
let currentVNode = stack[stack.length - 1];
|
|
if (!currentVNode) {
|
|
return [];
|
|
}
|
|
const normalizedStack = [];
|
|
while (currentVNode) {
|
|
const last = normalizedStack[0];
|
|
if (last && last.vnode === currentVNode) {
|
|
last.recurseCount++;
|
|
} else {
|
|
normalizedStack.push({
|
|
vnode: currentVNode,
|
|
recurseCount: 0
|
|
});
|
|
}
|
|
const parentInstance = currentVNode.component && currentVNode.component.parent;
|
|
currentVNode = parentInstance && parentInstance.vnode;
|
|
}
|
|
return normalizedStack;
|
|
}
|
|
function formatTrace(trace) {
|
|
const logs = [];
|
|
trace.forEach((entry, i) => {
|
|
logs.push(...i === 0 ? [] : [`
|
|
`], ...formatTraceEntry(entry));
|
|
});
|
|
return logs;
|
|
}
|
|
function formatTraceEntry({ vnode, recurseCount }) {
|
|
const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
|
|
const isRoot = vnode.component ? vnode.component.parent == null : false;
|
|
const open = ` at <${formatComponentName(
|
|
vnode.component,
|
|
vnode.type,
|
|
isRoot
|
|
)}`;
|
|
const close = `>` + postfix;
|
|
return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];
|
|
}
|
|
function formatProps(props) {
|
|
const res = [];
|
|
const keys = Object.keys(props);
|
|
keys.slice(0, 3).forEach((key) => {
|
|
res.push(...formatProp(key, props[key]));
|
|
});
|
|
if (keys.length > 3) {
|
|
res.push(` ...`);
|
|
}
|
|
return res;
|
|
}
|
|
function formatProp(key, value, raw) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(value)) {
|
|
value = JSON.stringify(value);
|
|
return raw ? value : [`${key}=${value}`];
|
|
} else if (typeof value === "number" || typeof value === "boolean" || value == null) {
|
|
return raw ? value : [`${key}=${value}`];
|
|
} else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(value)) {
|
|
value = formatProp(key, (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(value.value), true);
|
|
return raw ? value : [`${key}=Ref<`, value, `>`];
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(value)) {
|
|
return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];
|
|
} else {
|
|
value = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(value);
|
|
return raw ? value : [`${key}=`, value];
|
|
}
|
|
}
|
|
function assertNumber(val, type) {
|
|
if (false)
|
|
{}
|
|
if (val === void 0) {
|
|
return;
|
|
} else if (typeof val !== "number") {
|
|
warn(`${type} is not a valid number - got ${JSON.stringify(val)}.`);
|
|
} else if (isNaN(val)) {
|
|
warn(`${type} is NaN - the duration expression might be incorrect.`);
|
|
}
|
|
}
|
|
|
|
const ErrorTypeStrings = {
|
|
["sp"]: "serverPrefetch hook",
|
|
["bc"]: "beforeCreate hook",
|
|
["c"]: "created hook",
|
|
["bm"]: "beforeMount hook",
|
|
["m"]: "mounted hook",
|
|
["bu"]: "beforeUpdate hook",
|
|
["u"]: "updated",
|
|
["bum"]: "beforeUnmount hook",
|
|
["um"]: "unmounted hook",
|
|
["a"]: "activated hook",
|
|
["da"]: "deactivated hook",
|
|
["ec"]: "errorCaptured hook",
|
|
["rtc"]: "renderTracked hook",
|
|
["rtg"]: "renderTriggered hook",
|
|
[0]: "setup function",
|
|
[1]: "render function",
|
|
[2]: "watcher getter",
|
|
[3]: "watcher callback",
|
|
[4]: "watcher cleanup function",
|
|
[5]: "native event handler",
|
|
[6]: "component event handler",
|
|
[7]: "vnode hook",
|
|
[8]: "directive hook",
|
|
[9]: "transition hook",
|
|
[10]: "app errorHandler",
|
|
[11]: "app warnHandler",
|
|
[12]: "ref function",
|
|
[13]: "async component loader",
|
|
[14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
|
|
};
|
|
function callWithErrorHandling(fn, instance, type, args) {
|
|
let res;
|
|
try {
|
|
res = args ? fn(...args) : fn();
|
|
} catch (err) {
|
|
handleError(err, instance, type);
|
|
}
|
|
return res;
|
|
}
|
|
function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(fn)) {
|
|
const res = callWithErrorHandling(fn, instance, type, args);
|
|
if (res && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isPromise)(res)) {
|
|
res.catch((err) => {
|
|
handleError(err, instance, type);
|
|
});
|
|
}
|
|
return res;
|
|
}
|
|
const values = [];
|
|
for (let i = 0; i < fn.length; i++) {
|
|
values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
|
|
}
|
|
return values;
|
|
}
|
|
function handleError(err, instance, type, throwInDev = true) {
|
|
const contextVNode = instance ? instance.vnode : null;
|
|
if (instance) {
|
|
let cur = instance.parent;
|
|
const exposedInstance = instance.proxy;
|
|
const errorInfo = true ? ErrorTypeStrings[type] : 0;
|
|
while (cur) {
|
|
const errorCapturedHooks = cur.ec;
|
|
if (errorCapturedHooks) {
|
|
for (let i = 0; i < errorCapturedHooks.length; i++) {
|
|
if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
cur = cur.parent;
|
|
}
|
|
const appErrorHandler = instance.appContext.config.errorHandler;
|
|
if (appErrorHandler) {
|
|
callWithErrorHandling(
|
|
appErrorHandler,
|
|
null,
|
|
10,
|
|
[err, exposedInstance, errorInfo]
|
|
);
|
|
return;
|
|
}
|
|
}
|
|
logError(err, type, contextVNode, throwInDev);
|
|
}
|
|
function logError(err, type, contextVNode, throwInDev = true) {
|
|
if (true) {
|
|
const info = ErrorTypeStrings[type];
|
|
if (contextVNode) {
|
|
pushWarningContext(contextVNode);
|
|
}
|
|
warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
|
|
if (contextVNode) {
|
|
popWarningContext();
|
|
}
|
|
if (throwInDev) {
|
|
throw err;
|
|
} else {
|
|
console.error(err);
|
|
}
|
|
} else {}
|
|
}
|
|
|
|
let isFlushing = false;
|
|
let isFlushPending = false;
|
|
const queue = [];
|
|
let flushIndex = 0;
|
|
const pendingPostFlushCbs = [];
|
|
let activePostFlushCbs = null;
|
|
let postFlushIndex = 0;
|
|
const resolvedPromise = /* @__PURE__ */ Promise.resolve();
|
|
let currentFlushPromise = null;
|
|
const RECURSION_LIMIT = 100;
|
|
function nextTick(fn) {
|
|
const p = currentFlushPromise || resolvedPromise;
|
|
return fn ? p.then(this ? fn.bind(this) : fn) : p;
|
|
}
|
|
function findInsertionIndex(id) {
|
|
let start = flushIndex + 1;
|
|
let end = queue.length;
|
|
while (start < end) {
|
|
const middle = start + end >>> 1;
|
|
const middleJobId = getId(queue[middle]);
|
|
middleJobId < id ? start = middle + 1 : end = middle;
|
|
}
|
|
return start;
|
|
}
|
|
function queueJob(job) {
|
|
if (!queue.length || !queue.includes(
|
|
job,
|
|
isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex
|
|
)) {
|
|
if (job.id == null) {
|
|
queue.push(job);
|
|
} else {
|
|
queue.splice(findInsertionIndex(job.id), 0, job);
|
|
}
|
|
queueFlush();
|
|
}
|
|
}
|
|
function queueFlush() {
|
|
if (!isFlushing && !isFlushPending) {
|
|
isFlushPending = true;
|
|
currentFlushPromise = resolvedPromise.then(flushJobs);
|
|
}
|
|
}
|
|
function invalidateJob(job) {
|
|
const i = queue.indexOf(job);
|
|
if (i > flushIndex) {
|
|
queue.splice(i, 1);
|
|
}
|
|
}
|
|
function queuePostFlushCb(cb) {
|
|
if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(cb)) {
|
|
if (!activePostFlushCbs || !activePostFlushCbs.includes(
|
|
cb,
|
|
cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex
|
|
)) {
|
|
pendingPostFlushCbs.push(cb);
|
|
}
|
|
} else {
|
|
pendingPostFlushCbs.push(...cb);
|
|
}
|
|
queueFlush();
|
|
}
|
|
function flushPreFlushCbs(seen, i = isFlushing ? flushIndex + 1 : 0) {
|
|
if (true) {
|
|
seen = seen || /* @__PURE__ */ new Map();
|
|
}
|
|
for (; i < queue.length; i++) {
|
|
const cb = queue[i];
|
|
if (cb && cb.pre) {
|
|
if ( true && checkRecursiveUpdates(seen, cb)) {
|
|
continue;
|
|
}
|
|
queue.splice(i, 1);
|
|
i--;
|
|
cb();
|
|
}
|
|
}
|
|
}
|
|
function flushPostFlushCbs(seen) {
|
|
if (pendingPostFlushCbs.length) {
|
|
const deduped = [...new Set(pendingPostFlushCbs)];
|
|
pendingPostFlushCbs.length = 0;
|
|
if (activePostFlushCbs) {
|
|
activePostFlushCbs.push(...deduped);
|
|
return;
|
|
}
|
|
activePostFlushCbs = deduped;
|
|
if (true) {
|
|
seen = seen || /* @__PURE__ */ new Map();
|
|
}
|
|
activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
|
|
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
|
|
if ( true && checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {
|
|
continue;
|
|
}
|
|
activePostFlushCbs[postFlushIndex]();
|
|
}
|
|
activePostFlushCbs = null;
|
|
postFlushIndex = 0;
|
|
}
|
|
}
|
|
const getId = (job) => job.id == null ? Infinity : job.id;
|
|
const comparator = (a, b) => {
|
|
const diff = getId(a) - getId(b);
|
|
if (diff === 0) {
|
|
if (a.pre && !b.pre)
|
|
return -1;
|
|
if (b.pre && !a.pre)
|
|
return 1;
|
|
}
|
|
return diff;
|
|
};
|
|
function flushJobs(seen) {
|
|
isFlushPending = false;
|
|
isFlushing = true;
|
|
if (true) {
|
|
seen = seen || /* @__PURE__ */ new Map();
|
|
}
|
|
queue.sort(comparator);
|
|
const check = true ? (job) => checkRecursiveUpdates(seen, job) : 0;
|
|
try {
|
|
for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
|
|
const job = queue[flushIndex];
|
|
if (job && job.active !== false) {
|
|
if ( true && check(job)) {
|
|
continue;
|
|
}
|
|
callWithErrorHandling(job, null, 14);
|
|
}
|
|
}
|
|
} finally {
|
|
flushIndex = 0;
|
|
queue.length = 0;
|
|
flushPostFlushCbs(seen);
|
|
isFlushing = false;
|
|
currentFlushPromise = null;
|
|
if (queue.length || pendingPostFlushCbs.length) {
|
|
flushJobs(seen);
|
|
}
|
|
}
|
|
}
|
|
function checkRecursiveUpdates(seen, fn) {
|
|
if (!seen.has(fn)) {
|
|
seen.set(fn, 1);
|
|
} else {
|
|
const count = seen.get(fn);
|
|
if (count > RECURSION_LIMIT) {
|
|
const instance = fn.ownerInstance;
|
|
const componentName = instance && getComponentName(instance.type);
|
|
warn(
|
|
`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`
|
|
);
|
|
return true;
|
|
} else {
|
|
seen.set(fn, count + 1);
|
|
}
|
|
}
|
|
}
|
|
|
|
let isHmrUpdating = false;
|
|
const hmrDirtyComponents = /* @__PURE__ */ new Set();
|
|
if (true) {
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.getGlobalThis)().__VUE_HMR_RUNTIME__ = {
|
|
createRecord: tryWrap(createRecord),
|
|
rerender: tryWrap(rerender),
|
|
reload: tryWrap(reload)
|
|
};
|
|
}
|
|
const map = /* @__PURE__ */ new Map();
|
|
function registerHMR(instance) {
|
|
const id = instance.type.__hmrId;
|
|
let record = map.get(id);
|
|
if (!record) {
|
|
createRecord(id, instance.type);
|
|
record = map.get(id);
|
|
}
|
|
record.instances.add(instance);
|
|
}
|
|
function unregisterHMR(instance) {
|
|
map.get(instance.type.__hmrId).instances.delete(instance);
|
|
}
|
|
function createRecord(id, initialDef) {
|
|
if (map.has(id)) {
|
|
return false;
|
|
}
|
|
map.set(id, {
|
|
initialDef: normalizeClassComponent(initialDef),
|
|
instances: /* @__PURE__ */ new Set()
|
|
});
|
|
return true;
|
|
}
|
|
function normalizeClassComponent(component) {
|
|
return isClassComponent(component) ? component.__vccOpts : component;
|
|
}
|
|
function rerender(id, newRender) {
|
|
const record = map.get(id);
|
|
if (!record) {
|
|
return;
|
|
}
|
|
record.initialDef.render = newRender;
|
|
[...record.instances].forEach((instance) => {
|
|
if (newRender) {
|
|
instance.render = newRender;
|
|
normalizeClassComponent(instance.type).render = newRender;
|
|
}
|
|
instance.renderCache = [];
|
|
isHmrUpdating = true;
|
|
instance.update();
|
|
isHmrUpdating = false;
|
|
});
|
|
}
|
|
function reload(id, newComp) {
|
|
const record = map.get(id);
|
|
if (!record)
|
|
return;
|
|
newComp = normalizeClassComponent(newComp);
|
|
updateComponentDef(record.initialDef, newComp);
|
|
const instances = [...record.instances];
|
|
for (const instance of instances) {
|
|
const oldComp = normalizeClassComponent(instance.type);
|
|
if (!hmrDirtyComponents.has(oldComp)) {
|
|
if (oldComp !== record.initialDef) {
|
|
updateComponentDef(oldComp, newComp);
|
|
}
|
|
hmrDirtyComponents.add(oldComp);
|
|
}
|
|
instance.appContext.propsCache.delete(instance.type);
|
|
instance.appContext.emitsCache.delete(instance.type);
|
|
instance.appContext.optionsCache.delete(instance.type);
|
|
if (instance.ceReload) {
|
|
hmrDirtyComponents.add(oldComp);
|
|
instance.ceReload(newComp.styles);
|
|
hmrDirtyComponents.delete(oldComp);
|
|
} else if (instance.parent) {
|
|
queueJob(instance.parent.update);
|
|
} else if (instance.appContext.reload) {
|
|
instance.appContext.reload();
|
|
} else if (typeof window !== "undefined") {
|
|
window.location.reload();
|
|
} else {
|
|
console.warn(
|
|
"[HMR] Root or manually mounted instance modified. Full reload required."
|
|
);
|
|
}
|
|
}
|
|
queuePostFlushCb(() => {
|
|
for (const instance of instances) {
|
|
hmrDirtyComponents.delete(
|
|
normalizeClassComponent(instance.type)
|
|
);
|
|
}
|
|
});
|
|
}
|
|
function updateComponentDef(oldComp, newComp) {
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(oldComp, newComp);
|
|
for (const key in oldComp) {
|
|
if (key !== "__file" && !(key in newComp)) {
|
|
delete oldComp[key];
|
|
}
|
|
}
|
|
}
|
|
function tryWrap(fn) {
|
|
return (id, arg) => {
|
|
try {
|
|
return fn(id, arg);
|
|
} catch (e) {
|
|
console.error(e);
|
|
console.warn(
|
|
`[HMR] Something went wrong during Vue component hot-reload. Full reload required.`
|
|
);
|
|
}
|
|
};
|
|
}
|
|
|
|
let devtools;
|
|
let buffer = [];
|
|
let devtoolsNotInstalled = false;
|
|
function emit$1(event, ...args) {
|
|
if (devtools) {
|
|
devtools.emit(event, ...args);
|
|
} else if (!devtoolsNotInstalled) {
|
|
buffer.push({ event, args });
|
|
}
|
|
}
|
|
function setDevtoolsHook(hook, target) {
|
|
var _a, _b;
|
|
devtools = hook;
|
|
if (devtools) {
|
|
devtools.enabled = true;
|
|
buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
|
|
buffer = [];
|
|
} else if (
|
|
// handle late devtools injection - only do this if we are in an actual
|
|
// browser environment to avoid the timer handle stalling test runner exit
|
|
// (#4815)
|
|
typeof window !== "undefined" && // some envs mock window but not fully
|
|
window.HTMLElement && // also exclude jsdom
|
|
!((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom"))
|
|
) {
|
|
const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
|
|
replay.push((newHook) => {
|
|
setDevtoolsHook(newHook, target);
|
|
});
|
|
setTimeout(() => {
|
|
if (!devtools) {
|
|
target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
|
|
devtoolsNotInstalled = true;
|
|
buffer = [];
|
|
}
|
|
}, 3e3);
|
|
} else {
|
|
devtoolsNotInstalled = true;
|
|
buffer = [];
|
|
}
|
|
}
|
|
function devtoolsInitApp(app, version) {
|
|
emit$1("app:init" /* APP_INIT */, app, version, {
|
|
Fragment,
|
|
Text,
|
|
Comment,
|
|
Static
|
|
});
|
|
}
|
|
function devtoolsUnmountApp(app) {
|
|
emit$1("app:unmount" /* APP_UNMOUNT */, app);
|
|
}
|
|
const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook(
|
|
"component:added" /* COMPONENT_ADDED */
|
|
);
|
|
const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */);
|
|
const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(
|
|
"component:removed" /* COMPONENT_REMOVED */
|
|
);
|
|
const devtoolsComponentRemoved = (component) => {
|
|
if (devtools && typeof devtools.cleanupBuffer === "function" && // remove the component if it wasn't buffered
|
|
!devtools.cleanupBuffer(component)) {
|
|
_devtoolsComponentRemoved(component);
|
|
}
|
|
};
|
|
function createDevtoolsComponentHook(hook) {
|
|
return (component) => {
|
|
emit$1(
|
|
hook,
|
|
component.appContext.app,
|
|
component.uid,
|
|
component.parent ? component.parent.uid : void 0,
|
|
component
|
|
);
|
|
};
|
|
}
|
|
const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook(
|
|
"perf:start" /* PERFORMANCE_START */
|
|
);
|
|
const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(
|
|
"perf:end" /* PERFORMANCE_END */
|
|
);
|
|
function createDevtoolsPerformanceHook(hook) {
|
|
return (component, type, time) => {
|
|
emit$1(hook, component.appContext.app, component.uid, component, type, time);
|
|
};
|
|
}
|
|
function devtoolsComponentEmit(component, event, params) {
|
|
emit$1(
|
|
"component:emit" /* COMPONENT_EMIT */,
|
|
component.appContext.app,
|
|
component,
|
|
event,
|
|
params
|
|
);
|
|
}
|
|
|
|
function emit(instance, event, ...rawArgs) {
|
|
if (instance.isUnmounted)
|
|
return;
|
|
const props = instance.vnode.props || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ;
|
|
if (true) {
|
|
const {
|
|
emitsOptions,
|
|
propsOptions: [propsOptions]
|
|
} = instance;
|
|
if (emitsOptions) {
|
|
if (!(event in emitsOptions) && true) {
|
|
if (!propsOptions || !((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)(event) in propsOptions)) {
|
|
warn(
|
|
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)(event)}" prop.`
|
|
);
|
|
}
|
|
} else {
|
|
const validator = emitsOptions[event];
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(validator)) {
|
|
const isValid = validator(...rawArgs);
|
|
if (!isValid) {
|
|
warn(
|
|
`Invalid event arguments: event validation failed for event "${event}".`
|
|
);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let args = rawArgs;
|
|
const isModelListener = event.startsWith("update:");
|
|
const modelArg = isModelListener && event.slice(7);
|
|
if (modelArg && modelArg in props) {
|
|
const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`;
|
|
const { number, trim } = props[modifiersKey] || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ;
|
|
if (trim) {
|
|
args = rawArgs.map((a) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(a) ? a.trim() : a);
|
|
}
|
|
if (number) {
|
|
args = rawArgs.map(_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseToNumber);
|
|
}
|
|
}
|
|
if (true) {
|
|
devtoolsComponentEmit(instance, event, args);
|
|
}
|
|
if (true) {
|
|
const lowerCaseEvent = event.toLowerCase();
|
|
if (lowerCaseEvent !== event && props[(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)(lowerCaseEvent)]) {
|
|
warn(
|
|
`Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(
|
|
instance,
|
|
instance.type
|
|
)} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(event)}" instead of "${event}".`
|
|
);
|
|
}
|
|
}
|
|
let handlerName;
|
|
let handler = props[handlerName = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)(event)] || // also try camelCase event handler (#2249)
|
|
props[handlerName = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(event))];
|
|
if (!handler && isModelListener) {
|
|
handler = props[handlerName = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(event))];
|
|
}
|
|
if (handler) {
|
|
callWithAsyncErrorHandling(
|
|
handler,
|
|
instance,
|
|
6,
|
|
args
|
|
);
|
|
}
|
|
const onceHandler = props[handlerName + `Once`];
|
|
if (onceHandler) {
|
|
if (!instance.emitted) {
|
|
instance.emitted = {};
|
|
} else if (instance.emitted[handlerName]) {
|
|
return;
|
|
}
|
|
instance.emitted[handlerName] = true;
|
|
callWithAsyncErrorHandling(
|
|
onceHandler,
|
|
instance,
|
|
6,
|
|
args
|
|
);
|
|
}
|
|
}
|
|
function normalizeEmitsOptions(comp, appContext, asMixin = false) {
|
|
const cache = appContext.emitsCache;
|
|
const cached = cache.get(comp);
|
|
if (cached !== void 0) {
|
|
return cached;
|
|
}
|
|
const raw = comp.emits;
|
|
let normalized = {};
|
|
let hasExtends = false;
|
|
if ( true && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(comp)) {
|
|
const extendEmits = (raw2) => {
|
|
const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
|
|
if (normalizedFromExtend) {
|
|
hasExtends = true;
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(normalized, normalizedFromExtend);
|
|
}
|
|
};
|
|
if (!asMixin && appContext.mixins.length) {
|
|
appContext.mixins.forEach(extendEmits);
|
|
}
|
|
if (comp.extends) {
|
|
extendEmits(comp.extends);
|
|
}
|
|
if (comp.mixins) {
|
|
comp.mixins.forEach(extendEmits);
|
|
}
|
|
}
|
|
if (!raw && !hasExtends) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(comp)) {
|
|
cache.set(comp, null);
|
|
}
|
|
return null;
|
|
}
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(raw)) {
|
|
raw.forEach((key) => normalized[key] = null);
|
|
} else {
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(normalized, raw);
|
|
}
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(comp)) {
|
|
cache.set(comp, normalized);
|
|
}
|
|
return normalized;
|
|
}
|
|
function isEmitListener(options, key) {
|
|
if (!options || !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isOn)(key)) {
|
|
return false;
|
|
}
|
|
key = key.slice(2).replace(/Once$/, "");
|
|
return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(options, key[0].toLowerCase() + key.slice(1)) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(options, (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(key)) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(options, key);
|
|
}
|
|
|
|
let currentRenderingInstance = null;
|
|
let currentScopeId = null;
|
|
function setCurrentRenderingInstance(instance) {
|
|
const prev = currentRenderingInstance;
|
|
currentRenderingInstance = instance;
|
|
currentScopeId = instance && instance.type.__scopeId || null;
|
|
return prev;
|
|
}
|
|
function pushScopeId(id) {
|
|
currentScopeId = id;
|
|
}
|
|
function popScopeId() {
|
|
currentScopeId = null;
|
|
}
|
|
const withScopeId = (_id) => withCtx;
|
|
function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
|
|
if (!ctx)
|
|
return fn;
|
|
if (fn._n) {
|
|
return fn;
|
|
}
|
|
const renderFnWithContext = (...args) => {
|
|
if (renderFnWithContext._d) {
|
|
setBlockTracking(-1);
|
|
}
|
|
const prevInstance = setCurrentRenderingInstance(ctx);
|
|
let res;
|
|
try {
|
|
res = fn(...args);
|
|
} finally {
|
|
setCurrentRenderingInstance(prevInstance);
|
|
if (renderFnWithContext._d) {
|
|
setBlockTracking(1);
|
|
}
|
|
}
|
|
if (true) {
|
|
devtoolsComponentUpdated(ctx);
|
|
}
|
|
return res;
|
|
};
|
|
renderFnWithContext._n = true;
|
|
renderFnWithContext._c = true;
|
|
renderFnWithContext._d = true;
|
|
return renderFnWithContext;
|
|
}
|
|
|
|
let accessedAttrs = false;
|
|
function markAttrsAccessed() {
|
|
accessedAttrs = true;
|
|
}
|
|
function renderComponentRoot(instance) {
|
|
const {
|
|
type: Component,
|
|
vnode,
|
|
proxy,
|
|
withProxy,
|
|
props,
|
|
propsOptions: [propsOptions],
|
|
slots,
|
|
attrs,
|
|
emit,
|
|
render,
|
|
renderCache,
|
|
data,
|
|
setupState,
|
|
ctx,
|
|
inheritAttrs
|
|
} = instance;
|
|
let result;
|
|
let fallthroughAttrs;
|
|
const prev = setCurrentRenderingInstance(instance);
|
|
if (true) {
|
|
accessedAttrs = false;
|
|
}
|
|
try {
|
|
if (vnode.shapeFlag & 4) {
|
|
const proxyToUse = withProxy || proxy;
|
|
result = normalizeVNode(
|
|
render.call(
|
|
proxyToUse,
|
|
proxyToUse,
|
|
renderCache,
|
|
props,
|
|
setupState,
|
|
data,
|
|
ctx
|
|
)
|
|
);
|
|
fallthroughAttrs = attrs;
|
|
} else {
|
|
const render2 = Component;
|
|
if ( true && attrs === props) {
|
|
markAttrsAccessed();
|
|
}
|
|
result = normalizeVNode(
|
|
render2.length > 1 ? render2(
|
|
props,
|
|
true ? {
|
|
get attrs() {
|
|
markAttrsAccessed();
|
|
return attrs;
|
|
},
|
|
slots,
|
|
emit
|
|
} : 0
|
|
) : render2(
|
|
props,
|
|
null
|
|
/* we know it doesn't need it */
|
|
)
|
|
);
|
|
fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
|
|
}
|
|
} catch (err) {
|
|
blockStack.length = 0;
|
|
handleError(err, instance, 1);
|
|
result = createVNode(Comment);
|
|
}
|
|
let root = result;
|
|
let setRoot = void 0;
|
|
if ( true && result.patchFlag > 0 && result.patchFlag & 2048) {
|
|
[root, setRoot] = getChildRoot(result);
|
|
}
|
|
if (fallthroughAttrs && inheritAttrs !== false) {
|
|
const keys = Object.keys(fallthroughAttrs);
|
|
const { shapeFlag } = root;
|
|
if (keys.length) {
|
|
if (shapeFlag & (1 | 6)) {
|
|
if (propsOptions && keys.some(_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isModelListener)) {
|
|
fallthroughAttrs = filterModelListeners(
|
|
fallthroughAttrs,
|
|
propsOptions
|
|
);
|
|
}
|
|
root = cloneVNode(root, fallthroughAttrs);
|
|
} else if ( true && !accessedAttrs && root.type !== Comment) {
|
|
const allAttrs = Object.keys(attrs);
|
|
const eventAttrs = [];
|
|
const extraAttrs = [];
|
|
for (let i = 0, l = allAttrs.length; i < l; i++) {
|
|
const key = allAttrs[i];
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isOn)(key)) {
|
|
if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isModelListener)(key)) {
|
|
eventAttrs.push(key[2].toLowerCase() + key.slice(3));
|
|
}
|
|
} else {
|
|
extraAttrs.push(key);
|
|
}
|
|
}
|
|
if (extraAttrs.length) {
|
|
warn(
|
|
`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
|
|
);
|
|
}
|
|
if (eventAttrs.length) {
|
|
warn(
|
|
`Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`
|
|
);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (vnode.dirs) {
|
|
if ( true && !isElementRoot(root)) {
|
|
warn(
|
|
`Runtime directive used on component with non-element root node. The directives will not function as intended.`
|
|
);
|
|
}
|
|
root = cloneVNode(root);
|
|
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
}
|
|
if (vnode.transition) {
|
|
if ( true && !isElementRoot(root)) {
|
|
warn(
|
|
`Component inside <Transition> renders non-element root node that cannot be animated.`
|
|
);
|
|
}
|
|
root.transition = vnode.transition;
|
|
}
|
|
if ( true && setRoot) {
|
|
setRoot(root);
|
|
} else {
|
|
result = root;
|
|
}
|
|
setCurrentRenderingInstance(prev);
|
|
return result;
|
|
}
|
|
const getChildRoot = (vnode) => {
|
|
const rawChildren = vnode.children;
|
|
const dynamicChildren = vnode.dynamicChildren;
|
|
const childRoot = filterSingleRoot(rawChildren);
|
|
if (!childRoot) {
|
|
return [vnode, void 0];
|
|
}
|
|
const index = rawChildren.indexOf(childRoot);
|
|
const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
|
|
const setRoot = (updatedRoot) => {
|
|
rawChildren[index] = updatedRoot;
|
|
if (dynamicChildren) {
|
|
if (dynamicIndex > -1) {
|
|
dynamicChildren[dynamicIndex] = updatedRoot;
|
|
} else if (updatedRoot.patchFlag > 0) {
|
|
vnode.dynamicChildren = [...dynamicChildren, updatedRoot];
|
|
}
|
|
}
|
|
};
|
|
return [normalizeVNode(childRoot), setRoot];
|
|
};
|
|
function filterSingleRoot(children) {
|
|
let singleRoot;
|
|
for (let i = 0; i < children.length; i++) {
|
|
const child = children[i];
|
|
if (isVNode(child)) {
|
|
if (child.type !== Comment || child.children === "v-if") {
|
|
if (singleRoot) {
|
|
return;
|
|
} else {
|
|
singleRoot = child;
|
|
}
|
|
}
|
|
} else {
|
|
return;
|
|
}
|
|
}
|
|
return singleRoot;
|
|
}
|
|
const getFunctionalFallthrough = (attrs) => {
|
|
let res;
|
|
for (const key in attrs) {
|
|
if (key === "class" || key === "style" || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isOn)(key)) {
|
|
(res || (res = {}))[key] = attrs[key];
|
|
}
|
|
}
|
|
return res;
|
|
};
|
|
const filterModelListeners = (attrs, props) => {
|
|
const res = {};
|
|
for (const key in attrs) {
|
|
if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isModelListener)(key) || !(key.slice(9) in props)) {
|
|
res[key] = attrs[key];
|
|
}
|
|
}
|
|
return res;
|
|
};
|
|
const isElementRoot = (vnode) => {
|
|
return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;
|
|
};
|
|
function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
|
|
const { props: prevProps, children: prevChildren, component } = prevVNode;
|
|
const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
|
|
const emits = component.emitsOptions;
|
|
if ( true && (prevChildren || nextChildren) && isHmrUpdating) {
|
|
return true;
|
|
}
|
|
if (nextVNode.dirs || nextVNode.transition) {
|
|
return true;
|
|
}
|
|
if (optimized && patchFlag >= 0) {
|
|
if (patchFlag & 1024) {
|
|
return true;
|
|
}
|
|
if (patchFlag & 16) {
|
|
if (!prevProps) {
|
|
return !!nextProps;
|
|
}
|
|
return hasPropsChanged(prevProps, nextProps, emits);
|
|
} else if (patchFlag & 8) {
|
|
const dynamicProps = nextVNode.dynamicProps;
|
|
for (let i = 0; i < dynamicProps.length; i++) {
|
|
const key = dynamicProps[i];
|
|
if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
if (prevChildren || nextChildren) {
|
|
if (!nextChildren || !nextChildren.$stable) {
|
|
return true;
|
|
}
|
|
}
|
|
if (prevProps === nextProps) {
|
|
return false;
|
|
}
|
|
if (!prevProps) {
|
|
return !!nextProps;
|
|
}
|
|
if (!nextProps) {
|
|
return true;
|
|
}
|
|
return hasPropsChanged(prevProps, nextProps, emits);
|
|
}
|
|
return false;
|
|
}
|
|
function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
const nextKeys = Object.keys(nextProps);
|
|
if (nextKeys.length !== Object.keys(prevProps).length) {
|
|
return true;
|
|
}
|
|
for (let i = 0; i < nextKeys.length; i++) {
|
|
const key = nextKeys[i];
|
|
if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
function updateHOCHostEl({ vnode, parent }, el) {
|
|
while (parent && parent.subTree === vnode) {
|
|
(vnode = parent.vnode).el = el;
|
|
parent = parent.parent;
|
|
}
|
|
}
|
|
|
|
const isSuspense = (type) => type.__isSuspense;
|
|
const SuspenseImpl = {
|
|
name: "Suspense",
|
|
// In order to make Suspense tree-shakable, we need to avoid importing it
|
|
// directly in the renderer. The renderer checks for the __isSuspense flag
|
|
// on a vnode's type and calls the `process` method, passing in renderer
|
|
// internals.
|
|
__isSuspense: true,
|
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {
|
|
if (n1 == null) {
|
|
mountSuspense(
|
|
n2,
|
|
container,
|
|
anchor,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized,
|
|
rendererInternals
|
|
);
|
|
} else {
|
|
patchSuspense(
|
|
n1,
|
|
n2,
|
|
container,
|
|
anchor,
|
|
parentComponent,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized,
|
|
rendererInternals
|
|
);
|
|
}
|
|
},
|
|
hydrate: hydrateSuspense,
|
|
create: createSuspenseBoundary,
|
|
normalize: normalizeSuspenseChildren
|
|
};
|
|
const Suspense = SuspenseImpl ;
|
|
function triggerEvent(vnode, name) {
|
|
const eventListener = vnode.props && vnode.props[name];
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(eventListener)) {
|
|
eventListener();
|
|
}
|
|
}
|
|
function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {
|
|
const {
|
|
p: patch,
|
|
o: { createElement }
|
|
} = rendererInternals;
|
|
const hiddenContainer = createElement("div");
|
|
const suspense = vnode.suspense = createSuspenseBoundary(
|
|
vnode,
|
|
parentSuspense,
|
|
parentComponent,
|
|
container,
|
|
hiddenContainer,
|
|
anchor,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized,
|
|
rendererInternals
|
|
);
|
|
patch(
|
|
null,
|
|
suspense.pendingBranch = vnode.ssContent,
|
|
hiddenContainer,
|
|
null,
|
|
parentComponent,
|
|
suspense,
|
|
isSVG,
|
|
slotScopeIds
|
|
);
|
|
if (suspense.deps > 0) {
|
|
triggerEvent(vnode, "onPending");
|
|
triggerEvent(vnode, "onFallback");
|
|
patch(
|
|
null,
|
|
vnode.ssFallback,
|
|
container,
|
|
anchor,
|
|
parentComponent,
|
|
null,
|
|
// fallback tree will not have suspense context
|
|
isSVG,
|
|
slotScopeIds
|
|
);
|
|
setActiveBranch(suspense, vnode.ssFallback);
|
|
} else {
|
|
suspense.resolve(false, true);
|
|
}
|
|
}
|
|
function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
|
|
const suspense = n2.suspense = n1.suspense;
|
|
suspense.vnode = n2;
|
|
n2.el = n1.el;
|
|
const newBranch = n2.ssContent;
|
|
const newFallback = n2.ssFallback;
|
|
const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
|
|
if (pendingBranch) {
|
|
suspense.pendingBranch = newBranch;
|
|
if (isSameVNodeType(newBranch, pendingBranch)) {
|
|
patch(
|
|
pendingBranch,
|
|
newBranch,
|
|
suspense.hiddenContainer,
|
|
null,
|
|
parentComponent,
|
|
suspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
if (suspense.deps <= 0) {
|
|
suspense.resolve();
|
|
} else if (isInFallback) {
|
|
patch(
|
|
activeBranch,
|
|
newFallback,
|
|
container,
|
|
anchor,
|
|
parentComponent,
|
|
null,
|
|
// fallback tree will not have suspense context
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
setActiveBranch(suspense, newFallback);
|
|
}
|
|
} else {
|
|
suspense.pendingId++;
|
|
if (isHydrating) {
|
|
suspense.isHydrating = false;
|
|
suspense.activeBranch = pendingBranch;
|
|
} else {
|
|
unmount(pendingBranch, parentComponent, suspense);
|
|
}
|
|
suspense.deps = 0;
|
|
suspense.effects.length = 0;
|
|
suspense.hiddenContainer = createElement("div");
|
|
if (isInFallback) {
|
|
patch(
|
|
null,
|
|
newBranch,
|
|
suspense.hiddenContainer,
|
|
null,
|
|
parentComponent,
|
|
suspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
if (suspense.deps <= 0) {
|
|
suspense.resolve();
|
|
} else {
|
|
patch(
|
|
activeBranch,
|
|
newFallback,
|
|
container,
|
|
anchor,
|
|
parentComponent,
|
|
null,
|
|
// fallback tree will not have suspense context
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
setActiveBranch(suspense, newFallback);
|
|
}
|
|
} else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
|
|
patch(
|
|
activeBranch,
|
|
newBranch,
|
|
container,
|
|
anchor,
|
|
parentComponent,
|
|
suspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
suspense.resolve(true);
|
|
} else {
|
|
patch(
|
|
null,
|
|
newBranch,
|
|
suspense.hiddenContainer,
|
|
null,
|
|
parentComponent,
|
|
suspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
if (suspense.deps <= 0) {
|
|
suspense.resolve();
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
|
|
patch(
|
|
activeBranch,
|
|
newBranch,
|
|
container,
|
|
anchor,
|
|
parentComponent,
|
|
suspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
setActiveBranch(suspense, newBranch);
|
|
} else {
|
|
triggerEvent(n2, "onPending");
|
|
suspense.pendingBranch = newBranch;
|
|
suspense.pendingId++;
|
|
patch(
|
|
null,
|
|
newBranch,
|
|
suspense.hiddenContainer,
|
|
null,
|
|
parentComponent,
|
|
suspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
if (suspense.deps <= 0) {
|
|
suspense.resolve();
|
|
} else {
|
|
const { timeout, pendingId } = suspense;
|
|
if (timeout > 0) {
|
|
setTimeout(() => {
|
|
if (suspense.pendingId === pendingId) {
|
|
suspense.fallback(newFallback);
|
|
}
|
|
}, timeout);
|
|
} else if (timeout === 0) {
|
|
suspense.fallback(newFallback);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let hasWarned = false;
|
|
function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
|
|
if ( true && !hasWarned) {
|
|
hasWarned = true;
|
|
console[console.info ? "info" : "log"](
|
|
`<Suspense> is an experimental feature and its API will likely change.`
|
|
);
|
|
}
|
|
const {
|
|
p: patch,
|
|
m: move,
|
|
um: unmount,
|
|
n: next,
|
|
o: { parentNode, remove }
|
|
} = rendererInternals;
|
|
let parentSuspenseId;
|
|
const isSuspensible = isVNodeSuspensible(vnode);
|
|
if (isSuspensible) {
|
|
if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {
|
|
parentSuspenseId = parentSuspense.pendingId;
|
|
parentSuspense.deps++;
|
|
}
|
|
}
|
|
const timeout = vnode.props ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toNumber)(vnode.props.timeout) : void 0;
|
|
if (true) {
|
|
assertNumber(timeout, `Suspense timeout`);
|
|
}
|
|
const suspense = {
|
|
vnode,
|
|
parent: parentSuspense,
|
|
parentComponent,
|
|
isSVG,
|
|
container,
|
|
hiddenContainer,
|
|
anchor,
|
|
deps: 0,
|
|
pendingId: 0,
|
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
activeBranch: null,
|
|
pendingBranch: null,
|
|
isInFallback: true,
|
|
isHydrating,
|
|
isUnmounted: false,
|
|
effects: [],
|
|
resolve(resume = false, sync = false) {
|
|
if (true) {
|
|
if (!resume && !suspense.pendingBranch) {
|
|
throw new Error(
|
|
`suspense.resolve() is called without a pending branch.`
|
|
);
|
|
}
|
|
if (suspense.isUnmounted) {
|
|
throw new Error(
|
|
`suspense.resolve() is called on an already unmounted suspense boundary.`
|
|
);
|
|
}
|
|
}
|
|
const {
|
|
vnode: vnode2,
|
|
activeBranch,
|
|
pendingBranch,
|
|
pendingId,
|
|
effects,
|
|
parentComponent: parentComponent2,
|
|
container: container2
|
|
} = suspense;
|
|
if (suspense.isHydrating) {
|
|
suspense.isHydrating = false;
|
|
} else if (!resume) {
|
|
const delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
|
|
if (delayEnter) {
|
|
activeBranch.transition.afterLeave = () => {
|
|
if (pendingId === suspense.pendingId) {
|
|
move(pendingBranch, container2, anchor2, 0);
|
|
}
|
|
};
|
|
}
|
|
let { anchor: anchor2 } = suspense;
|
|
if (activeBranch) {
|
|
anchor2 = next(activeBranch);
|
|
unmount(activeBranch, parentComponent2, suspense, true);
|
|
}
|
|
if (!delayEnter) {
|
|
move(pendingBranch, container2, anchor2, 0);
|
|
}
|
|
}
|
|
setActiveBranch(suspense, pendingBranch);
|
|
suspense.pendingBranch = null;
|
|
suspense.isInFallback = false;
|
|
let parent = suspense.parent;
|
|
let hasUnresolvedAncestor = false;
|
|
while (parent) {
|
|
if (parent.pendingBranch) {
|
|
parent.effects.push(...effects);
|
|
hasUnresolvedAncestor = true;
|
|
break;
|
|
}
|
|
parent = parent.parent;
|
|
}
|
|
if (!hasUnresolvedAncestor) {
|
|
queuePostFlushCb(effects);
|
|
}
|
|
suspense.effects = [];
|
|
if (isSuspensible) {
|
|
if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
|
|
parentSuspense.deps--;
|
|
if (parentSuspense.deps === 0 && !sync) {
|
|
parentSuspense.resolve();
|
|
}
|
|
}
|
|
}
|
|
triggerEvent(vnode2, "onResolve");
|
|
},
|
|
fallback(fallbackVNode) {
|
|
if (!suspense.pendingBranch) {
|
|
return;
|
|
}
|
|
const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;
|
|
triggerEvent(vnode2, "onFallback");
|
|
const anchor2 = next(activeBranch);
|
|
const mountFallback = () => {
|
|
if (!suspense.isInFallback) {
|
|
return;
|
|
}
|
|
patch(
|
|
null,
|
|
fallbackVNode,
|
|
container2,
|
|
anchor2,
|
|
parentComponent2,
|
|
null,
|
|
// fallback tree will not have suspense context
|
|
isSVG2,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
setActiveBranch(suspense, fallbackVNode);
|
|
};
|
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
if (delayEnter) {
|
|
activeBranch.transition.afterLeave = mountFallback;
|
|
}
|
|
suspense.isInFallback = true;
|
|
unmount(
|
|
activeBranch,
|
|
parentComponent2,
|
|
null,
|
|
// no suspense so unmount hooks fire now
|
|
true
|
|
// shouldRemove
|
|
);
|
|
if (!delayEnter) {
|
|
mountFallback();
|
|
}
|
|
},
|
|
move(container2, anchor2, type) {
|
|
suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);
|
|
suspense.container = container2;
|
|
},
|
|
next() {
|
|
return suspense.activeBranch && next(suspense.activeBranch);
|
|
},
|
|
registerDep(instance, setupRenderEffect) {
|
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
if (isInPendingSuspense) {
|
|
suspense.deps++;
|
|
}
|
|
const hydratedEl = instance.vnode.el;
|
|
instance.asyncDep.catch((err) => {
|
|
handleError(err, instance, 0);
|
|
}).then((asyncSetupResult) => {
|
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
|
|
return;
|
|
}
|
|
instance.asyncResolved = true;
|
|
const { vnode: vnode2 } = instance;
|
|
if (true) {
|
|
pushWarningContext(vnode2);
|
|
}
|
|
handleSetupResult(instance, asyncSetupResult, false);
|
|
if (hydratedEl) {
|
|
vnode2.el = hydratedEl;
|
|
}
|
|
const placeholder = !hydratedEl && instance.subTree.el;
|
|
setupRenderEffect(
|
|
instance,
|
|
vnode2,
|
|
// component may have been moved before resolve.
|
|
// if this is not a hydration, instance.subTree will be the comment
|
|
// placeholder.
|
|
parentNode(hydratedEl || instance.subTree.el),
|
|
// anchor will not be used if this is hydration, so only need to
|
|
// consider the comment placeholder case.
|
|
hydratedEl ? null : next(instance.subTree),
|
|
suspense,
|
|
isSVG,
|
|
optimized
|
|
);
|
|
if (placeholder) {
|
|
remove(placeholder);
|
|
}
|
|
updateHOCHostEl(instance, vnode2.el);
|
|
if (true) {
|
|
popWarningContext();
|
|
}
|
|
if (isInPendingSuspense && --suspense.deps === 0) {
|
|
suspense.resolve();
|
|
}
|
|
});
|
|
},
|
|
unmount(parentSuspense2, doRemove) {
|
|
suspense.isUnmounted = true;
|
|
if (suspense.activeBranch) {
|
|
unmount(
|
|
suspense.activeBranch,
|
|
parentComponent,
|
|
parentSuspense2,
|
|
doRemove
|
|
);
|
|
}
|
|
if (suspense.pendingBranch) {
|
|
unmount(
|
|
suspense.pendingBranch,
|
|
parentComponent,
|
|
parentSuspense2,
|
|
doRemove
|
|
);
|
|
}
|
|
}
|
|
};
|
|
return suspense;
|
|
}
|
|
function hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) {
|
|
const suspense = vnode.suspense = createSuspenseBoundary(
|
|
vnode,
|
|
parentSuspense,
|
|
parentComponent,
|
|
node.parentNode,
|
|
document.createElement("div"),
|
|
null,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized,
|
|
rendererInternals,
|
|
true
|
|
/* hydrating */
|
|
);
|
|
const result = hydrateNode(
|
|
node,
|
|
suspense.pendingBranch = vnode.ssContent,
|
|
parentComponent,
|
|
suspense,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
if (suspense.deps === 0) {
|
|
suspense.resolve(false, true);
|
|
}
|
|
return result;
|
|
}
|
|
function normalizeSuspenseChildren(vnode) {
|
|
const { shapeFlag, children } = vnode;
|
|
const isSlotChildren = shapeFlag & 32;
|
|
vnode.ssContent = normalizeSuspenseSlot(
|
|
isSlotChildren ? children.default : children
|
|
);
|
|
vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);
|
|
}
|
|
function normalizeSuspenseSlot(s) {
|
|
let block;
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(s)) {
|
|
const trackBlock = isBlockTreeEnabled && s._c;
|
|
if (trackBlock) {
|
|
s._d = false;
|
|
openBlock();
|
|
}
|
|
s = s();
|
|
if (trackBlock) {
|
|
s._d = true;
|
|
block = currentBlock;
|
|
closeBlock();
|
|
}
|
|
}
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(s)) {
|
|
const singleChild = filterSingleRoot(s);
|
|
if ( true && !singleChild) {
|
|
warn(`<Suspense> slots expect a single root node.`);
|
|
}
|
|
s = singleChild;
|
|
}
|
|
s = normalizeVNode(s);
|
|
if (block && !s.dynamicChildren) {
|
|
s.dynamicChildren = block.filter((c) => c !== s);
|
|
}
|
|
return s;
|
|
}
|
|
function queueEffectWithSuspense(fn, suspense) {
|
|
if (suspense && suspense.pendingBranch) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(fn)) {
|
|
suspense.effects.push(...fn);
|
|
} else {
|
|
suspense.effects.push(fn);
|
|
}
|
|
} else {
|
|
queuePostFlushCb(fn);
|
|
}
|
|
}
|
|
function setActiveBranch(suspense, branch) {
|
|
suspense.activeBranch = branch;
|
|
const { vnode, parentComponent } = suspense;
|
|
const el = vnode.el = branch.el;
|
|
if (parentComponent && parentComponent.subTree === vnode) {
|
|
parentComponent.vnode.el = el;
|
|
updateHOCHostEl(parentComponent, el);
|
|
}
|
|
}
|
|
function isVNodeSuspensible(vnode) {
|
|
var _a;
|
|
return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
|
|
}
|
|
|
|
function watchEffect(effect, options) {
|
|
return doWatch(effect, null, options);
|
|
}
|
|
function watchPostEffect(effect, options) {
|
|
return doWatch(
|
|
effect,
|
|
null,
|
|
true ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, options, { flush: "post" }) : 0
|
|
);
|
|
}
|
|
function watchSyncEffect(effect, options) {
|
|
return doWatch(
|
|
effect,
|
|
null,
|
|
true ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, options, { flush: "sync" }) : 0
|
|
);
|
|
}
|
|
const INITIAL_WATCHER_VALUE = {};
|
|
function watch(source, cb, options) {
|
|
if ( true && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(cb)) {
|
|
warn(
|
|
`\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`
|
|
);
|
|
}
|
|
return doWatch(source, cb, options);
|
|
}
|
|
function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ) {
|
|
var _a;
|
|
if ( true && !cb) {
|
|
if (immediate !== void 0) {
|
|
warn(
|
|
`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
|
|
);
|
|
}
|
|
if (deep !== void 0) {
|
|
warn(
|
|
`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
|
|
);
|
|
}
|
|
}
|
|
const warnInvalidSource = (s) => {
|
|
warn(
|
|
`Invalid watch source: `,
|
|
s,
|
|
`A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`
|
|
);
|
|
};
|
|
const instance = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.getCurrentScope)() === ((_a = currentInstance) == null ? void 0 : _a.scope) ? currentInstance : null;
|
|
let getter;
|
|
let forceTrigger = false;
|
|
let isMultiSource = false;
|
|
if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(source)) {
|
|
getter = () => source.value;
|
|
forceTrigger = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isShallow)(source);
|
|
} else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReactive)(source)) {
|
|
getter = () => source;
|
|
deep = true;
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(source)) {
|
|
isMultiSource = true;
|
|
forceTrigger = source.some((s) => (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReactive)(s) || (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isShallow)(s));
|
|
getter = () => source.map((s) => {
|
|
if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(s)) {
|
|
return s.value;
|
|
} else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReactive)(s)) {
|
|
return traverse(s);
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(s)) {
|
|
return callWithErrorHandling(s, instance, 2);
|
|
} else {
|
|
true && warnInvalidSource(s);
|
|
}
|
|
});
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(source)) {
|
|
if (cb) {
|
|
getter = () => callWithErrorHandling(source, instance, 2);
|
|
} else {
|
|
getter = () => {
|
|
if (instance && instance.isUnmounted) {
|
|
return;
|
|
}
|
|
if (cleanup) {
|
|
cleanup();
|
|
}
|
|
return callWithAsyncErrorHandling(
|
|
source,
|
|
instance,
|
|
3,
|
|
[onCleanup]
|
|
);
|
|
};
|
|
}
|
|
} else {
|
|
getter = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP;
|
|
true && warnInvalidSource(source);
|
|
}
|
|
if (cb && deep) {
|
|
const baseGetter = getter;
|
|
getter = () => traverse(baseGetter());
|
|
}
|
|
let cleanup;
|
|
let onCleanup = (fn) => {
|
|
cleanup = effect.onStop = () => {
|
|
callWithErrorHandling(fn, instance, 4);
|
|
};
|
|
};
|
|
let ssrCleanup;
|
|
if (isInSSRComponentSetup) {
|
|
onCleanup = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP;
|
|
if (!cb) {
|
|
getter();
|
|
} else if (immediate) {
|
|
callWithAsyncErrorHandling(cb, instance, 3, [
|
|
getter(),
|
|
isMultiSource ? [] : void 0,
|
|
onCleanup
|
|
]);
|
|
}
|
|
if (flush === "sync") {
|
|
const ctx = useSSRContext();
|
|
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
} else {
|
|
return _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP;
|
|
}
|
|
}
|
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
const job = () => {
|
|
if (!effect.active) {
|
|
return;
|
|
}
|
|
if (cb) {
|
|
const newValue = effect.run();
|
|
if (deep || forceTrigger || (isMultiSource ? newValue.some(
|
|
(v, i) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasChanged)(v, oldValue[i])
|
|
) : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasChanged)(newValue, oldValue)) || false) {
|
|
if (cleanup) {
|
|
cleanup();
|
|
}
|
|
callWithAsyncErrorHandling(cb, instance, 3, [
|
|
newValue,
|
|
// pass undefined as the old value when it's changed for the first time
|
|
oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
|
|
onCleanup
|
|
]);
|
|
oldValue = newValue;
|
|
}
|
|
} else {
|
|
effect.run();
|
|
}
|
|
};
|
|
job.allowRecurse = !!cb;
|
|
let scheduler;
|
|
if (flush === "sync") {
|
|
scheduler = job;
|
|
} else if (flush === "post") {
|
|
scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
|
|
} else {
|
|
job.pre = true;
|
|
if (instance)
|
|
job.id = instance.uid;
|
|
scheduler = () => queueJob(job);
|
|
}
|
|
const effect = new _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ReactiveEffect(getter, scheduler);
|
|
if (true) {
|
|
effect.onTrack = onTrack;
|
|
effect.onTrigger = onTrigger;
|
|
}
|
|
if (cb) {
|
|
if (immediate) {
|
|
job();
|
|
} else {
|
|
oldValue = effect.run();
|
|
}
|
|
} else if (flush === "post") {
|
|
queuePostRenderEffect(
|
|
effect.run.bind(effect),
|
|
instance && instance.suspense
|
|
);
|
|
} else {
|
|
effect.run();
|
|
}
|
|
const unwatch = () => {
|
|
effect.stop();
|
|
if (instance && instance.scope) {
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.remove)(instance.scope.effects, effect);
|
|
}
|
|
};
|
|
if (ssrCleanup)
|
|
ssrCleanup.push(unwatch);
|
|
return unwatch;
|
|
}
|
|
function instanceWatch(source, value, options) {
|
|
const publicThis = this.proxy;
|
|
const getter = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
|
|
let cb;
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(value)) {
|
|
cb = value;
|
|
} else {
|
|
cb = value.handler;
|
|
options = value;
|
|
}
|
|
const cur = currentInstance;
|
|
setCurrentInstance(this);
|
|
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
if (cur) {
|
|
setCurrentInstance(cur);
|
|
} else {
|
|
unsetCurrentInstance();
|
|
}
|
|
return res;
|
|
}
|
|
function createPathGetter(ctx, path) {
|
|
const segments = path.split(".");
|
|
return () => {
|
|
let cur = ctx;
|
|
for (let i = 0; i < segments.length && cur; i++) {
|
|
cur = cur[segments[i]];
|
|
}
|
|
return cur;
|
|
};
|
|
}
|
|
function traverse(value, seen) {
|
|
if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(value) || value["__v_skip"]) {
|
|
return value;
|
|
}
|
|
seen = seen || /* @__PURE__ */ new Set();
|
|
if (seen.has(value)) {
|
|
return value;
|
|
}
|
|
seen.add(value);
|
|
if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(value)) {
|
|
traverse(value.value, seen);
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value)) {
|
|
for (let i = 0; i < value.length; i++) {
|
|
traverse(value[i], seen);
|
|
}
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSet)(value) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isMap)(value)) {
|
|
value.forEach((v) => {
|
|
traverse(v, seen);
|
|
});
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isPlainObject)(value)) {
|
|
for (const key in value) {
|
|
traverse(value[key], seen);
|
|
}
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function validateDirectiveName(name) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isBuiltInDirective)(name)) {
|
|
warn("Do not use built-in directive ids as custom directive id: " + name);
|
|
}
|
|
}
|
|
function withDirectives(vnode, directives) {
|
|
const internalInstance = currentRenderingInstance;
|
|
if (internalInstance === null) {
|
|
true && warn(`withDirectives can only be used inside render functions.`);
|
|
return vnode;
|
|
}
|
|
const instance = getExposeProxy(internalInstance) || internalInstance.proxy;
|
|
const bindings = vnode.dirs || (vnode.dirs = []);
|
|
for (let i = 0; i < directives.length; i++) {
|
|
let [dir, value, arg, modifiers = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ] = directives[i];
|
|
if (dir) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(dir)) {
|
|
dir = {
|
|
mounted: dir,
|
|
updated: dir
|
|
};
|
|
}
|
|
if (dir.deep) {
|
|
traverse(value);
|
|
}
|
|
bindings.push({
|
|
dir,
|
|
instance,
|
|
value,
|
|
oldValue: void 0,
|
|
arg,
|
|
modifiers
|
|
});
|
|
}
|
|
}
|
|
return vnode;
|
|
}
|
|
function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
const bindings = vnode.dirs;
|
|
const oldBindings = prevVNode && prevVNode.dirs;
|
|
for (let i = 0; i < bindings.length; i++) {
|
|
const binding = bindings[i];
|
|
if (oldBindings) {
|
|
binding.oldValue = oldBindings[i].value;
|
|
}
|
|
let hook = binding.dir[name];
|
|
if (hook) {
|
|
(0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.pauseTracking)();
|
|
callWithAsyncErrorHandling(hook, instance, 8, [
|
|
vnode.el,
|
|
binding,
|
|
vnode,
|
|
prevVNode
|
|
]);
|
|
(0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.resetTracking)();
|
|
}
|
|
}
|
|
}
|
|
|
|
function useTransitionState() {
|
|
const state = {
|
|
isMounted: false,
|
|
isLeaving: false,
|
|
isUnmounting: false,
|
|
leavingVNodes: /* @__PURE__ */ new Map()
|
|
};
|
|
onMounted(() => {
|
|
state.isMounted = true;
|
|
});
|
|
onBeforeUnmount(() => {
|
|
state.isUnmounting = true;
|
|
});
|
|
return state;
|
|
}
|
|
const TransitionHookValidator = [Function, Array];
|
|
const BaseTransitionPropsValidators = {
|
|
mode: String,
|
|
appear: Boolean,
|
|
persisted: Boolean,
|
|
// enter
|
|
onBeforeEnter: TransitionHookValidator,
|
|
onEnter: TransitionHookValidator,
|
|
onAfterEnter: TransitionHookValidator,
|
|
onEnterCancelled: TransitionHookValidator,
|
|
// leave
|
|
onBeforeLeave: TransitionHookValidator,
|
|
onLeave: TransitionHookValidator,
|
|
onAfterLeave: TransitionHookValidator,
|
|
onLeaveCancelled: TransitionHookValidator,
|
|
// appear
|
|
onBeforeAppear: TransitionHookValidator,
|
|
onAppear: TransitionHookValidator,
|
|
onAfterAppear: TransitionHookValidator,
|
|
onAppearCancelled: TransitionHookValidator
|
|
};
|
|
const BaseTransitionImpl = {
|
|
name: `BaseTransition`,
|
|
props: BaseTransitionPropsValidators,
|
|
setup(props, { slots }) {
|
|
const instance = getCurrentInstance();
|
|
const state = useTransitionState();
|
|
let prevTransitionKey;
|
|
return () => {
|
|
const children = slots.default && getTransitionRawChildren(slots.default(), true);
|
|
if (!children || !children.length) {
|
|
return;
|
|
}
|
|
let child = children[0];
|
|
if (children.length > 1) {
|
|
let hasFound = false;
|
|
for (const c of children) {
|
|
if (c.type !== Comment) {
|
|
if ( true && hasFound) {
|
|
warn(
|
|
"<transition> can only be used on a single element or component. Use <transition-group> for lists."
|
|
);
|
|
break;
|
|
}
|
|
child = c;
|
|
hasFound = true;
|
|
if (false)
|
|
{}
|
|
}
|
|
}
|
|
}
|
|
const rawProps = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(props);
|
|
const { mode } = rawProps;
|
|
if ( true && mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
|
|
warn(`invalid <transition> mode: ${mode}`);
|
|
}
|
|
if (state.isLeaving) {
|
|
return emptyPlaceholder(child);
|
|
}
|
|
const innerChild = getKeepAliveChild(child);
|
|
if (!innerChild) {
|
|
return emptyPlaceholder(child);
|
|
}
|
|
const enterHooks = resolveTransitionHooks(
|
|
innerChild,
|
|
rawProps,
|
|
state,
|
|
instance
|
|
);
|
|
setTransitionHooks(innerChild, enterHooks);
|
|
const oldChild = instance.subTree;
|
|
const oldInnerChild = oldChild && getKeepAliveChild(oldChild);
|
|
let transitionKeyChanged = false;
|
|
const { getTransitionKey } = innerChild.type;
|
|
if (getTransitionKey) {
|
|
const key = getTransitionKey();
|
|
if (prevTransitionKey === void 0) {
|
|
prevTransitionKey = key;
|
|
} else if (key !== prevTransitionKey) {
|
|
prevTransitionKey = key;
|
|
transitionKeyChanged = true;
|
|
}
|
|
}
|
|
if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {
|
|
const leavingHooks = resolveTransitionHooks(
|
|
oldInnerChild,
|
|
rawProps,
|
|
state,
|
|
instance
|
|
);
|
|
setTransitionHooks(oldInnerChild, leavingHooks);
|
|
if (mode === "out-in") {
|
|
state.isLeaving = true;
|
|
leavingHooks.afterLeave = () => {
|
|
state.isLeaving = false;
|
|
if (instance.update.active !== false) {
|
|
instance.update();
|
|
}
|
|
};
|
|
return emptyPlaceholder(child);
|
|
} else if (mode === "in-out" && innerChild.type !== Comment) {
|
|
leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
|
|
const leavingVNodesCache = getLeavingNodesForType(
|
|
state,
|
|
oldInnerChild
|
|
);
|
|
leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
|
|
el._leaveCb = () => {
|
|
earlyRemove();
|
|
el._leaveCb = void 0;
|
|
delete enterHooks.delayedLeave;
|
|
};
|
|
enterHooks.delayedLeave = delayedLeave;
|
|
};
|
|
}
|
|
}
|
|
return child;
|
|
};
|
|
}
|
|
};
|
|
const BaseTransition = BaseTransitionImpl;
|
|
function getLeavingNodesForType(state, vnode) {
|
|
const { leavingVNodes } = state;
|
|
let leavingVNodesCache = leavingVNodes.get(vnode.type);
|
|
if (!leavingVNodesCache) {
|
|
leavingVNodesCache = /* @__PURE__ */ Object.create(null);
|
|
leavingVNodes.set(vnode.type, leavingVNodesCache);
|
|
}
|
|
return leavingVNodesCache;
|
|
}
|
|
function resolveTransitionHooks(vnode, props, state, instance) {
|
|
const {
|
|
appear,
|
|
mode,
|
|
persisted = false,
|
|
onBeforeEnter,
|
|
onEnter,
|
|
onAfterEnter,
|
|
onEnterCancelled,
|
|
onBeforeLeave,
|
|
onLeave,
|
|
onAfterLeave,
|
|
onLeaveCancelled,
|
|
onBeforeAppear,
|
|
onAppear,
|
|
onAfterAppear,
|
|
onAppearCancelled
|
|
} = props;
|
|
const key = String(vnode.key);
|
|
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
const callHook = (hook, args) => {
|
|
hook && callWithAsyncErrorHandling(
|
|
hook,
|
|
instance,
|
|
9,
|
|
args
|
|
);
|
|
};
|
|
const callAsyncHook = (hook, args) => {
|
|
const done = args[1];
|
|
callHook(hook, args);
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(hook)) {
|
|
if (hook.every((hook2) => hook2.length <= 1))
|
|
done();
|
|
} else if (hook.length <= 1) {
|
|
done();
|
|
}
|
|
};
|
|
const hooks = {
|
|
mode,
|
|
persisted,
|
|
beforeEnter(el) {
|
|
let hook = onBeforeEnter;
|
|
if (!state.isMounted) {
|
|
if (appear) {
|
|
hook = onBeforeAppear || onBeforeEnter;
|
|
} else {
|
|
return;
|
|
}
|
|
}
|
|
if (el._leaveCb) {
|
|
el._leaveCb(
|
|
true
|
|
/* cancelled */
|
|
);
|
|
}
|
|
const leavingVNode = leavingVNodesCache[key];
|
|
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el._leaveCb) {
|
|
leavingVNode.el._leaveCb();
|
|
}
|
|
callHook(hook, [el]);
|
|
},
|
|
enter(el) {
|
|
let hook = onEnter;
|
|
let afterHook = onAfterEnter;
|
|
let cancelHook = onEnterCancelled;
|
|
if (!state.isMounted) {
|
|
if (appear) {
|
|
hook = onAppear || onEnter;
|
|
afterHook = onAfterAppear || onAfterEnter;
|
|
cancelHook = onAppearCancelled || onEnterCancelled;
|
|
} else {
|
|
return;
|
|
}
|
|
}
|
|
let called = false;
|
|
const done = el._enterCb = (cancelled) => {
|
|
if (called)
|
|
return;
|
|
called = true;
|
|
if (cancelled) {
|
|
callHook(cancelHook, [el]);
|
|
} else {
|
|
callHook(afterHook, [el]);
|
|
}
|
|
if (hooks.delayedLeave) {
|
|
hooks.delayedLeave();
|
|
}
|
|
el._enterCb = void 0;
|
|
};
|
|
if (hook) {
|
|
callAsyncHook(hook, [el, done]);
|
|
} else {
|
|
done();
|
|
}
|
|
},
|
|
leave(el, remove) {
|
|
const key2 = String(vnode.key);
|
|
if (el._enterCb) {
|
|
el._enterCb(
|
|
true
|
|
/* cancelled */
|
|
);
|
|
}
|
|
if (state.isUnmounting) {
|
|
return remove();
|
|
}
|
|
callHook(onBeforeLeave, [el]);
|
|
let called = false;
|
|
const done = el._leaveCb = (cancelled) => {
|
|
if (called)
|
|
return;
|
|
called = true;
|
|
remove();
|
|
if (cancelled) {
|
|
callHook(onLeaveCancelled, [el]);
|
|
} else {
|
|
callHook(onAfterLeave, [el]);
|
|
}
|
|
el._leaveCb = void 0;
|
|
if (leavingVNodesCache[key2] === vnode) {
|
|
delete leavingVNodesCache[key2];
|
|
}
|
|
};
|
|
leavingVNodesCache[key2] = vnode;
|
|
if (onLeave) {
|
|
callAsyncHook(onLeave, [el, done]);
|
|
} else {
|
|
done();
|
|
}
|
|
},
|
|
clone(vnode2) {
|
|
return resolveTransitionHooks(vnode2, props, state, instance);
|
|
}
|
|
};
|
|
return hooks;
|
|
}
|
|
function emptyPlaceholder(vnode) {
|
|
if (isKeepAlive(vnode)) {
|
|
vnode = cloneVNode(vnode);
|
|
vnode.children = null;
|
|
return vnode;
|
|
}
|
|
}
|
|
function getKeepAliveChild(vnode) {
|
|
return isKeepAlive(vnode) ? vnode.children ? vnode.children[0] : void 0 : vnode;
|
|
}
|
|
function setTransitionHooks(vnode, hooks) {
|
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
setTransitionHooks(vnode.component.subTree, hooks);
|
|
} else if (vnode.shapeFlag & 128) {
|
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
} else {
|
|
vnode.transition = hooks;
|
|
}
|
|
}
|
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
let ret = [];
|
|
let keyedFragmentCount = 0;
|
|
for (let i = 0; i < children.length; i++) {
|
|
let child = children[i];
|
|
const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);
|
|
if (child.type === Fragment) {
|
|
if (child.patchFlag & 128)
|
|
keyedFragmentCount++;
|
|
ret = ret.concat(
|
|
getTransitionRawChildren(child.children, keepComment, key)
|
|
);
|
|
} else if (keepComment || child.type !== Comment) {
|
|
ret.push(key != null ? cloneVNode(child, { key }) : child);
|
|
}
|
|
}
|
|
if (keyedFragmentCount > 1) {
|
|
for (let i = 0; i < ret.length; i++) {
|
|
ret[i].patchFlag = -2;
|
|
}
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
function defineComponent(options, extraOptions) {
|
|
return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(options) ? (
|
|
// #8326: extend call and options.name access are considered side-effects
|
|
// by Rollup, so we have to wrap it in a pure-annotated IIFE.
|
|
/* @__PURE__ */ (() => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({ name: options.name }, extraOptions, { setup: options }))()
|
|
) : options;
|
|
}
|
|
|
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
function defineAsyncComponent(source) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(source)) {
|
|
source = { loader: source };
|
|
}
|
|
const {
|
|
loader,
|
|
loadingComponent,
|
|
errorComponent,
|
|
delay = 200,
|
|
timeout,
|
|
// undefined = never times out
|
|
suspensible = true,
|
|
onError: userOnError
|
|
} = source;
|
|
let pendingRequest = null;
|
|
let resolvedComp;
|
|
let retries = 0;
|
|
const retry = () => {
|
|
retries++;
|
|
pendingRequest = null;
|
|
return load();
|
|
};
|
|
const load = () => {
|
|
let thisRequest;
|
|
return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {
|
|
err = err instanceof Error ? err : new Error(String(err));
|
|
if (userOnError) {
|
|
return new Promise((resolve, reject) => {
|
|
const userRetry = () => resolve(retry());
|
|
const userFail = () => reject(err);
|
|
userOnError(err, userRetry, userFail, retries + 1);
|
|
});
|
|
} else {
|
|
throw err;
|
|
}
|
|
}).then((comp) => {
|
|
if (thisRequest !== pendingRequest && pendingRequest) {
|
|
return pendingRequest;
|
|
}
|
|
if ( true && !comp) {
|
|
warn(
|
|
`Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`
|
|
);
|
|
}
|
|
if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) {
|
|
comp = comp.default;
|
|
}
|
|
if ( true && comp && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(comp) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(comp)) {
|
|
throw new Error(`Invalid async component load result: ${comp}`);
|
|
}
|
|
resolvedComp = comp;
|
|
return comp;
|
|
}));
|
|
};
|
|
return defineComponent({
|
|
name: "AsyncComponentWrapper",
|
|
__asyncLoader: load,
|
|
get __asyncResolved() {
|
|
return resolvedComp;
|
|
},
|
|
setup() {
|
|
const instance = currentInstance;
|
|
if (resolvedComp) {
|
|
return () => createInnerComp(resolvedComp, instance);
|
|
}
|
|
const onError = (err) => {
|
|
pendingRequest = null;
|
|
handleError(
|
|
err,
|
|
instance,
|
|
13,
|
|
!errorComponent
|
|
/* do not throw in dev if user provided error component */
|
|
);
|
|
};
|
|
if (suspensible && instance.suspense || isInSSRComponentSetup) {
|
|
return load().then((comp) => {
|
|
return () => createInnerComp(comp, instance);
|
|
}).catch((err) => {
|
|
onError(err);
|
|
return () => errorComponent ? createVNode(errorComponent, {
|
|
error: err
|
|
}) : null;
|
|
});
|
|
}
|
|
const loaded = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ref)(false);
|
|
const error = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ref)();
|
|
const delayed = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ref)(!!delay);
|
|
if (delay) {
|
|
setTimeout(() => {
|
|
delayed.value = false;
|
|
}, delay);
|
|
}
|
|
if (timeout != null) {
|
|
setTimeout(() => {
|
|
if (!loaded.value && !error.value) {
|
|
const err = new Error(
|
|
`Async component timed out after ${timeout}ms.`
|
|
);
|
|
onError(err);
|
|
error.value = err;
|
|
}
|
|
}, timeout);
|
|
}
|
|
load().then(() => {
|
|
loaded.value = true;
|
|
if (instance.parent && isKeepAlive(instance.parent.vnode)) {
|
|
queueJob(instance.parent.update);
|
|
}
|
|
}).catch((err) => {
|
|
onError(err);
|
|
error.value = err;
|
|
});
|
|
return () => {
|
|
if (loaded.value && resolvedComp) {
|
|
return createInnerComp(resolvedComp, instance);
|
|
} else if (error.value && errorComponent) {
|
|
return createVNode(errorComponent, {
|
|
error: error.value
|
|
});
|
|
} else if (loadingComponent && !delayed.value) {
|
|
return createVNode(loadingComponent);
|
|
}
|
|
};
|
|
}
|
|
});
|
|
}
|
|
function createInnerComp(comp, parent) {
|
|
const { ref: ref2, props, children, ce } = parent.vnode;
|
|
const vnode = createVNode(comp, props, children);
|
|
vnode.ref = ref2;
|
|
vnode.ce = ce;
|
|
delete parent.vnode.ce;
|
|
return vnode;
|
|
}
|
|
|
|
const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
|
|
const KeepAliveImpl = {
|
|
name: `KeepAlive`,
|
|
// Marker for special handling inside the renderer. We are not using a ===
|
|
// check directly on KeepAlive in the renderer, because importing it directly
|
|
// would prevent it from being tree-shaken.
|
|
__isKeepAlive: true,
|
|
props: {
|
|
include: [String, RegExp, Array],
|
|
exclude: [String, RegExp, Array],
|
|
max: [String, Number]
|
|
},
|
|
setup(props, { slots }) {
|
|
const instance = getCurrentInstance();
|
|
const sharedContext = instance.ctx;
|
|
if (!sharedContext.renderer) {
|
|
return () => {
|
|
const children = slots.default && slots.default();
|
|
return children && children.length === 1 ? children[0] : children;
|
|
};
|
|
}
|
|
const cache = /* @__PURE__ */ new Map();
|
|
const keys = /* @__PURE__ */ new Set();
|
|
let current = null;
|
|
if (true) {
|
|
instance.__v_cache = cache;
|
|
}
|
|
const parentSuspense = instance.suspense;
|
|
const {
|
|
renderer: {
|
|
p: patch,
|
|
m: move,
|
|
um: _unmount,
|
|
o: { createElement }
|
|
}
|
|
} = sharedContext;
|
|
const storageContainer = createElement("div");
|
|
sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {
|
|
const instance2 = vnode.component;
|
|
move(vnode, container, anchor, 0, parentSuspense);
|
|
patch(
|
|
instance2.vnode,
|
|
vnode,
|
|
container,
|
|
anchor,
|
|
instance2,
|
|
parentSuspense,
|
|
isSVG,
|
|
vnode.slotScopeIds,
|
|
optimized
|
|
);
|
|
queuePostRenderEffect(() => {
|
|
instance2.isDeactivated = false;
|
|
if (instance2.a) {
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(instance2.a);
|
|
}
|
|
const vnodeHook = vnode.props && vnode.props.onVnodeMounted;
|
|
if (vnodeHook) {
|
|
invokeVNodeHook(vnodeHook, instance2.parent, vnode);
|
|
}
|
|
}, parentSuspense);
|
|
if (true) {
|
|
devtoolsComponentAdded(instance2);
|
|
}
|
|
};
|
|
sharedContext.deactivate = (vnode) => {
|
|
const instance2 = vnode.component;
|
|
move(vnode, storageContainer, null, 1, parentSuspense);
|
|
queuePostRenderEffect(() => {
|
|
if (instance2.da) {
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(instance2.da);
|
|
}
|
|
const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;
|
|
if (vnodeHook) {
|
|
invokeVNodeHook(vnodeHook, instance2.parent, vnode);
|
|
}
|
|
instance2.isDeactivated = true;
|
|
}, parentSuspense);
|
|
if (true) {
|
|
devtoolsComponentAdded(instance2);
|
|
}
|
|
};
|
|
function unmount(vnode) {
|
|
resetShapeFlag(vnode);
|
|
_unmount(vnode, instance, parentSuspense, true);
|
|
}
|
|
function pruneCache(filter) {
|
|
cache.forEach((vnode, key) => {
|
|
const name = getComponentName(vnode.type);
|
|
if (name && (!filter || !filter(name))) {
|
|
pruneCacheEntry(key);
|
|
}
|
|
});
|
|
}
|
|
function pruneCacheEntry(key) {
|
|
const cached = cache.get(key);
|
|
if (!current || !isSameVNodeType(cached, current)) {
|
|
unmount(cached);
|
|
} else if (current) {
|
|
resetShapeFlag(current);
|
|
}
|
|
cache.delete(key);
|
|
keys.delete(key);
|
|
}
|
|
watch(
|
|
() => [props.include, props.exclude],
|
|
([include, exclude]) => {
|
|
include && pruneCache((name) => matches(include, name));
|
|
exclude && pruneCache((name) => !matches(exclude, name));
|
|
},
|
|
// prune post-render after `current` has been updated
|
|
{ flush: "post", deep: true }
|
|
);
|
|
let pendingCacheKey = null;
|
|
const cacheSubtree = () => {
|
|
if (pendingCacheKey != null) {
|
|
cache.set(pendingCacheKey, getInnerChild(instance.subTree));
|
|
}
|
|
};
|
|
onMounted(cacheSubtree);
|
|
onUpdated(cacheSubtree);
|
|
onBeforeUnmount(() => {
|
|
cache.forEach((cached) => {
|
|
const { subTree, suspense } = instance;
|
|
const vnode = getInnerChild(subTree);
|
|
if (cached.type === vnode.type && cached.key === vnode.key) {
|
|
resetShapeFlag(vnode);
|
|
const da = vnode.component.da;
|
|
da && queuePostRenderEffect(da, suspense);
|
|
return;
|
|
}
|
|
unmount(cached);
|
|
});
|
|
});
|
|
return () => {
|
|
pendingCacheKey = null;
|
|
if (!slots.default) {
|
|
return null;
|
|
}
|
|
const children = slots.default();
|
|
const rawVNode = children[0];
|
|
if (children.length > 1) {
|
|
if (true) {
|
|
warn(`KeepAlive should contain exactly one component child.`);
|
|
}
|
|
current = null;
|
|
return children;
|
|
} else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {
|
|
current = null;
|
|
return rawVNode;
|
|
}
|
|
let vnode = getInnerChild(rawVNode);
|
|
const comp = vnode.type;
|
|
const name = getComponentName(
|
|
isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
|
|
);
|
|
const { include, exclude, max } = props;
|
|
if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
|
|
current = vnode;
|
|
return rawVNode;
|
|
}
|
|
const key = vnode.key == null ? comp : vnode.key;
|
|
const cachedVNode = cache.get(key);
|
|
if (vnode.el) {
|
|
vnode = cloneVNode(vnode);
|
|
if (rawVNode.shapeFlag & 128) {
|
|
rawVNode.ssContent = vnode;
|
|
}
|
|
}
|
|
pendingCacheKey = key;
|
|
if (cachedVNode) {
|
|
vnode.el = cachedVNode.el;
|
|
vnode.component = cachedVNode.component;
|
|
if (vnode.transition) {
|
|
setTransitionHooks(vnode, vnode.transition);
|
|
}
|
|
vnode.shapeFlag |= 512;
|
|
keys.delete(key);
|
|
keys.add(key);
|
|
} else {
|
|
keys.add(key);
|
|
if (max && keys.size > parseInt(max, 10)) {
|
|
pruneCacheEntry(keys.values().next().value);
|
|
}
|
|
}
|
|
vnode.shapeFlag |= 256;
|
|
current = vnode;
|
|
return isSuspense(rawVNode.type) ? rawVNode : vnode;
|
|
};
|
|
}
|
|
};
|
|
const KeepAlive = KeepAliveImpl;
|
|
function matches(pattern, name) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(pattern)) {
|
|
return pattern.some((p) => matches(p, name));
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(pattern)) {
|
|
return pattern.split(",").includes(name);
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isRegExp)(pattern)) {
|
|
return pattern.test(name);
|
|
}
|
|
return false;
|
|
}
|
|
function onActivated(hook, target) {
|
|
registerKeepAliveHook(hook, "a", target);
|
|
}
|
|
function onDeactivated(hook, target) {
|
|
registerKeepAliveHook(hook, "da", target);
|
|
}
|
|
function registerKeepAliveHook(hook, type, target = currentInstance) {
|
|
const wrappedHook = hook.__wdc || (hook.__wdc = () => {
|
|
let current = target;
|
|
while (current) {
|
|
if (current.isDeactivated) {
|
|
return;
|
|
}
|
|
current = current.parent;
|
|
}
|
|
return hook();
|
|
});
|
|
injectHook(type, wrappedHook, target);
|
|
if (target) {
|
|
let current = target.parent;
|
|
while (current && current.parent) {
|
|
if (isKeepAlive(current.parent.vnode)) {
|
|
injectToKeepAliveRoot(wrappedHook, type, target, current);
|
|
}
|
|
current = current.parent;
|
|
}
|
|
}
|
|
}
|
|
function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
|
|
const injected = injectHook(
|
|
type,
|
|
hook,
|
|
keepAliveRoot,
|
|
true
|
|
/* prepend */
|
|
);
|
|
onUnmounted(() => {
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.remove)(keepAliveRoot[type], injected);
|
|
}, target);
|
|
}
|
|
function resetShapeFlag(vnode) {
|
|
vnode.shapeFlag &= ~256;
|
|
vnode.shapeFlag &= ~512;
|
|
}
|
|
function getInnerChild(vnode) {
|
|
return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
|
|
}
|
|
|
|
function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
if (target) {
|
|
const hooks = target[type] || (target[type] = []);
|
|
const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
|
|
if (target.isUnmounted) {
|
|
return;
|
|
}
|
|
(0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.pauseTracking)();
|
|
setCurrentInstance(target);
|
|
const res = callWithAsyncErrorHandling(hook, target, type, args);
|
|
unsetCurrentInstance();
|
|
(0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.resetTracking)();
|
|
return res;
|
|
});
|
|
if (prepend) {
|
|
hooks.unshift(wrappedHook);
|
|
} else {
|
|
hooks.push(wrappedHook);
|
|
}
|
|
return wrappedHook;
|
|
} else if (true) {
|
|
const apiName = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)(ErrorTypeStrings[type].replace(/ hook$/, ""));
|
|
warn(
|
|
`${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` )
|
|
);
|
|
}
|
|
}
|
|
const createHook = (lifecycle) => (hook, target = currentInstance) => (
|
|
// post-create lifecycle registrations are noops during SSR (except for serverPrefetch)
|
|
(!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target)
|
|
);
|
|
const onBeforeMount = createHook("bm");
|
|
const onMounted = createHook("m");
|
|
const onBeforeUpdate = createHook("bu");
|
|
const onUpdated = createHook("u");
|
|
const onBeforeUnmount = createHook("bum");
|
|
const onUnmounted = createHook("um");
|
|
const onServerPrefetch = createHook("sp");
|
|
const onRenderTriggered = createHook(
|
|
"rtg"
|
|
);
|
|
const onRenderTracked = createHook(
|
|
"rtc"
|
|
);
|
|
function onErrorCaptured(hook, target = currentInstance) {
|
|
injectHook("ec", hook, target);
|
|
}
|
|
|
|
const COMPONENTS = "components";
|
|
const DIRECTIVES = "directives";
|
|
function resolveComponent(name, maybeSelfReference) {
|
|
return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
|
|
}
|
|
const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
|
|
function resolveDynamicComponent(component) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(component)) {
|
|
return resolveAsset(COMPONENTS, component, false) || component;
|
|
} else {
|
|
return component || NULL_DYNAMIC_COMPONENT;
|
|
}
|
|
}
|
|
function resolveDirective(name) {
|
|
return resolveAsset(DIRECTIVES, name);
|
|
}
|
|
function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
|
|
const instance = currentRenderingInstance || currentInstance;
|
|
if (instance) {
|
|
const Component = instance.type;
|
|
if (type === COMPONENTS) {
|
|
const selfName = getComponentName(
|
|
Component,
|
|
false
|
|
/* do not include inferred name to avoid breaking existing code */
|
|
);
|
|
if (selfName && (selfName === name || selfName === (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(name) || selfName === (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.capitalize)((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(name)))) {
|
|
return Component;
|
|
}
|
|
}
|
|
const res = (
|
|
// local registration
|
|
// check instance[type] first which is resolved for options API
|
|
resolve(instance[type] || Component[type], name) || // global registration
|
|
resolve(instance.appContext[type], name)
|
|
);
|
|
if (!res && maybeSelfReference) {
|
|
return Component;
|
|
}
|
|
if ( true && warnMissing && !res) {
|
|
const extra = type === COMPONENTS ? `
|
|
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
|
|
warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
|
|
}
|
|
return res;
|
|
} else if (true) {
|
|
warn(
|
|
`resolve${(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.capitalize)(type.slice(0, -1))} can only be used in render() or setup().`
|
|
);
|
|
}
|
|
}
|
|
function resolve(registry, name) {
|
|
return registry && (registry[name] || registry[(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(name)] || registry[(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.capitalize)((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(name))]);
|
|
}
|
|
|
|
function renderList(source, renderItem, cache, index) {
|
|
let ret;
|
|
const cached = cache && cache[index];
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(source) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(source)) {
|
|
ret = new Array(source.length);
|
|
for (let i = 0, l = source.length; i < l; i++) {
|
|
ret[i] = renderItem(source[i], i, void 0, cached && cached[i]);
|
|
}
|
|
} else if (typeof source === "number") {
|
|
if ( true && !Number.isInteger(source)) {
|
|
warn(`The v-for range expect an integer value but got ${source}.`);
|
|
}
|
|
ret = new Array(source);
|
|
for (let i = 0; i < source; i++) {
|
|
ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
|
|
}
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(source)) {
|
|
if (source[Symbol.iterator]) {
|
|
ret = Array.from(
|
|
source,
|
|
(item, i) => renderItem(item, i, void 0, cached && cached[i])
|
|
);
|
|
} else {
|
|
const keys = Object.keys(source);
|
|
ret = new Array(keys.length);
|
|
for (let i = 0, l = keys.length; i < l; i++) {
|
|
const key = keys[i];
|
|
ret[i] = renderItem(source[key], key, i, cached && cached[i]);
|
|
}
|
|
}
|
|
} else {
|
|
ret = [];
|
|
}
|
|
if (cache) {
|
|
cache[index] = ret;
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
function createSlots(slots, dynamicSlots) {
|
|
for (let i = 0; i < dynamicSlots.length; i++) {
|
|
const slot = dynamicSlots[i];
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(slot)) {
|
|
for (let j = 0; j < slot.length; j++) {
|
|
slots[slot[j].name] = slot[j].fn;
|
|
}
|
|
} else if (slot) {
|
|
slots[slot.name] = slot.key ? (...args) => {
|
|
const res = slot.fn(...args);
|
|
if (res)
|
|
res.key = slot.key;
|
|
return res;
|
|
} : slot.fn;
|
|
}
|
|
}
|
|
return slots;
|
|
}
|
|
|
|
function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) {
|
|
if (name !== "default")
|
|
props.name = name;
|
|
return createVNode("slot", props, fallback && fallback());
|
|
}
|
|
let slot = slots[name];
|
|
if ( true && slot && slot.length > 1) {
|
|
warn(
|
|
`SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.`
|
|
);
|
|
slot = () => [];
|
|
}
|
|
if (slot && slot._c) {
|
|
slot._d = false;
|
|
}
|
|
openBlock();
|
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
const rendered = createBlock(
|
|
Fragment,
|
|
{
|
|
key: props.key || // slot content array of a dynamic conditional slot may have a branch
|
|
// key attached in the `createSlots` helper, respect that
|
|
validSlotContent && validSlotContent.key || `_${name}`
|
|
},
|
|
validSlotContent || (fallback ? fallback() : []),
|
|
validSlotContent && slots._ === 1 ? 64 : -2
|
|
);
|
|
if (!noSlotted && rendered.scopeId) {
|
|
rendered.slotScopeIds = [rendered.scopeId + "-s"];
|
|
}
|
|
if (slot && slot._c) {
|
|
slot._d = true;
|
|
}
|
|
return rendered;
|
|
}
|
|
function ensureValidVNode(vnodes) {
|
|
return vnodes.some((child) => {
|
|
if (!isVNode(child))
|
|
return true;
|
|
if (child.type === Comment)
|
|
return false;
|
|
if (child.type === Fragment && !ensureValidVNode(child.children))
|
|
return false;
|
|
return true;
|
|
}) ? vnodes : null;
|
|
}
|
|
|
|
function toHandlers(obj, preserveCaseIfNecessary) {
|
|
const ret = {};
|
|
if ( true && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(obj)) {
|
|
warn(`v-on with no argument expects an object value.`);
|
|
return ret;
|
|
}
|
|
for (const key in obj) {
|
|
ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)(key)] = obj[key];
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
const getPublicInstance = (i) => {
|
|
if (!i)
|
|
return null;
|
|
if (isStatefulComponent(i))
|
|
return getExposeProxy(i) || i.proxy;
|
|
return getPublicInstance(i.parent);
|
|
};
|
|
const publicPropertiesMap = (
|
|
// Move PURE marker to new line to workaround compiler discarding it
|
|
// due to type annotation
|
|
/* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(/* @__PURE__ */ Object.create(null), {
|
|
$: (i) => i,
|
|
$el: (i) => i.vnode.el,
|
|
$data: (i) => i.data,
|
|
$props: (i) => true ? (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly)(i.props) : 0,
|
|
$attrs: (i) => true ? (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly)(i.attrs) : 0,
|
|
$slots: (i) => true ? (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly)(i.slots) : 0,
|
|
$refs: (i) => true ? (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly)(i.refs) : 0,
|
|
$parent: (i) => getPublicInstance(i.parent),
|
|
$root: (i) => getPublicInstance(i.root),
|
|
$emit: (i) => i.emit,
|
|
$options: (i) => true ? resolveMergedOptions(i) : 0,
|
|
$forceUpdate: (i) => i.f || (i.f = () => queueJob(i.update)),
|
|
$nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),
|
|
$watch: (i) => true ? instanceWatch.bind(i) : 0
|
|
})
|
|
);
|
|
const isReservedPrefix = (key) => key === "_" || key === "$";
|
|
const hasSetupBinding = (state, key) => state !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ && !state.__isScriptSetup && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(state, key);
|
|
const PublicInstanceProxyHandlers = {
|
|
get({ _: instance }, key) {
|
|
const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
|
|
if ( true && key === "__isVue") {
|
|
return true;
|
|
}
|
|
let normalizedProps;
|
|
if (key[0] !== "$") {
|
|
const n = accessCache[key];
|
|
if (n !== void 0) {
|
|
switch (n) {
|
|
case 1 /* SETUP */:
|
|
return setupState[key];
|
|
case 2 /* DATA */:
|
|
return data[key];
|
|
case 4 /* CONTEXT */:
|
|
return ctx[key];
|
|
case 3 /* PROPS */:
|
|
return props[key];
|
|
}
|
|
} else if (hasSetupBinding(setupState, key)) {
|
|
accessCache[key] = 1 /* SETUP */;
|
|
return setupState[key];
|
|
} else if (data !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(data, key)) {
|
|
accessCache[key] = 2 /* DATA */;
|
|
return data[key];
|
|
} else if (
|
|
// only cache other properties when instance has declared (thus stable)
|
|
// props
|
|
(normalizedProps = instance.propsOptions[0]) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(normalizedProps, key)
|
|
) {
|
|
accessCache[key] = 3 /* PROPS */;
|
|
return props[key];
|
|
} else if (ctx !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(ctx, key)) {
|
|
accessCache[key] = 4 /* CONTEXT */;
|
|
return ctx[key];
|
|
} else if ( false || shouldCacheAccess) {
|
|
accessCache[key] = 0 /* OTHER */;
|
|
}
|
|
}
|
|
const publicGetter = publicPropertiesMap[key];
|
|
let cssModule, globalProperties;
|
|
if (publicGetter) {
|
|
if (key === "$attrs") {
|
|
(0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.track)(instance, "get", key);
|
|
true && markAttrsAccessed();
|
|
} else if ( true && key === "$slots") {
|
|
(0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.track)(instance, "get", key);
|
|
}
|
|
return publicGetter(instance);
|
|
} else if (
|
|
// css module (injected by vue-loader)
|
|
(cssModule = type.__cssModules) && (cssModule = cssModule[key])
|
|
) {
|
|
return cssModule;
|
|
} else if (ctx !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(ctx, key)) {
|
|
accessCache[key] = 4 /* CONTEXT */;
|
|
return ctx[key];
|
|
} else if (
|
|
// global properties
|
|
globalProperties = appContext.config.globalProperties, (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(globalProperties, key)
|
|
) {
|
|
{
|
|
return globalProperties[key];
|
|
}
|
|
} else if ( true && currentRenderingInstance && (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading
|
|
// to infinite warning loop
|
|
key.indexOf("__v") !== 0)) {
|
|
if (data !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ && isReservedPrefix(key[0]) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(data, key)) {
|
|
warn(
|
|
`Property ${JSON.stringify(
|
|
key
|
|
)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`
|
|
);
|
|
} else if (instance === currentRenderingInstance) {
|
|
warn(
|
|
`Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`
|
|
);
|
|
}
|
|
}
|
|
},
|
|
set({ _: instance }, key, value) {
|
|
const { data, setupState, ctx } = instance;
|
|
if (hasSetupBinding(setupState, key)) {
|
|
setupState[key] = value;
|
|
return true;
|
|
} else if ( true && setupState.__isScriptSetup && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(setupState, key)) {
|
|
warn(`Cannot mutate <script setup> binding "${key}" from Options API.`);
|
|
return false;
|
|
} else if (data !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(data, key)) {
|
|
data[key] = value;
|
|
return true;
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(instance.props, key)) {
|
|
true && warn(`Attempting to mutate prop "${key}". Props are readonly.`);
|
|
return false;
|
|
}
|
|
if (key[0] === "$" && key.slice(1) in instance) {
|
|
true && warn(
|
|
`Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.`
|
|
);
|
|
return false;
|
|
} else {
|
|
if ( true && key in instance.appContext.config.globalProperties) {
|
|
Object.defineProperty(ctx, key, {
|
|
enumerable: true,
|
|
configurable: true,
|
|
value
|
|
});
|
|
} else {
|
|
ctx[key] = value;
|
|
}
|
|
}
|
|
return true;
|
|
},
|
|
has({
|
|
_: { data, setupState, accessCache, ctx, appContext, propsOptions }
|
|
}, key) {
|
|
let normalizedProps;
|
|
return !!accessCache[key] || data !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(normalizedProps, key) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(ctx, key) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(publicPropertiesMap, key) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(appContext.config.globalProperties, key);
|
|
},
|
|
defineProperty(target, key, descriptor) {
|
|
if (descriptor.get != null) {
|
|
target._.accessCache[key] = 0;
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(descriptor, "value")) {
|
|
this.set(target, key, descriptor.value, null);
|
|
}
|
|
return Reflect.defineProperty(target, key, descriptor);
|
|
}
|
|
};
|
|
if (true) {
|
|
PublicInstanceProxyHandlers.ownKeys = (target) => {
|
|
warn(
|
|
`Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`
|
|
);
|
|
return Reflect.ownKeys(target);
|
|
};
|
|
}
|
|
const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(
|
|
{},
|
|
PublicInstanceProxyHandlers,
|
|
{
|
|
get(target, key) {
|
|
if (key === Symbol.unscopables) {
|
|
return;
|
|
}
|
|
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
},
|
|
has(_, key) {
|
|
const has = key[0] !== "_" && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isGloballyWhitelisted)(key);
|
|
if ( true && !has && PublicInstanceProxyHandlers.has(_, key)) {
|
|
warn(
|
|
`Property ${JSON.stringify(
|
|
key
|
|
)} should not start with _ which is a reserved prefix for Vue internals.`
|
|
);
|
|
}
|
|
return has;
|
|
}
|
|
}
|
|
);
|
|
function createDevRenderContext(instance) {
|
|
const target = {};
|
|
Object.defineProperty(target, `_`, {
|
|
configurable: true,
|
|
enumerable: false,
|
|
get: () => instance
|
|
});
|
|
Object.keys(publicPropertiesMap).forEach((key) => {
|
|
Object.defineProperty(target, key, {
|
|
configurable: true,
|
|
enumerable: false,
|
|
get: () => publicPropertiesMap[key](instance),
|
|
// intercepted by the proxy so no need for implementation,
|
|
// but needed to prevent set errors
|
|
set: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP
|
|
});
|
|
});
|
|
return target;
|
|
}
|
|
function exposePropsOnRenderContext(instance) {
|
|
const {
|
|
ctx,
|
|
propsOptions: [propsOptions]
|
|
} = instance;
|
|
if (propsOptions) {
|
|
Object.keys(propsOptions).forEach((key) => {
|
|
Object.defineProperty(ctx, key, {
|
|
enumerable: true,
|
|
configurable: true,
|
|
get: () => instance.props[key],
|
|
set: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP
|
|
});
|
|
});
|
|
}
|
|
}
|
|
function exposeSetupStateOnRenderContext(instance) {
|
|
const { ctx, setupState } = instance;
|
|
Object.keys((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(setupState)).forEach((key) => {
|
|
if (!setupState.__isScriptSetup) {
|
|
if (isReservedPrefix(key[0])) {
|
|
warn(
|
|
`setup() return property ${JSON.stringify(
|
|
key
|
|
)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`
|
|
);
|
|
return;
|
|
}
|
|
Object.defineProperty(ctx, key, {
|
|
enumerable: true,
|
|
configurable: true,
|
|
get: () => setupState[key],
|
|
set: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP
|
|
});
|
|
}
|
|
});
|
|
}
|
|
|
|
const warnRuntimeUsage = (method) => warn(
|
|
`${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.`
|
|
);
|
|
function defineProps() {
|
|
if (true) {
|
|
warnRuntimeUsage(`defineProps`);
|
|
}
|
|
return null;
|
|
}
|
|
function defineEmits() {
|
|
if (true) {
|
|
warnRuntimeUsage(`defineEmits`);
|
|
}
|
|
return null;
|
|
}
|
|
function defineExpose(exposed) {
|
|
if (true) {
|
|
warnRuntimeUsage(`defineExpose`);
|
|
}
|
|
}
|
|
function defineOptions(options) {
|
|
if (true) {
|
|
warnRuntimeUsage(`defineOptions`);
|
|
}
|
|
}
|
|
function defineSlots() {
|
|
if (true) {
|
|
warnRuntimeUsage(`defineSlots`);
|
|
}
|
|
return null;
|
|
}
|
|
function defineModel() {
|
|
if (true) {
|
|
warnRuntimeUsage("defineModel");
|
|
}
|
|
}
|
|
function withDefaults(props, defaults) {
|
|
if (true) {
|
|
warnRuntimeUsage(`withDefaults`);
|
|
}
|
|
return null;
|
|
}
|
|
function useSlots() {
|
|
return getContext().slots;
|
|
}
|
|
function useAttrs() {
|
|
return getContext().attrs;
|
|
}
|
|
function useModel(props, name, options) {
|
|
const i = getCurrentInstance();
|
|
if ( true && !i) {
|
|
warn(`useModel() called without active instance.`);
|
|
return (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ref)();
|
|
}
|
|
if ( true && !i.propsOptions[0][name]) {
|
|
warn(`useModel() called with prop "${name}" which is not declared.`);
|
|
return (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ref)();
|
|
}
|
|
if (options && options.local) {
|
|
const proxy = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ref)(props[name]);
|
|
watch(
|
|
() => props[name],
|
|
(v) => proxy.value = v
|
|
);
|
|
watch(proxy, (value) => {
|
|
if (value !== props[name]) {
|
|
i.emit(`update:${name}`, value);
|
|
}
|
|
});
|
|
return proxy;
|
|
} else {
|
|
return {
|
|
__v_isRef: true,
|
|
get value() {
|
|
return props[name];
|
|
},
|
|
set value(value) {
|
|
i.emit(`update:${name}`, value);
|
|
}
|
|
};
|
|
}
|
|
}
|
|
function getContext() {
|
|
const i = getCurrentInstance();
|
|
if ( true && !i) {
|
|
warn(`useContext() called without active instance.`);
|
|
}
|
|
return i.setupContext || (i.setupContext = createSetupContext(i));
|
|
}
|
|
function normalizePropsOrEmits(props) {
|
|
return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(props) ? props.reduce(
|
|
(normalized, p) => (normalized[p] = null, normalized),
|
|
{}
|
|
) : props;
|
|
}
|
|
function mergeDefaults(raw, defaults) {
|
|
const props = normalizePropsOrEmits(raw);
|
|
for (const key in defaults) {
|
|
if (key.startsWith("__skip"))
|
|
continue;
|
|
let opt = props[key];
|
|
if (opt) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(opt) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(opt)) {
|
|
opt = props[key] = { type: opt, default: defaults[key] };
|
|
} else {
|
|
opt.default = defaults[key];
|
|
}
|
|
} else if (opt === null) {
|
|
opt = props[key] = { default: defaults[key] };
|
|
} else if (true) {
|
|
warn(`props default key "${key}" has no corresponding declaration.`);
|
|
}
|
|
if (opt && defaults[`__skip_${key}`]) {
|
|
opt.skipFactory = true;
|
|
}
|
|
}
|
|
return props;
|
|
}
|
|
function mergeModels(a, b) {
|
|
if (!a || !b)
|
|
return a || b;
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(a) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(b))
|
|
return a.concat(b);
|
|
return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));
|
|
}
|
|
function createPropsRestProxy(props, excludedKeys) {
|
|
const ret = {};
|
|
for (const key in props) {
|
|
if (!excludedKeys.includes(key)) {
|
|
Object.defineProperty(ret, key, {
|
|
enumerable: true,
|
|
get: () => props[key]
|
|
});
|
|
}
|
|
}
|
|
return ret;
|
|
}
|
|
function withAsyncContext(getAwaitable) {
|
|
const ctx = getCurrentInstance();
|
|
if ( true && !ctx) {
|
|
warn(
|
|
`withAsyncContext called without active current instance. This is likely a bug.`
|
|
);
|
|
}
|
|
let awaitable = getAwaitable();
|
|
unsetCurrentInstance();
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isPromise)(awaitable)) {
|
|
awaitable = awaitable.catch((e) => {
|
|
setCurrentInstance(ctx);
|
|
throw e;
|
|
});
|
|
}
|
|
return [awaitable, () => setCurrentInstance(ctx)];
|
|
}
|
|
|
|
function createDuplicateChecker() {
|
|
const cache = /* @__PURE__ */ Object.create(null);
|
|
return (type, key) => {
|
|
if (cache[key]) {
|
|
warn(`${type} property "${key}" is already defined in ${cache[key]}.`);
|
|
} else {
|
|
cache[key] = type;
|
|
}
|
|
};
|
|
}
|
|
let shouldCacheAccess = true;
|
|
function applyOptions(instance) {
|
|
const options = resolveMergedOptions(instance);
|
|
const publicThis = instance.proxy;
|
|
const ctx = instance.ctx;
|
|
shouldCacheAccess = false;
|
|
if (options.beforeCreate) {
|
|
callHook(options.beforeCreate, instance, "bc");
|
|
}
|
|
const {
|
|
// state
|
|
data: dataOptions,
|
|
computed: computedOptions,
|
|
methods,
|
|
watch: watchOptions,
|
|
provide: provideOptions,
|
|
inject: injectOptions,
|
|
// lifecycle
|
|
created,
|
|
beforeMount,
|
|
mounted,
|
|
beforeUpdate,
|
|
updated,
|
|
activated,
|
|
deactivated,
|
|
beforeDestroy,
|
|
beforeUnmount,
|
|
destroyed,
|
|
unmounted,
|
|
render,
|
|
renderTracked,
|
|
renderTriggered,
|
|
errorCaptured,
|
|
serverPrefetch,
|
|
// public API
|
|
expose,
|
|
inheritAttrs,
|
|
// assets
|
|
components,
|
|
directives,
|
|
filters
|
|
} = options;
|
|
const checkDuplicateProperties = true ? createDuplicateChecker() : 0;
|
|
if (true) {
|
|
const [propsOptions] = instance.propsOptions;
|
|
if (propsOptions) {
|
|
for (const key in propsOptions) {
|
|
checkDuplicateProperties("Props" /* PROPS */, key);
|
|
}
|
|
}
|
|
}
|
|
if (injectOptions) {
|
|
resolveInjections(injectOptions, ctx, checkDuplicateProperties);
|
|
}
|
|
if (methods) {
|
|
for (const key in methods) {
|
|
const methodHandler = methods[key];
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(methodHandler)) {
|
|
if (true) {
|
|
Object.defineProperty(ctx, key, {
|
|
value: methodHandler.bind(publicThis),
|
|
configurable: true,
|
|
enumerable: true,
|
|
writable: true
|
|
});
|
|
} else {}
|
|
if (true) {
|
|
checkDuplicateProperties("Methods" /* METHODS */, key);
|
|
}
|
|
} else if (true) {
|
|
warn(
|
|
`Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?`
|
|
);
|
|
}
|
|
}
|
|
}
|
|
if (dataOptions) {
|
|
if ( true && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(dataOptions)) {
|
|
warn(
|
|
`The data option must be a function. Plain object usage is no longer supported.`
|
|
);
|
|
}
|
|
const data = dataOptions.call(publicThis, publicThis);
|
|
if ( true && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isPromise)(data)) {
|
|
warn(
|
|
`data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`
|
|
);
|
|
}
|
|
if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(data)) {
|
|
true && warn(`data() should return an object.`);
|
|
} else {
|
|
instance.data = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.reactive)(data);
|
|
if (true) {
|
|
for (const key in data) {
|
|
checkDuplicateProperties("Data" /* DATA */, key);
|
|
if (!isReservedPrefix(key[0])) {
|
|
Object.defineProperty(ctx, key, {
|
|
configurable: true,
|
|
enumerable: true,
|
|
get: () => data[key],
|
|
set: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
shouldCacheAccess = true;
|
|
if (computedOptions) {
|
|
for (const key in computedOptions) {
|
|
const opt = computedOptions[key];
|
|
const get = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(opt) ? opt.bind(publicThis, publicThis) : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(opt.get) ? opt.get.bind(publicThis, publicThis) : _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP;
|
|
if ( true && get === _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP) {
|
|
warn(`Computed property "${key}" has no getter.`);
|
|
}
|
|
const set = !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(opt) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(opt.set) ? opt.set.bind(publicThis) : true ? () => {
|
|
warn(
|
|
`Write operation failed: computed property "${key}" is readonly.`
|
|
);
|
|
} : 0;
|
|
const c = computed({
|
|
get,
|
|
set
|
|
});
|
|
Object.defineProperty(ctx, key, {
|
|
enumerable: true,
|
|
configurable: true,
|
|
get: () => c.value,
|
|
set: (v) => c.value = v
|
|
});
|
|
if (true) {
|
|
checkDuplicateProperties("Computed" /* COMPUTED */, key);
|
|
}
|
|
}
|
|
}
|
|
if (watchOptions) {
|
|
for (const key in watchOptions) {
|
|
createWatcher(watchOptions[key], ctx, publicThis, key);
|
|
}
|
|
}
|
|
if (provideOptions) {
|
|
const provides = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(provideOptions) ? provideOptions.call(publicThis) : provideOptions;
|
|
Reflect.ownKeys(provides).forEach((key) => {
|
|
provide(key, provides[key]);
|
|
});
|
|
}
|
|
if (created) {
|
|
callHook(created, instance, "c");
|
|
}
|
|
function registerLifecycleHook(register, hook) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(hook)) {
|
|
hook.forEach((_hook) => register(_hook.bind(publicThis)));
|
|
} else if (hook) {
|
|
register(hook.bind(publicThis));
|
|
}
|
|
}
|
|
registerLifecycleHook(onBeforeMount, beforeMount);
|
|
registerLifecycleHook(onMounted, mounted);
|
|
registerLifecycleHook(onBeforeUpdate, beforeUpdate);
|
|
registerLifecycleHook(onUpdated, updated);
|
|
registerLifecycleHook(onActivated, activated);
|
|
registerLifecycleHook(onDeactivated, deactivated);
|
|
registerLifecycleHook(onErrorCaptured, errorCaptured);
|
|
registerLifecycleHook(onRenderTracked, renderTracked);
|
|
registerLifecycleHook(onRenderTriggered, renderTriggered);
|
|
registerLifecycleHook(onBeforeUnmount, beforeUnmount);
|
|
registerLifecycleHook(onUnmounted, unmounted);
|
|
registerLifecycleHook(onServerPrefetch, serverPrefetch);
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(expose)) {
|
|
if (expose.length) {
|
|
const exposed = instance.exposed || (instance.exposed = {});
|
|
expose.forEach((key) => {
|
|
Object.defineProperty(exposed, key, {
|
|
get: () => publicThis[key],
|
|
set: (val) => publicThis[key] = val
|
|
});
|
|
});
|
|
} else if (!instance.exposed) {
|
|
instance.exposed = {};
|
|
}
|
|
}
|
|
if (render && instance.render === _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP) {
|
|
instance.render = render;
|
|
}
|
|
if (inheritAttrs != null) {
|
|
instance.inheritAttrs = inheritAttrs;
|
|
}
|
|
if (components)
|
|
instance.components = components;
|
|
if (directives)
|
|
instance.directives = directives;
|
|
}
|
|
function resolveInjections(injectOptions, ctx, checkDuplicateProperties = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(injectOptions)) {
|
|
injectOptions = normalizeInject(injectOptions);
|
|
}
|
|
for (const key in injectOptions) {
|
|
const opt = injectOptions[key];
|
|
let injected;
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(opt)) {
|
|
if ("default" in opt) {
|
|
injected = inject(
|
|
opt.from || key,
|
|
opt.default,
|
|
true
|
|
/* treat default function as factory */
|
|
);
|
|
} else {
|
|
injected = inject(opt.from || key);
|
|
}
|
|
} else {
|
|
injected = inject(opt);
|
|
}
|
|
if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(injected)) {
|
|
Object.defineProperty(ctx, key, {
|
|
enumerable: true,
|
|
configurable: true,
|
|
get: () => injected.value,
|
|
set: (v) => injected.value = v
|
|
});
|
|
} else {
|
|
ctx[key] = injected;
|
|
}
|
|
if (true) {
|
|
checkDuplicateProperties("Inject" /* INJECT */, key);
|
|
}
|
|
}
|
|
}
|
|
function callHook(hook, instance, type) {
|
|
callWithAsyncErrorHandling(
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy),
|
|
instance,
|
|
type
|
|
);
|
|
}
|
|
function createWatcher(raw, ctx, publicThis, key) {
|
|
const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(raw)) {
|
|
const handler = ctx[raw];
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(handler)) {
|
|
watch(getter, handler);
|
|
} else if (true) {
|
|
warn(`Invalid watch handler specified by key "${raw}"`, handler);
|
|
}
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(raw)) {
|
|
watch(getter, raw.bind(publicThis));
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(raw)) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(raw)) {
|
|
raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
|
|
} else {
|
|
const handler = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(handler)) {
|
|
watch(getter, handler, raw);
|
|
} else if (true) {
|
|
warn(`Invalid watch handler specified by key "${raw.handler}"`, handler);
|
|
}
|
|
}
|
|
} else if (true) {
|
|
warn(`Invalid watch option: "${key}"`, raw);
|
|
}
|
|
}
|
|
function resolveMergedOptions(instance) {
|
|
const base = instance.type;
|
|
const { mixins, extends: extendsOptions } = base;
|
|
const {
|
|
mixins: globalMixins,
|
|
optionsCache: cache,
|
|
config: { optionMergeStrategies }
|
|
} = instance.appContext;
|
|
const cached = cache.get(base);
|
|
let resolved;
|
|
if (cached) {
|
|
resolved = cached;
|
|
} else if (!globalMixins.length && !mixins && !extendsOptions) {
|
|
{
|
|
resolved = base;
|
|
}
|
|
} else {
|
|
resolved = {};
|
|
if (globalMixins.length) {
|
|
globalMixins.forEach(
|
|
(m) => mergeOptions(resolved, m, optionMergeStrategies, true)
|
|
);
|
|
}
|
|
mergeOptions(resolved, base, optionMergeStrategies);
|
|
}
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(base)) {
|
|
cache.set(base, resolved);
|
|
}
|
|
return resolved;
|
|
}
|
|
function mergeOptions(to, from, strats, asMixin = false) {
|
|
const { mixins, extends: extendsOptions } = from;
|
|
if (extendsOptions) {
|
|
mergeOptions(to, extendsOptions, strats, true);
|
|
}
|
|
if (mixins) {
|
|
mixins.forEach(
|
|
(m) => mergeOptions(to, m, strats, true)
|
|
);
|
|
}
|
|
for (const key in from) {
|
|
if (asMixin && key === "expose") {
|
|
true && warn(
|
|
`"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`
|
|
);
|
|
} else {
|
|
const strat = internalOptionMergeStrats[key] || strats && strats[key];
|
|
to[key] = strat ? strat(to[key], from[key]) : from[key];
|
|
}
|
|
}
|
|
return to;
|
|
}
|
|
const internalOptionMergeStrats = {
|
|
data: mergeDataFn,
|
|
props: mergeEmitsOrPropsOptions,
|
|
emits: mergeEmitsOrPropsOptions,
|
|
// objects
|
|
methods: mergeObjectOptions,
|
|
computed: mergeObjectOptions,
|
|
// lifecycle
|
|
beforeCreate: mergeAsArray,
|
|
created: mergeAsArray,
|
|
beforeMount: mergeAsArray,
|
|
mounted: mergeAsArray,
|
|
beforeUpdate: mergeAsArray,
|
|
updated: mergeAsArray,
|
|
beforeDestroy: mergeAsArray,
|
|
beforeUnmount: mergeAsArray,
|
|
destroyed: mergeAsArray,
|
|
unmounted: mergeAsArray,
|
|
activated: mergeAsArray,
|
|
deactivated: mergeAsArray,
|
|
errorCaptured: mergeAsArray,
|
|
serverPrefetch: mergeAsArray,
|
|
// assets
|
|
components: mergeObjectOptions,
|
|
directives: mergeObjectOptions,
|
|
// watch
|
|
watch: mergeWatchOptions,
|
|
// provide / inject
|
|
provide: mergeDataFn,
|
|
inject: mergeInject
|
|
};
|
|
function mergeDataFn(to, from) {
|
|
if (!from) {
|
|
return to;
|
|
}
|
|
if (!to) {
|
|
return from;
|
|
}
|
|
return function mergedDataFn() {
|
|
return ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend))(
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(to) ? to.call(this, this) : to,
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(from) ? from.call(this, this) : from
|
|
);
|
|
};
|
|
}
|
|
function mergeInject(to, from) {
|
|
return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
|
|
}
|
|
function normalizeInject(raw) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(raw)) {
|
|
const res = {};
|
|
for (let i = 0; i < raw.length; i++) {
|
|
res[raw[i]] = raw[i];
|
|
}
|
|
return res;
|
|
}
|
|
return raw;
|
|
}
|
|
function mergeAsArray(to, from) {
|
|
return to ? [...new Set([].concat(to, from))] : from;
|
|
}
|
|
function mergeObjectOptions(to, from) {
|
|
return to ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(/* @__PURE__ */ Object.create(null), to, from) : from;
|
|
}
|
|
function mergeEmitsOrPropsOptions(to, from) {
|
|
if (to) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(to) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(from)) {
|
|
return [.../* @__PURE__ */ new Set([...to, ...from])];
|
|
}
|
|
return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(
|
|
/* @__PURE__ */ Object.create(null),
|
|
normalizePropsOrEmits(to),
|
|
normalizePropsOrEmits(from != null ? from : {})
|
|
);
|
|
} else {
|
|
return from;
|
|
}
|
|
}
|
|
function mergeWatchOptions(to, from) {
|
|
if (!to)
|
|
return from;
|
|
if (!from)
|
|
return to;
|
|
const merged = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(/* @__PURE__ */ Object.create(null), to);
|
|
for (const key in from) {
|
|
merged[key] = mergeAsArray(to[key], from[key]);
|
|
}
|
|
return merged;
|
|
}
|
|
|
|
function createAppContext() {
|
|
return {
|
|
app: null,
|
|
config: {
|
|
isNativeTag: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NO,
|
|
performance: false,
|
|
globalProperties: {},
|
|
optionMergeStrategies: {},
|
|
errorHandler: void 0,
|
|
warnHandler: void 0,
|
|
compilerOptions: {}
|
|
},
|
|
mixins: [],
|
|
components: {},
|
|
directives: {},
|
|
provides: /* @__PURE__ */ Object.create(null),
|
|
optionsCache: /* @__PURE__ */ new WeakMap(),
|
|
propsCache: /* @__PURE__ */ new WeakMap(),
|
|
emitsCache: /* @__PURE__ */ new WeakMap()
|
|
};
|
|
}
|
|
let uid$1 = 0;
|
|
function createAppAPI(render, hydrate) {
|
|
return function createApp(rootComponent, rootProps = null) {
|
|
if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(rootComponent)) {
|
|
rootComponent = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, rootComponent);
|
|
}
|
|
if (rootProps != null && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(rootProps)) {
|
|
true && warn(`root props passed to app.mount() must be an object.`);
|
|
rootProps = null;
|
|
}
|
|
const context = createAppContext();
|
|
if (true) {
|
|
Object.defineProperty(context.config, "unwrapInjectedRef", {
|
|
get() {
|
|
return true;
|
|
},
|
|
set() {
|
|
warn(
|
|
`app.config.unwrapInjectedRef has been deprecated. 3.3 now alawys unwraps injected refs in Options API.`
|
|
);
|
|
}
|
|
});
|
|
}
|
|
const installedPlugins = /* @__PURE__ */ new Set();
|
|
let isMounted = false;
|
|
const app = context.app = {
|
|
_uid: uid$1++,
|
|
_component: rootComponent,
|
|
_props: rootProps,
|
|
_container: null,
|
|
_context: context,
|
|
_instance: null,
|
|
version,
|
|
get config() {
|
|
return context.config;
|
|
},
|
|
set config(v) {
|
|
if (true) {
|
|
warn(
|
|
`app.config cannot be replaced. Modify individual options instead.`
|
|
);
|
|
}
|
|
},
|
|
use(plugin, ...options) {
|
|
if (installedPlugins.has(plugin)) {
|
|
true && warn(`Plugin has already been applied to target app.`);
|
|
} else if (plugin && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(plugin.install)) {
|
|
installedPlugins.add(plugin);
|
|
plugin.install(app, ...options);
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(plugin)) {
|
|
installedPlugins.add(plugin);
|
|
plugin(app, ...options);
|
|
} else if (true) {
|
|
warn(
|
|
`A plugin must either be a function or an object with an "install" function.`
|
|
);
|
|
}
|
|
return app;
|
|
},
|
|
mixin(mixin) {
|
|
if (true) {
|
|
if (!context.mixins.includes(mixin)) {
|
|
context.mixins.push(mixin);
|
|
} else if (true) {
|
|
warn(
|
|
"Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "")
|
|
);
|
|
}
|
|
} else {}
|
|
return app;
|
|
},
|
|
component(name, component) {
|
|
if (true) {
|
|
validateComponentName(name, context.config);
|
|
}
|
|
if (!component) {
|
|
return context.components[name];
|
|
}
|
|
if ( true && context.components[name]) {
|
|
warn(`Component "${name}" has already been registered in target app.`);
|
|
}
|
|
context.components[name] = component;
|
|
return app;
|
|
},
|
|
directive(name, directive) {
|
|
if (true) {
|
|
validateDirectiveName(name);
|
|
}
|
|
if (!directive) {
|
|
return context.directives[name];
|
|
}
|
|
if ( true && context.directives[name]) {
|
|
warn(`Directive "${name}" has already been registered in target app.`);
|
|
}
|
|
context.directives[name] = directive;
|
|
return app;
|
|
},
|
|
mount(rootContainer, isHydrate, isSVG) {
|
|
if (!isMounted) {
|
|
if ( true && rootContainer.__vue_app__) {
|
|
warn(
|
|
`There is already an app instance mounted on the host container.
|
|
If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
|
|
);
|
|
}
|
|
const vnode = createVNode(
|
|
rootComponent,
|
|
rootProps
|
|
);
|
|
vnode.appContext = context;
|
|
if (true) {
|
|
context.reload = () => {
|
|
render(cloneVNode(vnode), rootContainer, isSVG);
|
|
};
|
|
}
|
|
if (isHydrate && hydrate) {
|
|
hydrate(vnode, rootContainer);
|
|
} else {
|
|
render(vnode, rootContainer, isSVG);
|
|
}
|
|
isMounted = true;
|
|
app._container = rootContainer;
|
|
rootContainer.__vue_app__ = app;
|
|
if (true) {
|
|
app._instance = vnode.component;
|
|
devtoolsInitApp(app, version);
|
|
}
|
|
return getExposeProxy(vnode.component) || vnode.component.proxy;
|
|
} else if (true) {
|
|
warn(
|
|
`App has already been mounted.
|
|
If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\``
|
|
);
|
|
}
|
|
},
|
|
unmount() {
|
|
if (isMounted) {
|
|
render(null, app._container);
|
|
if (true) {
|
|
app._instance = null;
|
|
devtoolsUnmountApp(app);
|
|
}
|
|
delete app._container.__vue_app__;
|
|
} else if (true) {
|
|
warn(`Cannot unmount an app that is not mounted.`);
|
|
}
|
|
},
|
|
provide(key, value) {
|
|
if ( true && key in context.provides) {
|
|
warn(
|
|
`App already provides property with key "${String(key)}". It will be overwritten with the new value.`
|
|
);
|
|
}
|
|
context.provides[key] = value;
|
|
return app;
|
|
},
|
|
runWithContext(fn) {
|
|
currentApp = app;
|
|
try {
|
|
return fn();
|
|
} finally {
|
|
currentApp = null;
|
|
}
|
|
}
|
|
};
|
|
return app;
|
|
};
|
|
}
|
|
let currentApp = null;
|
|
|
|
function provide(key, value) {
|
|
if (!currentInstance) {
|
|
if (true) {
|
|
warn(`provide() can only be used inside setup().`);
|
|
}
|
|
} else {
|
|
let provides = currentInstance.provides;
|
|
const parentProvides = currentInstance.parent && currentInstance.parent.provides;
|
|
if (parentProvides === provides) {
|
|
provides = currentInstance.provides = Object.create(parentProvides);
|
|
}
|
|
provides[key] = value;
|
|
}
|
|
}
|
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
const instance = currentInstance || currentRenderingInstance;
|
|
if (instance || currentApp) {
|
|
const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides;
|
|
if (provides && key in provides) {
|
|
return provides[key];
|
|
} else if (arguments.length > 1) {
|
|
return treatDefaultAsFactory && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
|
|
} else if (true) {
|
|
warn(`injection "${String(key)}" not found.`);
|
|
}
|
|
} else if (true) {
|
|
warn(`inject() can only be used inside setup() or functional components.`);
|
|
}
|
|
}
|
|
function hasInjectionContext() {
|
|
return !!(currentInstance || currentRenderingInstance || currentApp);
|
|
}
|
|
|
|
function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
const props = {};
|
|
const attrs = {};
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.def)(attrs, InternalObjectKey, 1);
|
|
instance.propsDefaults = /* @__PURE__ */ Object.create(null);
|
|
setFullProps(instance, rawProps, props, attrs);
|
|
for (const key in instance.propsOptions[0]) {
|
|
if (!(key in props)) {
|
|
props[key] = void 0;
|
|
}
|
|
}
|
|
if (true) {
|
|
validateProps(rawProps || {}, props, instance);
|
|
}
|
|
if (isStateful) {
|
|
instance.props = isSSR ? props : (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReactive)(props);
|
|
} else {
|
|
if (!instance.type.props) {
|
|
instance.props = attrs;
|
|
} else {
|
|
instance.props = props;
|
|
}
|
|
}
|
|
instance.attrs = attrs;
|
|
}
|
|
function isInHmrContext(instance) {
|
|
while (instance) {
|
|
if (instance.type.__hmrId)
|
|
return true;
|
|
instance = instance.parent;
|
|
}
|
|
}
|
|
function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
const {
|
|
props,
|
|
attrs,
|
|
vnode: { patchFlag }
|
|
} = instance;
|
|
const rawCurrentProps = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(props);
|
|
const [options] = instance.propsOptions;
|
|
let hasAttrsChanged = false;
|
|
if (
|
|
// always force full diff in dev
|
|
// - #1942 if hmr is enabled with sfc component
|
|
// - vite#872 non-sfc component used by sfc component
|
|
!( true && isInHmrContext(instance)) && (optimized || patchFlag > 0) && !(patchFlag & 16)
|
|
) {
|
|
if (patchFlag & 8) {
|
|
const propsToUpdate = instance.vnode.dynamicProps;
|
|
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
let key = propsToUpdate[i];
|
|
if (isEmitListener(instance.emitsOptions, key)) {
|
|
continue;
|
|
}
|
|
const value = rawProps[key];
|
|
if (options) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(attrs, key)) {
|
|
if (value !== attrs[key]) {
|
|
attrs[key] = value;
|
|
hasAttrsChanged = true;
|
|
}
|
|
} else {
|
|
const camelizedKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(key);
|
|
props[camelizedKey] = resolvePropValue(
|
|
options,
|
|
rawCurrentProps,
|
|
camelizedKey,
|
|
value,
|
|
instance,
|
|
false
|
|
/* isAbsent */
|
|
);
|
|
}
|
|
} else {
|
|
if (value !== attrs[key]) {
|
|
attrs[key] = value;
|
|
hasAttrsChanged = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
if (setFullProps(instance, rawProps, props, attrs)) {
|
|
hasAttrsChanged = true;
|
|
}
|
|
let kebabKey;
|
|
for (const key in rawCurrentProps) {
|
|
if (!rawProps || // for camelCase
|
|
!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(rawProps, key) && // it's possible the original props was passed in as kebab-case
|
|
// and converted to camelCase (#955)
|
|
((kebabKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(key)) === key || !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(rawProps, kebabKey))) {
|
|
if (options) {
|
|
if (rawPrevProps && // for camelCase
|
|
(rawPrevProps[key] !== void 0 || // for kebab-case
|
|
rawPrevProps[kebabKey] !== void 0)) {
|
|
props[key] = resolvePropValue(
|
|
options,
|
|
rawCurrentProps,
|
|
key,
|
|
void 0,
|
|
instance,
|
|
true
|
|
/* isAbsent */
|
|
);
|
|
}
|
|
} else {
|
|
delete props[key];
|
|
}
|
|
}
|
|
}
|
|
if (attrs !== rawCurrentProps) {
|
|
for (const key in attrs) {
|
|
if (!rawProps || !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(rawProps, key) && true) {
|
|
delete attrs[key];
|
|
hasAttrsChanged = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (hasAttrsChanged) {
|
|
(0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.trigger)(instance, "set", "$attrs");
|
|
}
|
|
if (true) {
|
|
validateProps(rawProps || {}, props, instance);
|
|
}
|
|
}
|
|
function setFullProps(instance, rawProps, props, attrs) {
|
|
const [options, needCastKeys] = instance.propsOptions;
|
|
let hasAttrsChanged = false;
|
|
let rawCastValues;
|
|
if (rawProps) {
|
|
for (let key in rawProps) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isReservedProp)(key)) {
|
|
continue;
|
|
}
|
|
const value = rawProps[key];
|
|
let camelKey;
|
|
if (options && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(options, camelKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(key))) {
|
|
if (!needCastKeys || !needCastKeys.includes(camelKey)) {
|
|
props[camelKey] = value;
|
|
} else {
|
|
(rawCastValues || (rawCastValues = {}))[camelKey] = value;
|
|
}
|
|
} else if (!isEmitListener(instance.emitsOptions, key)) {
|
|
if (!(key in attrs) || value !== attrs[key]) {
|
|
attrs[key] = value;
|
|
hasAttrsChanged = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (needCastKeys) {
|
|
const rawCurrentProps = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(props);
|
|
const castValues = rawCastValues || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ;
|
|
for (let i = 0; i < needCastKeys.length; i++) {
|
|
const key = needCastKeys[i];
|
|
props[key] = resolvePropValue(
|
|
options,
|
|
rawCurrentProps,
|
|
key,
|
|
castValues[key],
|
|
instance,
|
|
!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(castValues, key)
|
|
);
|
|
}
|
|
}
|
|
return hasAttrsChanged;
|
|
}
|
|
function resolvePropValue(options, props, key, value, instance, isAbsent) {
|
|
const opt = options[key];
|
|
if (opt != null) {
|
|
const hasDefault = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(opt, "default");
|
|
if (hasDefault && value === void 0) {
|
|
const defaultValue = opt.default;
|
|
if (opt.type !== Function && !opt.skipFactory && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(defaultValue)) {
|
|
const { propsDefaults } = instance;
|
|
if (key in propsDefaults) {
|
|
value = propsDefaults[key];
|
|
} else {
|
|
setCurrentInstance(instance);
|
|
value = propsDefaults[key] = defaultValue.call(
|
|
null,
|
|
props
|
|
);
|
|
unsetCurrentInstance();
|
|
}
|
|
} else {
|
|
value = defaultValue;
|
|
}
|
|
}
|
|
if (opt[0 /* shouldCast */]) {
|
|
if (isAbsent && !hasDefault) {
|
|
value = false;
|
|
} else if (opt[1 /* shouldCastTrue */] && (value === "" || value === (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(key))) {
|
|
value = true;
|
|
}
|
|
}
|
|
}
|
|
return value;
|
|
}
|
|
function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
const cache = appContext.propsCache;
|
|
const cached = cache.get(comp);
|
|
if (cached) {
|
|
return cached;
|
|
}
|
|
const raw = comp.props;
|
|
const normalized = {};
|
|
const needCastKeys = [];
|
|
let hasExtends = false;
|
|
if ( true && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(comp)) {
|
|
const extendProps = (raw2) => {
|
|
hasExtends = true;
|
|
const [props, keys] = normalizePropsOptions(raw2, appContext, true);
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(normalized, props);
|
|
if (keys)
|
|
needCastKeys.push(...keys);
|
|
};
|
|
if (!asMixin && appContext.mixins.length) {
|
|
appContext.mixins.forEach(extendProps);
|
|
}
|
|
if (comp.extends) {
|
|
extendProps(comp.extends);
|
|
}
|
|
if (comp.mixins) {
|
|
comp.mixins.forEach(extendProps);
|
|
}
|
|
}
|
|
if (!raw && !hasExtends) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(comp)) {
|
|
cache.set(comp, _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_ARR);
|
|
}
|
|
return _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_ARR;
|
|
}
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(raw)) {
|
|
for (let i = 0; i < raw.length; i++) {
|
|
if ( true && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(raw[i])) {
|
|
warn(`props must be strings when using array syntax.`, raw[i]);
|
|
}
|
|
const normalizedKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(raw[i]);
|
|
if (validatePropName(normalizedKey)) {
|
|
normalized[normalizedKey] = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ;
|
|
}
|
|
}
|
|
} else if (raw) {
|
|
if ( true && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(raw)) {
|
|
warn(`invalid props options`, raw);
|
|
}
|
|
for (const key in raw) {
|
|
const normalizedKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(key);
|
|
if (validatePropName(normalizedKey)) {
|
|
const opt = raw[key];
|
|
const prop = normalized[normalizedKey] = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(opt) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(opt) ? { type: opt } : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, opt);
|
|
if (prop) {
|
|
const booleanIndex = getTypeIndex(Boolean, prop.type);
|
|
const stringIndex = getTypeIndex(String, prop.type);
|
|
prop[0 /* shouldCast */] = booleanIndex > -1;
|
|
prop[1 /* shouldCastTrue */] = stringIndex < 0 || booleanIndex < stringIndex;
|
|
if (booleanIndex > -1 || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(prop, "default")) {
|
|
needCastKeys.push(normalizedKey);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const res = [normalized, needCastKeys];
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(comp)) {
|
|
cache.set(comp, res);
|
|
}
|
|
return res;
|
|
}
|
|
function validatePropName(key) {
|
|
if (key[0] !== "$") {
|
|
return true;
|
|
} else if (true) {
|
|
warn(`Invalid prop name: "${key}" is a reserved property.`);
|
|
}
|
|
return false;
|
|
}
|
|
function getType(ctor) {
|
|
const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/);
|
|
return match ? match[2] : ctor === null ? "null" : "";
|
|
}
|
|
function isSameType(a, b) {
|
|
return getType(a) === getType(b);
|
|
}
|
|
function getTypeIndex(type, expectedTypes) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(expectedTypes)) {
|
|
return expectedTypes.findIndex((t) => isSameType(t, type));
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(expectedTypes)) {
|
|
return isSameType(expectedTypes, type) ? 0 : -1;
|
|
}
|
|
return -1;
|
|
}
|
|
function validateProps(rawProps, props, instance) {
|
|
const resolvedValues = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(props);
|
|
const options = instance.propsOptions[0];
|
|
for (const key in options) {
|
|
let opt = options[key];
|
|
if (opt == null)
|
|
continue;
|
|
validateProp(
|
|
key,
|
|
resolvedValues[key],
|
|
opt,
|
|
!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(rawProps, key) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(rawProps, (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(key))
|
|
);
|
|
}
|
|
}
|
|
function validateProp(name, value, prop, isAbsent) {
|
|
const { type, required, validator, skipCheck } = prop;
|
|
if (required && isAbsent) {
|
|
warn('Missing required prop: "' + name + '"');
|
|
return;
|
|
}
|
|
if (value == null && !required) {
|
|
return;
|
|
}
|
|
if (type != null && type !== true && !skipCheck) {
|
|
let isValid = false;
|
|
const types = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(type) ? type : [type];
|
|
const expectedTypes = [];
|
|
for (let i = 0; i < types.length && !isValid; i++) {
|
|
const { valid, expectedType } = assertType(value, types[i]);
|
|
expectedTypes.push(expectedType || "");
|
|
isValid = valid;
|
|
}
|
|
if (!isValid) {
|
|
warn(getInvalidTypeMessage(name, value, expectedTypes));
|
|
return;
|
|
}
|
|
}
|
|
if (validator && !validator(value)) {
|
|
warn('Invalid prop: custom validator check failed for prop "' + name + '".');
|
|
}
|
|
}
|
|
const isSimpleType = /* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.makeMap)(
|
|
"String,Number,Boolean,Function,Symbol,BigInt"
|
|
);
|
|
function assertType(value, type) {
|
|
let valid;
|
|
const expectedType = getType(type);
|
|
if (isSimpleType(expectedType)) {
|
|
const t = typeof value;
|
|
valid = t === expectedType.toLowerCase();
|
|
if (!valid && t === "object") {
|
|
valid = value instanceof type;
|
|
}
|
|
} else if (expectedType === "Object") {
|
|
valid = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(value);
|
|
} else if (expectedType === "Array") {
|
|
valid = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value);
|
|
} else if (expectedType === "null") {
|
|
valid = value === null;
|
|
} else {
|
|
valid = value instanceof type;
|
|
}
|
|
return {
|
|
valid,
|
|
expectedType
|
|
};
|
|
}
|
|
function getInvalidTypeMessage(name, value, expectedTypes) {
|
|
let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(_vue_shared__WEBPACK_IMPORTED_MODULE_1__.capitalize).join(" | ")}`;
|
|
const expectedType = expectedTypes[0];
|
|
const receivedType = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toRawType)(value);
|
|
const expectedValue = styleValue(value, expectedType);
|
|
const receivedValue = styleValue(value, receivedType);
|
|
if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
|
|
message += ` with value ${expectedValue}`;
|
|
}
|
|
message += `, got ${receivedType} `;
|
|
if (isExplicable(receivedType)) {
|
|
message += `with value ${receivedValue}.`;
|
|
}
|
|
return message;
|
|
}
|
|
function styleValue(value, type) {
|
|
if (type === "String") {
|
|
return `"${value}"`;
|
|
} else if (type === "Number") {
|
|
return `${Number(value)}`;
|
|
} else {
|
|
return `${value}`;
|
|
}
|
|
}
|
|
function isExplicable(type) {
|
|
const explicitTypes = ["string", "number", "boolean"];
|
|
return explicitTypes.some((elem) => type.toLowerCase() === elem);
|
|
}
|
|
function isBoolean(...args) {
|
|
return args.some((elem) => elem.toLowerCase() === "boolean");
|
|
}
|
|
|
|
const isInternalKey = (key) => key[0] === "_" || key === "$stable";
|
|
const normalizeSlotValue = (value) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
|
|
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
if (rawSlot._n) {
|
|
return rawSlot;
|
|
}
|
|
const normalized = withCtx((...args) => {
|
|
if ( true && currentInstance) {
|
|
warn(
|
|
`Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
|
|
);
|
|
}
|
|
return normalizeSlotValue(rawSlot(...args));
|
|
}, ctx);
|
|
normalized._c = false;
|
|
return normalized;
|
|
};
|
|
const normalizeObjectSlots = (rawSlots, slots, instance) => {
|
|
const ctx = rawSlots._ctx;
|
|
for (const key in rawSlots) {
|
|
if (isInternalKey(key))
|
|
continue;
|
|
const value = rawSlots[key];
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(value)) {
|
|
slots[key] = normalizeSlot(key, value, ctx);
|
|
} else if (value != null) {
|
|
if (true) {
|
|
warn(
|
|
`Non-function value encountered for slot "${key}". Prefer function slots for better performance.`
|
|
);
|
|
}
|
|
const normalized = normalizeSlotValue(value);
|
|
slots[key] = () => normalized;
|
|
}
|
|
}
|
|
};
|
|
const normalizeVNodeSlots = (instance, children) => {
|
|
if ( true && !isKeepAlive(instance.vnode) && true) {
|
|
warn(
|
|
`Non-function value encountered for default slot. Prefer function slots for better performance.`
|
|
);
|
|
}
|
|
const normalized = normalizeSlotValue(children);
|
|
instance.slots.default = () => normalized;
|
|
};
|
|
const initSlots = (instance, children) => {
|
|
if (instance.vnode.shapeFlag & 32) {
|
|
const type = children._;
|
|
if (type) {
|
|
instance.slots = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(children);
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.def)(children, "_", type);
|
|
} else {
|
|
normalizeObjectSlots(
|
|
children,
|
|
instance.slots = {});
|
|
}
|
|
} else {
|
|
instance.slots = {};
|
|
if (children) {
|
|
normalizeVNodeSlots(instance, children);
|
|
}
|
|
}
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.def)(instance.slots, InternalObjectKey, 1);
|
|
};
|
|
const updateSlots = (instance, children, optimized) => {
|
|
const { vnode, slots } = instance;
|
|
let needDeletionCheck = true;
|
|
let deletionComparisonTarget = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ;
|
|
if (vnode.shapeFlag & 32) {
|
|
const type = children._;
|
|
if (type) {
|
|
if ( true && isHmrUpdating) {
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(slots, children);
|
|
(0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.trigger)(instance, "set", "$slots");
|
|
} else if (optimized && type === 1) {
|
|
needDeletionCheck = false;
|
|
} else {
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(slots, children);
|
|
if (!optimized && type === 1) {
|
|
delete slots._;
|
|
}
|
|
}
|
|
} else {
|
|
needDeletionCheck = !children.$stable;
|
|
normalizeObjectSlots(children, slots);
|
|
}
|
|
deletionComparisonTarget = children;
|
|
} else if (children) {
|
|
normalizeVNodeSlots(instance, children);
|
|
deletionComparisonTarget = { default: 1 };
|
|
}
|
|
if (needDeletionCheck) {
|
|
for (const key in slots) {
|
|
if (!isInternalKey(key) && !(key in deletionComparisonTarget)) {
|
|
delete slots[key];
|
|
}
|
|
}
|
|
}
|
|
};
|
|
|
|
function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(rawRef)) {
|
|
rawRef.forEach(
|
|
(r, i) => setRef(
|
|
r,
|
|
oldRawRef && ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(oldRawRef) ? oldRawRef[i] : oldRawRef),
|
|
parentSuspense,
|
|
vnode,
|
|
isUnmount
|
|
)
|
|
);
|
|
return;
|
|
}
|
|
if (isAsyncWrapper(vnode) && !isUnmount) {
|
|
return;
|
|
}
|
|
const refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el;
|
|
const value = isUnmount ? null : refValue;
|
|
const { i: owner, r: ref } = rawRef;
|
|
if ( true && !owner) {
|
|
warn(
|
|
`Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.`
|
|
);
|
|
return;
|
|
}
|
|
const oldRef = oldRawRef && oldRawRef.r;
|
|
const refs = owner.refs === _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ ? owner.refs = {} : owner.refs;
|
|
const setupState = owner.setupState;
|
|
if (oldRef != null && oldRef !== ref) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(oldRef)) {
|
|
refs[oldRef] = null;
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(setupState, oldRef)) {
|
|
setupState[oldRef] = null;
|
|
}
|
|
} else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(oldRef)) {
|
|
oldRef.value = null;
|
|
}
|
|
}
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(ref)) {
|
|
callWithErrorHandling(ref, owner, 12, [value, refs]);
|
|
} else {
|
|
const _isString = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(ref);
|
|
const _isRef = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(ref);
|
|
if (_isString || _isRef) {
|
|
const doSet = () => {
|
|
if (rawRef.f) {
|
|
const existing = _isString ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(setupState, ref) ? setupState[ref] : refs[ref] : ref.value;
|
|
if (isUnmount) {
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(existing) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.remove)(existing, refValue);
|
|
} else {
|
|
if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(existing)) {
|
|
if (_isString) {
|
|
refs[ref] = [refValue];
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(setupState, ref)) {
|
|
setupState[ref] = refs[ref];
|
|
}
|
|
} else {
|
|
ref.value = [refValue];
|
|
if (rawRef.k)
|
|
refs[rawRef.k] = ref.value;
|
|
}
|
|
} else if (!existing.includes(refValue)) {
|
|
existing.push(refValue);
|
|
}
|
|
}
|
|
} else if (_isString) {
|
|
refs[ref] = value;
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(setupState, ref)) {
|
|
setupState[ref] = value;
|
|
}
|
|
} else if (_isRef) {
|
|
ref.value = value;
|
|
if (rawRef.k)
|
|
refs[rawRef.k] = value;
|
|
} else if (true) {
|
|
warn("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
}
|
|
};
|
|
if (value) {
|
|
doSet.id = -1;
|
|
queuePostRenderEffect(doSet, parentSuspense);
|
|
} else {
|
|
doSet();
|
|
}
|
|
} else if (true) {
|
|
warn("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
}
|
|
}
|
|
}
|
|
|
|
let hasMismatch = false;
|
|
const isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== "foreignObject";
|
|
const isComment = (node) => node.nodeType === 8 /* COMMENT */;
|
|
function createHydrationFunctions(rendererInternals) {
|
|
const {
|
|
mt: mountComponent,
|
|
p: patch,
|
|
o: {
|
|
patchProp,
|
|
createText,
|
|
nextSibling,
|
|
parentNode,
|
|
remove,
|
|
insert,
|
|
createComment
|
|
}
|
|
} = rendererInternals;
|
|
const hydrate = (vnode, container) => {
|
|
if (!container.hasChildNodes()) {
|
|
true && warn(
|
|
`Attempting to hydrate existing markup but container is empty. Performing full mount instead.`
|
|
);
|
|
patch(null, vnode, container);
|
|
flushPostFlushCbs();
|
|
container._vnode = vnode;
|
|
return;
|
|
}
|
|
hasMismatch = false;
|
|
hydrateNode(container.firstChild, vnode, null, null, null);
|
|
flushPostFlushCbs();
|
|
container._vnode = vnode;
|
|
if (hasMismatch && true) {
|
|
console.error(`Hydration completed but contains mismatches.`);
|
|
}
|
|
};
|
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
const isFragmentStart = isComment(node) && node.data === "[";
|
|
const onMismatch = () => handleMismatch(
|
|
node,
|
|
vnode,
|
|
parentComponent,
|
|
parentSuspense,
|
|
slotScopeIds,
|
|
isFragmentStart
|
|
);
|
|
const { type, ref, shapeFlag, patchFlag } = vnode;
|
|
let domType = node.nodeType;
|
|
vnode.el = node;
|
|
if (patchFlag === -2) {
|
|
optimized = false;
|
|
vnode.dynamicChildren = null;
|
|
}
|
|
let nextNode = null;
|
|
switch (type) {
|
|
case Text:
|
|
if (domType !== 3 /* TEXT */) {
|
|
if (vnode.children === "") {
|
|
insert(vnode.el = createText(""), parentNode(node), node);
|
|
nextNode = node;
|
|
} else {
|
|
nextNode = onMismatch();
|
|
}
|
|
} else {
|
|
if (node.data !== vnode.children) {
|
|
hasMismatch = true;
|
|
true && warn(
|
|
`Hydration text mismatch:
|
|
- Client: ${JSON.stringify(node.data)}
|
|
- Server: ${JSON.stringify(vnode.children)}`
|
|
);
|
|
node.data = vnode.children;
|
|
}
|
|
nextNode = nextSibling(node);
|
|
}
|
|
break;
|
|
case Comment:
|
|
if (domType !== 8 /* COMMENT */ || isFragmentStart) {
|
|
nextNode = onMismatch();
|
|
} else {
|
|
nextNode = nextSibling(node);
|
|
}
|
|
break;
|
|
case Static:
|
|
if (isFragmentStart) {
|
|
node = nextSibling(node);
|
|
domType = node.nodeType;
|
|
}
|
|
if (domType === 1 /* ELEMENT */ || domType === 3 /* TEXT */) {
|
|
nextNode = node;
|
|
const needToAdoptContent = !vnode.children.length;
|
|
for (let i = 0; i < vnode.staticCount; i++) {
|
|
if (needToAdoptContent)
|
|
vnode.children += nextNode.nodeType === 1 /* ELEMENT */ ? nextNode.outerHTML : nextNode.data;
|
|
if (i === vnode.staticCount - 1) {
|
|
vnode.anchor = nextNode;
|
|
}
|
|
nextNode = nextSibling(nextNode);
|
|
}
|
|
return isFragmentStart ? nextSibling(nextNode) : nextNode;
|
|
} else {
|
|
onMismatch();
|
|
}
|
|
break;
|
|
case Fragment:
|
|
if (!isFragmentStart) {
|
|
nextNode = onMismatch();
|
|
} else {
|
|
nextNode = hydrateFragment(
|
|
node,
|
|
vnode,
|
|
parentComponent,
|
|
parentSuspense,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
}
|
|
break;
|
|
default:
|
|
if (shapeFlag & 1) {
|
|
if (domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) {
|
|
nextNode = onMismatch();
|
|
} else {
|
|
nextNode = hydrateElement(
|
|
node,
|
|
vnode,
|
|
parentComponent,
|
|
parentSuspense,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
}
|
|
} else if (shapeFlag & 6) {
|
|
vnode.slotScopeIds = slotScopeIds;
|
|
const container = parentNode(node);
|
|
mountComponent(
|
|
vnode,
|
|
container,
|
|
null,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVGContainer(container),
|
|
optimized
|
|
);
|
|
nextNode = isFragmentStart ? locateClosingAsyncAnchor(node) : nextSibling(node);
|
|
if (nextNode && isComment(nextNode) && nextNode.data === "teleport end") {
|
|
nextNode = nextSibling(nextNode);
|
|
}
|
|
if (isAsyncWrapper(vnode)) {
|
|
let subTree;
|
|
if (isFragmentStart) {
|
|
subTree = createVNode(Fragment);
|
|
subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
|
|
} else {
|
|
subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
|
|
}
|
|
subTree.el = node;
|
|
vnode.component.subTree = subTree;
|
|
}
|
|
} else if (shapeFlag & 64) {
|
|
if (domType !== 8 /* COMMENT */) {
|
|
nextNode = onMismatch();
|
|
} else {
|
|
nextNode = vnode.type.hydrate(
|
|
node,
|
|
vnode,
|
|
parentComponent,
|
|
parentSuspense,
|
|
slotScopeIds,
|
|
optimized,
|
|
rendererInternals,
|
|
hydrateChildren
|
|
);
|
|
}
|
|
} else if (shapeFlag & 128) {
|
|
nextNode = vnode.type.hydrate(
|
|
node,
|
|
vnode,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVGContainer(parentNode(node)),
|
|
slotScopeIds,
|
|
optimized,
|
|
rendererInternals,
|
|
hydrateNode
|
|
);
|
|
} else if (true) {
|
|
warn("Invalid HostVNode type:", type, `(${typeof type})`);
|
|
}
|
|
}
|
|
if (ref != null) {
|
|
setRef(ref, null, parentSuspense, vnode);
|
|
}
|
|
return nextNode;
|
|
};
|
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
const { type, props, patchFlag, shapeFlag, dirs } = vnode;
|
|
const forcePatchValue = type === "input" && dirs || type === "option";
|
|
if (true) {
|
|
if (dirs) {
|
|
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
}
|
|
if (props) {
|
|
if (forcePatchValue || !optimized || patchFlag & (16 | 32)) {
|
|
for (const key in props) {
|
|
if (forcePatchValue && key.endsWith("value") || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isOn)(key) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isReservedProp)(key)) {
|
|
patchProp(
|
|
el,
|
|
key,
|
|
null,
|
|
props[key],
|
|
false,
|
|
void 0,
|
|
parentComponent
|
|
);
|
|
}
|
|
}
|
|
} else if (props.onClick) {
|
|
patchProp(
|
|
el,
|
|
"onClick",
|
|
null,
|
|
props.onClick,
|
|
false,
|
|
void 0,
|
|
parentComponent
|
|
);
|
|
}
|
|
}
|
|
let vnodeHooks;
|
|
if (vnodeHooks = props && props.onVnodeBeforeMount) {
|
|
invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
}
|
|
if (dirs) {
|
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
}
|
|
if ((vnodeHooks = props && props.onVnodeMounted) || dirs) {
|
|
queueEffectWithSuspense(() => {
|
|
vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
}, parentSuspense);
|
|
}
|
|
if (shapeFlag & 16 && // skip if element has innerHTML / textContent
|
|
!(props && (props.innerHTML || props.textContent))) {
|
|
let next = hydrateChildren(
|
|
el.firstChild,
|
|
vnode,
|
|
el,
|
|
parentComponent,
|
|
parentSuspense,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
let hasWarned = false;
|
|
while (next) {
|
|
hasMismatch = true;
|
|
if ( true && !hasWarned) {
|
|
warn(
|
|
`Hydration children mismatch in <${vnode.type}>: server rendered element contains more child nodes than client vdom.`
|
|
);
|
|
hasWarned = true;
|
|
}
|
|
const cur = next;
|
|
next = next.nextSibling;
|
|
remove(cur);
|
|
}
|
|
} else if (shapeFlag & 8) {
|
|
if (el.textContent !== vnode.children) {
|
|
hasMismatch = true;
|
|
true && warn(
|
|
`Hydration text content mismatch in <${vnode.type}>:
|
|
- Client: ${el.textContent}
|
|
- Server: ${vnode.children}`
|
|
);
|
|
el.textContent = vnode.children;
|
|
}
|
|
}
|
|
}
|
|
return el.nextSibling;
|
|
};
|
|
const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
optimized = optimized || !!parentVNode.dynamicChildren;
|
|
const children = parentVNode.children;
|
|
const l = children.length;
|
|
let hasWarned = false;
|
|
for (let i = 0; i < l; i++) {
|
|
const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
|
|
if (node) {
|
|
node = hydrateNode(
|
|
node,
|
|
vnode,
|
|
parentComponent,
|
|
parentSuspense,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
} else if (vnode.type === Text && !vnode.children) {
|
|
continue;
|
|
} else {
|
|
hasMismatch = true;
|
|
if ( true && !hasWarned) {
|
|
warn(
|
|
`Hydration children mismatch in <${container.tagName.toLowerCase()}>: server rendered element contains fewer child nodes than client vdom.`
|
|
);
|
|
hasWarned = true;
|
|
}
|
|
patch(
|
|
null,
|
|
vnode,
|
|
container,
|
|
null,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVGContainer(container),
|
|
slotScopeIds
|
|
);
|
|
}
|
|
}
|
|
return node;
|
|
};
|
|
const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
const { slotScopeIds: fragmentSlotScopeIds } = vnode;
|
|
if (fragmentSlotScopeIds) {
|
|
slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
|
|
}
|
|
const container = parentNode(node);
|
|
const next = hydrateChildren(
|
|
nextSibling(node),
|
|
vnode,
|
|
container,
|
|
parentComponent,
|
|
parentSuspense,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
if (next && isComment(next) && next.data === "]") {
|
|
return nextSibling(vnode.anchor = next);
|
|
} else {
|
|
hasMismatch = true;
|
|
insert(vnode.anchor = createComment(`]`), container, next);
|
|
return next;
|
|
}
|
|
};
|
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
hasMismatch = true;
|
|
true && warn(
|
|
`Hydration node mismatch:
|
|
- Client vnode:`,
|
|
vnode.type,
|
|
`
|
|
- Server rendered DOM:`,
|
|
node,
|
|
node.nodeType === 3 /* TEXT */ ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``
|
|
);
|
|
vnode.el = null;
|
|
if (isFragment) {
|
|
const end = locateClosingAsyncAnchor(node);
|
|
while (true) {
|
|
const next2 = nextSibling(node);
|
|
if (next2 && next2 !== end) {
|
|
remove(next2);
|
|
} else {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
const next = nextSibling(node);
|
|
const container = parentNode(node);
|
|
remove(node);
|
|
patch(
|
|
null,
|
|
vnode,
|
|
container,
|
|
next,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVGContainer(container),
|
|
slotScopeIds
|
|
);
|
|
return next;
|
|
};
|
|
const locateClosingAsyncAnchor = (node) => {
|
|
let match = 0;
|
|
while (node) {
|
|
node = nextSibling(node);
|
|
if (node && isComment(node)) {
|
|
if (node.data === "[")
|
|
match++;
|
|
if (node.data === "]") {
|
|
if (match === 0) {
|
|
return nextSibling(node);
|
|
} else {
|
|
match--;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return node;
|
|
};
|
|
return [hydrate, hydrateNode];
|
|
}
|
|
|
|
let supported;
|
|
let perf;
|
|
function startMeasure(instance, type) {
|
|
if (instance.appContext.config.performance && isSupported()) {
|
|
perf.mark(`vue-${type}-${instance.uid}`);
|
|
}
|
|
if (true) {
|
|
devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
|
|
}
|
|
}
|
|
function endMeasure(instance, type) {
|
|
if (instance.appContext.config.performance && isSupported()) {
|
|
const startTag = `vue-${type}-${instance.uid}`;
|
|
const endTag = startTag + `:end`;
|
|
perf.mark(endTag);
|
|
perf.measure(
|
|
`<${formatComponentName(instance, instance.type)}> ${type}`,
|
|
startTag,
|
|
endTag
|
|
);
|
|
perf.clearMarks(startTag);
|
|
perf.clearMarks(endTag);
|
|
}
|
|
if (true) {
|
|
devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
|
|
}
|
|
}
|
|
function isSupported() {
|
|
if (supported !== void 0) {
|
|
return supported;
|
|
}
|
|
if (typeof window !== "undefined" && window.performance) {
|
|
supported = true;
|
|
perf = window.performance;
|
|
} else {
|
|
supported = false;
|
|
}
|
|
return supported;
|
|
}
|
|
|
|
function initFeatureFlags() {
|
|
const needWarn = [];
|
|
if (false) {}
|
|
if (false) {}
|
|
if ( true && needWarn.length) {
|
|
const multi = needWarn.length > 1;
|
|
console.warn(
|
|
`Feature flag${multi ? `s` : ``} ${needWarn.join(", ")} ${multi ? `are` : `is`} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
|
|
|
|
For more details, see https://link.vuejs.org/feature-flags.`
|
|
);
|
|
}
|
|
}
|
|
|
|
const queuePostRenderEffect = queueEffectWithSuspense ;
|
|
function createRenderer(options) {
|
|
return baseCreateRenderer(options);
|
|
}
|
|
function createHydrationRenderer(options) {
|
|
return baseCreateRenderer(options, createHydrationFunctions);
|
|
}
|
|
function baseCreateRenderer(options, createHydrationFns) {
|
|
{
|
|
initFeatureFlags();
|
|
}
|
|
const target = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.getGlobalThis)();
|
|
target.__VUE__ = true;
|
|
if (true) {
|
|
setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
|
|
}
|
|
const {
|
|
insert: hostInsert,
|
|
remove: hostRemove,
|
|
patchProp: hostPatchProp,
|
|
createElement: hostCreateElement,
|
|
createText: hostCreateText,
|
|
createComment: hostCreateComment,
|
|
setText: hostSetText,
|
|
setElementText: hostSetElementText,
|
|
parentNode: hostParentNode,
|
|
nextSibling: hostNextSibling,
|
|
setScopeId: hostSetScopeId = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP,
|
|
insertStaticContent: hostInsertStaticContent
|
|
} = options;
|
|
const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = true && isHmrUpdating ? false : !!n2.dynamicChildren) => {
|
|
if (n1 === n2) {
|
|
return;
|
|
}
|
|
if (n1 && !isSameVNodeType(n1, n2)) {
|
|
anchor = getNextHostNode(n1);
|
|
unmount(n1, parentComponent, parentSuspense, true);
|
|
n1 = null;
|
|
}
|
|
if (n2.patchFlag === -2) {
|
|
optimized = false;
|
|
n2.dynamicChildren = null;
|
|
}
|
|
const { type, ref, shapeFlag } = n2;
|
|
switch (type) {
|
|
case Text:
|
|
processText(n1, n2, container, anchor);
|
|
break;
|
|
case Comment:
|
|
processCommentNode(n1, n2, container, anchor);
|
|
break;
|
|
case Static:
|
|
if (n1 == null) {
|
|
mountStaticNode(n2, container, anchor, isSVG);
|
|
} else if (true) {
|
|
patchStaticNode(n1, n2, container, isSVG);
|
|
}
|
|
break;
|
|
case Fragment:
|
|
processFragment(
|
|
n1,
|
|
n2,
|
|
container,
|
|
anchor,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
break;
|
|
default:
|
|
if (shapeFlag & 1) {
|
|
processElement(
|
|
n1,
|
|
n2,
|
|
container,
|
|
anchor,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
} else if (shapeFlag & 6) {
|
|
processComponent(
|
|
n1,
|
|
n2,
|
|
container,
|
|
anchor,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
} else if (shapeFlag & 64) {
|
|
type.process(
|
|
n1,
|
|
n2,
|
|
container,
|
|
anchor,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized,
|
|
internals
|
|
);
|
|
} else if (shapeFlag & 128) {
|
|
type.process(
|
|
n1,
|
|
n2,
|
|
container,
|
|
anchor,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized,
|
|
internals
|
|
);
|
|
} else if (true) {
|
|
warn("Invalid VNode type:", type, `(${typeof type})`);
|
|
}
|
|
}
|
|
if (ref != null && parentComponent) {
|
|
setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
|
|
}
|
|
};
|
|
const processText = (n1, n2, container, anchor) => {
|
|
if (n1 == null) {
|
|
hostInsert(
|
|
n2.el = hostCreateText(n2.children),
|
|
container,
|
|
anchor
|
|
);
|
|
} else {
|
|
const el = n2.el = n1.el;
|
|
if (n2.children !== n1.children) {
|
|
hostSetText(el, n2.children);
|
|
}
|
|
}
|
|
};
|
|
const processCommentNode = (n1, n2, container, anchor) => {
|
|
if (n1 == null) {
|
|
hostInsert(
|
|
n2.el = hostCreateComment(n2.children || ""),
|
|
container,
|
|
anchor
|
|
);
|
|
} else {
|
|
n2.el = n1.el;
|
|
}
|
|
};
|
|
const mountStaticNode = (n2, container, anchor, isSVG) => {
|
|
[n2.el, n2.anchor] = hostInsertStaticContent(
|
|
n2.children,
|
|
container,
|
|
anchor,
|
|
isSVG,
|
|
n2.el,
|
|
n2.anchor
|
|
);
|
|
};
|
|
const patchStaticNode = (n1, n2, container, isSVG) => {
|
|
if (n2.children !== n1.children) {
|
|
const anchor = hostNextSibling(n1.anchor);
|
|
removeStaticNode(n1);
|
|
[n2.el, n2.anchor] = hostInsertStaticContent(
|
|
n2.children,
|
|
container,
|
|
anchor,
|
|
isSVG
|
|
);
|
|
} else {
|
|
n2.el = n1.el;
|
|
n2.anchor = n1.anchor;
|
|
}
|
|
};
|
|
const moveStaticNode = ({ el, anchor }, container, nextSibling) => {
|
|
let next;
|
|
while (el && el !== anchor) {
|
|
next = hostNextSibling(el);
|
|
hostInsert(el, container, nextSibling);
|
|
el = next;
|
|
}
|
|
hostInsert(anchor, container, nextSibling);
|
|
};
|
|
const removeStaticNode = ({ el, anchor }) => {
|
|
let next;
|
|
while (el && el !== anchor) {
|
|
next = hostNextSibling(el);
|
|
hostRemove(el);
|
|
el = next;
|
|
}
|
|
hostRemove(anchor);
|
|
};
|
|
const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
|
|
isSVG = isSVG || n2.type === "svg";
|
|
if (n1 == null) {
|
|
mountElement(
|
|
n2,
|
|
container,
|
|
anchor,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
} else {
|
|
patchElement(
|
|
n1,
|
|
n2,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
}
|
|
};
|
|
const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
|
|
let el;
|
|
let vnodeHook;
|
|
const { type, props, shapeFlag, transition, dirs } = vnode;
|
|
el = vnode.el = hostCreateElement(
|
|
vnode.type,
|
|
isSVG,
|
|
props && props.is,
|
|
props
|
|
);
|
|
if (shapeFlag & 8) {
|
|
hostSetElementText(el, vnode.children);
|
|
} else if (shapeFlag & 16) {
|
|
mountChildren(
|
|
vnode.children,
|
|
el,
|
|
null,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG && type !== "foreignObject",
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
}
|
|
if (dirs) {
|
|
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
}
|
|
setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
|
|
if (props) {
|
|
for (const key in props) {
|
|
if (key !== "value" && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isReservedProp)(key)) {
|
|
hostPatchProp(
|
|
el,
|
|
key,
|
|
null,
|
|
props[key],
|
|
isSVG,
|
|
vnode.children,
|
|
parentComponent,
|
|
parentSuspense,
|
|
unmountChildren
|
|
);
|
|
}
|
|
}
|
|
if ("value" in props) {
|
|
hostPatchProp(el, "value", null, props.value);
|
|
}
|
|
if (vnodeHook = props.onVnodeBeforeMount) {
|
|
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
}
|
|
}
|
|
if (true) {
|
|
Object.defineProperty(el, "__vnode", {
|
|
value: vnode,
|
|
enumerable: false
|
|
});
|
|
Object.defineProperty(el, "__vueParentComponent", {
|
|
value: parentComponent,
|
|
enumerable: false
|
|
});
|
|
}
|
|
if (dirs) {
|
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
}
|
|
const needCallTransitionHooks = (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
|
|
if (needCallTransitionHooks) {
|
|
transition.beforeEnter(el);
|
|
}
|
|
hostInsert(el, container, anchor);
|
|
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
queuePostRenderEffect(() => {
|
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
needCallTransitionHooks && transition.enter(el);
|
|
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
}, parentSuspense);
|
|
}
|
|
};
|
|
const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {
|
|
if (scopeId) {
|
|
hostSetScopeId(el, scopeId);
|
|
}
|
|
if (slotScopeIds) {
|
|
for (let i = 0; i < slotScopeIds.length; i++) {
|
|
hostSetScopeId(el, slotScopeIds[i]);
|
|
}
|
|
}
|
|
if (parentComponent) {
|
|
let subTree = parentComponent.subTree;
|
|
if ( true && subTree.patchFlag > 0 && subTree.patchFlag & 2048) {
|
|
subTree = filterSingleRoot(subTree.children) || subTree;
|
|
}
|
|
if (vnode === subTree) {
|
|
const parentVNode = parentComponent.vnode;
|
|
setScopeId(
|
|
el,
|
|
parentVNode,
|
|
parentVNode.scopeId,
|
|
parentVNode.slotScopeIds,
|
|
parentComponent.parent
|
|
);
|
|
}
|
|
}
|
|
};
|
|
const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start = 0) => {
|
|
for (let i = start; i < children.length; i++) {
|
|
const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
|
|
patch(
|
|
null,
|
|
child,
|
|
container,
|
|
anchor,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
}
|
|
};
|
|
const patchElement = (n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
|
|
const el = n2.el = n1.el;
|
|
let { patchFlag, dynamicChildren, dirs } = n2;
|
|
patchFlag |= n1.patchFlag & 16;
|
|
const oldProps = n1.props || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ;
|
|
const newProps = n2.props || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ;
|
|
let vnodeHook;
|
|
parentComponent && toggleRecurse(parentComponent, false);
|
|
if (vnodeHook = newProps.onVnodeBeforeUpdate) {
|
|
invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
}
|
|
if (dirs) {
|
|
invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
}
|
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
if ( true && isHmrUpdating) {
|
|
patchFlag = 0;
|
|
optimized = false;
|
|
dynamicChildren = null;
|
|
}
|
|
const areChildrenSVG = isSVG && n2.type !== "foreignObject";
|
|
if (dynamicChildren) {
|
|
patchBlockChildren(
|
|
n1.dynamicChildren,
|
|
dynamicChildren,
|
|
el,
|
|
parentComponent,
|
|
parentSuspense,
|
|
areChildrenSVG,
|
|
slotScopeIds
|
|
);
|
|
if (true) {
|
|
traverseStaticChildren(n1, n2);
|
|
}
|
|
} else if (!optimized) {
|
|
patchChildren(
|
|
n1,
|
|
n2,
|
|
el,
|
|
null,
|
|
parentComponent,
|
|
parentSuspense,
|
|
areChildrenSVG,
|
|
slotScopeIds,
|
|
false
|
|
);
|
|
}
|
|
if (patchFlag > 0) {
|
|
if (patchFlag & 16) {
|
|
patchProps(
|
|
el,
|
|
n2,
|
|
oldProps,
|
|
newProps,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG
|
|
);
|
|
} else {
|
|
if (patchFlag & 2) {
|
|
if (oldProps.class !== newProps.class) {
|
|
hostPatchProp(el, "class", null, newProps.class, isSVG);
|
|
}
|
|
}
|
|
if (patchFlag & 4) {
|
|
hostPatchProp(el, "style", oldProps.style, newProps.style, isSVG);
|
|
}
|
|
if (patchFlag & 8) {
|
|
const propsToUpdate = n2.dynamicProps;
|
|
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
const key = propsToUpdate[i];
|
|
const prev = oldProps[key];
|
|
const next = newProps[key];
|
|
if (next !== prev || key === "value") {
|
|
hostPatchProp(
|
|
el,
|
|
key,
|
|
prev,
|
|
next,
|
|
isSVG,
|
|
n1.children,
|
|
parentComponent,
|
|
parentSuspense,
|
|
unmountChildren
|
|
);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (patchFlag & 1) {
|
|
if (n1.children !== n2.children) {
|
|
hostSetElementText(el, n2.children);
|
|
}
|
|
}
|
|
} else if (!optimized && dynamicChildren == null) {
|
|
patchProps(
|
|
el,
|
|
n2,
|
|
oldProps,
|
|
newProps,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG
|
|
);
|
|
}
|
|
if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
|
|
queuePostRenderEffect(() => {
|
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
}, parentSuspense);
|
|
}
|
|
};
|
|
const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, isSVG, slotScopeIds) => {
|
|
for (let i = 0; i < newChildren.length; i++) {
|
|
const oldVNode = oldChildren[i];
|
|
const newVNode = newChildren[i];
|
|
const container = (
|
|
// oldVNode may be an errored async setup() component inside Suspense
|
|
// which will not have a mounted element
|
|
oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent
|
|
// of the Fragment itself so it can move its children.
|
|
(oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
|
|
// which also requires the correct parent container
|
|
!isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
|
|
oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : (
|
|
// In other cases, the parent container is not actually used so we
|
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
fallbackContainer
|
|
)
|
|
);
|
|
patch(
|
|
oldVNode,
|
|
newVNode,
|
|
container,
|
|
null,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
true
|
|
);
|
|
}
|
|
};
|
|
const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, isSVG) => {
|
|
if (oldProps !== newProps) {
|
|
if (oldProps !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ) {
|
|
for (const key in oldProps) {
|
|
if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isReservedProp)(key) && !(key in newProps)) {
|
|
hostPatchProp(
|
|
el,
|
|
key,
|
|
oldProps[key],
|
|
null,
|
|
isSVG,
|
|
vnode.children,
|
|
parentComponent,
|
|
parentSuspense,
|
|
unmountChildren
|
|
);
|
|
}
|
|
}
|
|
}
|
|
for (const key in newProps) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isReservedProp)(key))
|
|
continue;
|
|
const next = newProps[key];
|
|
const prev = oldProps[key];
|
|
if (next !== prev && key !== "value") {
|
|
hostPatchProp(
|
|
el,
|
|
key,
|
|
prev,
|
|
next,
|
|
isSVG,
|
|
vnode.children,
|
|
parentComponent,
|
|
parentSuspense,
|
|
unmountChildren
|
|
);
|
|
}
|
|
}
|
|
if ("value" in newProps) {
|
|
hostPatchProp(el, "value", oldProps.value, newProps.value);
|
|
}
|
|
}
|
|
};
|
|
const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
|
|
const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText("");
|
|
const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText("");
|
|
let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
|
|
if ( true && // #5523 dev root fragment may inherit directives
|
|
(isHmrUpdating || patchFlag & 2048)) {
|
|
patchFlag = 0;
|
|
optimized = false;
|
|
dynamicChildren = null;
|
|
}
|
|
if (fragmentSlotScopeIds) {
|
|
slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
|
|
}
|
|
if (n1 == null) {
|
|
hostInsert(fragmentStartAnchor, container, anchor);
|
|
hostInsert(fragmentEndAnchor, container, anchor);
|
|
mountChildren(
|
|
n2.children,
|
|
container,
|
|
fragmentEndAnchor,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
} else {
|
|
if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result
|
|
// of renderSlot() with no valid children
|
|
n1.dynamicChildren) {
|
|
patchBlockChildren(
|
|
n1.dynamicChildren,
|
|
dynamicChildren,
|
|
container,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds
|
|
);
|
|
if (true) {
|
|
traverseStaticChildren(n1, n2);
|
|
} else {}
|
|
} else {
|
|
patchChildren(
|
|
n1,
|
|
n2,
|
|
container,
|
|
fragmentEndAnchor,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
}
|
|
}
|
|
};
|
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
|
|
n2.slotScopeIds = slotScopeIds;
|
|
if (n1 == null) {
|
|
if (n2.shapeFlag & 512) {
|
|
parentComponent.ctx.activate(
|
|
n2,
|
|
container,
|
|
anchor,
|
|
isSVG,
|
|
optimized
|
|
);
|
|
} else {
|
|
mountComponent(
|
|
n2,
|
|
container,
|
|
anchor,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
optimized
|
|
);
|
|
}
|
|
} else {
|
|
updateComponent(n1, n2, optimized);
|
|
}
|
|
};
|
|
const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => {
|
|
const instance = (initialVNode.component = createComponentInstance(
|
|
initialVNode,
|
|
parentComponent,
|
|
parentSuspense
|
|
));
|
|
if ( true && instance.type.__hmrId) {
|
|
registerHMR(instance);
|
|
}
|
|
if (true) {
|
|
pushWarningContext(initialVNode);
|
|
startMeasure(instance, `mount`);
|
|
}
|
|
if (isKeepAlive(initialVNode)) {
|
|
instance.ctx.renderer = internals;
|
|
}
|
|
{
|
|
if (true) {
|
|
startMeasure(instance, `init`);
|
|
}
|
|
setupComponent(instance);
|
|
if (true) {
|
|
endMeasure(instance, `init`);
|
|
}
|
|
}
|
|
if (instance.asyncDep) {
|
|
parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect);
|
|
if (!initialVNode.el) {
|
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
processCommentNode(null, placeholder, container, anchor);
|
|
}
|
|
return;
|
|
}
|
|
setupRenderEffect(
|
|
instance,
|
|
initialVNode,
|
|
container,
|
|
anchor,
|
|
parentSuspense,
|
|
isSVG,
|
|
optimized
|
|
);
|
|
if (true) {
|
|
popWarningContext();
|
|
endMeasure(instance, `mount`);
|
|
}
|
|
};
|
|
const updateComponent = (n1, n2, optimized) => {
|
|
const instance = n2.component = n1.component;
|
|
if (shouldUpdateComponent(n1, n2, optimized)) {
|
|
if (instance.asyncDep && !instance.asyncResolved) {
|
|
if (true) {
|
|
pushWarningContext(n2);
|
|
}
|
|
updateComponentPreRender(instance, n2, optimized);
|
|
if (true) {
|
|
popWarningContext();
|
|
}
|
|
return;
|
|
} else {
|
|
instance.next = n2;
|
|
invalidateJob(instance.update);
|
|
instance.update();
|
|
}
|
|
} else {
|
|
n2.el = n1.el;
|
|
instance.vnode = n2;
|
|
}
|
|
};
|
|
const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized) => {
|
|
const componentUpdateFn = () => {
|
|
if (!instance.isMounted) {
|
|
let vnodeHook;
|
|
const { el, props } = initialVNode;
|
|
const { bm, m, parent } = instance;
|
|
const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
|
|
toggleRecurse(instance, false);
|
|
if (bm) {
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(bm);
|
|
}
|
|
if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) {
|
|
invokeVNodeHook(vnodeHook, parent, initialVNode);
|
|
}
|
|
toggleRecurse(instance, true);
|
|
if (el && hydrateNode) {
|
|
const hydrateSubTree = () => {
|
|
if (true) {
|
|
startMeasure(instance, `render`);
|
|
}
|
|
instance.subTree = renderComponentRoot(instance);
|
|
if (true) {
|
|
endMeasure(instance, `render`);
|
|
}
|
|
if (true) {
|
|
startMeasure(instance, `hydrate`);
|
|
}
|
|
hydrateNode(
|
|
el,
|
|
instance.subTree,
|
|
instance,
|
|
parentSuspense,
|
|
null
|
|
);
|
|
if (true) {
|
|
endMeasure(instance, `hydrate`);
|
|
}
|
|
};
|
|
if (isAsyncWrapperVNode) {
|
|
initialVNode.type.__asyncLoader().then(
|
|
// note: we are moving the render call into an async callback,
|
|
// which means it won't track dependencies - but it's ok because
|
|
// a server-rendered async wrapper is already in resolved state
|
|
// and it will never need to change.
|
|
() => !instance.isUnmounted && hydrateSubTree()
|
|
);
|
|
} else {
|
|
hydrateSubTree();
|
|
}
|
|
} else {
|
|
if (true) {
|
|
startMeasure(instance, `render`);
|
|
}
|
|
const subTree = instance.subTree = renderComponentRoot(instance);
|
|
if (true) {
|
|
endMeasure(instance, `render`);
|
|
}
|
|
if (true) {
|
|
startMeasure(instance, `patch`);
|
|
}
|
|
patch(
|
|
null,
|
|
subTree,
|
|
container,
|
|
anchor,
|
|
instance,
|
|
parentSuspense,
|
|
isSVG
|
|
);
|
|
if (true) {
|
|
endMeasure(instance, `patch`);
|
|
}
|
|
initialVNode.el = subTree.el;
|
|
}
|
|
if (m) {
|
|
queuePostRenderEffect(m, parentSuspense);
|
|
}
|
|
if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) {
|
|
const scopedInitialVNode = initialVNode;
|
|
queuePostRenderEffect(
|
|
() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode),
|
|
parentSuspense
|
|
);
|
|
}
|
|
if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) {
|
|
instance.a && queuePostRenderEffect(instance.a, parentSuspense);
|
|
}
|
|
instance.isMounted = true;
|
|
if (true) {
|
|
devtoolsComponentAdded(instance);
|
|
}
|
|
initialVNode = container = anchor = null;
|
|
} else {
|
|
let { next, bu, u, parent, vnode } = instance;
|
|
let originNext = next;
|
|
let vnodeHook;
|
|
if (true) {
|
|
pushWarningContext(next || instance.vnode);
|
|
}
|
|
toggleRecurse(instance, false);
|
|
if (next) {
|
|
next.el = vnode.el;
|
|
updateComponentPreRender(instance, next, optimized);
|
|
} else {
|
|
next = vnode;
|
|
}
|
|
if (bu) {
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(bu);
|
|
}
|
|
if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) {
|
|
invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
}
|
|
toggleRecurse(instance, true);
|
|
if (true) {
|
|
startMeasure(instance, `render`);
|
|
}
|
|
const nextTree = renderComponentRoot(instance);
|
|
if (true) {
|
|
endMeasure(instance, `render`);
|
|
}
|
|
const prevTree = instance.subTree;
|
|
instance.subTree = nextTree;
|
|
if (true) {
|
|
startMeasure(instance, `patch`);
|
|
}
|
|
patch(
|
|
prevTree,
|
|
nextTree,
|
|
// parent may have changed if it's in a teleport
|
|
hostParentNode(prevTree.el),
|
|
// anchor may have changed if it's in a fragment
|
|
getNextHostNode(prevTree),
|
|
instance,
|
|
parentSuspense,
|
|
isSVG
|
|
);
|
|
if (true) {
|
|
endMeasure(instance, `patch`);
|
|
}
|
|
next.el = nextTree.el;
|
|
if (originNext === null) {
|
|
updateHOCHostEl(instance, nextTree.el);
|
|
}
|
|
if (u) {
|
|
queuePostRenderEffect(u, parentSuspense);
|
|
}
|
|
if (vnodeHook = next.props && next.props.onVnodeUpdated) {
|
|
queuePostRenderEffect(
|
|
() => invokeVNodeHook(vnodeHook, parent, next, vnode),
|
|
parentSuspense
|
|
);
|
|
}
|
|
if (true) {
|
|
devtoolsComponentUpdated(instance);
|
|
}
|
|
if (true) {
|
|
popWarningContext();
|
|
}
|
|
}
|
|
};
|
|
const effect = instance.effect = new _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ReactiveEffect(
|
|
componentUpdateFn,
|
|
() => queueJob(update),
|
|
instance.scope
|
|
// track it in component's effect scope
|
|
);
|
|
const update = instance.update = () => effect.run();
|
|
update.id = instance.uid;
|
|
toggleRecurse(instance, true);
|
|
if (true) {
|
|
effect.onTrack = instance.rtc ? (e) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(instance.rtc, e) : void 0;
|
|
effect.onTrigger = instance.rtg ? (e) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(instance.rtg, e) : void 0;
|
|
update.ownerInstance = instance;
|
|
}
|
|
update();
|
|
};
|
|
const updateComponentPreRender = (instance, nextVNode, optimized) => {
|
|
nextVNode.component = instance;
|
|
const prevProps = instance.vnode.props;
|
|
instance.vnode = nextVNode;
|
|
instance.next = null;
|
|
updateProps(instance, nextVNode.props, prevProps, optimized);
|
|
updateSlots(instance, nextVNode.children, optimized);
|
|
(0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.pauseTracking)();
|
|
flushPreFlushCbs();
|
|
(0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.resetTracking)();
|
|
};
|
|
const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => {
|
|
const c1 = n1 && n1.children;
|
|
const prevShapeFlag = n1 ? n1.shapeFlag : 0;
|
|
const c2 = n2.children;
|
|
const { patchFlag, shapeFlag } = n2;
|
|
if (patchFlag > 0) {
|
|
if (patchFlag & 128) {
|
|
patchKeyedChildren(
|
|
c1,
|
|
c2,
|
|
container,
|
|
anchor,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
return;
|
|
} else if (patchFlag & 256) {
|
|
patchUnkeyedChildren(
|
|
c1,
|
|
c2,
|
|
container,
|
|
anchor,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
return;
|
|
}
|
|
}
|
|
if (shapeFlag & 8) {
|
|
if (prevShapeFlag & 16) {
|
|
unmountChildren(c1, parentComponent, parentSuspense);
|
|
}
|
|
if (c2 !== c1) {
|
|
hostSetElementText(container, c2);
|
|
}
|
|
} else {
|
|
if (prevShapeFlag & 16) {
|
|
if (shapeFlag & 16) {
|
|
patchKeyedChildren(
|
|
c1,
|
|
c2,
|
|
container,
|
|
anchor,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
} else {
|
|
unmountChildren(c1, parentComponent, parentSuspense, true);
|
|
}
|
|
} else {
|
|
if (prevShapeFlag & 8) {
|
|
hostSetElementText(container, "");
|
|
}
|
|
if (shapeFlag & 16) {
|
|
mountChildren(
|
|
c2,
|
|
container,
|
|
anchor,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
}
|
|
}
|
|
}
|
|
};
|
|
const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
|
|
c1 = c1 || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_ARR;
|
|
c2 = c2 || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_ARR;
|
|
const oldLength = c1.length;
|
|
const newLength = c2.length;
|
|
const commonLength = Math.min(oldLength, newLength);
|
|
let i;
|
|
for (i = 0; i < commonLength; i++) {
|
|
const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
|
|
patch(
|
|
c1[i],
|
|
nextChild,
|
|
container,
|
|
null,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
}
|
|
if (oldLength > newLength) {
|
|
unmountChildren(
|
|
c1,
|
|
parentComponent,
|
|
parentSuspense,
|
|
true,
|
|
false,
|
|
commonLength
|
|
);
|
|
} else {
|
|
mountChildren(
|
|
c2,
|
|
container,
|
|
anchor,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized,
|
|
commonLength
|
|
);
|
|
}
|
|
};
|
|
const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
|
|
let i = 0;
|
|
const l2 = c2.length;
|
|
let e1 = c1.length - 1;
|
|
let e2 = l2 - 1;
|
|
while (i <= e1 && i <= e2) {
|
|
const n1 = c1[i];
|
|
const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
|
|
if (isSameVNodeType(n1, n2)) {
|
|
patch(
|
|
n1,
|
|
n2,
|
|
container,
|
|
null,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
} else {
|
|
break;
|
|
}
|
|
i++;
|
|
}
|
|
while (i <= e1 && i <= e2) {
|
|
const n1 = c1[e1];
|
|
const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]);
|
|
if (isSameVNodeType(n1, n2)) {
|
|
patch(
|
|
n1,
|
|
n2,
|
|
container,
|
|
null,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
} else {
|
|
break;
|
|
}
|
|
e1--;
|
|
e2--;
|
|
}
|
|
if (i > e1) {
|
|
if (i <= e2) {
|
|
const nextPos = e2 + 1;
|
|
const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;
|
|
while (i <= e2) {
|
|
patch(
|
|
null,
|
|
c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]),
|
|
container,
|
|
anchor,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
i++;
|
|
}
|
|
}
|
|
} else if (i > e2) {
|
|
while (i <= e1) {
|
|
unmount(c1[i], parentComponent, parentSuspense, true);
|
|
i++;
|
|
}
|
|
} else {
|
|
const s1 = i;
|
|
const s2 = i;
|
|
const keyToNewIndexMap = /* @__PURE__ */ new Map();
|
|
for (i = s2; i <= e2; i++) {
|
|
const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
|
|
if (nextChild.key != null) {
|
|
if ( true && keyToNewIndexMap.has(nextChild.key)) {
|
|
warn(
|
|
`Duplicate keys found during update:`,
|
|
JSON.stringify(nextChild.key),
|
|
`Make sure keys are unique.`
|
|
);
|
|
}
|
|
keyToNewIndexMap.set(nextChild.key, i);
|
|
}
|
|
}
|
|
let j;
|
|
let patched = 0;
|
|
const toBePatched = e2 - s2 + 1;
|
|
let moved = false;
|
|
let maxNewIndexSoFar = 0;
|
|
const newIndexToOldIndexMap = new Array(toBePatched);
|
|
for (i = 0; i < toBePatched; i++)
|
|
newIndexToOldIndexMap[i] = 0;
|
|
for (i = s1; i <= e1; i++) {
|
|
const prevChild = c1[i];
|
|
if (patched >= toBePatched) {
|
|
unmount(prevChild, parentComponent, parentSuspense, true);
|
|
continue;
|
|
}
|
|
let newIndex;
|
|
if (prevChild.key != null) {
|
|
newIndex = keyToNewIndexMap.get(prevChild.key);
|
|
} else {
|
|
for (j = s2; j <= e2; j++) {
|
|
if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) {
|
|
newIndex = j;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
if (newIndex === void 0) {
|
|
unmount(prevChild, parentComponent, parentSuspense, true);
|
|
} else {
|
|
newIndexToOldIndexMap[newIndex - s2] = i + 1;
|
|
if (newIndex >= maxNewIndexSoFar) {
|
|
maxNewIndexSoFar = newIndex;
|
|
} else {
|
|
moved = true;
|
|
}
|
|
patch(
|
|
prevChild,
|
|
c2[newIndex],
|
|
container,
|
|
null,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
patched++;
|
|
}
|
|
}
|
|
const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_ARR;
|
|
j = increasingNewIndexSequence.length - 1;
|
|
for (i = toBePatched - 1; i >= 0; i--) {
|
|
const nextIndex = s2 + i;
|
|
const nextChild = c2[nextIndex];
|
|
const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor;
|
|
if (newIndexToOldIndexMap[i] === 0) {
|
|
patch(
|
|
null,
|
|
nextChild,
|
|
container,
|
|
anchor,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
} else if (moved) {
|
|
if (j < 0 || i !== increasingNewIndexSequence[j]) {
|
|
move(nextChild, container, anchor, 2);
|
|
} else {
|
|
j--;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
const move = (vnode, container, anchor, moveType, parentSuspense = null) => {
|
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
if (shapeFlag & 6) {
|
|
move(vnode.component.subTree, container, anchor, moveType);
|
|
return;
|
|
}
|
|
if (shapeFlag & 128) {
|
|
vnode.suspense.move(container, anchor, moveType);
|
|
return;
|
|
}
|
|
if (shapeFlag & 64) {
|
|
type.move(vnode, container, anchor, internals);
|
|
return;
|
|
}
|
|
if (type === Fragment) {
|
|
hostInsert(el, container, anchor);
|
|
for (let i = 0; i < children.length; i++) {
|
|
move(children[i], container, anchor, moveType);
|
|
}
|
|
hostInsert(vnode.anchor, container, anchor);
|
|
return;
|
|
}
|
|
if (type === Static) {
|
|
moveStaticNode(vnode, container, anchor);
|
|
return;
|
|
}
|
|
const needTransition = moveType !== 2 && shapeFlag & 1 && transition;
|
|
if (needTransition) {
|
|
if (moveType === 0) {
|
|
transition.beforeEnter(el);
|
|
hostInsert(el, container, anchor);
|
|
queuePostRenderEffect(() => transition.enter(el), parentSuspense);
|
|
} else {
|
|
const { leave, delayLeave, afterLeave } = transition;
|
|
const remove2 = () => hostInsert(el, container, anchor);
|
|
const performLeave = () => {
|
|
leave(el, () => {
|
|
remove2();
|
|
afterLeave && afterLeave();
|
|
});
|
|
};
|
|
if (delayLeave) {
|
|
delayLeave(el, remove2, performLeave);
|
|
} else {
|
|
performLeave();
|
|
}
|
|
}
|
|
} else {
|
|
hostInsert(el, container, anchor);
|
|
}
|
|
};
|
|
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
const {
|
|
type,
|
|
props,
|
|
ref,
|
|
children,
|
|
dynamicChildren,
|
|
shapeFlag,
|
|
patchFlag,
|
|
dirs
|
|
} = vnode;
|
|
if (ref != null) {
|
|
setRef(ref, null, parentSuspense, vnode, true);
|
|
}
|
|
if (shapeFlag & 256) {
|
|
parentComponent.ctx.deactivate(vnode);
|
|
return;
|
|
}
|
|
const shouldInvokeDirs = shapeFlag & 1 && dirs;
|
|
const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
|
|
let vnodeHook;
|
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) {
|
|
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
}
|
|
if (shapeFlag & 6) {
|
|
unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
} else {
|
|
if (shapeFlag & 128) {
|
|
vnode.suspense.unmount(parentSuspense, doRemove);
|
|
return;
|
|
}
|
|
if (shouldInvokeDirs) {
|
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
}
|
|
if (shapeFlag & 64) {
|
|
vnode.type.remove(
|
|
vnode,
|
|
parentComponent,
|
|
parentSuspense,
|
|
optimized,
|
|
internals,
|
|
doRemove
|
|
);
|
|
} else if (dynamicChildren && // #1153: fast path should not be taken for non-stable (v-for) fragments
|
|
(type !== Fragment || patchFlag > 0 && patchFlag & 64)) {
|
|
unmountChildren(
|
|
dynamicChildren,
|
|
parentComponent,
|
|
parentSuspense,
|
|
false,
|
|
true
|
|
);
|
|
} else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) {
|
|
unmountChildren(children, parentComponent, parentSuspense);
|
|
}
|
|
if (doRemove) {
|
|
remove(vnode);
|
|
}
|
|
}
|
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) {
|
|
queuePostRenderEffect(() => {
|
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
}, parentSuspense);
|
|
}
|
|
};
|
|
const remove = (vnode) => {
|
|
const { type, el, anchor, transition } = vnode;
|
|
if (type === Fragment) {
|
|
if ( true && vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) {
|
|
vnode.children.forEach((child) => {
|
|
if (child.type === Comment) {
|
|
hostRemove(child.el);
|
|
} else {
|
|
remove(child);
|
|
}
|
|
});
|
|
} else {
|
|
removeFragment(el, anchor);
|
|
}
|
|
return;
|
|
}
|
|
if (type === Static) {
|
|
removeStaticNode(vnode);
|
|
return;
|
|
}
|
|
const performRemove = () => {
|
|
hostRemove(el);
|
|
if (transition && !transition.persisted && transition.afterLeave) {
|
|
transition.afterLeave();
|
|
}
|
|
};
|
|
if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
|
|
const { leave, delayLeave } = transition;
|
|
const performLeave = () => leave(el, performRemove);
|
|
if (delayLeave) {
|
|
delayLeave(vnode.el, performRemove, performLeave);
|
|
} else {
|
|
performLeave();
|
|
}
|
|
} else {
|
|
performRemove();
|
|
}
|
|
};
|
|
const removeFragment = (cur, end) => {
|
|
let next;
|
|
while (cur !== end) {
|
|
next = hostNextSibling(cur);
|
|
hostRemove(cur);
|
|
cur = next;
|
|
}
|
|
hostRemove(end);
|
|
};
|
|
const unmountComponent = (instance, parentSuspense, doRemove) => {
|
|
if ( true && instance.type.__hmrId) {
|
|
unregisterHMR(instance);
|
|
}
|
|
const { bum, scope, update, subTree, um } = instance;
|
|
if (bum) {
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(bum);
|
|
}
|
|
scope.stop();
|
|
if (update) {
|
|
update.active = false;
|
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
}
|
|
if (um) {
|
|
queuePostRenderEffect(um, parentSuspense);
|
|
}
|
|
queuePostRenderEffect(() => {
|
|
instance.isUnmounted = true;
|
|
}, parentSuspense);
|
|
if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
|
|
parentSuspense.deps--;
|
|
if (parentSuspense.deps === 0) {
|
|
parentSuspense.resolve();
|
|
}
|
|
}
|
|
if (true) {
|
|
devtoolsComponentRemoved(instance);
|
|
}
|
|
};
|
|
const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
|
|
for (let i = start; i < children.length; i++) {
|
|
unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);
|
|
}
|
|
};
|
|
const getNextHostNode = (vnode) => {
|
|
if (vnode.shapeFlag & 6) {
|
|
return getNextHostNode(vnode.component.subTree);
|
|
}
|
|
if (vnode.shapeFlag & 128) {
|
|
return vnode.suspense.next();
|
|
}
|
|
return hostNextSibling(vnode.anchor || vnode.el);
|
|
};
|
|
const render = (vnode, container, isSVG) => {
|
|
if (vnode == null) {
|
|
if (container._vnode) {
|
|
unmount(container._vnode, null, null, true);
|
|
}
|
|
} else {
|
|
patch(container._vnode || null, vnode, container, null, null, null, isSVG);
|
|
}
|
|
flushPreFlushCbs();
|
|
flushPostFlushCbs();
|
|
container._vnode = vnode;
|
|
};
|
|
const internals = {
|
|
p: patch,
|
|
um: unmount,
|
|
m: move,
|
|
r: remove,
|
|
mt: mountComponent,
|
|
mc: mountChildren,
|
|
pc: patchChildren,
|
|
pbc: patchBlockChildren,
|
|
n: getNextHostNode,
|
|
o: options
|
|
};
|
|
let hydrate;
|
|
let hydrateNode;
|
|
if (createHydrationFns) {
|
|
[hydrate, hydrateNode] = createHydrationFns(
|
|
internals
|
|
);
|
|
}
|
|
return {
|
|
render,
|
|
hydrate,
|
|
createApp: createAppAPI(render, hydrate)
|
|
};
|
|
}
|
|
function toggleRecurse({ effect, update }, allowed) {
|
|
effect.allowRecurse = update.allowRecurse = allowed;
|
|
}
|
|
function traverseStaticChildren(n1, n2, shallow = false) {
|
|
const ch1 = n1.children;
|
|
const ch2 = n2.children;
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(ch1) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(ch2)) {
|
|
for (let i = 0; i < ch1.length; i++) {
|
|
const c1 = ch1[i];
|
|
let c2 = ch2[i];
|
|
if (c2.shapeFlag & 1 && !c2.dynamicChildren) {
|
|
if (c2.patchFlag <= 0 || c2.patchFlag === 32) {
|
|
c2 = ch2[i] = cloneIfMounted(ch2[i]);
|
|
c2.el = c1.el;
|
|
}
|
|
if (!shallow)
|
|
traverseStaticChildren(c1, c2);
|
|
}
|
|
if (c2.type === Text) {
|
|
c2.el = c1.el;
|
|
}
|
|
if ( true && c2.type === Comment && !c2.el) {
|
|
c2.el = c1.el;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function getSequence(arr) {
|
|
const p = arr.slice();
|
|
const result = [0];
|
|
let i, j, u, v, c;
|
|
const len = arr.length;
|
|
for (i = 0; i < len; i++) {
|
|
const arrI = arr[i];
|
|
if (arrI !== 0) {
|
|
j = result[result.length - 1];
|
|
if (arr[j] < arrI) {
|
|
p[i] = j;
|
|
result.push(i);
|
|
continue;
|
|
}
|
|
u = 0;
|
|
v = result.length - 1;
|
|
while (u < v) {
|
|
c = u + v >> 1;
|
|
if (arr[result[c]] < arrI) {
|
|
u = c + 1;
|
|
} else {
|
|
v = c;
|
|
}
|
|
}
|
|
if (arrI < arr[result[u]]) {
|
|
if (u > 0) {
|
|
p[i] = result[u - 1];
|
|
}
|
|
result[u] = i;
|
|
}
|
|
}
|
|
}
|
|
u = result.length;
|
|
v = result[u - 1];
|
|
while (u-- > 0) {
|
|
result[u] = v;
|
|
v = p[v];
|
|
}
|
|
return result;
|
|
}
|
|
|
|
const isTeleport = (type) => type.__isTeleport;
|
|
const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
|
|
const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement;
|
|
const resolveTarget = (props, select) => {
|
|
const targetSelector = props && props.to;
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(targetSelector)) {
|
|
if (!select) {
|
|
true && warn(
|
|
`Current renderer does not support string target for Teleports. (missing querySelector renderer option)`
|
|
);
|
|
return null;
|
|
} else {
|
|
const target = select(targetSelector);
|
|
if (!target) {
|
|
true && warn(
|
|
`Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`
|
|
);
|
|
}
|
|
return target;
|
|
}
|
|
} else {
|
|
if ( true && !targetSelector && !isTeleportDisabled(props)) {
|
|
warn(`Invalid Teleport target: ${targetSelector}`);
|
|
}
|
|
return targetSelector;
|
|
}
|
|
};
|
|
const TeleportImpl = {
|
|
__isTeleport: true,
|
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) {
|
|
const {
|
|
mc: mountChildren,
|
|
pc: patchChildren,
|
|
pbc: patchBlockChildren,
|
|
o: { insert, querySelector, createText, createComment }
|
|
} = internals;
|
|
const disabled = isTeleportDisabled(n2.props);
|
|
let { shapeFlag, children, dynamicChildren } = n2;
|
|
if ( true && isHmrUpdating) {
|
|
optimized = false;
|
|
dynamicChildren = null;
|
|
}
|
|
if (n1 == null) {
|
|
const placeholder = n2.el = true ? createComment("teleport start") : 0;
|
|
const mainAnchor = n2.anchor = true ? createComment("teleport end") : 0;
|
|
insert(placeholder, container, anchor);
|
|
insert(mainAnchor, container, anchor);
|
|
const target = n2.target = resolveTarget(n2.props, querySelector);
|
|
const targetAnchor = n2.targetAnchor = createText("");
|
|
if (target) {
|
|
insert(targetAnchor, target);
|
|
isSVG = isSVG || isTargetSVG(target);
|
|
} else if ( true && !disabled) {
|
|
warn("Invalid Teleport target on mount:", target, `(${typeof target})`);
|
|
}
|
|
const mount = (container2, anchor2) => {
|
|
if (shapeFlag & 16) {
|
|
mountChildren(
|
|
children,
|
|
container2,
|
|
anchor2,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
}
|
|
};
|
|
if (disabled) {
|
|
mount(container, mainAnchor);
|
|
} else if (target) {
|
|
mount(target, targetAnchor);
|
|
}
|
|
} else {
|
|
n2.el = n1.el;
|
|
const mainAnchor = n2.anchor = n1.anchor;
|
|
const target = n2.target = n1.target;
|
|
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
const wasDisabled = isTeleportDisabled(n1.props);
|
|
const currentContainer = wasDisabled ? container : target;
|
|
const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
|
|
isSVG = isSVG || isTargetSVG(target);
|
|
if (dynamicChildren) {
|
|
patchBlockChildren(
|
|
n1.dynamicChildren,
|
|
dynamicChildren,
|
|
currentContainer,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds
|
|
);
|
|
traverseStaticChildren(n1, n2, true);
|
|
} else if (!optimized) {
|
|
patchChildren(
|
|
n1,
|
|
n2,
|
|
currentContainer,
|
|
currentAnchor,
|
|
parentComponent,
|
|
parentSuspense,
|
|
isSVG,
|
|
slotScopeIds,
|
|
false
|
|
);
|
|
}
|
|
if (disabled) {
|
|
if (!wasDisabled) {
|
|
moveTeleport(
|
|
n2,
|
|
container,
|
|
mainAnchor,
|
|
internals,
|
|
1
|
|
);
|
|
}
|
|
} else {
|
|
if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
|
|
const nextTarget = n2.target = resolveTarget(
|
|
n2.props,
|
|
querySelector
|
|
);
|
|
if (nextTarget) {
|
|
moveTeleport(
|
|
n2,
|
|
nextTarget,
|
|
null,
|
|
internals,
|
|
0
|
|
);
|
|
} else if (true) {
|
|
warn(
|
|
"Invalid Teleport target on update:",
|
|
target,
|
|
`(${typeof target})`
|
|
);
|
|
}
|
|
} else if (wasDisabled) {
|
|
moveTeleport(
|
|
n2,
|
|
target,
|
|
targetAnchor,
|
|
internals,
|
|
1
|
|
);
|
|
}
|
|
}
|
|
}
|
|
updateCssVars(n2);
|
|
},
|
|
remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode;
|
|
if (target) {
|
|
hostRemove(targetAnchor);
|
|
}
|
|
if (doRemove || !isTeleportDisabled(props)) {
|
|
hostRemove(anchor);
|
|
if (shapeFlag & 16) {
|
|
for (let i = 0; i < children.length; i++) {
|
|
const child = children[i];
|
|
unmount(
|
|
child,
|
|
parentComponent,
|
|
parentSuspense,
|
|
true,
|
|
!!child.dynamicChildren
|
|
);
|
|
}
|
|
}
|
|
}
|
|
},
|
|
move: moveTeleport,
|
|
hydrate: hydrateTeleport
|
|
};
|
|
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
|
|
if (moveType === 0) {
|
|
insert(vnode.targetAnchor, container, parentAnchor);
|
|
}
|
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
const isReorder = moveType === 2;
|
|
if (isReorder) {
|
|
insert(el, container, parentAnchor);
|
|
}
|
|
if (!isReorder || isTeleportDisabled(props)) {
|
|
if (shapeFlag & 16) {
|
|
for (let i = 0; i < children.length; i++) {
|
|
move(
|
|
children[i],
|
|
container,
|
|
parentAnchor,
|
|
2
|
|
);
|
|
}
|
|
}
|
|
}
|
|
if (isReorder) {
|
|
insert(anchor, container, parentAnchor);
|
|
}
|
|
}
|
|
function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
|
|
o: { nextSibling, parentNode, querySelector }
|
|
}, hydrateChildren) {
|
|
const target = vnode.target = resolveTarget(
|
|
vnode.props,
|
|
querySelector
|
|
);
|
|
if (target) {
|
|
const targetNode = target._lpa || target.firstChild;
|
|
if (vnode.shapeFlag & 16) {
|
|
if (isTeleportDisabled(vnode.props)) {
|
|
vnode.anchor = hydrateChildren(
|
|
nextSibling(node),
|
|
vnode,
|
|
parentNode(node),
|
|
parentComponent,
|
|
parentSuspense,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
vnode.targetAnchor = targetNode;
|
|
} else {
|
|
vnode.anchor = nextSibling(node);
|
|
let targetAnchor = targetNode;
|
|
while (targetAnchor) {
|
|
targetAnchor = nextSibling(targetAnchor);
|
|
if (targetAnchor && targetAnchor.nodeType === 8 && targetAnchor.data === "teleport anchor") {
|
|
vnode.targetAnchor = targetAnchor;
|
|
target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
|
|
break;
|
|
}
|
|
}
|
|
hydrateChildren(
|
|
targetNode,
|
|
vnode,
|
|
target,
|
|
parentComponent,
|
|
parentSuspense,
|
|
slotScopeIds,
|
|
optimized
|
|
);
|
|
}
|
|
}
|
|
updateCssVars(vnode);
|
|
}
|
|
return vnode.anchor && nextSibling(vnode.anchor);
|
|
}
|
|
const Teleport = TeleportImpl;
|
|
function updateCssVars(vnode) {
|
|
const ctx = vnode.ctx;
|
|
if (ctx && ctx.ut) {
|
|
let node = vnode.children[0].el;
|
|
while (node !== vnode.targetAnchor) {
|
|
if (node.nodeType === 1)
|
|
node.setAttribute("data-v-owner", ctx.uid);
|
|
node = node.nextSibling;
|
|
}
|
|
ctx.ut();
|
|
}
|
|
}
|
|
|
|
const Fragment = Symbol.for("v-fgt");
|
|
const Text = Symbol.for("v-txt");
|
|
const Comment = Symbol.for("v-cmt");
|
|
const Static = Symbol.for("v-stc");
|
|
const blockStack = [];
|
|
let currentBlock = null;
|
|
function openBlock(disableTracking = false) {
|
|
blockStack.push(currentBlock = disableTracking ? null : []);
|
|
}
|
|
function closeBlock() {
|
|
blockStack.pop();
|
|
currentBlock = blockStack[blockStack.length - 1] || null;
|
|
}
|
|
let isBlockTreeEnabled = 1;
|
|
function setBlockTracking(value) {
|
|
isBlockTreeEnabled += value;
|
|
}
|
|
function setupBlock(vnode) {
|
|
vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_ARR : null;
|
|
closeBlock();
|
|
if (isBlockTreeEnabled > 0 && currentBlock) {
|
|
currentBlock.push(vnode);
|
|
}
|
|
return vnode;
|
|
}
|
|
function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {
|
|
return setupBlock(
|
|
createBaseVNode(
|
|
type,
|
|
props,
|
|
children,
|
|
patchFlag,
|
|
dynamicProps,
|
|
shapeFlag,
|
|
true
|
|
/* isBlock */
|
|
)
|
|
);
|
|
}
|
|
function createBlock(type, props, children, patchFlag, dynamicProps) {
|
|
return setupBlock(
|
|
createVNode(
|
|
type,
|
|
props,
|
|
children,
|
|
patchFlag,
|
|
dynamicProps,
|
|
true
|
|
/* isBlock: prevent a block from tracking itself */
|
|
)
|
|
);
|
|
}
|
|
function isVNode(value) {
|
|
return value ? value.__v_isVNode === true : false;
|
|
}
|
|
function isSameVNodeType(n1, n2) {
|
|
if ( true && n2.shapeFlag & 6 && hmrDirtyComponents.has(n2.type)) {
|
|
n1.shapeFlag &= ~256;
|
|
n2.shapeFlag &= ~512;
|
|
return false;
|
|
}
|
|
return n1.type === n2.type && n1.key === n2.key;
|
|
}
|
|
let vnodeArgsTransformer;
|
|
function transformVNodeArgs(transformer) {
|
|
vnodeArgsTransformer = transformer;
|
|
}
|
|
const createVNodeWithArgsTransform = (...args) => {
|
|
return _createVNode(
|
|
...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
|
|
);
|
|
};
|
|
const InternalObjectKey = `__vInternal`;
|
|
const normalizeKey = ({ key }) => key != null ? key : null;
|
|
const normalizeRef = ({
|
|
ref,
|
|
ref_key,
|
|
ref_for
|
|
}) => {
|
|
if (typeof ref === "number") {
|
|
ref = "" + ref;
|
|
}
|
|
return ref != null ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(ref) || (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(ref) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null;
|
|
};
|
|
function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
|
|
const vnode = {
|
|
__v_isVNode: true,
|
|
__v_skip: true,
|
|
type,
|
|
props,
|
|
key: props && normalizeKey(props),
|
|
ref: props && normalizeRef(props),
|
|
scopeId: currentScopeId,
|
|
slotScopeIds: null,
|
|
children,
|
|
component: null,
|
|
suspense: null,
|
|
ssContent: null,
|
|
ssFallback: null,
|
|
dirs: null,
|
|
transition: null,
|
|
el: null,
|
|
anchor: null,
|
|
target: null,
|
|
targetAnchor: null,
|
|
staticCount: 0,
|
|
shapeFlag,
|
|
patchFlag,
|
|
dynamicProps,
|
|
dynamicChildren: null,
|
|
appContext: null,
|
|
ctx: currentRenderingInstance
|
|
};
|
|
if (needFullChildrenNormalization) {
|
|
normalizeChildren(vnode, children);
|
|
if (shapeFlag & 128) {
|
|
type.normalize(vnode);
|
|
}
|
|
} else if (children) {
|
|
vnode.shapeFlag |= (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(children) ? 8 : 16;
|
|
}
|
|
if ( true && vnode.key !== vnode.key) {
|
|
warn(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
|
|
}
|
|
if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
|
|
!isBlockNode && // has current parent block
|
|
currentBlock && // presence of a patch flag indicates this node needs patching on updates.
|
|
// component nodes also should always be patched, because even if the
|
|
// component doesn't need to update, it needs to persist the instance on to
|
|
// the next vnode so that it can be properly unmounted later.
|
|
(vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the
|
|
// vnode should not be considered dynamic due to handler caching.
|
|
vnode.patchFlag !== 32) {
|
|
currentBlock.push(vnode);
|
|
}
|
|
return vnode;
|
|
}
|
|
const createVNode = true ? createVNodeWithArgsTransform : 0;
|
|
function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
|
|
if (!type || type === NULL_DYNAMIC_COMPONENT) {
|
|
if ( true && !type) {
|
|
warn(`Invalid vnode type when creating vnode: ${type}.`);
|
|
}
|
|
type = Comment;
|
|
}
|
|
if (isVNode(type)) {
|
|
const cloned = cloneVNode(
|
|
type,
|
|
props,
|
|
true
|
|
/* mergeRef: true */
|
|
);
|
|
if (children) {
|
|
normalizeChildren(cloned, children);
|
|
}
|
|
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
|
|
if (cloned.shapeFlag & 6) {
|
|
currentBlock[currentBlock.indexOf(type)] = cloned;
|
|
} else {
|
|
currentBlock.push(cloned);
|
|
}
|
|
}
|
|
cloned.patchFlag |= -2;
|
|
return cloned;
|
|
}
|
|
if (isClassComponent(type)) {
|
|
type = type.__vccOpts;
|
|
}
|
|
if (props) {
|
|
props = guardReactiveProps(props);
|
|
let { class: klass, style } = props;
|
|
if (klass && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(klass)) {
|
|
props.class = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.normalizeClass)(klass);
|
|
}
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(style)) {
|
|
if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isProxy)(style) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(style)) {
|
|
style = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, style);
|
|
}
|
|
props.style = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.normalizeStyle)(style);
|
|
}
|
|
}
|
|
const shapeFlag = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(type) ? 4 : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(type) ? 2 : 0;
|
|
if ( true && shapeFlag & 4 && (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isProxy)(type)) {
|
|
type = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(type);
|
|
warn(
|
|
`Vue received a Component which was made a reactive object. This can lead to unnecessary performance overhead, and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`,
|
|
`
|
|
Component that was made reactive: `,
|
|
type
|
|
);
|
|
}
|
|
return createBaseVNode(
|
|
type,
|
|
props,
|
|
children,
|
|
patchFlag,
|
|
dynamicProps,
|
|
shapeFlag,
|
|
isBlockNode,
|
|
true
|
|
);
|
|
}
|
|
function guardReactiveProps(props) {
|
|
if (!props)
|
|
return null;
|
|
return (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isProxy)(props) || InternalObjectKey in props ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, props) : props;
|
|
}
|
|
function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
const { props, ref, patchFlag, children } = vnode;
|
|
const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
|
|
const cloned = {
|
|
__v_isVNode: true,
|
|
__v_skip: true,
|
|
type: vnode.type,
|
|
props: mergedProps,
|
|
key: mergedProps && normalizeKey(mergedProps),
|
|
ref: extraProps && extraProps.ref ? (
|
|
// #2078 in the case of <component :is="vnode" ref="extra"/>
|
|
// if the vnode itself already has a ref, cloneVNode will need to merge
|
|
// the refs so the single vnode can be set on multiple refs
|
|
mergeRef && ref ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps)
|
|
) : ref,
|
|
scopeId: vnode.scopeId,
|
|
slotScopeIds: vnode.slotScopeIds,
|
|
children: true && patchFlag === -1 && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(children) ? children.map(deepCloneVNode) : children,
|
|
target: vnode.target,
|
|
targetAnchor: vnode.targetAnchor,
|
|
staticCount: vnode.staticCount,
|
|
shapeFlag: vnode.shapeFlag,
|
|
// if the vnode is cloned with extra props, we can no longer assume its
|
|
// existing patch flag to be reliable and need to add the FULL_PROPS flag.
|
|
// note: preserve flag for fragments since they use the flag for children
|
|
// fast paths only.
|
|
patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,
|
|
dynamicProps: vnode.dynamicProps,
|
|
dynamicChildren: vnode.dynamicChildren,
|
|
appContext: vnode.appContext,
|
|
dirs: vnode.dirs,
|
|
transition: vnode.transition,
|
|
// These should technically only be non-null on mounted VNodes. However,
|
|
// they *should* be copied for kept-alive vnodes. So we just always copy
|
|
// them since them being non-null during a mount doesn't affect the logic as
|
|
// they will simply be overwritten.
|
|
component: vnode.component,
|
|
suspense: vnode.suspense,
|
|
ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
|
|
ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
|
|
el: vnode.el,
|
|
anchor: vnode.anchor,
|
|
ctx: vnode.ctx,
|
|
ce: vnode.ce
|
|
};
|
|
return cloned;
|
|
}
|
|
function deepCloneVNode(vnode) {
|
|
const cloned = cloneVNode(vnode);
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(vnode.children)) {
|
|
cloned.children = vnode.children.map(deepCloneVNode);
|
|
}
|
|
return cloned;
|
|
}
|
|
function createTextVNode(text = " ", flag = 0) {
|
|
return createVNode(Text, null, text, flag);
|
|
}
|
|
function createStaticVNode(content, numberOfNodes) {
|
|
const vnode = createVNode(Static, null, content);
|
|
vnode.staticCount = numberOfNodes;
|
|
return vnode;
|
|
}
|
|
function createCommentVNode(text = "", asBlock = false) {
|
|
return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text);
|
|
}
|
|
function normalizeVNode(child) {
|
|
if (child == null || typeof child === "boolean") {
|
|
return createVNode(Comment);
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(child)) {
|
|
return createVNode(
|
|
Fragment,
|
|
null,
|
|
// #3666, avoid reference pollution when reusing vnode
|
|
child.slice()
|
|
);
|
|
} else if (typeof child === "object") {
|
|
return cloneIfMounted(child);
|
|
} else {
|
|
return createVNode(Text, null, String(child));
|
|
}
|
|
}
|
|
function cloneIfMounted(child) {
|
|
return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child);
|
|
}
|
|
function normalizeChildren(vnode, children) {
|
|
let type = 0;
|
|
const { shapeFlag } = vnode;
|
|
if (children == null) {
|
|
children = null;
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(children)) {
|
|
type = 16;
|
|
} else if (typeof children === "object") {
|
|
if (shapeFlag & (1 | 64)) {
|
|
const slot = children.default;
|
|
if (slot) {
|
|
slot._c && (slot._d = false);
|
|
normalizeChildren(vnode, slot());
|
|
slot._c && (slot._d = true);
|
|
}
|
|
return;
|
|
} else {
|
|
type = 32;
|
|
const slotFlag = children._;
|
|
if (!slotFlag && !(InternalObjectKey in children)) {
|
|
children._ctx = currentRenderingInstance;
|
|
} else if (slotFlag === 3 && currentRenderingInstance) {
|
|
if (currentRenderingInstance.slots._ === 1) {
|
|
children._ = 1;
|
|
} else {
|
|
children._ = 2;
|
|
vnode.patchFlag |= 1024;
|
|
}
|
|
}
|
|
}
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(children)) {
|
|
children = { default: children, _ctx: currentRenderingInstance };
|
|
type = 32;
|
|
} else {
|
|
children = String(children);
|
|
if (shapeFlag & 64) {
|
|
type = 16;
|
|
children = [createTextVNode(children)];
|
|
} else {
|
|
type = 8;
|
|
}
|
|
}
|
|
vnode.children = children;
|
|
vnode.shapeFlag |= type;
|
|
}
|
|
function mergeProps(...args) {
|
|
const ret = {};
|
|
for (let i = 0; i < args.length; i++) {
|
|
const toMerge = args[i];
|
|
for (const key in toMerge) {
|
|
if (key === "class") {
|
|
if (ret.class !== toMerge.class) {
|
|
ret.class = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.normalizeClass)([ret.class, toMerge.class]);
|
|
}
|
|
} else if (key === "style") {
|
|
ret.style = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.normalizeStyle)([ret.style, toMerge.style]);
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isOn)(key)) {
|
|
const existing = ret[key];
|
|
const incoming = toMerge[key];
|
|
if (incoming && existing !== incoming && !((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(existing) && existing.includes(incoming))) {
|
|
ret[key] = existing ? [].concat(existing, incoming) : incoming;
|
|
}
|
|
} else if (key !== "") {
|
|
ret[key] = toMerge[key];
|
|
}
|
|
}
|
|
}
|
|
return ret;
|
|
}
|
|
function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
callWithAsyncErrorHandling(hook, instance, 7, [
|
|
vnode,
|
|
prevVNode
|
|
]);
|
|
}
|
|
|
|
const emptyAppContext = createAppContext();
|
|
let uid = 0;
|
|
function createComponentInstance(vnode, parent, suspense) {
|
|
const type = vnode.type;
|
|
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
const instance = {
|
|
uid: uid++,
|
|
vnode,
|
|
type,
|
|
parent,
|
|
appContext,
|
|
root: null,
|
|
// to be immediately set
|
|
next: null,
|
|
subTree: null,
|
|
// will be set synchronously right after creation
|
|
effect: null,
|
|
update: null,
|
|
// will be set synchronously right after creation
|
|
scope: new _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.EffectScope(
|
|
true
|
|
/* detached */
|
|
),
|
|
render: null,
|
|
proxy: null,
|
|
exposed: null,
|
|
exposeProxy: null,
|
|
withProxy: null,
|
|
provides: parent ? parent.provides : Object.create(appContext.provides),
|
|
accessCache: null,
|
|
renderCache: [],
|
|
// local resolved assets
|
|
components: null,
|
|
directives: null,
|
|
// resolved props and emits options
|
|
propsOptions: normalizePropsOptions(type, appContext),
|
|
emitsOptions: normalizeEmitsOptions(type, appContext),
|
|
// emit
|
|
emit: null,
|
|
// to be set immediately
|
|
emitted: null,
|
|
// props default value
|
|
propsDefaults: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ,
|
|
// inheritAttrs
|
|
inheritAttrs: type.inheritAttrs,
|
|
// state
|
|
ctx: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ,
|
|
data: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ,
|
|
props: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ,
|
|
attrs: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ,
|
|
slots: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ,
|
|
refs: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ,
|
|
setupState: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ,
|
|
setupContext: null,
|
|
attrsProxy: null,
|
|
slotsProxy: null,
|
|
// suspense related
|
|
suspense,
|
|
suspenseId: suspense ? suspense.pendingId : 0,
|
|
asyncDep: null,
|
|
asyncResolved: false,
|
|
// lifecycle hooks
|
|
// not using enums here because it results in computed properties
|
|
isMounted: false,
|
|
isUnmounted: false,
|
|
isDeactivated: false,
|
|
bc: null,
|
|
c: null,
|
|
bm: null,
|
|
m: null,
|
|
bu: null,
|
|
u: null,
|
|
um: null,
|
|
bum: null,
|
|
da: null,
|
|
a: null,
|
|
rtg: null,
|
|
rtc: null,
|
|
ec: null,
|
|
sp: null
|
|
};
|
|
if (true) {
|
|
instance.ctx = createDevRenderContext(instance);
|
|
} else {}
|
|
instance.root = parent ? parent.root : instance;
|
|
instance.emit = emit.bind(null, instance);
|
|
if (vnode.ce) {
|
|
vnode.ce(instance);
|
|
}
|
|
return instance;
|
|
}
|
|
let currentInstance = null;
|
|
const getCurrentInstance = () => currentInstance || currentRenderingInstance;
|
|
let internalSetCurrentInstance;
|
|
let globalCurrentInstanceSetters;
|
|
let settersKey = "__VUE_INSTANCE_SETTERS__";
|
|
{
|
|
if (!(globalCurrentInstanceSetters = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.getGlobalThis)()[settersKey])) {
|
|
globalCurrentInstanceSetters = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.getGlobalThis)()[settersKey] = [];
|
|
}
|
|
globalCurrentInstanceSetters.push((i) => currentInstance = i);
|
|
internalSetCurrentInstance = (instance) => {
|
|
if (globalCurrentInstanceSetters.length > 1) {
|
|
globalCurrentInstanceSetters.forEach((s) => s(instance));
|
|
} else {
|
|
globalCurrentInstanceSetters[0](instance);
|
|
}
|
|
};
|
|
}
|
|
const setCurrentInstance = (instance) => {
|
|
internalSetCurrentInstance(instance);
|
|
instance.scope.on();
|
|
};
|
|
const unsetCurrentInstance = () => {
|
|
currentInstance && currentInstance.scope.off();
|
|
internalSetCurrentInstance(null);
|
|
};
|
|
const isBuiltInTag = /* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.makeMap)("slot,component");
|
|
function validateComponentName(name, config) {
|
|
const appIsNativeTag = config.isNativeTag || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NO;
|
|
if (isBuiltInTag(name) || appIsNativeTag(name)) {
|
|
warn(
|
|
"Do not use built-in or reserved HTML elements as component id: " + name
|
|
);
|
|
}
|
|
}
|
|
function isStatefulComponent(instance) {
|
|
return instance.vnode.shapeFlag & 4;
|
|
}
|
|
let isInSSRComponentSetup = false;
|
|
function setupComponent(instance, isSSR = false) {
|
|
isInSSRComponentSetup = isSSR;
|
|
const { props, children } = instance.vnode;
|
|
const isStateful = isStatefulComponent(instance);
|
|
initProps(instance, props, isStateful, isSSR);
|
|
initSlots(instance, children);
|
|
const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
|
|
isInSSRComponentSetup = false;
|
|
return setupResult;
|
|
}
|
|
function setupStatefulComponent(instance, isSSR) {
|
|
var _a;
|
|
const Component = instance.type;
|
|
if (true) {
|
|
if (Component.name) {
|
|
validateComponentName(Component.name, instance.appContext.config);
|
|
}
|
|
if (Component.components) {
|
|
const names = Object.keys(Component.components);
|
|
for (let i = 0; i < names.length; i++) {
|
|
validateComponentName(names[i], instance.appContext.config);
|
|
}
|
|
}
|
|
if (Component.directives) {
|
|
const names = Object.keys(Component.directives);
|
|
for (let i = 0; i < names.length; i++) {
|
|
validateDirectiveName(names[i]);
|
|
}
|
|
}
|
|
if (Component.compilerOptions && isRuntimeOnly()) {
|
|
warn(
|
|
`"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.`
|
|
);
|
|
}
|
|
}
|
|
instance.accessCache = /* @__PURE__ */ Object.create(null);
|
|
instance.proxy = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.markRaw)(new Proxy(instance.ctx, PublicInstanceProxyHandlers));
|
|
if (true) {
|
|
exposePropsOnRenderContext(instance);
|
|
}
|
|
const { setup } = Component;
|
|
if (setup) {
|
|
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
|
setCurrentInstance(instance);
|
|
(0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.pauseTracking)();
|
|
const setupResult = callWithErrorHandling(
|
|
setup,
|
|
instance,
|
|
0,
|
|
[ true ? (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly)(instance.props) : 0, setupContext]
|
|
);
|
|
(0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.resetTracking)();
|
|
unsetCurrentInstance();
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isPromise)(setupResult)) {
|
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
if (isSSR) {
|
|
return setupResult.then((resolvedResult) => {
|
|
handleSetupResult(instance, resolvedResult, isSSR);
|
|
}).catch((e) => {
|
|
handleError(e, instance, 0);
|
|
});
|
|
} else {
|
|
instance.asyncDep = setupResult;
|
|
if ( true && !instance.suspense) {
|
|
const name = (_a = Component.name) != null ? _a : "Anonymous";
|
|
warn(
|
|
`Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`
|
|
);
|
|
}
|
|
}
|
|
} else {
|
|
handleSetupResult(instance, setupResult, isSSR);
|
|
}
|
|
} else {
|
|
finishComponentSetup(instance, isSSR);
|
|
}
|
|
}
|
|
function handleSetupResult(instance, setupResult, isSSR) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(setupResult)) {
|
|
if (instance.type.__ssrInlineRender) {
|
|
instance.ssrRender = setupResult;
|
|
} else {
|
|
instance.render = setupResult;
|
|
}
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(setupResult)) {
|
|
if ( true && isVNode(setupResult)) {
|
|
warn(
|
|
`setup() should not return VNodes directly - return a render function instead.`
|
|
);
|
|
}
|
|
if (true) {
|
|
instance.devtoolsRawSetupState = setupResult;
|
|
}
|
|
instance.setupState = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.proxyRefs)(setupResult);
|
|
if (true) {
|
|
exposeSetupStateOnRenderContext(instance);
|
|
}
|
|
} else if ( true && setupResult !== void 0) {
|
|
warn(
|
|
`setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}`
|
|
);
|
|
}
|
|
finishComponentSetup(instance, isSSR);
|
|
}
|
|
let compile;
|
|
let installWithProxy;
|
|
function registerRuntimeCompiler(_compile) {
|
|
compile = _compile;
|
|
installWithProxy = (i) => {
|
|
if (i.render._rc) {
|
|
i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers);
|
|
}
|
|
};
|
|
}
|
|
const isRuntimeOnly = () => !compile;
|
|
function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
const Component = instance.type;
|
|
if (!instance.render) {
|
|
if (!isSSR && compile && !Component.render) {
|
|
const template = Component.template || resolveMergedOptions(instance).template;
|
|
if (template) {
|
|
if (true) {
|
|
startMeasure(instance, `compile`);
|
|
}
|
|
const { isCustomElement, compilerOptions } = instance.appContext.config;
|
|
const { delimiters, compilerOptions: componentCompilerOptions } = Component;
|
|
const finalCompilerOptions = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(
|
|
{
|
|
isCustomElement,
|
|
delimiters
|
|
},
|
|
compilerOptions
|
|
),
|
|
componentCompilerOptions
|
|
);
|
|
Component.render = compile(template, finalCompilerOptions);
|
|
if (true) {
|
|
endMeasure(instance, `compile`);
|
|
}
|
|
}
|
|
}
|
|
instance.render = Component.render || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP;
|
|
if (installWithProxy) {
|
|
installWithProxy(instance);
|
|
}
|
|
}
|
|
if (true) {
|
|
setCurrentInstance(instance);
|
|
(0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.pauseTracking)();
|
|
applyOptions(instance);
|
|
(0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.resetTracking)();
|
|
unsetCurrentInstance();
|
|
}
|
|
if ( true && !Component.render && instance.render === _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP && !isSSR) {
|
|
if (!compile && Component.template) {
|
|
warn(
|
|
`Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".` )
|
|
/* should not happen */
|
|
);
|
|
} else {
|
|
warn(`Component is missing template or render function.`);
|
|
}
|
|
}
|
|
}
|
|
function getAttrsProxy(instance) {
|
|
return instance.attrsProxy || (instance.attrsProxy = new Proxy(
|
|
instance.attrs,
|
|
true ? {
|
|
get(target, key) {
|
|
markAttrsAccessed();
|
|
(0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.track)(instance, "get", "$attrs");
|
|
return target[key];
|
|
},
|
|
set() {
|
|
warn(`setupContext.attrs is readonly.`);
|
|
return false;
|
|
},
|
|
deleteProperty() {
|
|
warn(`setupContext.attrs is readonly.`);
|
|
return false;
|
|
}
|
|
} : 0
|
|
));
|
|
}
|
|
function getSlotsProxy(instance) {
|
|
return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
|
|
get(target, key) {
|
|
(0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.track)(instance, "get", "$slots");
|
|
return target[key];
|
|
}
|
|
}));
|
|
}
|
|
function createSetupContext(instance) {
|
|
const expose = (exposed) => {
|
|
if (true) {
|
|
if (instance.exposed) {
|
|
warn(`expose() should be called only once per setup().`);
|
|
}
|
|
if (exposed != null) {
|
|
let exposedType = typeof exposed;
|
|
if (exposedType === "object") {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(exposed)) {
|
|
exposedType = "array";
|
|
} else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(exposed)) {
|
|
exposedType = "ref";
|
|
}
|
|
}
|
|
if (exposedType !== "object") {
|
|
warn(
|
|
`expose() should be passed a plain object, received ${exposedType}.`
|
|
);
|
|
}
|
|
}
|
|
}
|
|
instance.exposed = exposed || {};
|
|
};
|
|
if (true) {
|
|
return Object.freeze({
|
|
get attrs() {
|
|
return getAttrsProxy(instance);
|
|
},
|
|
get slots() {
|
|
return getSlotsProxy(instance);
|
|
},
|
|
get emit() {
|
|
return (event, ...args) => instance.emit(event, ...args);
|
|
},
|
|
expose
|
|
});
|
|
} else {}
|
|
}
|
|
function getExposeProxy(instance) {
|
|
if (instance.exposed) {
|
|
return instance.exposeProxy || (instance.exposeProxy = new Proxy((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.proxyRefs)((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.markRaw)(instance.exposed)), {
|
|
get(target, key) {
|
|
if (key in target) {
|
|
return target[key];
|
|
} else if (key in publicPropertiesMap) {
|
|
return publicPropertiesMap[key](instance);
|
|
}
|
|
},
|
|
has(target, key) {
|
|
return key in target || key in publicPropertiesMap;
|
|
}
|
|
}));
|
|
}
|
|
}
|
|
const classifyRE = /(?:^|[-_])(\w)/g;
|
|
const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
|
|
function getComponentName(Component, includeInferred = true) {
|
|
return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
|
|
}
|
|
function formatComponentName(instance, Component, isRoot = false) {
|
|
let name = getComponentName(Component);
|
|
if (!name && Component.__file) {
|
|
const match = Component.__file.match(/([^/\\]+)\.\w+$/);
|
|
if (match) {
|
|
name = match[1];
|
|
}
|
|
}
|
|
if (!name && instance && instance.parent) {
|
|
const inferFromRegistry = (registry) => {
|
|
for (const key in registry) {
|
|
if (registry[key] === Component) {
|
|
return key;
|
|
}
|
|
}
|
|
};
|
|
name = inferFromRegistry(
|
|
instance.components || instance.parent.type.components
|
|
) || inferFromRegistry(instance.appContext.components);
|
|
}
|
|
return name ? classify(name) : isRoot ? `App` : `Anonymous`;
|
|
}
|
|
function isClassComponent(value) {
|
|
return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(value) && "__vccOpts" in value;
|
|
}
|
|
|
|
const computed = (getterOrOptions, debugOptions) => {
|
|
return (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.computed)(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
};
|
|
|
|
function h(type, propsOrChildren, children) {
|
|
const l = arguments.length;
|
|
if (l === 2) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(propsOrChildren) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(propsOrChildren)) {
|
|
if (isVNode(propsOrChildren)) {
|
|
return createVNode(type, null, [propsOrChildren]);
|
|
}
|
|
return createVNode(type, propsOrChildren);
|
|
} else {
|
|
return createVNode(type, null, propsOrChildren);
|
|
}
|
|
} else {
|
|
if (l > 3) {
|
|
children = Array.prototype.slice.call(arguments, 2);
|
|
} else if (l === 3 && isVNode(children)) {
|
|
children = [children];
|
|
}
|
|
return createVNode(type, propsOrChildren, children);
|
|
}
|
|
}
|
|
|
|
const ssrContextKey = Symbol.for("v-scx");
|
|
const useSSRContext = () => {
|
|
{
|
|
const ctx = inject(ssrContextKey);
|
|
if (!ctx) {
|
|
true && warn(
|
|
`Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
|
|
);
|
|
}
|
|
return ctx;
|
|
}
|
|
};
|
|
|
|
function isShallow(value) {
|
|
return !!(value && value["__v_isShallow"]);
|
|
}
|
|
|
|
function initCustomFormatter() {
|
|
if ( false || typeof window === "undefined") {
|
|
return;
|
|
}
|
|
const vueStyle = { style: "color:#3ba776" };
|
|
const numberStyle = { style: "color:#0b1bc9" };
|
|
const stringStyle = { style: "color:#b62e24" };
|
|
const keywordStyle = { style: "color:#9d288c" };
|
|
const formatter = {
|
|
header(obj) {
|
|
if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(obj)) {
|
|
return null;
|
|
}
|
|
if (obj.__isVue) {
|
|
return ["div", vueStyle, `VueInstance`];
|
|
} else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(obj)) {
|
|
return [
|
|
"div",
|
|
{},
|
|
["span", vueStyle, genRefFlag(obj)],
|
|
"<",
|
|
formatValue(obj.value),
|
|
`>`
|
|
];
|
|
} else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReactive)(obj)) {
|
|
return [
|
|
"div",
|
|
{},
|
|
["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"],
|
|
"<",
|
|
formatValue(obj),
|
|
`>${(0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReadonly)(obj) ? ` (readonly)` : ``}`
|
|
];
|
|
} else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReadonly)(obj)) {
|
|
return [
|
|
"div",
|
|
{},
|
|
["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"],
|
|
"<",
|
|
formatValue(obj),
|
|
">"
|
|
];
|
|
}
|
|
return null;
|
|
},
|
|
hasBody(obj) {
|
|
return obj && obj.__isVue;
|
|
},
|
|
body(obj) {
|
|
if (obj && obj.__isVue) {
|
|
return [
|
|
"div",
|
|
{},
|
|
...formatInstance(obj.$)
|
|
];
|
|
}
|
|
}
|
|
};
|
|
function formatInstance(instance) {
|
|
const blocks = [];
|
|
if (instance.type.props && instance.props) {
|
|
blocks.push(createInstanceBlock("props", (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(instance.props)));
|
|
}
|
|
if (instance.setupState !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ) {
|
|
blocks.push(createInstanceBlock("setup", instance.setupState));
|
|
}
|
|
if (instance.data !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ) {
|
|
blocks.push(createInstanceBlock("data", (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(instance.data)));
|
|
}
|
|
const computed = extractKeys(instance, "computed");
|
|
if (computed) {
|
|
blocks.push(createInstanceBlock("computed", computed));
|
|
}
|
|
const injected = extractKeys(instance, "inject");
|
|
if (injected) {
|
|
blocks.push(createInstanceBlock("injected", injected));
|
|
}
|
|
blocks.push([
|
|
"div",
|
|
{},
|
|
[
|
|
"span",
|
|
{
|
|
style: keywordStyle.style + ";opacity:0.66"
|
|
},
|
|
"$ (internal): "
|
|
],
|
|
["object", { object: instance }]
|
|
]);
|
|
return blocks;
|
|
}
|
|
function createInstanceBlock(type, target) {
|
|
target = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, target);
|
|
if (!Object.keys(target).length) {
|
|
return ["span", {}];
|
|
}
|
|
return [
|
|
"div",
|
|
{ style: "line-height:1.25em;margin-bottom:0.6em" },
|
|
[
|
|
"div",
|
|
{
|
|
style: "color:#476582"
|
|
},
|
|
type
|
|
],
|
|
[
|
|
"div",
|
|
{
|
|
style: "padding-left:1.25em"
|
|
},
|
|
...Object.keys(target).map((key) => {
|
|
return [
|
|
"div",
|
|
{},
|
|
["span", keywordStyle, key + ": "],
|
|
formatValue(target[key], false)
|
|
];
|
|
})
|
|
]
|
|
];
|
|
}
|
|
function formatValue(v, asRaw = true) {
|
|
if (typeof v === "number") {
|
|
return ["span", numberStyle, v];
|
|
} else if (typeof v === "string") {
|
|
return ["span", stringStyle, JSON.stringify(v)];
|
|
} else if (typeof v === "boolean") {
|
|
return ["span", keywordStyle, v];
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(v)) {
|
|
return ["object", { object: asRaw ? (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(v) : v }];
|
|
} else {
|
|
return ["span", stringStyle, String(v)];
|
|
}
|
|
}
|
|
function extractKeys(instance, type) {
|
|
const Comp = instance.type;
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(Comp)) {
|
|
return;
|
|
}
|
|
const extracted = {};
|
|
for (const key in instance.ctx) {
|
|
if (isKeyOfType(Comp, key, type)) {
|
|
extracted[key] = instance.ctx[key];
|
|
}
|
|
}
|
|
return extracted;
|
|
}
|
|
function isKeyOfType(Comp, key, type) {
|
|
const opts = Comp[type];
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(opts) && opts.includes(key) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(opts) && key in opts) {
|
|
return true;
|
|
}
|
|
if (Comp.extends && isKeyOfType(Comp.extends, key, type)) {
|
|
return true;
|
|
}
|
|
if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) {
|
|
return true;
|
|
}
|
|
}
|
|
function genRefFlag(v) {
|
|
if (isShallow(v)) {
|
|
return `ShallowRef`;
|
|
}
|
|
if (v.effect) {
|
|
return `ComputedRef`;
|
|
}
|
|
return `Ref`;
|
|
}
|
|
if (window.devtoolsFormatters) {
|
|
window.devtoolsFormatters.push(formatter);
|
|
} else {
|
|
window.devtoolsFormatters = [formatter];
|
|
}
|
|
}
|
|
|
|
function withMemo(memo, render, cache, index) {
|
|
const cached = cache[index];
|
|
if (cached && isMemoSame(cached, memo)) {
|
|
return cached;
|
|
}
|
|
const ret = render();
|
|
ret.memo = memo.slice();
|
|
return cache[index] = ret;
|
|
}
|
|
function isMemoSame(cached, memo) {
|
|
const prev = cached.memo;
|
|
if (prev.length != memo.length) {
|
|
return false;
|
|
}
|
|
for (let i = 0; i < prev.length; i++) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasChanged)(prev[i], memo[i])) {
|
|
return false;
|
|
}
|
|
}
|
|
if (isBlockTreeEnabled > 0 && currentBlock) {
|
|
currentBlock.push(cached);
|
|
}
|
|
return true;
|
|
}
|
|
|
|
const version = "3.3.4";
|
|
const _ssrUtils = {
|
|
createComponentInstance,
|
|
setupComponent,
|
|
renderComponentRoot,
|
|
setCurrentRenderingInstance,
|
|
isVNode: isVNode,
|
|
normalizeVNode
|
|
};
|
|
const ssrUtils = _ssrUtils ;
|
|
const resolveFilter = null;
|
|
const compatUtils = null;
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js":
|
|
/*!***********************************************************************!*\
|
|
!*** ./node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js ***!
|
|
\***********************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ BaseTransition: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.BaseTransition),
|
|
/* harmony export */ BaseTransitionPropsValidators: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.BaseTransitionPropsValidators),
|
|
/* harmony export */ Comment: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Comment),
|
|
/* harmony export */ EffectScope: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.EffectScope),
|
|
/* harmony export */ Fragment: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Fragment),
|
|
/* harmony export */ KeepAlive: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.KeepAlive),
|
|
/* harmony export */ ReactiveEffect: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.ReactiveEffect),
|
|
/* harmony export */ Static: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Static),
|
|
/* harmony export */ Suspense: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Suspense),
|
|
/* harmony export */ Teleport: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Teleport),
|
|
/* harmony export */ Text: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Text),
|
|
/* harmony export */ Transition: () => (/* binding */ Transition),
|
|
/* harmony export */ TransitionGroup: () => (/* binding */ TransitionGroup),
|
|
/* harmony export */ VueElement: () => (/* binding */ VueElement),
|
|
/* harmony export */ assertNumber: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.assertNumber),
|
|
/* harmony export */ callWithAsyncErrorHandling: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.callWithAsyncErrorHandling),
|
|
/* harmony export */ callWithErrorHandling: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.callWithErrorHandling),
|
|
/* harmony export */ camelize: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.camelize),
|
|
/* harmony export */ capitalize: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.capitalize),
|
|
/* harmony export */ cloneVNode: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.cloneVNode),
|
|
/* harmony export */ compatUtils: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.compatUtils),
|
|
/* harmony export */ computed: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.computed),
|
|
/* harmony export */ createApp: () => (/* binding */ createApp),
|
|
/* harmony export */ createBlock: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createBlock),
|
|
/* harmony export */ createCommentVNode: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode),
|
|
/* harmony export */ createElementBlock: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createElementBlock),
|
|
/* harmony export */ createElementVNode: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createElementVNode),
|
|
/* harmony export */ createHydrationRenderer: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createHydrationRenderer),
|
|
/* harmony export */ createPropsRestProxy: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createPropsRestProxy),
|
|
/* harmony export */ createRenderer: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createRenderer),
|
|
/* harmony export */ createSSRApp: () => (/* binding */ createSSRApp),
|
|
/* harmony export */ createSlots: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createSlots),
|
|
/* harmony export */ createStaticVNode: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createStaticVNode),
|
|
/* harmony export */ createTextVNode: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createTextVNode),
|
|
/* harmony export */ createVNode: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createVNode),
|
|
/* harmony export */ customRef: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.customRef),
|
|
/* harmony export */ defineAsyncComponent: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineAsyncComponent),
|
|
/* harmony export */ defineComponent: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineComponent),
|
|
/* harmony export */ defineCustomElement: () => (/* binding */ defineCustomElement),
|
|
/* harmony export */ defineEmits: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineEmits),
|
|
/* harmony export */ defineExpose: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineExpose),
|
|
/* harmony export */ defineModel: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineModel),
|
|
/* harmony export */ defineOptions: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineOptions),
|
|
/* harmony export */ defineProps: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineProps),
|
|
/* harmony export */ defineSSRCustomElement: () => (/* binding */ defineSSRCustomElement),
|
|
/* harmony export */ defineSlots: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineSlots),
|
|
/* harmony export */ devtools: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.devtools),
|
|
/* harmony export */ effect: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.effect),
|
|
/* harmony export */ effectScope: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.effectScope),
|
|
/* harmony export */ getCurrentInstance: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance),
|
|
/* harmony export */ getCurrentScope: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.getCurrentScope),
|
|
/* harmony export */ getTransitionRawChildren: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.getTransitionRawChildren),
|
|
/* harmony export */ guardReactiveProps: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps),
|
|
/* harmony export */ h: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.h),
|
|
/* harmony export */ handleError: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.handleError),
|
|
/* harmony export */ hasInjectionContext: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.hasInjectionContext),
|
|
/* harmony export */ hydrate: () => (/* binding */ hydrate),
|
|
/* harmony export */ initCustomFormatter: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.initCustomFormatter),
|
|
/* harmony export */ initDirectivesForSSR: () => (/* binding */ initDirectivesForSSR),
|
|
/* harmony export */ inject: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.inject),
|
|
/* harmony export */ isMemoSame: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isMemoSame),
|
|
/* harmony export */ isProxy: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isProxy),
|
|
/* harmony export */ isReactive: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isReactive),
|
|
/* harmony export */ isReadonly: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isReadonly),
|
|
/* harmony export */ isRef: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isRef),
|
|
/* harmony export */ isRuntimeOnly: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isRuntimeOnly),
|
|
/* harmony export */ isShallow: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isShallow),
|
|
/* harmony export */ isVNode: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isVNode),
|
|
/* harmony export */ markRaw: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.markRaw),
|
|
/* harmony export */ mergeDefaults: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.mergeDefaults),
|
|
/* harmony export */ mergeModels: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.mergeModels),
|
|
/* harmony export */ mergeProps: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.mergeProps),
|
|
/* harmony export */ nextTick: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.nextTick),
|
|
/* harmony export */ normalizeClass: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.normalizeClass),
|
|
/* harmony export */ normalizeProps: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.normalizeProps),
|
|
/* harmony export */ normalizeStyle: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle),
|
|
/* harmony export */ onActivated: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onActivated),
|
|
/* harmony export */ onBeforeMount: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onBeforeMount),
|
|
/* harmony export */ onBeforeUnmount: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onBeforeUnmount),
|
|
/* harmony export */ onBeforeUpdate: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onBeforeUpdate),
|
|
/* harmony export */ onDeactivated: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onDeactivated),
|
|
/* harmony export */ onErrorCaptured: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onErrorCaptured),
|
|
/* harmony export */ onMounted: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onMounted),
|
|
/* harmony export */ onRenderTracked: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onRenderTracked),
|
|
/* harmony export */ onRenderTriggered: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onRenderTriggered),
|
|
/* harmony export */ onScopeDispose: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onScopeDispose),
|
|
/* harmony export */ onServerPrefetch: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onServerPrefetch),
|
|
/* harmony export */ onUnmounted: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onUnmounted),
|
|
/* harmony export */ onUpdated: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onUpdated),
|
|
/* harmony export */ openBlock: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.openBlock),
|
|
/* harmony export */ popScopeId: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.popScopeId),
|
|
/* harmony export */ provide: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.provide),
|
|
/* harmony export */ proxyRefs: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.proxyRefs),
|
|
/* harmony export */ pushScopeId: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.pushScopeId),
|
|
/* harmony export */ queuePostFlushCb: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.queuePostFlushCb),
|
|
/* harmony export */ reactive: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.reactive),
|
|
/* harmony export */ readonly: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.readonly),
|
|
/* harmony export */ ref: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.ref),
|
|
/* harmony export */ registerRuntimeCompiler: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.registerRuntimeCompiler),
|
|
/* harmony export */ render: () => (/* binding */ render),
|
|
/* harmony export */ renderList: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.renderList),
|
|
/* harmony export */ renderSlot: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.renderSlot),
|
|
/* harmony export */ resolveComponent: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.resolveComponent),
|
|
/* harmony export */ resolveDirective: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.resolveDirective),
|
|
/* harmony export */ resolveDynamicComponent: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.resolveDynamicComponent),
|
|
/* harmony export */ resolveFilter: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.resolveFilter),
|
|
/* harmony export */ resolveTransitionHooks: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.resolveTransitionHooks),
|
|
/* harmony export */ setBlockTracking: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.setBlockTracking),
|
|
/* harmony export */ setDevtoolsHook: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.setDevtoolsHook),
|
|
/* harmony export */ setTransitionHooks: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.setTransitionHooks),
|
|
/* harmony export */ shallowReactive: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.shallowReactive),
|
|
/* harmony export */ shallowReadonly: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly),
|
|
/* harmony export */ shallowRef: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.shallowRef),
|
|
/* harmony export */ ssrContextKey: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.ssrContextKey),
|
|
/* harmony export */ ssrUtils: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.ssrUtils),
|
|
/* harmony export */ stop: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.stop),
|
|
/* harmony export */ toDisplayString: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.toDisplayString),
|
|
/* harmony export */ toHandlerKey: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.toHandlerKey),
|
|
/* harmony export */ toHandlers: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.toHandlers),
|
|
/* harmony export */ toRaw: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.toRaw),
|
|
/* harmony export */ toRef: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.toRef),
|
|
/* harmony export */ toRefs: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.toRefs),
|
|
/* harmony export */ toValue: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.toValue),
|
|
/* harmony export */ transformVNodeArgs: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.transformVNodeArgs),
|
|
/* harmony export */ triggerRef: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.triggerRef),
|
|
/* harmony export */ unref: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.unref),
|
|
/* harmony export */ useAttrs: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.useAttrs),
|
|
/* harmony export */ useCssModule: () => (/* binding */ useCssModule),
|
|
/* harmony export */ useCssVars: () => (/* binding */ useCssVars),
|
|
/* harmony export */ useModel: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.useModel),
|
|
/* harmony export */ useSSRContext: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.useSSRContext),
|
|
/* harmony export */ useSlots: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.useSlots),
|
|
/* harmony export */ useTransitionState: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.useTransitionState),
|
|
/* harmony export */ vModelCheckbox: () => (/* binding */ vModelCheckbox),
|
|
/* harmony export */ vModelDynamic: () => (/* binding */ vModelDynamic),
|
|
/* harmony export */ vModelRadio: () => (/* binding */ vModelRadio),
|
|
/* harmony export */ vModelSelect: () => (/* binding */ vModelSelect),
|
|
/* harmony export */ vModelText: () => (/* binding */ vModelText),
|
|
/* harmony export */ vShow: () => (/* binding */ vShow),
|
|
/* harmony export */ version: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.version),
|
|
/* harmony export */ warn: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn),
|
|
/* harmony export */ watch: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.watch),
|
|
/* harmony export */ watchEffect: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.watchEffect),
|
|
/* harmony export */ watchPostEffect: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.watchPostEffect),
|
|
/* harmony export */ watchSyncEffect: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.watchSyncEffect),
|
|
/* harmony export */ withAsyncContext: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.withAsyncContext),
|
|
/* harmony export */ withCtx: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.withCtx),
|
|
/* harmony export */ withDefaults: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.withDefaults),
|
|
/* harmony export */ withDirectives: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.withDirectives),
|
|
/* harmony export */ withKeys: () => (/* binding */ withKeys),
|
|
/* harmony export */ withMemo: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.withMemo),
|
|
/* harmony export */ withModifiers: () => (/* binding */ withModifiers),
|
|
/* harmony export */ withScopeId: () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.withScopeId)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/runtime-core */ "./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js");
|
|
/* harmony import */ var _vue_shared__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/shared */ "./node_modules/@vue/shared/dist/shared.esm-bundler.js");
|
|
/* harmony import */ var _vue_runtime_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @vue/runtime-core */ "./node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js");
|
|
|
|
|
|
|
|
|
|
const svgNS = "http://www.w3.org/2000/svg";
|
|
const doc = typeof document !== "undefined" ? document : null;
|
|
const templateContainer = doc && /* @__PURE__ */ doc.createElement("template");
|
|
const nodeOps = {
|
|
insert: (child, parent, anchor) => {
|
|
parent.insertBefore(child, anchor || null);
|
|
},
|
|
remove: (child) => {
|
|
const parent = child.parentNode;
|
|
if (parent) {
|
|
parent.removeChild(child);
|
|
}
|
|
},
|
|
createElement: (tag, isSVG, is, props) => {
|
|
const el = isSVG ? doc.createElementNS(svgNS, tag) : doc.createElement(tag, is ? { is } : void 0);
|
|
if (tag === "select" && props && props.multiple != null) {
|
|
el.setAttribute("multiple", props.multiple);
|
|
}
|
|
return el;
|
|
},
|
|
createText: (text) => doc.createTextNode(text),
|
|
createComment: (text) => doc.createComment(text),
|
|
setText: (node, text) => {
|
|
node.nodeValue = text;
|
|
},
|
|
setElementText: (el, text) => {
|
|
el.textContent = text;
|
|
},
|
|
parentNode: (node) => node.parentNode,
|
|
nextSibling: (node) => node.nextSibling,
|
|
querySelector: (selector) => doc.querySelector(selector),
|
|
setScopeId(el, id) {
|
|
el.setAttribute(id, "");
|
|
},
|
|
// __UNSAFE__
|
|
// Reason: innerHTML.
|
|
// Static content here can only come from compiled templates.
|
|
// As long as the user only uses trusted templates, this is safe.
|
|
insertStaticContent(content, parent, anchor, isSVG, start, end) {
|
|
const before = anchor ? anchor.previousSibling : parent.lastChild;
|
|
if (start && (start === end || start.nextSibling)) {
|
|
while (true) {
|
|
parent.insertBefore(start.cloneNode(true), anchor);
|
|
if (start === end || !(start = start.nextSibling))
|
|
break;
|
|
}
|
|
} else {
|
|
templateContainer.innerHTML = isSVG ? `<svg>${content}</svg>` : content;
|
|
const template = templateContainer.content;
|
|
if (isSVG) {
|
|
const wrapper = template.firstChild;
|
|
while (wrapper.firstChild) {
|
|
template.appendChild(wrapper.firstChild);
|
|
}
|
|
template.removeChild(wrapper);
|
|
}
|
|
parent.insertBefore(template, anchor);
|
|
}
|
|
return [
|
|
// first
|
|
before ? before.nextSibling : parent.firstChild,
|
|
// last
|
|
anchor ? anchor.previousSibling : parent.lastChild
|
|
];
|
|
}
|
|
};
|
|
|
|
function patchClass(el, value, isSVG) {
|
|
const transitionClasses = el._vtc;
|
|
if (transitionClasses) {
|
|
value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
|
|
}
|
|
if (value == null) {
|
|
el.removeAttribute("class");
|
|
} else if (isSVG) {
|
|
el.setAttribute("class", value);
|
|
} else {
|
|
el.className = value;
|
|
}
|
|
}
|
|
|
|
function patchStyle(el, prev, next) {
|
|
const style = el.style;
|
|
const isCssString = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(next);
|
|
if (next && !isCssString) {
|
|
if (prev && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(prev)) {
|
|
for (const key in prev) {
|
|
if (next[key] == null) {
|
|
setStyle(style, key, "");
|
|
}
|
|
}
|
|
}
|
|
for (const key in next) {
|
|
setStyle(style, key, next[key]);
|
|
}
|
|
} else {
|
|
const currentDisplay = style.display;
|
|
if (isCssString) {
|
|
if (prev !== next) {
|
|
style.cssText = next;
|
|
}
|
|
} else if (prev) {
|
|
el.removeAttribute("style");
|
|
}
|
|
if ("_vod" in el) {
|
|
style.display = currentDisplay;
|
|
}
|
|
}
|
|
}
|
|
const semicolonRE = /[^\\];\s*$/;
|
|
const importantRE = /\s*!important$/;
|
|
function setStyle(style, name, val) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(val)) {
|
|
val.forEach((v) => setStyle(style, name, v));
|
|
} else {
|
|
if (val == null)
|
|
val = "";
|
|
if (true) {
|
|
if (semicolonRE.test(val)) {
|
|
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(
|
|
`Unexpected semicolon at the end of '${name}' style value: '${val}'`
|
|
);
|
|
}
|
|
}
|
|
if (name.startsWith("--")) {
|
|
style.setProperty(name, val);
|
|
} else {
|
|
const prefixed = autoPrefix(style, name);
|
|
if (importantRE.test(val)) {
|
|
style.setProperty(
|
|
(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(prefixed),
|
|
val.replace(importantRE, ""),
|
|
"important"
|
|
);
|
|
} else {
|
|
style[prefixed] = val;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const prefixes = ["Webkit", "Moz", "ms"];
|
|
const prefixCache = {};
|
|
function autoPrefix(style, rawName) {
|
|
const cached = prefixCache[rawName];
|
|
if (cached) {
|
|
return cached;
|
|
}
|
|
let name = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(rawName);
|
|
if (name !== "filter" && name in style) {
|
|
return prefixCache[rawName] = name;
|
|
}
|
|
name = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.capitalize)(name);
|
|
for (let i = 0; i < prefixes.length; i++) {
|
|
const prefixed = prefixes[i] + name;
|
|
if (prefixed in style) {
|
|
return prefixCache[rawName] = prefixed;
|
|
}
|
|
}
|
|
return rawName;
|
|
}
|
|
|
|
const xlinkNS = "http://www.w3.org/1999/xlink";
|
|
function patchAttr(el, key, value, isSVG, instance) {
|
|
if (isSVG && key.startsWith("xlink:")) {
|
|
if (value == null) {
|
|
el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
|
|
} else {
|
|
el.setAttributeNS(xlinkNS, key, value);
|
|
}
|
|
} else {
|
|
const isBoolean = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSpecialBooleanAttr)(key);
|
|
if (value == null || isBoolean && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.includeBooleanAttr)(value)) {
|
|
el.removeAttribute(key);
|
|
} else {
|
|
el.setAttribute(key, isBoolean ? "" : value);
|
|
}
|
|
}
|
|
}
|
|
|
|
function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
if (key === "innerHTML" || key === "textContent") {
|
|
if (prevChildren) {
|
|
unmountChildren(prevChildren, parentComponent, parentSuspense);
|
|
}
|
|
el[key] = value == null ? "" : value;
|
|
return;
|
|
}
|
|
const tag = el.tagName;
|
|
if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
|
|
!tag.includes("-")) {
|
|
el._value = value;
|
|
const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value;
|
|
const newValue = value == null ? "" : value;
|
|
if (oldValue !== newValue) {
|
|
el.value = newValue;
|
|
}
|
|
if (value == null) {
|
|
el.removeAttribute(key);
|
|
}
|
|
return;
|
|
}
|
|
let needRemove = false;
|
|
if (value === "" || value == null) {
|
|
const type = typeof el[key];
|
|
if (type === "boolean") {
|
|
value = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.includeBooleanAttr)(value);
|
|
} else if (value == null && type === "string") {
|
|
value = "";
|
|
needRemove = true;
|
|
} else if (type === "number") {
|
|
value = 0;
|
|
needRemove = true;
|
|
}
|
|
}
|
|
try {
|
|
el[key] = value;
|
|
} catch (e) {
|
|
if ( true && !needRemove) {
|
|
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(
|
|
`Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`,
|
|
e
|
|
);
|
|
}
|
|
}
|
|
needRemove && el.removeAttribute(key);
|
|
}
|
|
|
|
function addEventListener(el, event, handler, options) {
|
|
el.addEventListener(event, handler, options);
|
|
}
|
|
function removeEventListener(el, event, handler, options) {
|
|
el.removeEventListener(event, handler, options);
|
|
}
|
|
function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
const invokers = el._vei || (el._vei = {});
|
|
const existingInvoker = invokers[rawName];
|
|
if (nextValue && existingInvoker) {
|
|
existingInvoker.value = nextValue;
|
|
} else {
|
|
const [name, options] = parseName(rawName);
|
|
if (nextValue) {
|
|
const invoker = invokers[rawName] = createInvoker(nextValue, instance);
|
|
addEventListener(el, name, invoker, options);
|
|
} else if (existingInvoker) {
|
|
removeEventListener(el, name, existingInvoker, options);
|
|
invokers[rawName] = void 0;
|
|
}
|
|
}
|
|
}
|
|
const optionsModifierRE = /(?:Once|Passive|Capture)$/;
|
|
function parseName(name) {
|
|
let options;
|
|
if (optionsModifierRE.test(name)) {
|
|
options = {};
|
|
let m;
|
|
while (m = name.match(optionsModifierRE)) {
|
|
name = name.slice(0, name.length - m[0].length);
|
|
options[m[0].toLowerCase()] = true;
|
|
}
|
|
}
|
|
const event = name[2] === ":" ? name.slice(3) : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(name.slice(2));
|
|
return [event, options];
|
|
}
|
|
let cachedNow = 0;
|
|
const p = /* @__PURE__ */ Promise.resolve();
|
|
const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
|
|
function createInvoker(initialValue, instance) {
|
|
const invoker = (e) => {
|
|
if (!e._vts) {
|
|
e._vts = Date.now();
|
|
} else if (e._vts <= invoker.attached) {
|
|
return;
|
|
}
|
|
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.callWithAsyncErrorHandling)(
|
|
patchStopImmediatePropagation(e, invoker.value),
|
|
instance,
|
|
5,
|
|
[e]
|
|
);
|
|
};
|
|
invoker.value = initialValue;
|
|
invoker.attached = getNow();
|
|
return invoker;
|
|
}
|
|
function patchStopImmediatePropagation(e, value) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value)) {
|
|
const originalStop = e.stopImmediatePropagation;
|
|
e.stopImmediatePropagation = () => {
|
|
originalStop.call(e);
|
|
e._stopped = true;
|
|
};
|
|
return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2));
|
|
} else {
|
|
return value;
|
|
}
|
|
}
|
|
|
|
const nativeOnRE = /^on[a-z]/;
|
|
const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
|
|
if (key === "class") {
|
|
patchClass(el, nextValue, isSVG);
|
|
} else if (key === "style") {
|
|
patchStyle(el, prevValue, nextValue);
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isOn)(key)) {
|
|
if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isModelListener)(key)) {
|
|
patchEvent(el, key, prevValue, nextValue, parentComponent);
|
|
}
|
|
} else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
|
|
patchDOMProp(
|
|
el,
|
|
key,
|
|
nextValue,
|
|
prevChildren,
|
|
parentComponent,
|
|
parentSuspense,
|
|
unmountChildren
|
|
);
|
|
} else {
|
|
if (key === "true-value") {
|
|
el._trueValue = nextValue;
|
|
} else if (key === "false-value") {
|
|
el._falseValue = nextValue;
|
|
}
|
|
patchAttr(el, key, nextValue, isSVG);
|
|
}
|
|
};
|
|
function shouldSetAsProp(el, key, value, isSVG) {
|
|
if (isSVG) {
|
|
if (key === "innerHTML" || key === "textContent") {
|
|
return true;
|
|
}
|
|
if (key in el && nativeOnRE.test(key) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(value)) {
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
if (key === "spellcheck" || key === "draggable" || key === "translate") {
|
|
return false;
|
|
}
|
|
if (key === "form") {
|
|
return false;
|
|
}
|
|
if (key === "list" && el.tagName === "INPUT") {
|
|
return false;
|
|
}
|
|
if (key === "type" && el.tagName === "TEXTAREA") {
|
|
return false;
|
|
}
|
|
if (nativeOnRE.test(key) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(value)) {
|
|
return false;
|
|
}
|
|
return key in el;
|
|
}
|
|
|
|
function defineCustomElement(options, hydrate2) {
|
|
const Comp = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineComponent)(options);
|
|
class VueCustomElement extends VueElement {
|
|
constructor(initialProps) {
|
|
super(Comp, initialProps, hydrate2);
|
|
}
|
|
}
|
|
VueCustomElement.def = Comp;
|
|
return VueCustomElement;
|
|
}
|
|
const defineSSRCustomElement = (options) => {
|
|
return defineCustomElement(options, hydrate);
|
|
};
|
|
const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
|
|
};
|
|
class VueElement extends BaseClass {
|
|
constructor(_def, _props = {}, hydrate2) {
|
|
super();
|
|
this._def = _def;
|
|
this._props = _props;
|
|
/**
|
|
* @internal
|
|
*/
|
|
this._instance = null;
|
|
this._connected = false;
|
|
this._resolved = false;
|
|
this._numberProps = null;
|
|
if (this.shadowRoot && hydrate2) {
|
|
hydrate2(this._createVNode(), this.shadowRoot);
|
|
} else {
|
|
if ( true && this.shadowRoot) {
|
|
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(
|
|
`Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
|
|
);
|
|
}
|
|
this.attachShadow({ mode: "open" });
|
|
if (!this._def.__asyncLoader) {
|
|
this._resolveProps(this._def);
|
|
}
|
|
}
|
|
}
|
|
connectedCallback() {
|
|
this._connected = true;
|
|
if (!this._instance) {
|
|
if (this._resolved) {
|
|
this._update();
|
|
} else {
|
|
this._resolveDef();
|
|
}
|
|
}
|
|
}
|
|
disconnectedCallback() {
|
|
this._connected = false;
|
|
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.nextTick)(() => {
|
|
if (!this._connected) {
|
|
render(null, this.shadowRoot);
|
|
this._instance = null;
|
|
}
|
|
});
|
|
}
|
|
/**
|
|
* resolve inner component definition (handle possible async component)
|
|
*/
|
|
_resolveDef() {
|
|
this._resolved = true;
|
|
for (let i = 0; i < this.attributes.length; i++) {
|
|
this._setAttr(this.attributes[i].name);
|
|
}
|
|
new MutationObserver((mutations) => {
|
|
for (const m of mutations) {
|
|
this._setAttr(m.attributeName);
|
|
}
|
|
}).observe(this, { attributes: true });
|
|
const resolve = (def, isAsync = false) => {
|
|
const { props, styles } = def;
|
|
let numberProps;
|
|
if (props && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(props)) {
|
|
for (const key in props) {
|
|
const opt = props[key];
|
|
if (opt === Number || opt && opt.type === Number) {
|
|
if (key in this._props) {
|
|
this._props[key] = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toNumber)(this._props[key]);
|
|
}
|
|
(numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(key)] = true;
|
|
}
|
|
}
|
|
}
|
|
this._numberProps = numberProps;
|
|
if (isAsync) {
|
|
this._resolveProps(def);
|
|
}
|
|
this._applyStyles(styles);
|
|
this._update();
|
|
};
|
|
const asyncDef = this._def.__asyncLoader;
|
|
if (asyncDef) {
|
|
asyncDef().then((def) => resolve(def, true));
|
|
} else {
|
|
resolve(this._def);
|
|
}
|
|
}
|
|
_resolveProps(def) {
|
|
const { props } = def;
|
|
const declaredPropKeys = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(props) ? props : Object.keys(props || {});
|
|
for (const key of Object.keys(this)) {
|
|
if (key[0] !== "_" && declaredPropKeys.includes(key)) {
|
|
this._setProp(key, this[key], true, false);
|
|
}
|
|
}
|
|
for (const key of declaredPropKeys.map(_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)) {
|
|
Object.defineProperty(this, key, {
|
|
get() {
|
|
return this._getProp(key);
|
|
},
|
|
set(val) {
|
|
this._setProp(key, val);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
_setAttr(key) {
|
|
let value = this.getAttribute(key);
|
|
const camelKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(key);
|
|
if (this._numberProps && this._numberProps[camelKey]) {
|
|
value = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toNumber)(value);
|
|
}
|
|
this._setProp(camelKey, value, false);
|
|
}
|
|
/**
|
|
* @internal
|
|
*/
|
|
_getProp(key) {
|
|
return this._props[key];
|
|
}
|
|
/**
|
|
* @internal
|
|
*/
|
|
_setProp(key, val, shouldReflect = true, shouldUpdate = true) {
|
|
if (val !== this._props[key]) {
|
|
this._props[key] = val;
|
|
if (shouldUpdate && this._instance) {
|
|
this._update();
|
|
}
|
|
if (shouldReflect) {
|
|
if (val === true) {
|
|
this.setAttribute((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(key), "");
|
|
} else if (typeof val === "string" || typeof val === "number") {
|
|
this.setAttribute((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(key), val + "");
|
|
} else if (!val) {
|
|
this.removeAttribute((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(key));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
_update() {
|
|
render(this._createVNode(), this.shadowRoot);
|
|
}
|
|
_createVNode() {
|
|
const vnode = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createVNode)(this._def, (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, this._props));
|
|
if (!this._instance) {
|
|
vnode.ce = (instance) => {
|
|
this._instance = instance;
|
|
instance.isCE = true;
|
|
if (true) {
|
|
instance.ceReload = (newStyles) => {
|
|
if (this._styles) {
|
|
this._styles.forEach((s) => this.shadowRoot.removeChild(s));
|
|
this._styles.length = 0;
|
|
}
|
|
this._applyStyles(newStyles);
|
|
this._instance = null;
|
|
this._update();
|
|
};
|
|
}
|
|
const dispatch = (event, args) => {
|
|
this.dispatchEvent(
|
|
new CustomEvent(event, {
|
|
detail: args
|
|
})
|
|
);
|
|
};
|
|
instance.emit = (event, ...args) => {
|
|
dispatch(event, args);
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(event) !== event) {
|
|
dispatch((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(event), args);
|
|
}
|
|
};
|
|
let parent = this;
|
|
while (parent = parent && (parent.parentNode || parent.host)) {
|
|
if (parent instanceof VueElement) {
|
|
instance.parent = parent._instance;
|
|
instance.provides = parent._instance.provides;
|
|
break;
|
|
}
|
|
}
|
|
};
|
|
}
|
|
return vnode;
|
|
}
|
|
_applyStyles(styles) {
|
|
if (styles) {
|
|
styles.forEach((css) => {
|
|
const s = document.createElement("style");
|
|
s.textContent = css;
|
|
this.shadowRoot.appendChild(s);
|
|
if (true) {
|
|
(this._styles || (this._styles = [])).push(s);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
|
|
function useCssModule(name = "$style") {
|
|
{
|
|
const instance = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance)();
|
|
if (!instance) {
|
|
true && (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`useCssModule must be called inside setup()`);
|
|
return _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ;
|
|
}
|
|
const modules = instance.type.__cssModules;
|
|
if (!modules) {
|
|
true && (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Current instance does not have CSS modules injected.`);
|
|
return _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ;
|
|
}
|
|
const mod = modules[name];
|
|
if (!mod) {
|
|
true && (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Current instance does not have CSS module named "${name}".`);
|
|
return _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ;
|
|
}
|
|
return mod;
|
|
}
|
|
}
|
|
|
|
function useCssVars(getter) {
|
|
const instance = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance)();
|
|
if (!instance) {
|
|
true && (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`useCssVars is called without current active component instance.`);
|
|
return;
|
|
}
|
|
const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
|
|
Array.from(
|
|
document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
|
|
).forEach((node) => setVarsOnNode(node, vars));
|
|
};
|
|
const setVars = () => {
|
|
const vars = getter(instance.proxy);
|
|
setVarsOnVNode(instance.subTree, vars);
|
|
updateTeleports(vars);
|
|
};
|
|
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.watchPostEffect)(setVars);
|
|
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => {
|
|
const ob = new MutationObserver(setVars);
|
|
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onUnmounted)(() => ob.disconnect());
|
|
});
|
|
}
|
|
function setVarsOnVNode(vnode, vars) {
|
|
if (vnode.shapeFlag & 128) {
|
|
const suspense = vnode.suspense;
|
|
vnode = suspense.activeBranch;
|
|
if (suspense.pendingBranch && !suspense.isHydrating) {
|
|
suspense.effects.push(() => {
|
|
setVarsOnVNode(suspense.activeBranch, vars);
|
|
});
|
|
}
|
|
}
|
|
while (vnode.component) {
|
|
vnode = vnode.component.subTree;
|
|
}
|
|
if (vnode.shapeFlag & 1 && vnode.el) {
|
|
setVarsOnNode(vnode.el, vars);
|
|
} else if (vnode.type === _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Fragment) {
|
|
vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
} else if (vnode.type === _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Static) {
|
|
let { el, anchor } = vnode;
|
|
while (el) {
|
|
setVarsOnNode(el, vars);
|
|
if (el === anchor)
|
|
break;
|
|
el = el.nextSibling;
|
|
}
|
|
}
|
|
}
|
|
function setVarsOnNode(el, vars) {
|
|
if (el.nodeType === 1) {
|
|
const style = el.style;
|
|
for (const key in vars) {
|
|
style.setProperty(`--${key}`, vars[key]);
|
|
}
|
|
}
|
|
}
|
|
|
|
const TRANSITION = "transition";
|
|
const ANIMATION = "animation";
|
|
const Transition = (props, { slots }) => (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.h)(_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.BaseTransition, resolveTransitionProps(props), slots);
|
|
Transition.displayName = "Transition";
|
|
const DOMTransitionPropsValidators = {
|
|
name: String,
|
|
type: String,
|
|
css: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
duration: [String, Number, Object],
|
|
enterFromClass: String,
|
|
enterActiveClass: String,
|
|
enterToClass: String,
|
|
appearFromClass: String,
|
|
appearActiveClass: String,
|
|
appearToClass: String,
|
|
leaveFromClass: String,
|
|
leaveActiveClass: String,
|
|
leaveToClass: String
|
|
};
|
|
const TransitionPropsValidators = Transition.props = /* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(
|
|
{},
|
|
_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.BaseTransitionPropsValidators,
|
|
DOMTransitionPropsValidators
|
|
);
|
|
const callHook = (hook, args = []) => {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(hook)) {
|
|
hook.forEach((h2) => h2(...args));
|
|
} else if (hook) {
|
|
hook(...args);
|
|
}
|
|
};
|
|
const hasExplicitCallback = (hook) => {
|
|
return hook ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
|
|
};
|
|
function resolveTransitionProps(rawProps) {
|
|
const baseProps = {};
|
|
for (const key in rawProps) {
|
|
if (!(key in DOMTransitionPropsValidators)) {
|
|
baseProps[key] = rawProps[key];
|
|
}
|
|
}
|
|
if (rawProps.css === false) {
|
|
return baseProps;
|
|
}
|
|
const {
|
|
name = "v",
|
|
type,
|
|
duration,
|
|
enterFromClass = `${name}-enter-from`,
|
|
enterActiveClass = `${name}-enter-active`,
|
|
enterToClass = `${name}-enter-to`,
|
|
appearFromClass = enterFromClass,
|
|
appearActiveClass = enterActiveClass,
|
|
appearToClass = enterToClass,
|
|
leaveFromClass = `${name}-leave-from`,
|
|
leaveActiveClass = `${name}-leave-active`,
|
|
leaveToClass = `${name}-leave-to`
|
|
} = rawProps;
|
|
const durations = normalizeDuration(duration);
|
|
const enterDuration = durations && durations[0];
|
|
const leaveDuration = durations && durations[1];
|
|
const {
|
|
onBeforeEnter,
|
|
onEnter,
|
|
onEnterCancelled,
|
|
onLeave,
|
|
onLeaveCancelled,
|
|
onBeforeAppear = onBeforeEnter,
|
|
onAppear = onEnter,
|
|
onAppearCancelled = onEnterCancelled
|
|
} = baseProps;
|
|
const finishEnter = (el, isAppear, done) => {
|
|
removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
|
|
done && done();
|
|
};
|
|
const finishLeave = (el, done) => {
|
|
el._isLeaving = false;
|
|
removeTransitionClass(el, leaveFromClass);
|
|
removeTransitionClass(el, leaveToClass);
|
|
removeTransitionClass(el, leaveActiveClass);
|
|
done && done();
|
|
};
|
|
const makeEnterHook = (isAppear) => {
|
|
return (el, done) => {
|
|
const hook = isAppear ? onAppear : onEnter;
|
|
const resolve = () => finishEnter(el, isAppear, done);
|
|
callHook(hook, [el, resolve]);
|
|
nextFrame(() => {
|
|
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
|
addTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
if (!hasExplicitCallback(hook)) {
|
|
whenTransitionEnds(el, type, enterDuration, resolve);
|
|
}
|
|
});
|
|
};
|
|
};
|
|
return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(baseProps, {
|
|
onBeforeEnter(el) {
|
|
callHook(onBeforeEnter, [el]);
|
|
addTransitionClass(el, enterFromClass);
|
|
addTransitionClass(el, enterActiveClass);
|
|
},
|
|
onBeforeAppear(el) {
|
|
callHook(onBeforeAppear, [el]);
|
|
addTransitionClass(el, appearFromClass);
|
|
addTransitionClass(el, appearActiveClass);
|
|
},
|
|
onEnter: makeEnterHook(false),
|
|
onAppear: makeEnterHook(true),
|
|
onLeave(el, done) {
|
|
el._isLeaving = true;
|
|
const resolve = () => finishLeave(el, done);
|
|
addTransitionClass(el, leaveFromClass);
|
|
forceReflow();
|
|
addTransitionClass(el, leaveActiveClass);
|
|
nextFrame(() => {
|
|
if (!el._isLeaving) {
|
|
return;
|
|
}
|
|
removeTransitionClass(el, leaveFromClass);
|
|
addTransitionClass(el, leaveToClass);
|
|
if (!hasExplicitCallback(onLeave)) {
|
|
whenTransitionEnds(el, type, leaveDuration, resolve);
|
|
}
|
|
});
|
|
callHook(onLeave, [el, resolve]);
|
|
},
|
|
onEnterCancelled(el) {
|
|
finishEnter(el, false);
|
|
callHook(onEnterCancelled, [el]);
|
|
},
|
|
onAppearCancelled(el) {
|
|
finishEnter(el, true);
|
|
callHook(onAppearCancelled, [el]);
|
|
},
|
|
onLeaveCancelled(el) {
|
|
finishLeave(el);
|
|
callHook(onLeaveCancelled, [el]);
|
|
}
|
|
});
|
|
}
|
|
function normalizeDuration(duration) {
|
|
if (duration == null) {
|
|
return null;
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(duration)) {
|
|
return [NumberOf(duration.enter), NumberOf(duration.leave)];
|
|
} else {
|
|
const n = NumberOf(duration);
|
|
return [n, n];
|
|
}
|
|
}
|
|
function NumberOf(val) {
|
|
const res = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toNumber)(val);
|
|
if (true) {
|
|
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.assertNumber)(res, "<transition> explicit duration");
|
|
}
|
|
return res;
|
|
}
|
|
function addTransitionClass(el, cls) {
|
|
cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
|
|
(el._vtc || (el._vtc = /* @__PURE__ */ new Set())).add(cls);
|
|
}
|
|
function removeTransitionClass(el, cls) {
|
|
cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
|
|
const { _vtc } = el;
|
|
if (_vtc) {
|
|
_vtc.delete(cls);
|
|
if (!_vtc.size) {
|
|
el._vtc = void 0;
|
|
}
|
|
}
|
|
}
|
|
function nextFrame(cb) {
|
|
requestAnimationFrame(() => {
|
|
requestAnimationFrame(cb);
|
|
});
|
|
}
|
|
let endId = 0;
|
|
function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
|
|
const id = el._endId = ++endId;
|
|
const resolveIfNotStale = () => {
|
|
if (id === el._endId) {
|
|
resolve();
|
|
}
|
|
};
|
|
if (explicitTimeout) {
|
|
return setTimeout(resolveIfNotStale, explicitTimeout);
|
|
}
|
|
const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
|
|
if (!type) {
|
|
return resolve();
|
|
}
|
|
const endEvent = type + "end";
|
|
let ended = 0;
|
|
const end = () => {
|
|
el.removeEventListener(endEvent, onEnd);
|
|
resolveIfNotStale();
|
|
};
|
|
const onEnd = (e) => {
|
|
if (e.target === el && ++ended >= propCount) {
|
|
end();
|
|
}
|
|
};
|
|
setTimeout(() => {
|
|
if (ended < propCount) {
|
|
end();
|
|
}
|
|
}, timeout + 1);
|
|
el.addEventListener(endEvent, onEnd);
|
|
}
|
|
function getTransitionInfo(el, expectedType) {
|
|
const styles = window.getComputedStyle(el);
|
|
const getStyleProperties = (key) => (styles[key] || "").split(", ");
|
|
const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
|
|
const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
|
|
const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
|
|
const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
|
|
const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
|
|
const animationTimeout = getTimeout(animationDelays, animationDurations);
|
|
let type = null;
|
|
let timeout = 0;
|
|
let propCount = 0;
|
|
if (expectedType === TRANSITION) {
|
|
if (transitionTimeout > 0) {
|
|
type = TRANSITION;
|
|
timeout = transitionTimeout;
|
|
propCount = transitionDurations.length;
|
|
}
|
|
} else if (expectedType === ANIMATION) {
|
|
if (animationTimeout > 0) {
|
|
type = ANIMATION;
|
|
timeout = animationTimeout;
|
|
propCount = animationDurations.length;
|
|
}
|
|
} else {
|
|
timeout = Math.max(transitionTimeout, animationTimeout);
|
|
type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
|
|
propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
|
|
}
|
|
const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test(
|
|
getStyleProperties(`${TRANSITION}Property`).toString()
|
|
);
|
|
return {
|
|
type,
|
|
timeout,
|
|
propCount,
|
|
hasTransform
|
|
};
|
|
}
|
|
function getTimeout(delays, durations) {
|
|
while (delays.length < durations.length) {
|
|
delays = delays.concat(delays);
|
|
}
|
|
return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
|
|
}
|
|
function toMs(s) {
|
|
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
}
|
|
function forceReflow() {
|
|
return document.body.offsetHeight;
|
|
}
|
|
|
|
const positionMap = /* @__PURE__ */ new WeakMap();
|
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
const TransitionGroupImpl = {
|
|
name: "TransitionGroup",
|
|
props: /* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, TransitionPropsValidators, {
|
|
tag: String,
|
|
moveClass: String
|
|
}),
|
|
setup(props, { slots }) {
|
|
const instance = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance)();
|
|
const state = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.useTransitionState)();
|
|
let prevChildren;
|
|
let children;
|
|
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onUpdated)(() => {
|
|
if (!prevChildren.length) {
|
|
return;
|
|
}
|
|
const moveClass = props.moveClass || `${props.name || "v"}-move`;
|
|
if (!hasCSSTransform(
|
|
prevChildren[0].el,
|
|
instance.vnode.el,
|
|
moveClass
|
|
)) {
|
|
return;
|
|
}
|
|
prevChildren.forEach(callPendingCbs);
|
|
prevChildren.forEach(recordPosition);
|
|
const movedChildren = prevChildren.filter(applyTranslation);
|
|
forceReflow();
|
|
movedChildren.forEach((c) => {
|
|
const el = c.el;
|
|
const style = el.style;
|
|
addTransitionClass(el, moveClass);
|
|
style.transform = style.webkitTransform = style.transitionDuration = "";
|
|
const cb = el._moveCb = (e) => {
|
|
if (e && e.target !== el) {
|
|
return;
|
|
}
|
|
if (!e || /transform$/.test(e.propertyName)) {
|
|
el.removeEventListener("transitionend", cb);
|
|
el._moveCb = null;
|
|
removeTransitionClass(el, moveClass);
|
|
}
|
|
};
|
|
el.addEventListener("transitionend", cb);
|
|
});
|
|
});
|
|
return () => {
|
|
const rawProps = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_2__.toRaw)(props);
|
|
const cssTransitionProps = resolveTransitionProps(rawProps);
|
|
let tag = rawProps.tag || _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Fragment;
|
|
prevChildren = children;
|
|
children = slots.default ? (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.getTransitionRawChildren)(slots.default()) : [];
|
|
for (let i = 0; i < children.length; i++) {
|
|
const child = children[i];
|
|
if (child.key != null) {
|
|
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.setTransitionHooks)(
|
|
child,
|
|
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.resolveTransitionHooks)(child, cssTransitionProps, state, instance)
|
|
);
|
|
} else if (true) {
|
|
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`<TransitionGroup> children must be keyed.`);
|
|
}
|
|
}
|
|
if (prevChildren) {
|
|
for (let i = 0; i < prevChildren.length; i++) {
|
|
const child = prevChildren[i];
|
|
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.setTransitionHooks)(
|
|
child,
|
|
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.resolveTransitionHooks)(child, cssTransitionProps, state, instance)
|
|
);
|
|
positionMap.set(child, child.el.getBoundingClientRect());
|
|
}
|
|
}
|
|
return (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createVNode)(tag, null, children);
|
|
};
|
|
}
|
|
};
|
|
const removeMode = (props) => delete props.mode;
|
|
/* @__PURE__ */ removeMode(TransitionGroupImpl.props);
|
|
const TransitionGroup = TransitionGroupImpl;
|
|
function callPendingCbs(c) {
|
|
const el = c.el;
|
|
if (el._moveCb) {
|
|
el._moveCb();
|
|
}
|
|
if (el._enterCb) {
|
|
el._enterCb();
|
|
}
|
|
}
|
|
function recordPosition(c) {
|
|
newPositionMap.set(c, c.el.getBoundingClientRect());
|
|
}
|
|
function applyTranslation(c) {
|
|
const oldPos = positionMap.get(c);
|
|
const newPos = newPositionMap.get(c);
|
|
const dx = oldPos.left - newPos.left;
|
|
const dy = oldPos.top - newPos.top;
|
|
if (dx || dy) {
|
|
const s = c.el.style;
|
|
s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`;
|
|
s.transitionDuration = "0s";
|
|
return c;
|
|
}
|
|
}
|
|
function hasCSSTransform(el, root, moveClass) {
|
|
const clone = el.cloneNode();
|
|
if (el._vtc) {
|
|
el._vtc.forEach((cls) => {
|
|
cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c));
|
|
});
|
|
}
|
|
moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c));
|
|
clone.style.display = "none";
|
|
const container = root.nodeType === 1 ? root : root.parentNode;
|
|
container.appendChild(clone);
|
|
const { hasTransform } = getTransitionInfo(clone);
|
|
container.removeChild(clone);
|
|
return hasTransform;
|
|
}
|
|
|
|
const getModelAssigner = (vnode) => {
|
|
const fn = vnode.props["onUpdate:modelValue"] || false;
|
|
return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(fn) ? (value) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(fn, value) : fn;
|
|
};
|
|
function onCompositionStart(e) {
|
|
e.target.composing = true;
|
|
}
|
|
function onCompositionEnd(e) {
|
|
const target = e.target;
|
|
if (target.composing) {
|
|
target.composing = false;
|
|
target.dispatchEvent(new Event("input"));
|
|
}
|
|
}
|
|
const vModelText = {
|
|
created(el, { modifiers: { lazy, trim, number } }, vnode) {
|
|
el._assign = getModelAssigner(vnode);
|
|
const castToNumber = number || vnode.props && vnode.props.type === "number";
|
|
addEventListener(el, lazy ? "change" : "input", (e) => {
|
|
if (e.target.composing)
|
|
return;
|
|
let domValue = el.value;
|
|
if (trim) {
|
|
domValue = domValue.trim();
|
|
}
|
|
if (castToNumber) {
|
|
domValue = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseToNumber)(domValue);
|
|
}
|
|
el._assign(domValue);
|
|
});
|
|
if (trim) {
|
|
addEventListener(el, "change", () => {
|
|
el.value = el.value.trim();
|
|
});
|
|
}
|
|
if (!lazy) {
|
|
addEventListener(el, "compositionstart", onCompositionStart);
|
|
addEventListener(el, "compositionend", onCompositionEnd);
|
|
addEventListener(el, "change", onCompositionEnd);
|
|
}
|
|
},
|
|
// set value on mounted so it's after min/max for type="range"
|
|
mounted(el, { value }) {
|
|
el.value = value == null ? "" : value;
|
|
},
|
|
beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) {
|
|
el._assign = getModelAssigner(vnode);
|
|
if (el.composing)
|
|
return;
|
|
if (document.activeElement === el && el.type !== "range") {
|
|
if (lazy) {
|
|
return;
|
|
}
|
|
if (trim && el.value.trim() === value) {
|
|
return;
|
|
}
|
|
if ((number || el.type === "number") && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseToNumber)(el.value) === value) {
|
|
return;
|
|
}
|
|
}
|
|
const newValue = value == null ? "" : value;
|
|
if (el.value !== newValue) {
|
|
el.value = newValue;
|
|
}
|
|
}
|
|
};
|
|
const vModelCheckbox = {
|
|
// #4096 array checkboxes need to be deep traversed
|
|
deep: true,
|
|
created(el, _, vnode) {
|
|
el._assign = getModelAssigner(vnode);
|
|
addEventListener(el, "change", () => {
|
|
const modelValue = el._modelValue;
|
|
const elementValue = getValue(el);
|
|
const checked = el.checked;
|
|
const assign = el._assign;
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(modelValue)) {
|
|
const index = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseIndexOf)(modelValue, elementValue);
|
|
const found = index !== -1;
|
|
if (checked && !found) {
|
|
assign(modelValue.concat(elementValue));
|
|
} else if (!checked && found) {
|
|
const filtered = [...modelValue];
|
|
filtered.splice(index, 1);
|
|
assign(filtered);
|
|
}
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSet)(modelValue)) {
|
|
const cloned = new Set(modelValue);
|
|
if (checked) {
|
|
cloned.add(elementValue);
|
|
} else {
|
|
cloned.delete(elementValue);
|
|
}
|
|
assign(cloned);
|
|
} else {
|
|
assign(getCheckboxValue(el, checked));
|
|
}
|
|
});
|
|
},
|
|
// set initial checked on mount to wait for true-value/false-value
|
|
mounted: setChecked,
|
|
beforeUpdate(el, binding, vnode) {
|
|
el._assign = getModelAssigner(vnode);
|
|
setChecked(el, binding, vnode);
|
|
}
|
|
};
|
|
function setChecked(el, { value, oldValue }, vnode) {
|
|
el._modelValue = value;
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value)) {
|
|
el.checked = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseIndexOf)(value, vnode.props.value) > -1;
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSet)(value)) {
|
|
el.checked = value.has(vnode.props.value);
|
|
} else if (value !== oldValue) {
|
|
el.checked = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseEqual)(value, getCheckboxValue(el, true));
|
|
}
|
|
}
|
|
const vModelRadio = {
|
|
created(el, { value }, vnode) {
|
|
el.checked = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseEqual)(value, vnode.props.value);
|
|
el._assign = getModelAssigner(vnode);
|
|
addEventListener(el, "change", () => {
|
|
el._assign(getValue(el));
|
|
});
|
|
},
|
|
beforeUpdate(el, { value, oldValue }, vnode) {
|
|
el._assign = getModelAssigner(vnode);
|
|
if (value !== oldValue) {
|
|
el.checked = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseEqual)(value, vnode.props.value);
|
|
}
|
|
}
|
|
};
|
|
const vModelSelect = {
|
|
// <select multiple> value need to be deep traversed
|
|
deep: true,
|
|
created(el, { value, modifiers: { number } }, vnode) {
|
|
const isSetModel = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSet)(value);
|
|
addEventListener(el, "change", () => {
|
|
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(
|
|
(o) => number ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseToNumber)(getValue(o)) : getValue(o)
|
|
);
|
|
el._assign(
|
|
el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
|
|
);
|
|
});
|
|
el._assign = getModelAssigner(vnode);
|
|
},
|
|
// set value in mounted & updated because <select> relies on its children
|
|
// <option>s.
|
|
mounted(el, { value }) {
|
|
setSelected(el, value);
|
|
},
|
|
beforeUpdate(el, _binding, vnode) {
|
|
el._assign = getModelAssigner(vnode);
|
|
},
|
|
updated(el, { value }) {
|
|
setSelected(el, value);
|
|
}
|
|
};
|
|
function setSelected(el, value) {
|
|
const isMultiple = el.multiple;
|
|
if (isMultiple && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSet)(value)) {
|
|
true && (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(
|
|
`<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.`
|
|
);
|
|
return;
|
|
}
|
|
for (let i = 0, l = el.options.length; i < l; i++) {
|
|
const option = el.options[i];
|
|
const optionValue = getValue(option);
|
|
if (isMultiple) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value)) {
|
|
option.selected = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseIndexOf)(value, optionValue) > -1;
|
|
} else {
|
|
option.selected = value.has(optionValue);
|
|
}
|
|
} else {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseEqual)(getValue(option), value)) {
|
|
if (el.selectedIndex !== i)
|
|
el.selectedIndex = i;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
if (!isMultiple && el.selectedIndex !== -1) {
|
|
el.selectedIndex = -1;
|
|
}
|
|
}
|
|
function getValue(el) {
|
|
return "_value" in el ? el._value : el.value;
|
|
}
|
|
function getCheckboxValue(el, checked) {
|
|
const key = checked ? "_trueValue" : "_falseValue";
|
|
return key in el ? el[key] : checked;
|
|
}
|
|
const vModelDynamic = {
|
|
created(el, binding, vnode) {
|
|
callModelHook(el, binding, vnode, null, "created");
|
|
},
|
|
mounted(el, binding, vnode) {
|
|
callModelHook(el, binding, vnode, null, "mounted");
|
|
},
|
|
beforeUpdate(el, binding, vnode, prevVNode) {
|
|
callModelHook(el, binding, vnode, prevVNode, "beforeUpdate");
|
|
},
|
|
updated(el, binding, vnode, prevVNode) {
|
|
callModelHook(el, binding, vnode, prevVNode, "updated");
|
|
}
|
|
};
|
|
function resolveDynamicModel(tagName, type) {
|
|
switch (tagName) {
|
|
case "SELECT":
|
|
return vModelSelect;
|
|
case "TEXTAREA":
|
|
return vModelText;
|
|
default:
|
|
switch (type) {
|
|
case "checkbox":
|
|
return vModelCheckbox;
|
|
case "radio":
|
|
return vModelRadio;
|
|
default:
|
|
return vModelText;
|
|
}
|
|
}
|
|
}
|
|
function callModelHook(el, binding, vnode, prevVNode, hook) {
|
|
const modelToUse = resolveDynamicModel(
|
|
el.tagName,
|
|
vnode.props && vnode.props.type
|
|
);
|
|
const fn = modelToUse[hook];
|
|
fn && fn(el, binding, vnode, prevVNode);
|
|
}
|
|
function initVModelForSSR() {
|
|
vModelText.getSSRProps = ({ value }) => ({ value });
|
|
vModelRadio.getSSRProps = ({ value }, vnode) => {
|
|
if (vnode.props && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseEqual)(vnode.props.value, value)) {
|
|
return { checked: true };
|
|
}
|
|
};
|
|
vModelCheckbox.getSSRProps = ({ value }, vnode) => {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value)) {
|
|
if (vnode.props && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseIndexOf)(value, vnode.props.value) > -1) {
|
|
return { checked: true };
|
|
}
|
|
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSet)(value)) {
|
|
if (vnode.props && value.has(vnode.props.value)) {
|
|
return { checked: true };
|
|
}
|
|
} else if (value) {
|
|
return { checked: true };
|
|
}
|
|
};
|
|
vModelDynamic.getSSRProps = (binding, vnode) => {
|
|
if (typeof vnode.type !== "string") {
|
|
return;
|
|
}
|
|
const modelToUse = resolveDynamicModel(
|
|
// resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase
|
|
vnode.type.toUpperCase(),
|
|
vnode.props && vnode.props.type
|
|
);
|
|
if (modelToUse.getSSRProps) {
|
|
return modelToUse.getSSRProps(binding, vnode);
|
|
}
|
|
};
|
|
}
|
|
|
|
const systemModifiers = ["ctrl", "shift", "alt", "meta"];
|
|
const modifierGuards = {
|
|
stop: (e) => e.stopPropagation(),
|
|
prevent: (e) => e.preventDefault(),
|
|
self: (e) => e.target !== e.currentTarget,
|
|
ctrl: (e) => !e.ctrlKey,
|
|
shift: (e) => !e.shiftKey,
|
|
alt: (e) => !e.altKey,
|
|
meta: (e) => !e.metaKey,
|
|
left: (e) => "button" in e && e.button !== 0,
|
|
middle: (e) => "button" in e && e.button !== 1,
|
|
right: (e) => "button" in e && e.button !== 2,
|
|
exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
|
|
};
|
|
const withModifiers = (fn, modifiers) => {
|
|
return (event, ...args) => {
|
|
for (let i = 0; i < modifiers.length; i++) {
|
|
const guard = modifierGuards[modifiers[i]];
|
|
if (guard && guard(event, modifiers))
|
|
return;
|
|
}
|
|
return fn(event, ...args);
|
|
};
|
|
};
|
|
const keyNames = {
|
|
esc: "escape",
|
|
space: " ",
|
|
up: "arrow-up",
|
|
left: "arrow-left",
|
|
right: "arrow-right",
|
|
down: "arrow-down",
|
|
delete: "backspace"
|
|
};
|
|
const withKeys = (fn, modifiers) => {
|
|
return (event) => {
|
|
if (!("key" in event)) {
|
|
return;
|
|
}
|
|
const eventKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(event.key);
|
|
if (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) {
|
|
return fn(event);
|
|
}
|
|
};
|
|
};
|
|
|
|
const vShow = {
|
|
beforeMount(el, { value }, { transition }) {
|
|
el._vod = el.style.display === "none" ? "" : el.style.display;
|
|
if (transition && value) {
|
|
transition.beforeEnter(el);
|
|
} else {
|
|
setDisplay(el, value);
|
|
}
|
|
},
|
|
mounted(el, { value }, { transition }) {
|
|
if (transition && value) {
|
|
transition.enter(el);
|
|
}
|
|
},
|
|
updated(el, { value, oldValue }, { transition }) {
|
|
if (!value === !oldValue)
|
|
return;
|
|
if (transition) {
|
|
if (value) {
|
|
transition.beforeEnter(el);
|
|
setDisplay(el, true);
|
|
transition.enter(el);
|
|
} else {
|
|
transition.leave(el, () => {
|
|
setDisplay(el, false);
|
|
});
|
|
}
|
|
} else {
|
|
setDisplay(el, value);
|
|
}
|
|
},
|
|
beforeUnmount(el, { value }) {
|
|
setDisplay(el, value);
|
|
}
|
|
};
|
|
function setDisplay(el, value) {
|
|
el.style.display = value ? el._vod : "none";
|
|
}
|
|
function initVShowForSSR() {
|
|
vShow.getSSRProps = ({ value }) => {
|
|
if (!value) {
|
|
return { style: { display: "none" } };
|
|
}
|
|
};
|
|
}
|
|
|
|
const rendererOptions = /* @__PURE__ */ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({ patchProp }, nodeOps);
|
|
let renderer;
|
|
let enabledHydration = false;
|
|
function ensureRenderer() {
|
|
return renderer || (renderer = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createRenderer)(rendererOptions));
|
|
}
|
|
function ensureHydrationRenderer() {
|
|
renderer = enabledHydration ? renderer : (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createHydrationRenderer)(rendererOptions);
|
|
enabledHydration = true;
|
|
return renderer;
|
|
}
|
|
const render = (...args) => {
|
|
ensureRenderer().render(...args);
|
|
};
|
|
const hydrate = (...args) => {
|
|
ensureHydrationRenderer().hydrate(...args);
|
|
};
|
|
const createApp = (...args) => {
|
|
const app = ensureRenderer().createApp(...args);
|
|
if (true) {
|
|
injectNativeTagCheck(app);
|
|
injectCompilerOptionsCheck(app);
|
|
}
|
|
const { mount } = app;
|
|
app.mount = (containerOrSelector) => {
|
|
const container = normalizeContainer(containerOrSelector);
|
|
if (!container)
|
|
return;
|
|
const component = app._component;
|
|
if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(component) && !component.render && !component.template) {
|
|
component.template = container.innerHTML;
|
|
}
|
|
container.innerHTML = "";
|
|
const proxy = mount(container, false, container instanceof SVGElement);
|
|
if (container instanceof Element) {
|
|
container.removeAttribute("v-cloak");
|
|
container.setAttribute("data-v-app", "");
|
|
}
|
|
return proxy;
|
|
};
|
|
return app;
|
|
};
|
|
const createSSRApp = (...args) => {
|
|
const app = ensureHydrationRenderer().createApp(...args);
|
|
if (true) {
|
|
injectNativeTagCheck(app);
|
|
injectCompilerOptionsCheck(app);
|
|
}
|
|
const { mount } = app;
|
|
app.mount = (containerOrSelector) => {
|
|
const container = normalizeContainer(containerOrSelector);
|
|
if (container) {
|
|
return mount(container, true, container instanceof SVGElement);
|
|
}
|
|
};
|
|
return app;
|
|
};
|
|
function injectNativeTagCheck(app) {
|
|
Object.defineProperty(app.config, "isNativeTag", {
|
|
value: (tag) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isHTMLTag)(tag) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSVGTag)(tag),
|
|
writable: false
|
|
});
|
|
}
|
|
function injectCompilerOptionsCheck(app) {
|
|
if ((0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isRuntimeOnly)()) {
|
|
const isCustomElement = app.config.isCustomElement;
|
|
Object.defineProperty(app.config, "isCustomElement", {
|
|
get() {
|
|
return isCustomElement;
|
|
},
|
|
set() {
|
|
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(
|
|
`The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.`
|
|
);
|
|
}
|
|
});
|
|
const compilerOptions = app.config.compilerOptions;
|
|
const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead.
|
|
- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.
|
|
- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader
|
|
- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`;
|
|
Object.defineProperty(app.config, "compilerOptions", {
|
|
get() {
|
|
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(msg);
|
|
return compilerOptions;
|
|
},
|
|
set() {
|
|
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(msg);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
function normalizeContainer(container) {
|
|
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(container)) {
|
|
const res = document.querySelector(container);
|
|
if ( true && !res) {
|
|
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(
|
|
`Failed to mount app: mount target selector "${container}" returned null.`
|
|
);
|
|
}
|
|
return res;
|
|
}
|
|
if ( true && window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") {
|
|
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(
|
|
`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`
|
|
);
|
|
}
|
|
return container;
|
|
}
|
|
let ssrDirectiveInitialized = false;
|
|
const initDirectivesForSSR = () => {
|
|
if (!ssrDirectiveInitialized) {
|
|
ssrDirectiveInitialized = true;
|
|
initVModelForSSR();
|
|
initVShowForSSR();
|
|
}
|
|
} ;
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/@vue/shared/dist/shared.esm-bundler.js":
|
|
/*!*************************************************************!*\
|
|
!*** ./node_modules/@vue/shared/dist/shared.esm-bundler.js ***!
|
|
\*************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ EMPTY_ARR: () => (/* binding */ EMPTY_ARR),
|
|
/* harmony export */ EMPTY_OBJ: () => (/* binding */ EMPTY_OBJ),
|
|
/* harmony export */ NO: () => (/* binding */ NO),
|
|
/* harmony export */ NOOP: () => (/* binding */ NOOP),
|
|
/* harmony export */ PatchFlagNames: () => (/* binding */ PatchFlagNames),
|
|
/* harmony export */ camelize: () => (/* binding */ camelize),
|
|
/* harmony export */ capitalize: () => (/* binding */ capitalize),
|
|
/* harmony export */ def: () => (/* binding */ def),
|
|
/* harmony export */ escapeHtml: () => (/* binding */ escapeHtml),
|
|
/* harmony export */ escapeHtmlComment: () => (/* binding */ escapeHtmlComment),
|
|
/* harmony export */ extend: () => (/* binding */ extend),
|
|
/* harmony export */ genPropsAccessExp: () => (/* binding */ genPropsAccessExp),
|
|
/* harmony export */ generateCodeFrame: () => (/* binding */ generateCodeFrame),
|
|
/* harmony export */ getGlobalThis: () => (/* binding */ getGlobalThis),
|
|
/* harmony export */ hasChanged: () => (/* binding */ hasChanged),
|
|
/* harmony export */ hasOwn: () => (/* binding */ hasOwn),
|
|
/* harmony export */ hyphenate: () => (/* binding */ hyphenate),
|
|
/* harmony export */ includeBooleanAttr: () => (/* binding */ includeBooleanAttr),
|
|
/* harmony export */ invokeArrayFns: () => (/* binding */ invokeArrayFns),
|
|
/* harmony export */ isArray: () => (/* binding */ isArray),
|
|
/* harmony export */ isBooleanAttr: () => (/* binding */ isBooleanAttr),
|
|
/* harmony export */ isBuiltInDirective: () => (/* binding */ isBuiltInDirective),
|
|
/* harmony export */ isDate: () => (/* binding */ isDate),
|
|
/* harmony export */ isFunction: () => (/* binding */ isFunction),
|
|
/* harmony export */ isGloballyWhitelisted: () => (/* binding */ isGloballyWhitelisted),
|
|
/* harmony export */ isHTMLTag: () => (/* binding */ isHTMLTag),
|
|
/* harmony export */ isIntegerKey: () => (/* binding */ isIntegerKey),
|
|
/* harmony export */ isKnownHtmlAttr: () => (/* binding */ isKnownHtmlAttr),
|
|
/* harmony export */ isKnownSvgAttr: () => (/* binding */ isKnownSvgAttr),
|
|
/* harmony export */ isMap: () => (/* binding */ isMap),
|
|
/* harmony export */ isModelListener: () => (/* binding */ isModelListener),
|
|
/* harmony export */ isObject: () => (/* binding */ isObject),
|
|
/* harmony export */ isOn: () => (/* binding */ isOn),
|
|
/* harmony export */ isPlainObject: () => (/* binding */ isPlainObject),
|
|
/* harmony export */ isPromise: () => (/* binding */ isPromise),
|
|
/* harmony export */ isRegExp: () => (/* binding */ isRegExp),
|
|
/* harmony export */ isReservedProp: () => (/* binding */ isReservedProp),
|
|
/* harmony export */ isSSRSafeAttrName: () => (/* binding */ isSSRSafeAttrName),
|
|
/* harmony export */ isSVGTag: () => (/* binding */ isSVGTag),
|
|
/* harmony export */ isSet: () => (/* binding */ isSet),
|
|
/* harmony export */ isSpecialBooleanAttr: () => (/* binding */ isSpecialBooleanAttr),
|
|
/* harmony export */ isString: () => (/* binding */ isString),
|
|
/* harmony export */ isSymbol: () => (/* binding */ isSymbol),
|
|
/* harmony export */ isVoidTag: () => (/* binding */ isVoidTag),
|
|
/* harmony export */ looseEqual: () => (/* binding */ looseEqual),
|
|
/* harmony export */ looseIndexOf: () => (/* binding */ looseIndexOf),
|
|
/* harmony export */ looseToNumber: () => (/* binding */ looseToNumber),
|
|
/* harmony export */ makeMap: () => (/* binding */ makeMap),
|
|
/* harmony export */ normalizeClass: () => (/* binding */ normalizeClass),
|
|
/* harmony export */ normalizeProps: () => (/* binding */ normalizeProps),
|
|
/* harmony export */ normalizeStyle: () => (/* binding */ normalizeStyle),
|
|
/* harmony export */ objectToString: () => (/* binding */ objectToString),
|
|
/* harmony export */ parseStringStyle: () => (/* binding */ parseStringStyle),
|
|
/* harmony export */ propsToAttrMap: () => (/* binding */ propsToAttrMap),
|
|
/* harmony export */ remove: () => (/* binding */ remove),
|
|
/* harmony export */ slotFlagsText: () => (/* binding */ slotFlagsText),
|
|
/* harmony export */ stringifyStyle: () => (/* binding */ stringifyStyle),
|
|
/* harmony export */ toDisplayString: () => (/* binding */ toDisplayString),
|
|
/* harmony export */ toHandlerKey: () => (/* binding */ toHandlerKey),
|
|
/* harmony export */ toNumber: () => (/* binding */ toNumber),
|
|
/* harmony export */ toRawType: () => (/* binding */ toRawType),
|
|
/* harmony export */ toTypeString: () => (/* binding */ toTypeString)
|
|
/* harmony export */ });
|
|
function makeMap(str, expectsLowerCase) {
|
|
const map = /* @__PURE__ */ Object.create(null);
|
|
const list = str.split(",");
|
|
for (let i = 0; i < list.length; i++) {
|
|
map[list[i]] = true;
|
|
}
|
|
return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];
|
|
}
|
|
|
|
const EMPTY_OBJ = true ? Object.freeze({}) : 0;
|
|
const EMPTY_ARR = true ? Object.freeze([]) : 0;
|
|
const NOOP = () => {
|
|
};
|
|
const NO = () => false;
|
|
const onRE = /^on[^a-z]/;
|
|
const isOn = (key) => onRE.test(key);
|
|
const isModelListener = (key) => key.startsWith("onUpdate:");
|
|
const extend = Object.assign;
|
|
const remove = (arr, el) => {
|
|
const i = arr.indexOf(el);
|
|
if (i > -1) {
|
|
arr.splice(i, 1);
|
|
}
|
|
};
|
|
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
const hasOwn = (val, key) => hasOwnProperty.call(val, key);
|
|
const isArray = Array.isArray;
|
|
const isMap = (val) => toTypeString(val) === "[object Map]";
|
|
const isSet = (val) => toTypeString(val) === "[object Set]";
|
|
const isDate = (val) => toTypeString(val) === "[object Date]";
|
|
const isRegExp = (val) => toTypeString(val) === "[object RegExp]";
|
|
const isFunction = (val) => typeof val === "function";
|
|
const isString = (val) => typeof val === "string";
|
|
const isSymbol = (val) => typeof val === "symbol";
|
|
const isObject = (val) => val !== null && typeof val === "object";
|
|
const isPromise = (val) => {
|
|
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
|
};
|
|
const objectToString = Object.prototype.toString;
|
|
const toTypeString = (value) => objectToString.call(value);
|
|
const toRawType = (value) => {
|
|
return toTypeString(value).slice(8, -1);
|
|
};
|
|
const isPlainObject = (val) => toTypeString(val) === "[object Object]";
|
|
const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
|
|
const isReservedProp = /* @__PURE__ */ makeMap(
|
|
// the leading comma is intentional so empty string "" is also included
|
|
",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
|
|
);
|
|
const isBuiltInDirective = /* @__PURE__ */ makeMap(
|
|
"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
|
|
);
|
|
const cacheStringFunction = (fn) => {
|
|
const cache = /* @__PURE__ */ Object.create(null);
|
|
return (str) => {
|
|
const hit = cache[str];
|
|
return hit || (cache[str] = fn(str));
|
|
};
|
|
};
|
|
const camelizeRE = /-(\w)/g;
|
|
const camelize = cacheStringFunction((str) => {
|
|
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
|
|
});
|
|
const hyphenateRE = /\B([A-Z])/g;
|
|
const hyphenate = cacheStringFunction(
|
|
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
);
|
|
const capitalize = cacheStringFunction(
|
|
(str) => str.charAt(0).toUpperCase() + str.slice(1)
|
|
);
|
|
const toHandlerKey = cacheStringFunction(
|
|
(str) => str ? `on${capitalize(str)}` : ``
|
|
);
|
|
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
const invokeArrayFns = (fns, arg) => {
|
|
for (let i = 0; i < fns.length; i++) {
|
|
fns[i](arg);
|
|
}
|
|
};
|
|
const def = (obj, key, value) => {
|
|
Object.defineProperty(obj, key, {
|
|
configurable: true,
|
|
enumerable: false,
|
|
value
|
|
});
|
|
};
|
|
const looseToNumber = (val) => {
|
|
const n = parseFloat(val);
|
|
return isNaN(n) ? val : n;
|
|
};
|
|
const toNumber = (val) => {
|
|
const n = isString(val) ? Number(val) : NaN;
|
|
return isNaN(n) ? val : n;
|
|
};
|
|
let _globalThis;
|
|
const getGlobalThis = () => {
|
|
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof __webpack_require__.g !== "undefined" ? __webpack_require__.g : {});
|
|
};
|
|
const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;
|
|
function genPropsAccessExp(name) {
|
|
return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;
|
|
}
|
|
|
|
const PatchFlagNames = {
|
|
[1]: `TEXT`,
|
|
[2]: `CLASS`,
|
|
[4]: `STYLE`,
|
|
[8]: `PROPS`,
|
|
[16]: `FULL_PROPS`,
|
|
[32]: `HYDRATE_EVENTS`,
|
|
[64]: `STABLE_FRAGMENT`,
|
|
[128]: `KEYED_FRAGMENT`,
|
|
[256]: `UNKEYED_FRAGMENT`,
|
|
[512]: `NEED_PATCH`,
|
|
[1024]: `DYNAMIC_SLOTS`,
|
|
[2048]: `DEV_ROOT_FRAGMENT`,
|
|
[-1]: `HOISTED`,
|
|
[-2]: `BAIL`
|
|
};
|
|
|
|
const slotFlagsText = {
|
|
[1]: "STABLE",
|
|
[2]: "DYNAMIC",
|
|
[3]: "FORWARDED"
|
|
};
|
|
|
|
const GLOBALS_WHITE_LISTED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console";
|
|
const isGloballyWhitelisted = /* @__PURE__ */ makeMap(GLOBALS_WHITE_LISTED);
|
|
|
|
const range = 2;
|
|
function generateCodeFrame(source, start = 0, end = source.length) {
|
|
let lines = source.split(/(\r?\n)/);
|
|
const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);
|
|
lines = lines.filter((_, idx) => idx % 2 === 0);
|
|
let count = 0;
|
|
const res = [];
|
|
for (let i = 0; i < lines.length; i++) {
|
|
count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);
|
|
if (count >= start) {
|
|
for (let j = i - range; j <= i + range || end > count; j++) {
|
|
if (j < 0 || j >= lines.length)
|
|
continue;
|
|
const line = j + 1;
|
|
res.push(
|
|
`${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`
|
|
);
|
|
const lineLength = lines[j].length;
|
|
const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;
|
|
if (j === i) {
|
|
const pad = start - (count - (lineLength + newLineSeqLength));
|
|
const length = Math.max(
|
|
1,
|
|
end > count ? lineLength - pad : end - start
|
|
);
|
|
res.push(` | ` + " ".repeat(pad) + "^".repeat(length));
|
|
} else if (j > i) {
|
|
if (end > count) {
|
|
const length = Math.max(Math.min(end - count, lineLength), 1);
|
|
res.push(` | ` + "^".repeat(length));
|
|
}
|
|
count += lineLength + newLineSeqLength;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
return res.join("\n");
|
|
}
|
|
|
|
function normalizeStyle(value) {
|
|
if (isArray(value)) {
|
|
const res = {};
|
|
for (let i = 0; i < value.length; i++) {
|
|
const item = value[i];
|
|
const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
|
|
if (normalized) {
|
|
for (const key in normalized) {
|
|
res[key] = normalized[key];
|
|
}
|
|
}
|
|
}
|
|
return res;
|
|
} else if (isString(value)) {
|
|
return value;
|
|
} else if (isObject(value)) {
|
|
return value;
|
|
}
|
|
}
|
|
const listDelimiterRE = /;(?![^(]*\))/g;
|
|
const propertyDelimiterRE = /:([^]+)/;
|
|
const styleCommentRE = /\/\*[^]*?\*\//g;
|
|
function parseStringStyle(cssText) {
|
|
const ret = {};
|
|
cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
|
|
if (item) {
|
|
const tmp = item.split(propertyDelimiterRE);
|
|
tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
|
|
}
|
|
});
|
|
return ret;
|
|
}
|
|
function stringifyStyle(styles) {
|
|
let ret = "";
|
|
if (!styles || isString(styles)) {
|
|
return ret;
|
|
}
|
|
for (const key in styles) {
|
|
const value = styles[key];
|
|
const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);
|
|
if (isString(value) || typeof value === "number") {
|
|
ret += `${normalizedKey}:${value};`;
|
|
}
|
|
}
|
|
return ret;
|
|
}
|
|
function normalizeClass(value) {
|
|
let res = "";
|
|
if (isString(value)) {
|
|
res = value;
|
|
} else if (isArray(value)) {
|
|
for (let i = 0; i < value.length; i++) {
|
|
const normalized = normalizeClass(value[i]);
|
|
if (normalized) {
|
|
res += normalized + " ";
|
|
}
|
|
}
|
|
} else if (isObject(value)) {
|
|
for (const name in value) {
|
|
if (value[name]) {
|
|
res += name + " ";
|
|
}
|
|
}
|
|
}
|
|
return res.trim();
|
|
}
|
|
function normalizeProps(props) {
|
|
if (!props)
|
|
return null;
|
|
let { class: klass, style } = props;
|
|
if (klass && !isString(klass)) {
|
|
props.class = normalizeClass(klass);
|
|
}
|
|
if (style) {
|
|
props.style = normalizeStyle(style);
|
|
}
|
|
return props;
|
|
}
|
|
|
|
const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
|
|
const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
|
|
const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
|
|
const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
|
|
const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
|
|
const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
|
|
|
|
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
const isBooleanAttr = /* @__PURE__ */ makeMap(
|
|
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
|
|
);
|
|
function includeBooleanAttr(value) {
|
|
return !!value || value === "";
|
|
}
|
|
const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/;
|
|
const attrValidationCache = {};
|
|
function isSSRSafeAttrName(name) {
|
|
if (attrValidationCache.hasOwnProperty(name)) {
|
|
return attrValidationCache[name];
|
|
}
|
|
const isUnsafe = unsafeAttrCharRE.test(name);
|
|
if (isUnsafe) {
|
|
console.error(`unsafe attribute name: ${name}`);
|
|
}
|
|
return attrValidationCache[name] = !isUnsafe;
|
|
}
|
|
const propsToAttrMap = {
|
|
acceptCharset: "accept-charset",
|
|
className: "class",
|
|
htmlFor: "for",
|
|
httpEquiv: "http-equiv"
|
|
};
|
|
const isKnownHtmlAttr = /* @__PURE__ */ makeMap(
|
|
`accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`
|
|
);
|
|
const isKnownSvgAttr = /* @__PURE__ */ makeMap(
|
|
`xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`
|
|
);
|
|
|
|
const escapeRE = /["'&<>]/;
|
|
function escapeHtml(string) {
|
|
const str = "" + string;
|
|
const match = escapeRE.exec(str);
|
|
if (!match) {
|
|
return str;
|
|
}
|
|
let html = "";
|
|
let escaped;
|
|
let index;
|
|
let lastIndex = 0;
|
|
for (index = match.index; index < str.length; index++) {
|
|
switch (str.charCodeAt(index)) {
|
|
case 34:
|
|
escaped = """;
|
|
break;
|
|
case 38:
|
|
escaped = "&";
|
|
break;
|
|
case 39:
|
|
escaped = "'";
|
|
break;
|
|
case 60:
|
|
escaped = "<";
|
|
break;
|
|
case 62:
|
|
escaped = ">";
|
|
break;
|
|
default:
|
|
continue;
|
|
}
|
|
if (lastIndex !== index) {
|
|
html += str.slice(lastIndex, index);
|
|
}
|
|
lastIndex = index + 1;
|
|
html += escaped;
|
|
}
|
|
return lastIndex !== index ? html + str.slice(lastIndex, index) : html;
|
|
}
|
|
const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;
|
|
function escapeHtmlComment(src) {
|
|
return src.replace(commentStripRE, "");
|
|
}
|
|
|
|
function looseCompareArrays(a, b) {
|
|
if (a.length !== b.length)
|
|
return false;
|
|
let equal = true;
|
|
for (let i = 0; equal && i < a.length; i++) {
|
|
equal = looseEqual(a[i], b[i]);
|
|
}
|
|
return equal;
|
|
}
|
|
function looseEqual(a, b) {
|
|
if (a === b)
|
|
return true;
|
|
let aValidType = isDate(a);
|
|
let bValidType = isDate(b);
|
|
if (aValidType || bValidType) {
|
|
return aValidType && bValidType ? a.getTime() === b.getTime() : false;
|
|
}
|
|
aValidType = isSymbol(a);
|
|
bValidType = isSymbol(b);
|
|
if (aValidType || bValidType) {
|
|
return a === b;
|
|
}
|
|
aValidType = isArray(a);
|
|
bValidType = isArray(b);
|
|
if (aValidType || bValidType) {
|
|
return aValidType && bValidType ? looseCompareArrays(a, b) : false;
|
|
}
|
|
aValidType = isObject(a);
|
|
bValidType = isObject(b);
|
|
if (aValidType || bValidType) {
|
|
if (!aValidType || !bValidType) {
|
|
return false;
|
|
}
|
|
const aKeysCount = Object.keys(a).length;
|
|
const bKeysCount = Object.keys(b).length;
|
|
if (aKeysCount !== bKeysCount) {
|
|
return false;
|
|
}
|
|
for (const key in a) {
|
|
const aHasKey = a.hasOwnProperty(key);
|
|
const bHasKey = b.hasOwnProperty(key);
|
|
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
return String(a) === String(b);
|
|
}
|
|
function looseIndexOf(arr, val) {
|
|
return arr.findIndex((item) => looseEqual(item, val));
|
|
}
|
|
|
|
const toDisplayString = (val) => {
|
|
return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
|
|
};
|
|
const replacer = (_key, val) => {
|
|
if (val && val.__v_isRef) {
|
|
return replacer(_key, val.value);
|
|
} else if (isMap(val)) {
|
|
return {
|
|
[`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => {
|
|
entries[`${key} =>`] = val2;
|
|
return entries;
|
|
}, {})
|
|
};
|
|
} else if (isSet(val)) {
|
|
return {
|
|
[`Set(${val.size})`]: [...val.values()]
|
|
};
|
|
} else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
|
|
return String(val);
|
|
}
|
|
return val;
|
|
};
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/Form/SelectInput.vue?vue&type=script&lang=js":
|
|
/*!**********************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/Form/SelectInput.vue?vue&type=script&lang=js ***!
|
|
\**********************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
/* harmony import */ var _Validation_useFormValidation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/Validation/useFormValidation */ "./resources/js/Validation/useFormValidation.js");
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
props: {
|
|
className: String | Object,
|
|
placeholder: String,
|
|
rules: Array,
|
|
items: Array,
|
|
empty: String
|
|
},
|
|
setup: function setup(props) {
|
|
var input = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)("");
|
|
var name = props.placeholder;
|
|
var _useFormValidation = (0,_Validation_useFormValidation__WEBPACK_IMPORTED_MODULE_1__["default"])(),
|
|
validate = _useFormValidation.validate,
|
|
errors = _useFormValidation.errors;
|
|
var validateInput = function validateInput() {
|
|
validate(props.rules, {}, name, input.value);
|
|
};
|
|
if (props.errormsg) {
|
|
errors[name] = props.errormsg;
|
|
}
|
|
console.log("errors[name]", errors);
|
|
return {
|
|
input: input,
|
|
name: name,
|
|
errors: errors,
|
|
validateInput: validateInput
|
|
};
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/Form/TextInput.vue?vue&type=script&lang=js":
|
|
/*!********************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/Form/TextInput.vue?vue&type=script&lang=js ***!
|
|
\********************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
/* harmony import */ var _Validation_useFormValidation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/Validation/useFormValidation */ "./resources/js/Validation/useFormValidation.js");
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
props: {
|
|
className: String | Object,
|
|
placeholder: String,
|
|
type: String,
|
|
rules: Array,
|
|
backend: String,
|
|
errors: Array
|
|
},
|
|
setup: function setup(props) {
|
|
var input = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)("");
|
|
var messages = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)([]);
|
|
var name = props.placeholder;
|
|
|
|
//const { validate, errors} = useFormValidation();
|
|
|
|
var validateInput = function validateInput() {
|
|
messages.value = [];
|
|
if (props.errors[0]) {
|
|
messages.value.push(props.errors[0]);
|
|
}
|
|
};
|
|
//console.log('ccc',messages)
|
|
return {
|
|
input: input,
|
|
name: name,
|
|
messages: messages,
|
|
validateInput: validateInput
|
|
};
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/AddProfile.vue?vue&type=script&lang=js":
|
|
/*!*************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/AddProfile.vue?vue&type=script&lang=js ***!
|
|
\*************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _vuelidate_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vuelidate/core */ "./node_modules/@vuelidate/core/dist/index.mjs");
|
|
/* harmony import */ var _vuelidate_validators__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @vuelidate/validators */ "./node_modules/@vuelidate/validators/dist/index.mjs");
|
|
/* harmony import */ var _Api_register__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../Api/register */ "./resources/js/Api/register.js");
|
|
/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../helper */ "./resources/js/helper/index.js");
|
|
/* harmony import */ var _router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../router */ "./resources/js/router/index.js");
|
|
/* harmony import */ var _helper_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../helper/state */ "./resources/js/helper/state.js");
|
|
/* harmony import */ var _helper_package__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../helper/package */ "./resources/js/helper/package.js");
|
|
/* harmony import */ var _SmartCreditLogo__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SmartCreditLogo */ "./resources/js/components/partials/SmartCreditLogo.vue");
|
|
/* harmony import */ var _SmartCreditPkg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./SmartCreditPkg */ "./resources/js/components/partials/SmartCreditPkg.vue");
|
|
/* harmony import */ var _modal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./modal */ "./resources/js/components/partials/modal.vue");
|
|
/* harmony import */ var _PaymentModal_vue__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./PaymentModal.vue */ "./resources/js/components/partials/PaymentModal.vue");
|
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./resources/js/store/index.js");
|
|
/* harmony import */ var _Footer_vue__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Footer.vue */ "./resources/js/components/partials/Footer.vue");
|
|
/* harmony import */ var _IdentityIQPkg__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./IdentityIQPkg */ "./resources/js/components/partials/IdentityIQPkg.vue");
|
|
/* harmony import */ var _helper_report_provider__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../helper/report_provider */ "./resources/js/helper/report_provider.js");
|
|
/* harmony import */ var _IdentityIqLogo_vue__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./IdentityIqLogo.vue */ "./resources/js/components/partials/IdentityIqLogo.vue");
|
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
components: {
|
|
IdentityIqLogo: _IdentityIqLogo_vue__WEBPACK_IMPORTED_MODULE_14__["default"],
|
|
SmartCreditPkg: _SmartCreditPkg__WEBPACK_IMPORTED_MODULE_7__["default"],
|
|
SmartCreditLogo: _SmartCreditLogo__WEBPACK_IMPORTED_MODULE_6__["default"],
|
|
PaymentModal: _PaymentModal_vue__WEBPACK_IMPORTED_MODULE_9__["default"],
|
|
modal: _modal__WEBPACK_IMPORTED_MODULE_8__["default"],
|
|
Footer: _Footer_vue__WEBPACK_IMPORTED_MODULE_11__["default"],
|
|
IdentityIQPkg: _IdentityIQPkg__WEBPACK_IMPORTED_MODULE_12__["default"]
|
|
},
|
|
setup: function setup() {
|
|
return {
|
|
v$: (0,_vuelidate_core__WEBPACK_IMPORTED_MODULE_0__["default"])()
|
|
};
|
|
},
|
|
data: function data() {
|
|
return {
|
|
reportProvider: REPORT_PROVIDER,
|
|
prepareformData: {},
|
|
formData: {
|
|
full_name: "",
|
|
first_name: "",
|
|
last_name: "",
|
|
email: "",
|
|
password: "",
|
|
street_no: "",
|
|
street_name: "",
|
|
city: "",
|
|
ssn: "",
|
|
state: "",
|
|
zip_code: "",
|
|
phone: "",
|
|
full_ssn: "",
|
|
package_id: 0,
|
|
birth_date: "",
|
|
amount: 0,
|
|
question_id: "",
|
|
answer: "",
|
|
address: "",
|
|
card_number: "",
|
|
expiry: "",
|
|
cvv_no: "",
|
|
is_authorized: false
|
|
},
|
|
stateList: _helper_state__WEBPACK_IMPORTED_MODULE_4__["default"],
|
|
errors: {},
|
|
message: ["All fields are required"],
|
|
isButtonDisabled: false,
|
|
disabled: 1,
|
|
"package": _helper_package__WEBPACK_IMPORTED_MODULE_5__["default"],
|
|
reportProviders: _helper_report_provider__WEBPACK_IMPORTED_MODULE_13__["default"],
|
|
value: null,
|
|
roleOptions: [],
|
|
isOpen: false,
|
|
min: 4,
|
|
isModalVisible: false,
|
|
isQuestionModalVisible: false,
|
|
questionList: null,
|
|
appName: APP_NAME,
|
|
company_Name: COMPANY_NAME
|
|
};
|
|
},
|
|
mounted: function mounted() {
|
|
var _this = this;
|
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
var _userData$state;
|
|
var userData;
|
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
userData = JSON.parse((0,_helper__WEBPACK_IMPORTED_MODULE_2__.getLocalStorage)('formData')) || [];
|
|
_this.formData.first_name = userData.first_name;
|
|
_this.formData.last_name = userData.last_name;
|
|
_this.formData.email = userData.email;
|
|
_this.formData.password = userData.password;
|
|
_this.formData.package_id = userData.package_id;
|
|
_this.formData.amount = userData.amount;
|
|
_this.formData.street_no = userData.street_no;
|
|
_this.formData.street_name = userData.street_name;
|
|
_this.formData.city = userData.city;
|
|
_this.formData.ssn = userData.ssn;
|
|
_this.formData.full_ssn = userData.full_ssn;
|
|
_this.formData.state = (_userData$state = userData.state) !== null && _userData$state !== void 0 ? _userData$state : '';
|
|
_this.formData.zip_code = userData.zip_code;
|
|
_this.formData.phone = userData.phone;
|
|
_this.formData.package_id = 2;
|
|
_this.formData.birth_date = userData.birth_date;
|
|
_this.formData.amount = _helper_package__WEBPACK_IMPORTED_MODULE_5__["default"].prices[_this.formData.package_id];
|
|
_this.formData.source_type = 1;
|
|
case 19:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}))();
|
|
},
|
|
methods: {
|
|
makePayment: function makePayment() {
|
|
var _this2 = this;
|
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
var subscription_info, data;
|
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
_context2.next = 2;
|
|
return _Api_register__WEBPACK_IMPORTED_MODULE_1__["default"].reportProviderValidsation(_this2.formData);
|
|
case 2:
|
|
subscription_info = _context2.sent;
|
|
if (!(subscription_info.status_code === 100)) {
|
|
_context2.next = 10;
|
|
break;
|
|
}
|
|
_context2.next = 6;
|
|
return _Api_register__WEBPACK_IMPORTED_MODULE_1__["default"].customerCreateAndUpdate(_this2.formData);
|
|
case 6:
|
|
data = _context2.sent;
|
|
if (data.status_code == "100") {
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_2__.unsetLocalStorage)('formData');
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_2__.setStep)(6);
|
|
_router__WEBPACK_IMPORTED_MODULE_3__["default"].push({
|
|
name: "success"
|
|
});
|
|
} else {
|
|
_this2.message = [data.message];
|
|
_this2.errors = data.data;
|
|
}
|
|
_context2.next = 12;
|
|
break;
|
|
case 10:
|
|
_this2.message = [subscription_info.message];
|
|
_this2.errors = subscription_info.data;
|
|
case 12:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}))();
|
|
},
|
|
toggle: function toggle(refId) {
|
|
var attribute = "readonly";
|
|
if (refId === "state") {
|
|
attribute = "disabled";
|
|
}
|
|
this.$refs[refId].toggleAttribute(attribute);
|
|
},
|
|
backToProfile: function backToProfile() {
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_2__.setStep)(1);
|
|
_router__WEBPACK_IMPORTED_MODULE_3__["default"].push({
|
|
name: 'create-account'
|
|
});
|
|
},
|
|
checkTermsAndService: function checkTermsAndService(e) {
|
|
if (e.target.checked) {
|
|
this.formData.is_authorized = e.target.checked;
|
|
} else {
|
|
this.formData.is_authorized = null;
|
|
}
|
|
},
|
|
ssnCompleted: function ssnCompleted(e) {
|
|
// if(this.formData.full_ssn.length === 3 || this.formData.full_ssn.length === 6) {
|
|
// this.formData.full_ssn += '-';
|
|
// }
|
|
// if(this.formData.full_ssn.length === 11){
|
|
// this.formData.ssn = this.formData.full_ssn.substring( 7, 11 );
|
|
// }
|
|
|
|
if (this.formData.full_ssn.length === 4) {
|
|
this.formData.ssn = this.formData.full_ssn;
|
|
}
|
|
},
|
|
birthDateCompleted: function birthDateCompleted(e) {
|
|
if (this.formData.birth_date.length === 2 || this.formData.birth_date.length === 5) {
|
|
this.formData.birth_date += '/';
|
|
}
|
|
},
|
|
showModal: function showModal() {
|
|
this.isModalVisible = true;
|
|
},
|
|
closeModal: function closeModal(data) {
|
|
this.isModalVisible = false;
|
|
if (typeof data.order_id !== "undefined") {
|
|
this.showQuestionModal(data);
|
|
}
|
|
},
|
|
showQuestionModal: function showQuestionModal(data) {
|
|
this.questionList = data;
|
|
this.isQuestionModalVisible = true;
|
|
},
|
|
closeQuestionModal: function closeQuestionModal() {
|
|
this.isQuestionModalVisible = false;
|
|
}
|
|
},
|
|
validations: function validations() {
|
|
return {
|
|
formData: {
|
|
first_name: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_15__.required
|
|
},
|
|
last_name: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_15__.required
|
|
},
|
|
email: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_15__.required,
|
|
email: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_15__.email
|
|
},
|
|
password: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_15__.required
|
|
},
|
|
street_no: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_15__.required
|
|
},
|
|
street_name: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_15__.required
|
|
},
|
|
city: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_15__.required
|
|
},
|
|
ssn: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_15__.required,
|
|
minLength: (0,_vuelidate_validators__WEBPACK_IMPORTED_MODULE_15__.minLength)(4)
|
|
},
|
|
state: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_15__.required
|
|
},
|
|
zip_code: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_15__.required
|
|
},
|
|
phone: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_15__.required
|
|
},
|
|
full_ssn: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_15__.required,
|
|
minLength: (0,_vuelidate_validators__WEBPACK_IMPORTED_MODULE_15__.minLength)(this.min)
|
|
},
|
|
birth_date: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_15__.required
|
|
}
|
|
}
|
|
};
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/ChoosePackage.vue?vue&type=script&lang=js":
|
|
/*!****************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/ChoosePackage.vue?vue&type=script&lang=js ***!
|
|
\****************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _helper_package__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../helper/package */ "./resources/js/helper/package.js");
|
|
/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../helper */ "./resources/js/helper/index.js");
|
|
/* harmony import */ var _router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../router */ "./resources/js/router/index.js");
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
setup: function setup() {},
|
|
data: function data() {
|
|
return {
|
|
"package": _helper_package__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
is_highlight1: true
|
|
};
|
|
},
|
|
methods: {
|
|
toggleClassForPackage: function toggleClassForPackage() {
|
|
this.is_highlight1 = false;
|
|
},
|
|
conditionalAlert: function conditionalAlert(message, package_id) {
|
|
var _this = this;
|
|
this.$swal({
|
|
title: 'Warning',
|
|
text: message,
|
|
icon: 'warning',
|
|
showCancelButton: true,
|
|
confirmButtonColor: '#3085d6',
|
|
cancelButtonColor: '#d33',
|
|
confirmButtonText: 'Yes'
|
|
}).then(function (result) {
|
|
if (result.isConfirmed) {
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.setStep)(5);
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.setPackageId)(package_id);
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.setAmount)(_this["package"].prices[package_id]);
|
|
_router__WEBPACK_IMPORTED_MODULE_2__["default"].push({
|
|
name: 'make-payment'
|
|
});
|
|
}
|
|
});
|
|
},
|
|
getPackage: function getPackage(package_id) {
|
|
if (package_id == 3) {
|
|
this.$swal("Currently this package is not available", "", "warning");
|
|
} else {
|
|
this.conditionalAlert("Are you sure want to take the $" + this["package"].prices[package_id] + ' (' + this["package"].labels[package_id] + ") package?", package_id);
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateAccount.vue?vue&type=script&lang=js":
|
|
/*!****************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateAccount.vue?vue&type=script&lang=js ***!
|
|
\****************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _Api_register__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/Api/register */ "./resources/js/Api/register.js");
|
|
/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../helper */ "./resources/js/helper/index.js");
|
|
/* harmony import */ var _router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../router */ "./resources/js/router/index.js");
|
|
/* harmony import */ var vue_recaptcha__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue-recaptcha */ "./node_modules/vue-recaptcha/dist/vue-recaptcha.es.js");
|
|
/* harmony import */ var _vuelidate_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @vuelidate/core */ "./node_modules/@vuelidate/core/dist/index.mjs");
|
|
/* harmony import */ var _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @vuelidate/validators */ "./node_modules/@vuelidate/validators/dist/index.mjs");
|
|
/* harmony import */ var _config_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../config/constants */ "./resources/js/config/constants.js");
|
|
/* harmony import */ var _helper_package__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../helper/package */ "./resources/js/helper/package.js");
|
|
/* harmony import */ var _Footer_vue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Footer.vue */ "./resources/js/components/partials/Footer.vue");
|
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
components: {
|
|
VueRecaptcha: vue_recaptcha__WEBPACK_IMPORTED_MODULE_3__.VueRecaptcha,
|
|
Footer: _Footer_vue__WEBPACK_IMPORTED_MODULE_7__["default"]
|
|
},
|
|
setup: function setup() {
|
|
return {
|
|
v$: (0,_vuelidate_core__WEBPACK_IMPORTED_MODULE_4__["default"])()
|
|
};
|
|
},
|
|
data: function data() {
|
|
return {
|
|
formData: {
|
|
first_name: "",
|
|
last_name: "",
|
|
email: "",
|
|
password: "",
|
|
captcha: "",
|
|
is_click_acknowledge: null
|
|
},
|
|
siteKey: _config_constants__WEBPACK_IMPORTED_MODULE_5__.GOOGLE_CAPTCHA_SITEKEY,
|
|
message: "",
|
|
errors: {},
|
|
errorMsg: {},
|
|
isButtonDisabled: true,
|
|
"package": _helper_package__WEBPACK_IMPORTED_MODULE_6__["default"],
|
|
appName: APP_NAME,
|
|
company_Name: COMPANY_NAME
|
|
};
|
|
},
|
|
mounted: function mounted() {
|
|
var _this = this;
|
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
var userData;
|
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
userData = JSON.parse((0,_helper__WEBPACK_IMPORTED_MODULE_1__.getLocalStorage)('formData')) || [];
|
|
_this.formData.first_name = userData.first_name;
|
|
_this.formData.last_name = userData.last_name;
|
|
_this.formData.email = userData.email;
|
|
_this.formData.password = userData.password;
|
|
case 5:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}))();
|
|
},
|
|
methods: {
|
|
handleSuccess: function handleSuccess(response) {
|
|
if (response) {
|
|
this.formData.captcha = response;
|
|
}
|
|
},
|
|
handleError: function handleError() {
|
|
this.formData.captcha = "";
|
|
},
|
|
createAccount: function createAccount() {
|
|
var _this2 = this;
|
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
var result, _this2$errors, _this2$errors3, _this2$errors2, _this2$errors4, _this2$errors5;
|
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
_context2.next = 2;
|
|
return _Api_register__WEBPACK_IMPORTED_MODULE_0__["default"].createAccount(_this2.formData);
|
|
case 2:
|
|
result = _context2.sent;
|
|
_this2.errors = {};
|
|
_this2.errorMsg = {};
|
|
if (result.status_code == 100) {
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.setLocalStorage)('formData', JSON.stringify(_this2.formData));
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.setStep)(2);
|
|
_router__WEBPACK_IMPORTED_MODULE_2__["default"].push({
|
|
name: 'add-profile'
|
|
});
|
|
} else {
|
|
_this2.errors = result.data;
|
|
if (result.status_code == 400) {
|
|
_this2.errorMsg.message = [result.message];
|
|
} else {
|
|
if ((_this2$errors = _this2.errors) !== null && _this2$errors !== void 0 && _this2$errors.email) {
|
|
_this2.errorMsg.message = (_this2$errors2 = _this2.errors) === null || _this2$errors2 === void 0 ? void 0 : _this2$errors2.email;
|
|
} else if ((_this2$errors3 = _this2.errors) !== null && _this2$errors3 !== void 0 && _this2$errors3.password) {
|
|
_this2.errorMsg.message = (_this2$errors4 = _this2.errors) === null || _this2$errors4 === void 0 ? void 0 : _this2$errors4.password;
|
|
} else {
|
|
_this2.errorMsg.message = (_this2$errors5 = _this2.errors) === null || _this2$errors5 === void 0 ? void 0 : _this2$errors5.captcha;
|
|
}
|
|
}
|
|
if (_this2.errorMsg.message) {
|
|
_this2.isButtonDisabled = false;
|
|
}
|
|
}
|
|
case 6:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}))();
|
|
},
|
|
checkClickAcknowledge: function checkClickAcknowledge(e) {
|
|
if (e.target.checked) {
|
|
this.formData.is_click_acknowledge = e.target.checked;
|
|
} else {
|
|
this.formData.is_click_acknowledge = null;
|
|
}
|
|
}
|
|
},
|
|
validations: function validations() {
|
|
this.errors = {};
|
|
return {
|
|
formData: {
|
|
first_name: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
last_name: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
email: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required,
|
|
email: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.email
|
|
},
|
|
password: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
is_click_acknowledge: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
}
|
|
}
|
|
};
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateCreditReportAccount.vue?vue&type=script&lang=js":
|
|
/*!****************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateCreditReportAccount.vue?vue&type=script&lang=js ***!
|
|
\****************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _Validation_useFormValidation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/Validation/useFormValidation */ "./resources/js/Validation/useFormValidation.js");
|
|
/* harmony import */ var _Validation_useSubmitButtonState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/Validation/useSubmitButtonState */ "./resources/js/Validation/useSubmitButtonState.js");
|
|
/* harmony import */ var _Api_register__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/Api/register */ "./resources/js/Api/register.js");
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
/* harmony import */ var _helper_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../helper/state */ "./resources/js/helper/state.js");
|
|
/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../helper */ "./resources/js/helper/index.js");
|
|
/* harmony import */ var _router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../router */ "./resources/js/router/index.js");
|
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
setup: function setup() {
|
|
var swal = (0,vue__WEBPACK_IMPORTED_MODULE_3__.inject)('$swal');
|
|
var formData = (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)({
|
|
"first_name": "",
|
|
"last_name": "",
|
|
"email": "",
|
|
"password": ""
|
|
});
|
|
var inputReadOnly = (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)({
|
|
"fname": true,
|
|
"lname": true,
|
|
"email": true
|
|
});
|
|
var stateList = _helper_state__WEBPACK_IMPORTED_MODULE_4__["default"];
|
|
var errorMsg = (0,vue__WEBPACK_IMPORTED_MODULE_3__.reactive)({
|
|
"message": ""
|
|
});
|
|
var success = {};
|
|
var _useFormValidation = (0,_Validation_useFormValidation__WEBPACK_IMPORTED_MODULE_0__["default"])(),
|
|
errors = _useFormValidation.errors;
|
|
// let {isButtonDisabled} = useSubmitButtonState(formData, errors);
|
|
var isButtonDisabled = (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(true);
|
|
var validateInput = function validateInput() {
|
|
var f = formData.value;
|
|
var count = 0;
|
|
isButtonDisabled.value = true;
|
|
if (f.first_name) {
|
|
count++;
|
|
}
|
|
if (f.last_name) {
|
|
count++;
|
|
}
|
|
if (f.email) {
|
|
count++;
|
|
}
|
|
if (f.password) {
|
|
count++;
|
|
}
|
|
if (count == 4) {
|
|
isButtonDisabled.value = false;
|
|
}
|
|
};
|
|
var editable = function editable(value) {
|
|
inputReadOnly.value[value] = !inputReadOnly.value[value];
|
|
};
|
|
var importCreditReport = /*#__PURE__*/function () {
|
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
var params, response;
|
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
if (!isButtonDisabled) {
|
|
_context.next = 7;
|
|
break;
|
|
}
|
|
params = {
|
|
"email": formData.value.email,
|
|
"password": formData.value.password,
|
|
"package_id": (0,_helper__WEBPACK_IMPORTED_MODULE_5__.getPackageId)(),
|
|
"user_id": (0,_helper__WEBPACK_IMPORTED_MODULE_5__.getUserId)()
|
|
};
|
|
_context.next = 4;
|
|
return _Api_register__WEBPACK_IMPORTED_MODULE_2__["default"].importCreditReportByEmail(params);
|
|
case 4:
|
|
response = _context.sent;
|
|
if (response.status_code == 100) {
|
|
_router__WEBPACK_IMPORTED_MODULE_6__["default"].push({
|
|
name: "success"
|
|
});
|
|
} else {
|
|
swal(response.message, "", "warning");
|
|
}
|
|
console.log('response', response);
|
|
case 7:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function importCreditReport() {
|
|
return _ref.apply(this, arguments);
|
|
};
|
|
}();
|
|
console.log('errors', errors, isButtonDisabled);
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_3__.onMounted)( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
var email, userInfo;
|
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
email = (0,_helper__WEBPACK_IMPORTED_MODULE_5__.getUserEmail)();
|
|
_context2.next = 3;
|
|
return _Api_register__WEBPACK_IMPORTED_MODULE_2__["default"].getUserInfo();
|
|
case 3:
|
|
userInfo = _context2.sent;
|
|
if (userInfo.status_code == 100) {
|
|
formData.value = userInfo.data;
|
|
}
|
|
case 5:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
})));
|
|
console.log('count', isButtonDisabled);
|
|
console.log('userInfo', formData);
|
|
return {
|
|
validateInput: validateInput,
|
|
editable: editable,
|
|
inputReadOnly: inputReadOnly,
|
|
formData: formData,
|
|
errors: errors,
|
|
importCreditReport: importCreditReport,
|
|
isButtonDisabled: isButtonDisabled,
|
|
stateList: stateList,
|
|
errorMsg: errorMsg
|
|
};
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/Footer.vue?vue&type=script&lang=js":
|
|
/*!*********************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/Footer.vue?vue&type=script&lang=js ***!
|
|
\*********************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _vuelidate_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vuelidate/core */ "./node_modules/@vuelidate/core/dist/index.mjs");
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
name: 'Footer',
|
|
setup: function setup() {
|
|
return {
|
|
v$: (0,_vuelidate_core__WEBPACK_IMPORTED_MODULE_0__["default"])()
|
|
};
|
|
},
|
|
data: function data() {},
|
|
mounted: function mounted() {},
|
|
methods: {},
|
|
validations: function validations() {}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/IdentityIQPkg.vue?vue&type=script&lang=js":
|
|
/*!****************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/IdentityIQPkg.vue?vue&type=script&lang=js ***!
|
|
\****************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _helper_package__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../helper/package */ "./resources/js/helper/package.js");
|
|
/* harmony import */ var _helper_report_provider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../helper/report_provider */ "./resources/js/helper/report_provider.js");
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
props: {
|
|
package_id: {
|
|
required: true
|
|
}
|
|
},
|
|
data: function data() {
|
|
return {
|
|
"package": _helper_package__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
app_base_url: APP_URL,
|
|
reportProviders: _helper_report_provider__WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
img_url: APP_URL + '/images/' + APP_NAME + '_logo.png',
|
|
company_Name: COMPANY_NAME
|
|
};
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/IdentityIqLogo.vue?vue&type=script&lang=js":
|
|
/*!*****************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/IdentityIqLogo.vue?vue&type=script&lang=js ***!
|
|
\*****************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _helper_package__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../helper/package */ "./resources/js/helper/package.js");
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
props: {
|
|
package_id: {
|
|
required: true
|
|
}
|
|
},
|
|
data: function data() {
|
|
return {
|
|
"package": _helper_package__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
image_base_url: APP_URL,
|
|
img_url: APP_URL + '/images/' + APP_NAME + '_logo.png'
|
|
};
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/MakePayment.vue?vue&type=script&lang=js":
|
|
/*!**************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/MakePayment.vue?vue&type=script&lang=js ***!
|
|
\**************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _vuelidate_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vuelidate/core */ "./node_modules/@vuelidate/core/dist/index.mjs");
|
|
/* harmony import */ var _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @vuelidate/validators */ "./node_modules/@vuelidate/validators/dist/index.mjs");
|
|
/* harmony import */ var _Api_register__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../Api/register */ "./resources/js/Api/register.js");
|
|
/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../helper */ "./resources/js/helper/index.js");
|
|
/* harmony import */ var _router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../router */ "./resources/js/router/index.js");
|
|
/* harmony import */ var _helper_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../helper/state */ "./resources/js/helper/state.js");
|
|
/* harmony import */ var _helper_package__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../helper/package */ "./resources/js/helper/package.js");
|
|
/* harmony import */ var _SmartCreditLogo__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SmartCreditLogo */ "./resources/js/components/partials/SmartCreditLogo.vue");
|
|
/* harmony import */ var _SmartCreditPkg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./SmartCreditPkg */ "./resources/js/components/partials/SmartCreditPkg.vue");
|
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
components: {
|
|
SmartCreditPkg: _SmartCreditPkg__WEBPACK_IMPORTED_MODULE_7__["default"],
|
|
SmartCreditLogo: _SmartCreditLogo__WEBPACK_IMPORTED_MODULE_6__["default"]
|
|
},
|
|
setup: function setup() {
|
|
return {
|
|
v$: (0,_vuelidate_core__WEBPACK_IMPORTED_MODULE_0__["default"])()
|
|
};
|
|
},
|
|
data: function data() {
|
|
return {
|
|
is_disable: true,
|
|
formData: {
|
|
first_name: "",
|
|
last_name: "",
|
|
email: "",
|
|
password: "",
|
|
street_no: "",
|
|
street_name: "",
|
|
city: "",
|
|
ssn: "",
|
|
state: "",
|
|
zip_code: "",
|
|
phone: "",
|
|
card_number: "",
|
|
full_ssn: "",
|
|
expiry: "",
|
|
amount: "",
|
|
package_id: 0,
|
|
birth_date: "",
|
|
is_authorized: null
|
|
// questionList:[]
|
|
},
|
|
|
|
stateList: _helper_state__WEBPACK_IMPORTED_MODULE_4__["default"],
|
|
errors: {},
|
|
message: ["All fields are required"],
|
|
disabled: 1,
|
|
"package": _helper_package__WEBPACK_IMPORTED_MODULE_5__["default"],
|
|
value: null,
|
|
roleOptions: [],
|
|
isOpen: false,
|
|
min: 11
|
|
};
|
|
},
|
|
mounted: function mounted() {
|
|
var _this = this;
|
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
var userData;
|
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
userData = JSON.parse((0,_helper__WEBPACK_IMPORTED_MODULE_2__.getLocalStorage)('formData')) || [];
|
|
_this.formData.first_name = userData.first_name;
|
|
_this.formData.last_name = userData.last_name;
|
|
_this.formData.email = userData.email;
|
|
_this.formData.password = userData.password;
|
|
_this.formData.package_id = userData.package_id;
|
|
_this.formData.amount = userData.amount;
|
|
_this.formData.street_no = userData.street_no;
|
|
_this.formData.street_name = userData.street_name;
|
|
_this.formData.city = userData.city;
|
|
_this.formData.ssn = userData.ssn;
|
|
_this.formData.full_ssn = userData.full_ssn;
|
|
_this.formData.state = userData.state;
|
|
_this.formData.zip_code = userData.zip_code;
|
|
_this.formData.phone = userData.phone;
|
|
_this.formData.package_id = userData.package_id;
|
|
_this.formData.birth_date = userData.birth_date;
|
|
_this.$refs['state'].toggleAttribute("disabled");
|
|
case 18:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}))();
|
|
},
|
|
methods: {
|
|
makePayment: function makePayment() {
|
|
var _this2 = this;
|
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
var data;
|
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
_this2.$refs['purchase-btn'].toggleAttribute("disabled");
|
|
_this2.errors = {};
|
|
_context2.next = 4;
|
|
return _Api_register__WEBPACK_IMPORTED_MODULE_1__["default"].makePayment(_this2.formData);
|
|
case 4:
|
|
data = _context2.sent;
|
|
if (data.status_code == "100") {
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_2__.unsetLocalStorage)('formData');
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_2__.setUserId)(data.data.id);
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_2__.setStep)(6);
|
|
_router__WEBPACK_IMPORTED_MODULE_3__["default"].push({
|
|
name: "success"
|
|
});
|
|
} else {
|
|
_this2.message[0] = data.message;
|
|
}
|
|
case 6:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}))();
|
|
},
|
|
toggle: function toggle(refId) {
|
|
var attribute = "readonly";
|
|
if (refId === "state") {
|
|
attribute = "disabled";
|
|
}
|
|
this.$refs[refId].toggleAttribute(attribute);
|
|
},
|
|
backToProfile: function backToProfile() {
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_2__.setStep)(2);
|
|
_router__WEBPACK_IMPORTED_MODULE_3__["default"].push({
|
|
name: 'add-profile'
|
|
});
|
|
},
|
|
checkTermsAndService: function checkTermsAndService(e) {
|
|
if (e.target.checked) {
|
|
this.formData.is_authorized = e.target.checked;
|
|
} else {
|
|
this.formData.is_authorized = null;
|
|
}
|
|
},
|
|
ssnCompleted: function ssnCompleted(e) {
|
|
if (this.formData.full_ssn.length === 3 || this.formData.full_ssn.length === 6) {
|
|
this.formData.full_ssn += '-';
|
|
}
|
|
if (this.formData.full_ssn.length === 11) {
|
|
this.formData.ssn = this.formData.full_ssn.substring(7, 11);
|
|
}
|
|
},
|
|
birthDateCompleted: function birthDateCompleted(e) {
|
|
if (this.formData.birth_date.length === 2 || this.formData.birth_date.length === 5) {
|
|
this.formData.birth_date += '/';
|
|
}
|
|
},
|
|
cardExpiryCompleted: function cardExpiryCompleted(e) {
|
|
if (this.formData.expiry.length === 2) {
|
|
this.formData.expiry += '/';
|
|
}
|
|
}
|
|
},
|
|
validations: function validations() {
|
|
return {
|
|
formData: {
|
|
first_name: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
// Matches this.firstName
|
|
last_name: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
email: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required,
|
|
email: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.email
|
|
},
|
|
password: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
card_number: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
street_no: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
street_name: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
city: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
ssn: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required,
|
|
minLength: (0,_vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.minLength)(4)
|
|
},
|
|
state: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
zip_code: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
phone: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
expiry: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
amount: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
full_ssn: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required,
|
|
minLength: (0,_vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.minLength)(this.min)
|
|
},
|
|
birth_date: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
is_authorized: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
}
|
|
// questionList: {required}
|
|
}
|
|
};
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/PaymentModal.vue?vue&type=script&lang=js":
|
|
/*!***************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/PaymentModal.vue?vue&type=script&lang=js ***!
|
|
\***************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _vuelidate_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vuelidate/core */ "./node_modules/@vuelidate/core/dist/index.mjs");
|
|
/* harmony import */ var _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @vuelidate/validators */ "./node_modules/@vuelidate/validators/dist/index.mjs");
|
|
/* harmony import */ var _router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../router */ "./resources/js/router/index.js");
|
|
/* harmony import */ var _Api_register__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Api/register */ "./resources/js/Api/register.js");
|
|
/* harmony import */ var _helper_package__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../helper/package */ "./resources/js/helper/package.js");
|
|
/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../helper */ "./resources/js/helper/index.js");
|
|
/* harmony import */ var _SmartCreditPkgView_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SmartCreditPkgView.vue */ "./resources/js/components/partials/SmartCreditPkgView.vue");
|
|
/* harmony import */ var _sc_partner_cz_logo_vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./sc_partner_cz_logo.vue */ "./resources/js/components/partials/sc_partner_cz_logo.vue");
|
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../store */ "./resources/js/store/index.js");
|
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
components: {
|
|
SmartCreditPkgView: _SmartCreditPkgView_vue__WEBPACK_IMPORTED_MODULE_5__["default"],
|
|
ScPartnerCzLogo: _sc_partner_cz_logo_vue__WEBPACK_IMPORTED_MODULE_6__["default"]
|
|
},
|
|
name: 'PaymentModal.vue',
|
|
setup: function setup() {
|
|
return {
|
|
v$: (0,_vuelidate_core__WEBPACK_IMPORTED_MODULE_0__["default"])()
|
|
};
|
|
},
|
|
props: {
|
|
data: {
|
|
type: Object,
|
|
"default": {}
|
|
}
|
|
},
|
|
data: function data() {
|
|
return {
|
|
formData: {
|
|
full_name: "",
|
|
first_name: "",
|
|
last_name: "",
|
|
email: "",
|
|
password: "",
|
|
street_no: "",
|
|
street_name: "",
|
|
city: "",
|
|
ssn: "",
|
|
state: "",
|
|
zip_code: "",
|
|
phone: "",
|
|
full_ssn: "",
|
|
package_id: 0,
|
|
birth_date: "",
|
|
amount: 0,
|
|
card_number: "",
|
|
expiry: "",
|
|
cvv_no: "",
|
|
address: "",
|
|
is_authorized: null
|
|
},
|
|
errors: {},
|
|
message: [""],
|
|
isButtonDisabled: false,
|
|
disabled: 1,
|
|
"package": _helper_package__WEBPACK_IMPORTED_MODULE_3__["default"],
|
|
value: null,
|
|
roleOptions: [],
|
|
min: 11,
|
|
app_base_url: APP_URL,
|
|
reportProvider: REPORT_PROVIDER,
|
|
company_Name: COMPANY_NAME
|
|
};
|
|
},
|
|
mounted: function mounted() {},
|
|
methods: {
|
|
closePaymentModal: function closePaymentModal(data) {
|
|
this.$emit('close', data);
|
|
},
|
|
paymentFormSubmit: function paymentFormSubmit() {
|
|
var _this = this;
|
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
var data;
|
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
_this.formData = _this.$props.data;
|
|
_this.v$.$validate();
|
|
_this.errors = {};
|
|
_this.formValidation();
|
|
if (!(!_this.v$.$invalid && _this.formData.is_authorized)) {
|
|
_context.next = 10;
|
|
break;
|
|
}
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_4__.setLocalStorage)('formData', JSON.stringify(_this.$props.data));
|
|
_context.next = 8;
|
|
return _Api_register__WEBPACK_IMPORTED_MODULE_2__["default"].customerCreateAndUpdate(_this.$props.data);
|
|
case 8:
|
|
data = _context.sent;
|
|
if (data.status_code == "100") {
|
|
if (_this.reportProvider === '3') {
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_4__.setTrackingToken)(data.data.tracking_token);
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_4__.setCustomerToken)(data.data.customer_token);
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_4__.setReferenceNumber)(data.data.customer_token);
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_4__.setReferenceNumber)(data.data.questionAnswer.idVerificationCriteria.referenceNumber);
|
|
_this.closePaymentModal(data.data.questionAnswer);
|
|
} else if (_this.reportProvider === '1') {
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_4__.unsetLocalStorage)('formData');
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_4__.setStep)(6);
|
|
_router__WEBPACK_IMPORTED_MODULE_1__["default"].push({
|
|
name: "success"
|
|
});
|
|
}
|
|
} else {
|
|
_this.message[0] = data.message;
|
|
_this.errors = data.data;
|
|
//this.closePaymentModal(true)
|
|
//this.$swal(data.message);
|
|
}
|
|
case 10:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}))();
|
|
},
|
|
showModal: function showModal() {
|
|
this.isQuestionModalVisible = true;
|
|
},
|
|
cardExpiryCompleted: function cardExpiryCompleted(e) {
|
|
if (this.$props.data.expiry.length === 2) {
|
|
this.$props.data.expiry += '/';
|
|
}
|
|
},
|
|
formValidation: function formValidation() {
|
|
for (var i in this.v$.$errors) {
|
|
var key = this.v$.$errors[i].$property;
|
|
var msg = this.v$.$errors[i].$message;
|
|
if (key && msg) {
|
|
this.errors[key] = msg;
|
|
}
|
|
}
|
|
if (!this.formData.is_authorized) {
|
|
this.message[1] = 'You have to agree the terms and privacy condition.';
|
|
}
|
|
},
|
|
checkTermsAndService: function checkTermsAndService(e) {
|
|
if (e.target.checked) {
|
|
this.$props.data.is_authorized = e.target.checked;
|
|
this.message[1] = null;
|
|
} else {
|
|
this.$props.data.is_authorized = null;
|
|
}
|
|
}
|
|
},
|
|
validations: function validations() {
|
|
return {
|
|
formData: {
|
|
first_name: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
// Matches this.firstName
|
|
last_name: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
email: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required,
|
|
email: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.email
|
|
},
|
|
password: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
card_number: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
street_no: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
street_name: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
city: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
ssn: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required,
|
|
minLength: (0,_vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.minLength)(4)
|
|
},
|
|
state: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
zip_code: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
phone: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
amount: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
full_ssn: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required,
|
|
minLength: (0,_vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.minLength)(this.min)
|
|
},
|
|
birth_date: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
expiry: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
cvv_no: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
address: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
},
|
|
full_name: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_8__.required
|
|
}
|
|
}
|
|
};
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditLogo.vue?vue&type=script&lang=js":
|
|
/*!******************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditLogo.vue?vue&type=script&lang=js ***!
|
|
\******************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _helper_package__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../helper/package */ "./resources/js/helper/package.js");
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
props: {
|
|
package_id: {
|
|
required: true
|
|
}
|
|
},
|
|
data: function data() {
|
|
return {
|
|
"package": _helper_package__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
image_base_url: APP_URL,
|
|
img_url: APP_URL + '/images/' + APP_NAME + '_logo.png'
|
|
};
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkg.vue?vue&type=script&lang=js":
|
|
/*!*****************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkg.vue?vue&type=script&lang=js ***!
|
|
\*****************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _helper_package__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../helper/package */ "./resources/js/helper/package.js");
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
props: {
|
|
package_id: {
|
|
required: true
|
|
}
|
|
},
|
|
data: function data() {
|
|
return {
|
|
"package": _helper_package__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
app_base_url: APP_URL,
|
|
img_url: APP_URL + '/images/' + APP_NAME + '_logo.png',
|
|
company_Name: COMPANY_NAME
|
|
};
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkgView.vue?vue&type=script&lang=js":
|
|
/*!*********************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkgView.vue?vue&type=script&lang=js ***!
|
|
\*********************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _helper_package__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../helper/package */ "./resources/js/helper/package.js");
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
props: {
|
|
package_id: {
|
|
required: true
|
|
}
|
|
},
|
|
data: function data() {
|
|
return {
|
|
"package": _helper_package__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
app_base_url: APP_URL
|
|
};
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/Success.vue?vue&type=script&lang=js":
|
|
/*!**********************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/Success.vue?vue&type=script&lang=js ***!
|
|
\**********************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _helper_package__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../helper/package */ "./resources/js/helper/package.js");
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../helper */ "./resources/js/helper/index.js");
|
|
/* harmony import */ var _Api_register__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Api/register */ "./resources/js/Api/register.js");
|
|
/* harmony import */ var _router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../router */ "./resources/js/router/index.js");
|
|
/* harmony import */ var _Footer_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Footer.vue */ "./resources/js/components/partials/Footer.vue");
|
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
components: {
|
|
Footer: _Footer_vue__WEBPACK_IMPORTED_MODULE_5__["default"]
|
|
},
|
|
setup: function setup() {
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_1__.onMounted)(function () {
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_2__.unsetStep)();
|
|
});
|
|
return {
|
|
APP_URL: APP_URL
|
|
};
|
|
},
|
|
data: function data() {
|
|
return {
|
|
package_id: 0,
|
|
"package": _helper_package__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
app_base_url: APP_URL,
|
|
company_Name: COMPANY_NAME
|
|
};
|
|
},
|
|
mounted: function mounted() {
|
|
var _this = this;
|
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
_this.package_id = (0,_helper__WEBPACK_IMPORTED_MODULE_2__.getPackageId)();
|
|
case 1:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}))();
|
|
},
|
|
created: function created() {
|
|
this.fbEvents();
|
|
},
|
|
methods: {
|
|
fbEvents: function fbEvents() {
|
|
window.fbq('init', '450475028484130');
|
|
window.fbq('track', 'PageView');
|
|
window.fbq('track', 'Purchase');
|
|
},
|
|
makePayment: function makePayment() {
|
|
var _this2 = this;
|
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
localStorage.removeItem('formData');
|
|
window.location.href = "".concat(_this2.app_base_url, "/login");
|
|
// const userData = JSON.parse(localStorage.getItem('formData')) || [];
|
|
// this.errors = {}
|
|
// let formData= {'user_id': getUserId(),'email':userData.email,'card_number':userData.card_number, 'expiry':userData.expiry,'amount':userData.amount,'full_ssn':userData.full_ssn,'phone':userData.phone ,'zip_code':userData.zip_code};
|
|
// const data = await register.makePayments(formData);
|
|
// if (data.status_code == "100") {
|
|
// localStorage.removeItem('formData');
|
|
// this.isOpen=false;
|
|
// this.isView=false;
|
|
// window.location.href = `${APP_URL}/login`;
|
|
// } else if (data.status_code == "402") {
|
|
// this.errors = data.data;
|
|
// } else {
|
|
// this.message[0] = data.message;
|
|
// }
|
|
case 2:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}))();
|
|
}
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/TopArea.vue?vue&type=script&lang=js":
|
|
/*!**********************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/TopArea.vue?vue&type=script&lang=js ***!
|
|
\**********************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../helper */ "./resources/js/helper/index.js");
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
props: {
|
|
is_show_login: {
|
|
"default": true
|
|
}
|
|
},
|
|
data: function data() {
|
|
return {
|
|
APP_URL: APP_URL,
|
|
img_url: APP_URL + '/images/' + APP_NAME + '_logo.png',
|
|
is_show_login: this.$props.is_show_login
|
|
};
|
|
},
|
|
methods: {
|
|
cookiesClear: function cookiesClear() {
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_0__.unsetLocalStorage)('formData');
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_0__.unsetLocalStorage)('userQuestionAnswer');
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_0__.unsetStep)();
|
|
window.location.href = "".concat(APP_URL, "/login");
|
|
}
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/ValidationError.vue?vue&type=script&lang=js":
|
|
/*!******************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/ValidationError.vue?vue&type=script&lang=js ***!
|
|
\******************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
name: 'Error',
|
|
props: {
|
|
msg: Array | String,
|
|
backend: Array
|
|
},
|
|
mounted: function mounted() {
|
|
// console.log(this.props.msg)
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/modal.vue?vue&type=script&lang=js":
|
|
/*!********************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/modal.vue?vue&type=script&lang=js ***!
|
|
\********************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _vuelidate_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vuelidate/core */ "./node_modules/@vuelidate/core/dist/index.mjs");
|
|
/* harmony import */ var _vuelidate_validators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @vuelidate/validators */ "./node_modules/@vuelidate/validators/dist/index.mjs");
|
|
/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../helper */ "./resources/js/helper/index.js");
|
|
/* harmony import */ var _router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../router */ "./resources/js/router/index.js");
|
|
/* harmony import */ var _Api_register__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Api/register */ "./resources/js/Api/register.js");
|
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
name: 'modal.vue',
|
|
setup: function setup() {
|
|
return {
|
|
v$: (0,_vuelidate_core__WEBPACK_IMPORTED_MODULE_0__["default"])()
|
|
};
|
|
},
|
|
data: function data() {
|
|
var finalFormData = {};
|
|
var qa = this.questionAnswer.idVerificationCriteria;
|
|
finalFormData['email'] = "";
|
|
finalFormData['customerToken'] = "";
|
|
finalFormData['trackingToken'] = "";
|
|
finalFormData['referenceNumber'] = "";
|
|
var totalQuestion = 0;
|
|
var qa_assoc = {};
|
|
for (var q in qa) {
|
|
if (this.getQuestionCounter(q) > 0) {
|
|
// qa_assoc[q] = qa[q].displayName;
|
|
qa_assoc["answer".concat(this.getQuestionCounter(q))] = {
|
|
'question': qa[q].displayName,
|
|
'answer': ""
|
|
};
|
|
totalQuestion++;
|
|
}
|
|
}
|
|
finalFormData['security_question_answer'] = qa_assoc;
|
|
console.log('qa', 'key ', finalFormData);
|
|
return {
|
|
formData: finalFormData,
|
|
answers: {},
|
|
totalQuestion: totalQuestion,
|
|
isNotValid: true,
|
|
message: ["All fields are required"]
|
|
};
|
|
},
|
|
props: {
|
|
questionAnswer: {
|
|
type: Object
|
|
}
|
|
},
|
|
mounted: function mounted() {},
|
|
methods: {
|
|
// close() {
|
|
// this.$emit('close');
|
|
// },
|
|
radioButtonEvent: function radioButtonEvent(event, counter) {
|
|
this.isNotValid = true;
|
|
if (this.totalQuestion == Object.keys(this.answers).length) {
|
|
console.log('correct');
|
|
this.isNotValid = false;
|
|
}
|
|
},
|
|
getQuestionCounter: function getQuestionCounter(key) {
|
|
var result = "";
|
|
if (key) {
|
|
result = key.replace('question', '');
|
|
}
|
|
return result > 0 ? result : 0;
|
|
},
|
|
submitQuestion: function submitQuestion() {
|
|
var _this = this;
|
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
var userData, security_question_answer, ans, data;
|
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
if (!_this.isNotValid) {
|
|
userData = JSON.parse((0,_helper__WEBPACK_IMPORTED_MODULE_1__.getLocalStorage)('formData')) || [];
|
|
_this.formData.email = userData.email;
|
|
_this.formData.customerToken = (0,_helper__WEBPACK_IMPORTED_MODULE_1__.getCustomerToken)();
|
|
_this.formData.trackingToken = (0,_helper__WEBPACK_IMPORTED_MODULE_1__.getTrackingToken)();
|
|
_this.formData.referenceNumber = (0,_helper__WEBPACK_IMPORTED_MODULE_1__.getReferenceNumber)();
|
|
security_question_answer = _this.formData.security_question_answer;
|
|
for (ans in _this.answers) {
|
|
security_question_answer[ans].answer = _this.answers[ans];
|
|
}
|
|
_this.formData.security_question_answer = security_question_answer;
|
|
}
|
|
/*console.log('dddd',this.formData);
|
|
return false*/
|
|
// this.formData.questionAnswer = this.questionAnswer;
|
|
_context.next = 3;
|
|
return _Api_register__WEBPACK_IMPORTED_MODULE_3__["default"].postIdentityQuestion(_this.formData);
|
|
case 3:
|
|
data = _context.sent;
|
|
if (data.status_code == "100") {
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.unsetCustomerToken)();
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.unsetTrackingToken)();
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.unsetReferenceNumber)();
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.unsetLocalStorage)('formData');
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.setStep)(6);
|
|
_router__WEBPACK_IMPORTED_MODULE_2__["default"].push({
|
|
name: "success"
|
|
});
|
|
// setLocalStorage('userQuestionAnswer', JSON.stringify(this.formData));
|
|
// setStep(5);
|
|
// router.push({name: "make-payment"});
|
|
} else {
|
|
_this.message[0] = data.message;
|
|
}
|
|
case 5:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}))();
|
|
}
|
|
},
|
|
validations: function validations() {
|
|
return {
|
|
formData: {
|
|
question1: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_4__.required
|
|
},
|
|
question2: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_4__.required
|
|
},
|
|
question3: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_4__.required
|
|
},
|
|
answer1: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_4__.required
|
|
},
|
|
answer2: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_4__.required
|
|
},
|
|
answer3: {
|
|
required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_4__.required
|
|
}
|
|
}
|
|
};
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/sc_partner_cz_logo.vue?vue&type=script&lang=js":
|
|
/*!*********************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/sc_partner_cz_logo.vue?vue&type=script&lang=js ***!
|
|
\*********************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
name: "sc_partner_cz_logo",
|
|
data: function data() {
|
|
return {
|
|
reportProvider: REPORT_PROVIDER,
|
|
image_base_url: APP_URL,
|
|
img_url: APP_URL + '/images/' + APP_NAME + '_logo.png',
|
|
company_Name: COMPANY_NAME
|
|
};
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/step.vue?vue&type=script&lang=js":
|
|
/*!*******************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/step.vue?vue&type=script&lang=js ***!
|
|
\*******************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
name: 'Step',
|
|
props: {
|
|
step: String
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/App.vue?vue&type=template&id=332fccf4":
|
|
/*!*************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/App.vue?vue&type=template&id=332fccf4 ***!
|
|
\*************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* binding */ render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
var _hoisted_1 = {
|
|
id: "spinner"
|
|
};
|
|
var _hoisted_2 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
id: "loading"
|
|
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", {
|
|
"class": "timer-loader"
|
|
}, "Loading…")], -1 /* HOISTED */);
|
|
var _hoisted_3 = [_hoisted_2];
|
|
function render(_ctx, _cache) {
|
|
var _component_router_view = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("router-view");
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_1, _hoisted_3, 512 /* NEED_PATCH */), [[vue__WEBPACK_IMPORTED_MODULE_0__.vShow, _ctx.$store.getters['auth/getLoaderStatus']]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_router_view)]);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/Form/SelectInput.vue?vue&type=template&id=0d6c342e":
|
|
/*!**************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/Form/SelectInput.vue?vue&type=template&id=0d6c342e ***!
|
|
\**************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* binding */ render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
var _hoisted_1 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_2 = {
|
|
key: 0,
|
|
value: "",
|
|
disabled: ""
|
|
};
|
|
var _hoisted_3 = ["value"];
|
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
var _component_ValidationError = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("ValidationError");
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("select", {
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($props.className),
|
|
onInput: _cache[0] || (_cache[0] = function ($event) {
|
|
return _ctx.$emit('update:modelValue', $event.target.value);
|
|
}),
|
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) {
|
|
return $setup.input = $event;
|
|
}),
|
|
onChange: _cache[2] || (_cache[2] = function () {
|
|
return $setup.validateInput && $setup.validateInput.apply($setup, arguments);
|
|
})
|
|
}, [$props.empty ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("option", _hoisted_2, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.empty), 1 /* TEXT */)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($props.items, function (item) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("option", {
|
|
key: item.id,
|
|
value: item.id
|
|
}, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(item.value), 9 /* TEXT, PROPS */, _hoisted_3);
|
|
}), 128 /* KEYED_FRAGMENT */))], 34 /* CLASS, HYDRATE_EVENTS */), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelSelect, $setup.input]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
msg: $setup.errors[$setup.name]
|
|
}, null, 8 /* PROPS */, ["msg"])]);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/Form/TextInput.vue?vue&type=template&id=4540c51d":
|
|
/*!************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/Form/TextInput.vue?vue&type=template&id=4540c51d ***!
|
|
\************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* binding */ render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
var _hoisted_1 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_2 = ["placeholder", "type"];
|
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
var _component_ValidationError = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("ValidationError");
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($props.className),
|
|
placeholder: $props.placeholder,
|
|
type: $props.type,
|
|
onInput: _cache[0] || (_cache[0] = function ($event) {
|
|
return _ctx.$emit('update:modelValue', $event.target.value);
|
|
}),
|
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) {
|
|
return $setup.input = $event;
|
|
}),
|
|
onKeyup: _cache[2] || (_cache[2] = function () {
|
|
return $setup.validateInput && $setup.validateInput.apply($setup, arguments);
|
|
}),
|
|
onBlur: _cache[3] || (_cache[3] = function () {
|
|
return $setup.validateInput && $setup.validateInput.apply($setup, arguments);
|
|
})
|
|
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_2), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelDynamic, $setup.input]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $props.backend,
|
|
msg: $setup.messages
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])]);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/AddProfile.vue?vue&type=template&id=41f2e48a&scoped=true":
|
|
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/AddProfile.vue?vue&type=template&id=41f2e48a&scoped=true ***!
|
|
\*****************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* binding */ render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
var _withScopeId = function _withScopeId(n) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-41f2e48a"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
|
|
};
|
|
var _hoisted_1 = {
|
|
"class": "container"
|
|
};
|
|
var _hoisted_2 = {
|
|
"class": "card"
|
|
};
|
|
var _hoisted_3 = {
|
|
"class": "form"
|
|
};
|
|
var _hoisted_4 = {
|
|
"class": "left-side"
|
|
};
|
|
var _hoisted_5 = {
|
|
"class": "left-heading"
|
|
};
|
|
var _hoisted_6 = {
|
|
"class": "right-side"
|
|
};
|
|
var _hoisted_7 = {
|
|
"class": "main active"
|
|
};
|
|
var _hoisted_8 = {
|
|
"class": "text"
|
|
};
|
|
var _hoisted_9 = {
|
|
key: 0
|
|
};
|
|
var _hoisted_10 = {
|
|
key: 1
|
|
};
|
|
var _hoisted_11 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", null, "Let's start with some basic info.", -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_12 = {
|
|
key: 0,
|
|
"class": "text"
|
|
};
|
|
var _hoisted_13 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", {
|
|
style: {
|
|
"color": "red",
|
|
"text-align": "center"
|
|
}
|
|
}, "All fields are required", -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_14 = [_hoisted_13];
|
|
var _hoisted_15 = {
|
|
key: 1,
|
|
"class": "text"
|
|
};
|
|
var _hoisted_16 = {
|
|
style: {
|
|
"color": "red",
|
|
"text-align": "center"
|
|
}
|
|
};
|
|
var _hoisted_17 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_18 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_19 = {
|
|
"class": "edit-text"
|
|
};
|
|
var _hoisted_20 = ["readonly"];
|
|
var _hoisted_21 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_22 = {
|
|
"class": "edit-text"
|
|
};
|
|
var _hoisted_23 = ["readonly"];
|
|
var _hoisted_24 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_25 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_26 = {
|
|
"class": "edit-text"
|
|
};
|
|
var _hoisted_27 = ["readonly"];
|
|
var _hoisted_28 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_29 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_30 = {
|
|
"class": "edit-text"
|
|
};
|
|
var _hoisted_31 = ["readonly"];
|
|
var _hoisted_32 = {
|
|
"class": "input-div",
|
|
style: {
|
|
"margin-top": "20px"
|
|
}
|
|
};
|
|
var _hoisted_33 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_34 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_35 = ["maxlength"];
|
|
var _hoisted_36 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_37 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_38 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_39 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_40 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_41 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_42 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_43 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("option", {
|
|
value: ""
|
|
}, "Please select state", -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_44 = ["value"];
|
|
var _hoisted_45 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_46 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_47 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_48 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_49 = {
|
|
"class": "input-div buttons",
|
|
style: {
|
|
"text-align": "left"
|
|
}
|
|
};
|
|
var _hoisted_50 = {
|
|
"class": "input-div buttons",
|
|
style: {
|
|
"text-align": "left"
|
|
}
|
|
};
|
|
var _hoisted_51 = ["disabled"];
|
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
var _component_Step = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Step");
|
|
var _component_TopArea = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("TopArea");
|
|
var _component_SmartCreditLogo = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("SmartCreditLogo");
|
|
var _component_ValidationError = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("ValidationError");
|
|
var _component_SmartCreditPkg = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("SmartCreditPkg");
|
|
var _component_IdentityIQPkg = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("IdentityIQPkg");
|
|
var _component_PaymentModal = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("PaymentModal");
|
|
var _component_Footer = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Footer");
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_5, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data.company_Name), 1 /* TEXT */)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Step, {
|
|
step: "2"
|
|
})]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_6, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("form", {
|
|
onSubmit: _cache[21] || (_cache[21] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function () {
|
|
return $options.makePayment && $options.makePayment.apply($options, arguments);
|
|
}, ["prevent"])),
|
|
autocomplete: "off",
|
|
"class": "form-element was-validated form-element--login",
|
|
method: "post",
|
|
novalidate: "novalidate"
|
|
}, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_7, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_TopArea, {
|
|
is_show_login: false
|
|
}), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_8, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data.company_Name) + " ", 1 /* TEXT */), $data.reportProvider === '3' ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_9, " Partnered with " + (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data.reportProviders.labels[$data.reportProvider]), 1 /* TEXT */)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $data.reportProvider === '1' ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_10, " Powerful Software System ")) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]), _hoisted_11]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_SmartCreditLogo, {
|
|
package_id: $data.formData.package_id
|
|
}, null, 8 /* PROPS */, ["package_id"]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <SmartCreditLogo :package_id=\"formData.package_id\" v-if=\"reportProvider==='3'\"/>"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <IdentityIqLogo :package_id=\"formData.package_id\" v-if=\"reportProvider==='1'\"/>"), $data.isButtonDisabled ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_12, _hoisted_14)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $data.message ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_15, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_16, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data.message[0]), 1 /* TEXT */)])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_17, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_18, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_19, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", {
|
|
href: "#",
|
|
onClick: _cache[0] || (_cache[0] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function ($event) {
|
|
return $options.toggle('first_name');
|
|
}, ["prevent"]))
|
|
}, "Edit")]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "first_name",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $setup.v$.formData.first_name.$errors.length
|
|
}),
|
|
placeholder: "First Name",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) {
|
|
return $data.formData.first_name = $event;
|
|
}),
|
|
readonly: $data.disabled == 1
|
|
}, null, 10 /* CLASS, PROPS */, _hoisted_20), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $data.formData.first_name]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.first_name,
|
|
msg: $setup.v$.formData.first_name.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_21, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_22, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", {
|
|
href: "#",
|
|
onClick: _cache[2] || (_cache[2] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function ($event) {
|
|
return $options.toggle('last_name');
|
|
}, ["prevent"]))
|
|
}, "Edit")]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "last_name",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $setup.v$.formData.last_name.$errors.length
|
|
}),
|
|
placeholder: "Last Name",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = function ($event) {
|
|
return $setup.v$.formData.last_name.$model = $event;
|
|
}),
|
|
readonly: $data.disabled == 1
|
|
}, null, 10 /* CLASS, PROPS */, _hoisted_23), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.last_name.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.last_name,
|
|
msg: $setup.v$.formData.last_name.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_24, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_25, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_26, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", {
|
|
href: "#",
|
|
onClick: _cache[4] || (_cache[4] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function ($event) {
|
|
return $options.toggle('email');
|
|
}, ["prevent"]))
|
|
}, "Edit")]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "email",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.email
|
|
}),
|
|
placeholder: "Email",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = function ($event) {
|
|
return $setup.v$.formData.email.$model = $event;
|
|
}),
|
|
readonly: $data.disabled == 1
|
|
}, null, 10 /* CLASS, PROPS */, _hoisted_27), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.email.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.email,
|
|
msg: $setup.v$.formData.email.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_28, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_29, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_30, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", {
|
|
href: "#",
|
|
onClick: _cache[6] || (_cache[6] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function ($event) {
|
|
return $options.toggle('password');
|
|
}, ["prevent"]))
|
|
}, "Edit")]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "password",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.password
|
|
}),
|
|
placeholder: "Password",
|
|
type: "password",
|
|
"onUpdate:modelValue": _cache[7] || (_cache[7] = function ($event) {
|
|
return $setup.v$.formData.password.$model = $event;
|
|
}),
|
|
readonly: $data.disabled == 1
|
|
}, null, 10 /* CLASS, PROPS */, _hoisted_31), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.password.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.password,
|
|
msg: $setup.v$.formData.password.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_32, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "phone",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.phone
|
|
}),
|
|
placeholder: "Phone, e,g. 954-604-4220",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[8] || (_cache[8] = function ($event) {
|
|
return $setup.v$.formData.phone.$model = $event;
|
|
})
|
|
}, null, 2 /* CLASS */), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.phone.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.phone,
|
|
msg: $setup.v$.formData.phone.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_33, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_34, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "full_ssn",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.full_ssn
|
|
}),
|
|
placeholder: "Last 4 digit of SSN",
|
|
type: "text",
|
|
onKeyup: _cache[9] || (_cache[9] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function ($event) {
|
|
return $options.ssnCompleted($event);
|
|
}, ["prevent"])),
|
|
"onUpdate:modelValue": _cache[10] || (_cache[10] = function ($event) {
|
|
return $setup.v$.formData.full_ssn.$model = $event;
|
|
}),
|
|
maxlength: $data.min
|
|
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_35), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.full_ssn.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.full_ssn,
|
|
msg: $setup.v$.formData.full_ssn.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_36, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "full_ssn",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.birth_date
|
|
}),
|
|
placeholder: "Birth Date e.g, mm/dd/yyyy",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[11] || (_cache[11] = function ($event) {
|
|
return $setup.v$.formData.birth_date.$model = $event;
|
|
}),
|
|
onKeyup: _cache[12] || (_cache[12] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function ($event) {
|
|
return $options.birthDateCompleted($event);
|
|
}, ["prevent"])),
|
|
maxlength: 10
|
|
}, null, 34 /* CLASS, HYDRATE_EVENTS */), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.birth_date.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.birth_date,
|
|
msg: $setup.v$.formData.birth_date.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_37, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_38, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "street_no",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.street_no
|
|
}),
|
|
placeholder: "Street No.",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[13] || (_cache[13] = function ($event) {
|
|
return $setup.v$.formData.street_no.$model = $event;
|
|
})
|
|
}, null, 2 /* CLASS */), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.street_no.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.street_no,
|
|
msg: $setup.v$.formData.street_no.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_39, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "street_name",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.street_name
|
|
}),
|
|
placeholder: "Street Name",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[14] || (_cache[14] = function ($event) {
|
|
return $setup.v$.formData.street_name.$model = $event;
|
|
})
|
|
}, null, 2 /* CLASS */), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.street_name.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.street_name,
|
|
msg: $setup.v$.formData.street_name.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_40, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_41, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "city",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.city
|
|
}),
|
|
placeholder: "City",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[15] || (_cache[15] = function ($event) {
|
|
return $setup.v$.formData.city.$model = $event;
|
|
})
|
|
}, null, 2 /* CLASS */), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.city.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.city,
|
|
msg: $setup.v$.formData.city.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_42, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("select", {
|
|
ref: "state",
|
|
"onUpdate:modelValue": _cache[16] || (_cache[16] = function ($event) {
|
|
return $setup.v$.formData.state.$model = $event;
|
|
})
|
|
}, [_hoisted_43, ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($data.stateList, function (item) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("option", {
|
|
key: item.id,
|
|
value: item.id
|
|
}, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(item.value), 9 /* TEXT, PROPS */, _hoisted_44);
|
|
}), 128 /* KEYED_FRAGMENT */))], 512 /* NEED_PATCH */), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelSelect, $setup.v$.formData.state.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.state,
|
|
msg: $setup.v$.formData.state.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_45, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_46, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "zip_code",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.zip_code
|
|
}),
|
|
placeholder: "Zip Code",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[17] || (_cache[17] = function ($event) {
|
|
return $setup.v$.formData.zip_code.$model = $event;
|
|
})
|
|
}, null, 2 /* CLASS */), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.zip_code.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.zip_code,
|
|
msg: $setup.v$.formData.zip_code.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_47, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "ssn",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.ssn
|
|
}),
|
|
placeholder: "Last 4 digit of SSN",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[18] || (_cache[18] = function ($event) {
|
|
return $setup.v$.formData.ssn.$model = $event;
|
|
}),
|
|
maxlength: 4,
|
|
onKeyup: _cache[19] || (_cache[19] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function ($event) {
|
|
return $options.ssnCompleted($event);
|
|
}, ["prevent"]))
|
|
}, null, 34 /* CLASS, HYDRATE_EVENTS */), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.ssn.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.ssn,
|
|
msg: $setup.v$.formData.ssn.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_48, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_49, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", {
|
|
type: "button",
|
|
value: "Back",
|
|
"class": "back_button",
|
|
onClick: _cache[20] || (_cache[20] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function () {
|
|
return $options.backToProfile && $options.backToProfile.apply($options, arguments);
|
|
}, ["prevent"]))
|
|
}, " Back ")]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_50, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", {
|
|
disabled: $setup.v$.formData.$invalid,
|
|
type: "submit",
|
|
value: "Next",
|
|
"class": "next_button"
|
|
}, " Next Step ", 8 /* PROPS */, _hoisted_51)])])])], 32 /* HYDRATE_EVENTS */)]), $data.reportProvider === '3' ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_SmartCreditPkg, {
|
|
key: 0,
|
|
package_id: $data.formData.package_id
|
|
}, null, 8 /* PROPS */, ["package_id"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $data.reportProvider === '1' ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_IdentityIQPkg, {
|
|
key: 1,
|
|
package_id: $data.formData.package_id
|
|
}, null, 8 /* PROPS */, ["package_id"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)])]), $data.isModalVisible ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_PaymentModal, {
|
|
key: 0,
|
|
onClose: $options.closeModal,
|
|
data: $data.prepareformData
|
|
}, null, 8 /* PROPS */, ["onClose", "data"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <modal :questionAnswer=\"questionList\" v-if=\"isQuestionModalVisible && reportProvider === '3' \" />")]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Footer)], 64 /* STABLE_FRAGMENT */);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/ChoosePackage.vue?vue&type=template&id=7b3e7646&scoped=true":
|
|
/*!********************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/ChoosePackage.vue?vue&type=template&id=7b3e7646&scoped=true ***!
|
|
\********************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* binding */ render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
var _withScopeId = function _withScopeId(n) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-7b3e7646"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
|
|
};
|
|
var _hoisted_1 = {
|
|
"class": "container"
|
|
};
|
|
var _hoisted_2 = {
|
|
"class": "card"
|
|
};
|
|
var _hoisted_3 = {
|
|
"class": "form"
|
|
};
|
|
var _hoisted_4 = {
|
|
"class": "left-side"
|
|
};
|
|
var _hoisted_5 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
"class": "left-heading"
|
|
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", null, "Creditzombies")], -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_6 = {
|
|
"class": "right-side"
|
|
};
|
|
var _hoisted_7 = {
|
|
"class": "main active",
|
|
style: {
|
|
"padding": "30px 40px 0px 20px"
|
|
}
|
|
};
|
|
var _hoisted_8 = {
|
|
"class": "row",
|
|
style: {
|
|
"padding": "10px 20px"
|
|
}
|
|
};
|
|
var _hoisted_9 = {
|
|
"class": "col-xs-12 col-sm-12 col-md-4 col-lg-4"
|
|
};
|
|
var _hoisted_10 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
"class": "shape"
|
|
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
"class": "shape-text"
|
|
}, "Best offer")], -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_11 = {
|
|
"class": "listing-content"
|
|
};
|
|
var _hoisted_12 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", {
|
|
"class": "lead text-white text-bold"
|
|
}, "SmartCredit", -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_13 = {
|
|
"class": "text-white text-bold"
|
|
};
|
|
var _hoisted_14 = {
|
|
"class": "col-xs-12 col-sm-12 col-md-4 col-lg-4"
|
|
};
|
|
var _hoisted_15 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
"class": "shape"
|
|
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
"class": "shape-text"
|
|
}, "50%")], -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_16 = {
|
|
"class": "listing-content"
|
|
};
|
|
var _hoisted_17 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", {
|
|
"class": "lead text-success text-bold"
|
|
}, "SmartCredit", -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_18 = {
|
|
"class": "text-success text-bold"
|
|
};
|
|
var _hoisted_19 = {
|
|
"class": "col-xs-12 col-sm-12 col-md-4 col-lg-4"
|
|
};
|
|
var _hoisted_20 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createStaticVNode)("<div class=\"shape\" data-v-7b3e7646><div class=\"shape-text\" data-v-7b3e7646>hot</div></div><div class=\"listing-content\" data-v-7b3e7646><h3 class=\"lead text-danger text-bold\" data-v-7b3e7646>Identity IQ</h3><p class=\"text-danger text-bold\" data-v-7b3e7646>Unavailable at this time </p></div>", 2);
|
|
var _hoisted_22 = [_hoisted_20];
|
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
var _component_Step = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Step");
|
|
var _component_TopArea = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("TopArea");
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_4, [_hoisted_5, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Step, {
|
|
step: "3"
|
|
})]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_6, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_7, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_TopArea)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_8, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_9, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
onClick: _cache[0] || (_cache[0] = function ($event) {
|
|
return $options.getPackage(1);
|
|
}),
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["listing listing-radius listing-primary package-1", {
|
|
'listing-highlight': $data.is_highlight1
|
|
}])
|
|
}, [_hoisted_10, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_11, [_hoisted_12, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_13, "$" + (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data["package"].prices[1]) + " (Basic)", 1 /* TEXT */)])], 2 /* CLASS */)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_14, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
onMouseover: _cache[1] || (_cache[1] = function () {
|
|
return $options.toggleClassForPackage && $options.toggleClassForPackage.apply($options, arguments);
|
|
}),
|
|
onClick: _cache[2] || (_cache[2] = function ($event) {
|
|
return $options.getPackage(2);
|
|
}),
|
|
"class": "listing listing-radius listing-success"
|
|
}, [_hoisted_15, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_16, [_hoisted_17, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_18, "$" + (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data["package"].prices[2]) + " (Premium)", 1 /* TEXT */)])], 32 /* HYDRATE_EVENTS */)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_19, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
onMouseover: _cache[3] || (_cache[3] = function () {
|
|
return $options.toggleClassForPackage && $options.toggleClassForPackage.apply($options, arguments);
|
|
}),
|
|
onClick: _cache[4] || (_cache[4] = function ($event) {
|
|
return $options.getPackage(3);
|
|
}),
|
|
"class": "listing listing-danger listing-radius"
|
|
}, _hoisted_22, 32 /* HYDRATE_EVENTS */)])])])])])]);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateAccount.vue?vue&type=template&id=bd535982&scoped=true":
|
|
/*!********************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateAccount.vue?vue&type=template&id=bd535982&scoped=true ***!
|
|
\********************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* binding */ render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
var _withScopeId = function _withScopeId(n) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-bd535982"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
|
|
};
|
|
var _hoisted_1 = {
|
|
"class": "container"
|
|
};
|
|
var _hoisted_2 = {
|
|
"class": "card"
|
|
};
|
|
var _hoisted_3 = {
|
|
"class": "form"
|
|
};
|
|
var _hoisted_4 = {
|
|
"class": "left-side"
|
|
};
|
|
var _hoisted_5 = {
|
|
"class": "left-heading"
|
|
};
|
|
var _hoisted_6 = {
|
|
"class": "right-side"
|
|
};
|
|
var _hoisted_7 = {
|
|
"class": "main active"
|
|
};
|
|
var _hoisted_8 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
"class": "text"
|
|
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", null, "Creating your account only takes a few seconds."), /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", null, "Let's start with some basic info.")], -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_9 = {
|
|
key: 0,
|
|
"class": "text"
|
|
};
|
|
var _hoisted_10 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", {
|
|
"class": "error-text"
|
|
}, "All fields are required", -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_11 = [_hoisted_10];
|
|
var _hoisted_12 = {
|
|
key: 1,
|
|
"class": "text"
|
|
};
|
|
var _hoisted_13 = {
|
|
"class": "error-text"
|
|
};
|
|
var _hoisted_14 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_15 = ["backend", "errors", "className"];
|
|
var _hoisted_16 = ["backend", "errors", "className"];
|
|
var _hoisted_17 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_18 = ["errors", "className"];
|
|
var _hoisted_19 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_20 = ["backend", "errors", "className"];
|
|
var _hoisted_21 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_22 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_23 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", {
|
|
style: {
|
|
"font-weight": "bold",
|
|
"color": "purple",
|
|
"font-size": "12px",
|
|
"margin-top": "5px"
|
|
}
|
|
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" By clicking on the \"Next \" button on the left, I acknowledge that I have read the Service Agreement, "), /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", {
|
|
href: "/terms-of-service",
|
|
target: "_blank"
|
|
}, "Terms of Use"), /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" and "), /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", {
|
|
href: "/terms-of-service",
|
|
target: "_blank"
|
|
}, "Privacy Policy"), /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" , and that I agree to their terms. ")], -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_24 = {
|
|
"class": "buttons"
|
|
};
|
|
var _hoisted_25 = ["disabled"];
|
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
var _component_Step = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Step");
|
|
var _component_TopArea = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("TopArea");
|
|
var _component_VueRecaptcha = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("VueRecaptcha");
|
|
var _component_Footer = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Footer");
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_5, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data.company_Name), 1 /* TEXT */)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Step, {
|
|
step: "1"
|
|
})]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_6, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("form", {
|
|
onSubmit: _cache[6] || (_cache[6] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function () {
|
|
return $options.createAccount && $options.createAccount.apply($options, arguments);
|
|
}, ["prevent"])),
|
|
autocomplete: "off",
|
|
"class": "form-element was-validated form-element--login",
|
|
method: "post",
|
|
id: "createAccountForm",
|
|
novalidate: "novalidate"
|
|
}, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_7, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_TopArea), _hoisted_8, $data.isButtonDisabled ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_9, _hoisted_11)) : $data.errorMsg.message ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_12, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_13, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data.errorMsg.message[0]), 1 /* TEXT */)])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_14, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
type: "text",
|
|
placeholder: "First Name",
|
|
name: "first_name",
|
|
backend: $data.errors.first_name,
|
|
errors: $setup.v$.formData.first_name.$errors,
|
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) {
|
|
return $data.formData.first_name = $event;
|
|
}),
|
|
rules: ['required'],
|
|
className: {
|
|
'warning': $data.errors.first_name
|
|
}
|
|
}, null, 8 /* PROPS */, _hoisted_15), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $data.formData.first_name]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
type: "text",
|
|
placeholder: "Last Name",
|
|
name: "last_name",
|
|
backend: $data.errors.last_name,
|
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) {
|
|
return $data.formData.last_name = $event;
|
|
}),
|
|
errors: $setup.v$.formData.last_name.$errors,
|
|
rules: ['required'],
|
|
className: {
|
|
'warning': $data.errors.last_name
|
|
}
|
|
}, null, 8 /* PROPS */, _hoisted_16), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $data.formData.last_name]])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_17, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
type: "text",
|
|
placeholder: "Email",
|
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = function ($event) {
|
|
return $data.formData.email = $event;
|
|
}),
|
|
errors: $setup.v$.formData.email.$errors,
|
|
rules: ['required', 'email'],
|
|
className: {
|
|
'warning': $data.errors.email
|
|
}
|
|
}, null, 8 /* PROPS */, _hoisted_18), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $data.formData.email]])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_19, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
type: "password",
|
|
placeholder: "Password",
|
|
backend: $data.errors.password,
|
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = function ($event) {
|
|
return $data.formData.password = $event;
|
|
}),
|
|
errors: $setup.v$.formData.password.$errors,
|
|
rules: ['required', 'password'],
|
|
className: {
|
|
'warning': $data.errors.password
|
|
}
|
|
}, null, 8 /* PROPS */, _hoisted_20), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $data.formData.password]])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_21, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_VueRecaptcha, {
|
|
sitekey: $data.siteKey,
|
|
"load-recaptcha-script": true,
|
|
onVerify: $options.handleSuccess,
|
|
onError: $options.handleError
|
|
}, null, 8 /* PROPS */, ["sitekey", "onVerify", "onError"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_22, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
type: "checkbox",
|
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = function ($event) {
|
|
return $data.formData.is_click_acknowledge = $event;
|
|
}),
|
|
onChange: _cache[5] || (_cache[5] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function ($event) {
|
|
return $options.checkClickAcknowledge($event);
|
|
}, ["prevent"]))
|
|
}, null, 544 /* HYDRATE_EVENTS, NEED_PATCH */), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelCheckbox, $data.formData.is_click_acknowledge]]), _hoisted_23]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_24, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", {
|
|
disabled: $setup.v$.formData.$invalid,
|
|
type: "submit",
|
|
value: "Next",
|
|
"class": "next_button"
|
|
}, "Next Step", 8 /* PROPS */, _hoisted_25)])])], 32 /* HYDRATE_EVENTS */)])])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Footer)], 64 /* STABLE_FRAGMENT */);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateCreditReportAccount.vue?vue&type=template&id=cbb5871c&scoped=true":
|
|
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateCreditReportAccount.vue?vue&type=template&id=cbb5871c&scoped=true ***!
|
|
\********************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* binding */ render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
var _withScopeId = function _withScopeId(n) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-cbb5871c"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
|
|
};
|
|
var _hoisted_1 = {
|
|
"class": "container"
|
|
};
|
|
var _hoisted_2 = {
|
|
"class": "card"
|
|
};
|
|
var _hoisted_3 = {
|
|
"class": "form"
|
|
};
|
|
var _hoisted_4 = {
|
|
"class": "left-side"
|
|
};
|
|
var _hoisted_5 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
"class": "left-heading"
|
|
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", null, "Creditzombies")], -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_6 = {
|
|
"class": "right-side"
|
|
};
|
|
var _hoisted_7 = {
|
|
"class": "main active"
|
|
};
|
|
var _hoisted_8 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
"class": "text"
|
|
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h2", null, "Please input your smart credit email and password"), /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", null, "Let's start with some basic info.")], -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_9 = {
|
|
key: 0,
|
|
"class": "text"
|
|
};
|
|
var _hoisted_10 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", {
|
|
style: {
|
|
"color": "red",
|
|
"text-align": "center"
|
|
}
|
|
}, "All fields are required", -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_11 = [_hoisted_10];
|
|
var _hoisted_12 = {
|
|
key: 1,
|
|
"class": "text"
|
|
};
|
|
var _hoisted_13 = {
|
|
style: {
|
|
"color": "red",
|
|
"text-align": "center"
|
|
}
|
|
};
|
|
var _hoisted_14 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_15 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_16 = {
|
|
"class": "edit-text"
|
|
};
|
|
var _hoisted_17 = ["readonly"];
|
|
var _hoisted_18 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_19 = {
|
|
"class": "edit-text"
|
|
};
|
|
var _hoisted_20 = ["readonly"];
|
|
var _hoisted_21 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_22 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_23 = {
|
|
"class": "edit-text"
|
|
};
|
|
var _hoisted_24 = ["readonly"];
|
|
var _hoisted_25 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_26 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_27 = {
|
|
"class": "buttons",
|
|
style: {
|
|
"text-align": "center"
|
|
}
|
|
};
|
|
var _hoisted_28 = ["disabled"];
|
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
var _component_Step = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Step");
|
|
var _component_TopArea = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("TopArea");
|
|
var _component_ValidationError = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("ValidationError");
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_4, [_hoisted_5, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Step, {
|
|
step: "3"
|
|
})]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_6, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("form", {
|
|
onSubmit: _cache[16] || (_cache[16] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function () {}, ["prevent"])),
|
|
autocomplete: "off",
|
|
"class": "form-element was-validated form-element--login",
|
|
method: "post",
|
|
novalidate: "novalidate"
|
|
}, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_7, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_TopArea), _hoisted_8, $setup.isButtonDisabled ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_9, _hoisted_11)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $setup.errorMsg.message ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_12, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_13, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($setup.errorMsg.message[0]), 1 /* TEXT */)])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_14, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_15, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_16, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", {
|
|
href: "#",
|
|
onClick: _cache[0] || (_cache[0] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function ($event) {
|
|
return $setup.editable('fname');
|
|
}, ["prevent"]))
|
|
}, "Edit")]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
readonly: $setup.inputReadOnly.fname,
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $setup.errors.first_name
|
|
}),
|
|
placeholder: "First Name",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) {
|
|
return $setup.formData.first_name = $event;
|
|
}),
|
|
onKeyup: _cache[2] || (_cache[2] = function () {
|
|
return $setup.validateInput && $setup.validateInput.apply($setup, arguments);
|
|
}),
|
|
onBlur: _cache[3] || (_cache[3] = function () {
|
|
return $setup.validateInput && $setup.validateInput.apply($setup, arguments);
|
|
})
|
|
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_17), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.formData.first_name]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
msg: $setup.errors.first_name
|
|
}, null, 8 /* PROPS */, ["msg"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_18, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_19, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", {
|
|
href: "#",
|
|
onClick: _cache[4] || (_cache[4] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function ($event) {
|
|
return $setup.editable('lname');
|
|
}, ["prevent"]))
|
|
}, "Edit")]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
readonly: $setup.inputReadOnly.lname,
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $setup.errors.last_name
|
|
}),
|
|
placeholder: "Last Name",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = function ($event) {
|
|
return $setup.formData.last_name = $event;
|
|
}),
|
|
onKeyup: _cache[6] || (_cache[6] = function () {
|
|
return $setup.validateInput && $setup.validateInput.apply($setup, arguments);
|
|
}),
|
|
onBlur: _cache[7] || (_cache[7] = function () {
|
|
return $setup.validateInput && $setup.validateInput.apply($setup, arguments);
|
|
})
|
|
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_20), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.formData.last_name]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
msg: $setup.errors.last_name
|
|
}, null, 8 /* PROPS */, ["msg"])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_21, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_22, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_23, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", {
|
|
href: "#",
|
|
onClick: _cache[8] || (_cache[8] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function ($event) {
|
|
return $setup.editable('email');
|
|
}, ["prevent"]))
|
|
}, "Edit")]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
readonly: $setup.inputReadOnly.email,
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $setup.errors.email
|
|
}),
|
|
placeholder: "Email",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[9] || (_cache[9] = function ($event) {
|
|
return $setup.formData.email = $event;
|
|
}),
|
|
onKeyup: _cache[10] || (_cache[10] = function () {
|
|
return $setup.validateInput && $setup.validateInput.apply($setup, arguments);
|
|
}),
|
|
onBlur: _cache[11] || (_cache[11] = function () {
|
|
return $setup.validateInput && $setup.validateInput.apply($setup, arguments);
|
|
})
|
|
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_24), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.formData.email]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
msg: $setup.errors.email
|
|
}, null, 8 /* PROPS */, ["msg"])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_25, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_26, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $setup.errors.password
|
|
}),
|
|
placeholder: "Password",
|
|
type: "password",
|
|
"onUpdate:modelValue": _cache[12] || (_cache[12] = function ($event) {
|
|
return $setup.formData.password = $event;
|
|
}),
|
|
onKeyup: _cache[13] || (_cache[13] = function () {
|
|
return $setup.validateInput && $setup.validateInput.apply($setup, arguments);
|
|
}),
|
|
onBlur: _cache[14] || (_cache[14] = function () {
|
|
return $setup.validateInput && $setup.validateInput.apply($setup, arguments);
|
|
})
|
|
}, null, 34 /* CLASS, HYDRATE_EVENTS */), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.formData.password]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
msg: $setup.errors.password
|
|
}, null, 8 /* PROPS */, ["msg"])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_27, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", {
|
|
disabled: $setup.isButtonDisabled,
|
|
onClick: _cache[15] || (_cache[15] = function () {
|
|
return $setup.importCreditReport && $setup.importCreditReport.apply($setup, arguments);
|
|
}),
|
|
type: "button",
|
|
value: "Next",
|
|
"class": "next_button"
|
|
}, "Import Credit Report", 8 /* PROPS */, _hoisted_28)])])], 32 /* HYDRATE_EVENTS */)])])])]);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/Footer.vue?vue&type=template&id=bc338846":
|
|
/*!*************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/Footer.vue?vue&type=template&id=bc338846 ***!
|
|
\*************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* binding */ render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
var _hoisted_1 = {
|
|
"class": "panel panel-default",
|
|
style: {
|
|
"text-align": "center",
|
|
"padding": "10px"
|
|
}
|
|
};
|
|
var _hoisted_2 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("strong", null, " Secure SSL Area | This website is protected by secure portal © 2025 Clickletters LLC/M2C Academy LLC. All rights reserved. ", -1 /* HOISTED */);
|
|
var _hoisted_3 = [_hoisted_2];
|
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, _hoisted_3);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/IdentityIQPkg.vue?vue&type=template&id=f0648e98":
|
|
/*!********************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/IdentityIQPkg.vue?vue&type=template&id=f0648e98 ***!
|
|
\********************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* binding */ render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
var _hoisted_1 = {
|
|
"class": "smart-credit-pkg"
|
|
};
|
|
var _hoisted_2 = {
|
|
"class": "link-area"
|
|
};
|
|
var _hoisted_3 = ["href"];
|
|
var _hoisted_4 = {
|
|
style: {
|
|
"margin-top": "40%"
|
|
},
|
|
"class": "report-card p-3 report-card--best report-card__aside mt-5 report-card--info"
|
|
};
|
|
var _hoisted_5 = {
|
|
"class": "report-card__header pb-3"
|
|
};
|
|
var _hoisted_6 = ["src"];
|
|
var _hoisted_7 = {
|
|
"class": "report-card__points py-2 pt-3"
|
|
};
|
|
var _hoisted_8 = {
|
|
"class": "points"
|
|
};
|
|
var _hoisted_9 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
|
|
"class": "fas fa-check-circle"
|
|
}, null, -1 /* HOISTED */);
|
|
var _hoisted_10 = {
|
|
"class": "report-card__points py-2"
|
|
};
|
|
var _hoisted_11 = {
|
|
"class": "points"
|
|
};
|
|
var _hoisted_12 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
|
|
"class": "fas fa-check-circle"
|
|
}, null, -1 /* HOISTED */);
|
|
var _hoisted_13 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
"class": "report-card__text py-2"
|
|
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", null, " Includes Full 6 Wave attacks, that will allow you to effectively and efficiently challenge all inaccurate negative items with a click of a button in 45 seconds or less. ")], -1 /* HOISTED */);
|
|
var _hoisted_14 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
"class": "report-card__action"
|
|
}, null, -1 /* HOISTED */);
|
|
|
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", {
|
|
href: "".concat($data.app_base_url, "/login")
|
|
}, " Already a member? Log In ", 8 /* PROPS */, _hoisted_3)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_5, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h5", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("strong", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("img", {
|
|
src: "".concat($data.img_url),
|
|
alt: "SmartCredit",
|
|
"class": "provider-logo"
|
|
}, null, 8 /* PROPS */, _hoisted_6), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" " + (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data["package"].labels[$props.package_id]), 1 /* TEXT */)])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <div class=\"report-card__price p-2\">"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <h4> ${{package.prices[package_id]}}/mo </h4>"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <span> Cancel Anytime </span>"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" </div>"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_7, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("ul", _hoisted_8, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("li", null, [_hoisted_9, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("strong", null, " Unlimited " + (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data.company_Name) + " Challenges/Letter Attacks ", 1 /* TEXT */)])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_10, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("ul", _hoisted_11, [((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($data.reportProviders.IdentityIQPoints, function (subitem) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("li", null, [_hoisted_12, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" " + (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(subitem), 1 /* TEXT */)]);
|
|
}), 256 /* UNKEYED_FRAGMENT */))])]), _hoisted_13, _hoisted_14])]);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/IdentityIqLogo.vue?vue&type=template&id=31feba93":
|
|
/*!*********************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/IdentityIqLogo.vue?vue&type=template&id=31feba93 ***!
|
|
\*********************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* binding */ render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
var _hoisted_1 = {
|
|
"class": "smart-credit-logo"
|
|
};
|
|
var _hoisted_2 = ["src"];
|
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("img", {
|
|
src: "".concat($data.img_url),
|
|
"class": "provider-logo",
|
|
alt: ""
|
|
}, null, 8 /* PROPS */, _hoisted_2), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("strong", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data["package"].labels[$props.package_id]), 1 /* TEXT */)]);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/MakePayment.vue?vue&type=template&id=59807834&scoped=true":
|
|
/*!******************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/MakePayment.vue?vue&type=template&id=59807834&scoped=true ***!
|
|
\******************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* binding */ render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
var _withScopeId = function _withScopeId(n) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-59807834"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
|
|
};
|
|
var _hoisted_1 = {
|
|
"class": "container"
|
|
};
|
|
var _hoisted_2 = {
|
|
"class": "card"
|
|
};
|
|
var _hoisted_3 = {
|
|
"class": "form"
|
|
};
|
|
var _hoisted_4 = {
|
|
"class": "left-side"
|
|
};
|
|
var _hoisted_5 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
"class": "left-heading"
|
|
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", null, "Creditzombies")], -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_6 = {
|
|
"class": "right-side"
|
|
};
|
|
var _hoisted_7 = {
|
|
"class": "main active"
|
|
};
|
|
var _hoisted_8 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
"class": "text"
|
|
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h2", null, " Credit Counsel Elite Partnered with SmartCredit"), /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", null, "Let's start with some basic info.")], -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_9 = {
|
|
key: 0,
|
|
"class": "text",
|
|
style: {
|
|
"margin-top": "10px"
|
|
}
|
|
};
|
|
var _hoisted_10 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", {
|
|
style: {
|
|
"color": "red",
|
|
"text-align": "center"
|
|
}
|
|
}, "All fields are required", -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_11 = [_hoisted_10];
|
|
var _hoisted_12 = {
|
|
key: 1,
|
|
"class": "text"
|
|
};
|
|
var _hoisted_13 = {
|
|
style: {
|
|
"color": "red",
|
|
"text-align": "center"
|
|
}
|
|
};
|
|
var _hoisted_14 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_15 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_16 = ["readonly"];
|
|
var _hoisted_17 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_18 = ["readonly"];
|
|
var _hoisted_19 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_20 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_21 = ["readonly"];
|
|
var _hoisted_22 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_23 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_24 = ["readonly"];
|
|
var _hoisted_25 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_26 = ["readonly"];
|
|
var _hoisted_27 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_28 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_29 = ["maxlength", "readonly"];
|
|
var _hoisted_30 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_31 = ["readonly"];
|
|
var _hoisted_32 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_33 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_34 = ["readonly"];
|
|
var _hoisted_35 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_36 = ["readonly"];
|
|
var _hoisted_37 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_38 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_39 = ["readonly"];
|
|
var _hoisted_40 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_41 = ["aria-readonly"];
|
|
var _hoisted_42 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("option", {
|
|
value: ""
|
|
}, "Please select state", -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_43 = ["value"];
|
|
var _hoisted_44 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_45 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_46 = ["readonly"];
|
|
var _hoisted_47 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_48 = ["readonly"];
|
|
var _hoisted_49 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
"class": "text"
|
|
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", null, "Provide Card Information")], -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_50 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_51 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_52 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_53 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_54 = {
|
|
"class": "input-text",
|
|
style: {
|
|
"gap": "5px"
|
|
}
|
|
};
|
|
var _hoisted_55 = {
|
|
style: {
|
|
"font-weight": "bold",
|
|
"color": "purple",
|
|
"font-size": "12px",
|
|
"margin-top": "15px"
|
|
}
|
|
};
|
|
var _hoisted_56 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", {
|
|
href: "/terms-of-service",
|
|
target: "_blank"
|
|
}, "SmartCredit terms of services", -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_57 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_58 = {
|
|
"class": "input-div buttons",
|
|
style: {
|
|
"text-align": "center"
|
|
}
|
|
};
|
|
var _hoisted_59 = ["disabled"];
|
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
var _component_Step = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Step");
|
|
var _component_TopArea = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("TopArea");
|
|
var _component_SmartCreditLogo = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("SmartCreditLogo");
|
|
var _component_ValidationError = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("ValidationError");
|
|
var _component_SmartCreditPkg = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("SmartCreditPkg");
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_4, [_hoisted_5, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Step, {
|
|
step: "3"
|
|
})]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_6, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("form", {
|
|
onSubmit: _cache[22] || (_cache[22] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function () {
|
|
return $options.makePayment && $options.makePayment.apply($options, arguments);
|
|
}, ["prevent"])),
|
|
autocomplete: "off",
|
|
"class": "form-element was-validated form-element--login",
|
|
method: "post",
|
|
novalidate: "novalidate"
|
|
}, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_7, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_TopArea, {
|
|
is_show_login: false
|
|
}), _hoisted_8, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_SmartCreditLogo, {
|
|
package_id: $data.formData.package_id
|
|
}, null, 8 /* PROPS */, ["package_id"]), _ctx.isButtonDisabled ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_9, _hoisted_11)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $data.message ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_12, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_13, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data.message[0]), 1 /* TEXT */)])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_14, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_15, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "first_name",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $setup.v$.formData.first_name.$errors.length
|
|
}),
|
|
placeholder: "First Name",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) {
|
|
return $data.formData.first_name = $event;
|
|
}),
|
|
readonly: $data.disabled == 1
|
|
}, null, 10 /* CLASS, PROPS */, _hoisted_16), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $data.formData.first_name]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.first_name,
|
|
msg: $setup.v$.formData.first_name.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_17, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "last_name",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $setup.v$.formData.last_name.$errors.length
|
|
}),
|
|
placeholder: "Last Name",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) {
|
|
return $setup.v$.formData.last_name.$model = $event;
|
|
}),
|
|
readonly: $data.disabled == 1
|
|
}, null, 10 /* CLASS, PROPS */, _hoisted_18), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.last_name.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.last_name,
|
|
msg: $setup.v$.formData.last_name.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_19, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_20, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "email",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.email
|
|
}),
|
|
placeholder: "Email",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = function ($event) {
|
|
return $setup.v$.formData.email.$model = $event;
|
|
}),
|
|
readonly: $data.disabled == 1
|
|
}, null, 10 /* CLASS, PROPS */, _hoisted_21), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.email.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.email,
|
|
msg: $setup.v$.formData.email.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_22, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_23, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "password",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.password
|
|
}),
|
|
placeholder: "Password",
|
|
type: "password",
|
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = function ($event) {
|
|
return $setup.v$.formData.password.$model = $event;
|
|
}),
|
|
readonly: $data.disabled == 1
|
|
}, null, 10 /* CLASS, PROPS */, _hoisted_24), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.password.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.password,
|
|
msg: $setup.v$.formData.password.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_25, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "phone",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.phone
|
|
}),
|
|
placeholder: "Phone, e,g. 954-604-4220",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = function ($event) {
|
|
return $setup.v$.formData.phone.$model = $event;
|
|
}),
|
|
readonly: $data.disabled == 1
|
|
}, null, 10 /* CLASS, PROPS */, _hoisted_26), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.phone.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.phone,
|
|
msg: $setup.v$.formData.phone.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_27, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_28, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "full_ssn",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.full_ssn
|
|
}),
|
|
placeholder: "Full SSN e.g, 555-55-5555",
|
|
type: "text",
|
|
onKeyup: _cache[5] || (_cache[5] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function ($event) {
|
|
return $options.ssnCompleted($event);
|
|
}, ["prevent"])),
|
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = function ($event) {
|
|
return $setup.v$.formData.full_ssn.$model = $event;
|
|
}),
|
|
maxlength: $data.min,
|
|
readonly: $data.disabled == 1
|
|
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_29), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.full_ssn.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.full_ssn,
|
|
msg: $setup.v$.formData.full_ssn.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_30, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "birth_date",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.birth_date
|
|
}),
|
|
placeholder: "Birth Date e.g, mm/dd/yyyy",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[7] || (_cache[7] = function ($event) {
|
|
return $setup.v$.formData.birth_date.$model = $event;
|
|
}),
|
|
onKeyup: _cache[8] || (_cache[8] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function ($event) {
|
|
return $options.birthDateCompleted($event);
|
|
}, ["prevent"])),
|
|
maxlength: 10,
|
|
readonly: $data.disabled == 1
|
|
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_31), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.birth_date.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.birth_date,
|
|
msg: $setup.v$.formData.birth_date.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_32, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_33, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "street_no",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.street_no
|
|
}),
|
|
placeholder: "Street No.",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[9] || (_cache[9] = function ($event) {
|
|
return $setup.v$.formData.street_no.$model = $event;
|
|
}),
|
|
readonly: $data.disabled == 1
|
|
}, null, 10 /* CLASS, PROPS */, _hoisted_34), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.street_no.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.street_no,
|
|
msg: $setup.v$.formData.street_no.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_35, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "street_name",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.street_name
|
|
}),
|
|
placeholder: "Street Name",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[10] || (_cache[10] = function ($event) {
|
|
return $setup.v$.formData.street_name.$model = $event;
|
|
}),
|
|
readonly: $data.disabled == 1
|
|
}, null, 10 /* CLASS, PROPS */, _hoisted_36), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.street_name.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.street_name,
|
|
msg: $setup.v$.formData.street_name.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_37, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_38, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "city",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.city
|
|
}),
|
|
placeholder: "City",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[11] || (_cache[11] = function ($event) {
|
|
return $setup.v$.formData.city.$model = $event;
|
|
}),
|
|
readonly: $data.disabled == 1
|
|
}, null, 10 /* CLASS, PROPS */, _hoisted_39), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.city.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.city,
|
|
msg: $setup.v$.formData.city.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_40, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("select", {
|
|
ref: "state",
|
|
"onUpdate:modelValue": _cache[12] || (_cache[12] = function ($event) {
|
|
return $setup.v$.formData.state.$model = $event;
|
|
}),
|
|
"aria-readonly": $data.disabled
|
|
}, [_hoisted_42, ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($data.stateList, function (item) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("option", {
|
|
key: item.id,
|
|
value: item.id
|
|
}, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(item.value), 9 /* TEXT, PROPS */, _hoisted_43);
|
|
}), 128 /* KEYED_FRAGMENT */))], 8 /* PROPS */, _hoisted_41), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelSelect, $setup.v$.formData.state.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.state,
|
|
msg: $setup.v$.formData.state.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_44, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_45, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "zip_code",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.zip_code
|
|
}),
|
|
placeholder: "Zip Code",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[13] || (_cache[13] = function ($event) {
|
|
return $setup.v$.formData.zip_code.$model = $event;
|
|
}),
|
|
readonly: $data.disabled == 1
|
|
}, null, 10 /* CLASS, PROPS */, _hoisted_46), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.zip_code.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.zip_code,
|
|
msg: $setup.v$.formData.zip_code.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_47, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
ref: "ssn",
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.ssn
|
|
}),
|
|
placeholder: "SSN",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[14] || (_cache[14] = function ($event) {
|
|
return $setup.v$.formData.ssn.$model = $event;
|
|
}),
|
|
maxlength: 4,
|
|
onKeyup: _cache[15] || (_cache[15] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function ($event) {
|
|
return $options.ssnCompleted($event);
|
|
}, ["prevent"])),
|
|
readonly: $data.disabled == 1
|
|
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_48), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.ssn.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.ssn,
|
|
msg: $setup.v$.formData.ssn.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])])]), _hoisted_49, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_50, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_51, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.card_number
|
|
}),
|
|
placeholder: "Card Number",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[16] || (_cache[16] = function ($event) {
|
|
return $setup.v$.formData.card_number.$model = $event;
|
|
})
|
|
}, null, 2 /* CLASS */), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.card_number.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.card_number,
|
|
msg: $setup.v$.formData.card_number.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_52, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.expiry
|
|
}),
|
|
placeholder: "Expiry e.g mm/yy",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[17] || (_cache[17] = function ($event) {
|
|
return $setup.v$.formData.expiry.$model = $event;
|
|
}),
|
|
onKeyup: _cache[18] || (_cache[18] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function ($event) {
|
|
return $options.cardExpiryCompleted($event);
|
|
}, ["prevent"])),
|
|
maxlength: 5
|
|
}, null, 34 /* CLASS, HYDRATE_EVENTS */), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.expiry.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.expiry,
|
|
msg: $setup.v$.formData.expiry.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_53, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.amount
|
|
}),
|
|
placeholder: "Amount",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[19] || (_cache[19] = function ($event) {
|
|
return $setup.v$.formData.amount.$model = $event;
|
|
}),
|
|
disabled: "disabled"
|
|
}, null, 2 /* CLASS */), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $setup.v$.formData.amount.$model]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ValidationError, {
|
|
backend: $data.errors.amount,
|
|
msg: $setup.v$.formData.amount.$errors
|
|
}, null, 8 /* PROPS */, ["backend", "msg"])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_54, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
type: "checkbox",
|
|
"onUpdate:modelValue": _cache[20] || (_cache[20] = function ($event) {
|
|
return $data.formData.is_authorized = $event;
|
|
}),
|
|
onChange: _cache[21] || (_cache[21] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function ($event) {
|
|
return $options.checkTermsAndService($event);
|
|
}, ["prevent"]))
|
|
}, null, 544 /* HYDRATE_EVENTS, NEED_PATCH */), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelCheckbox, $data.formData.is_authorized]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", _hoisted_55, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" Yes I have read the "), _hoisted_56, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" for this purchase and I totally Agree and Authorize this Charge of $" + (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data.formData.amount), 1 /* TEXT */)])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_57, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_58, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", {
|
|
disabled: $setup.v$.formData.$invalid,
|
|
ref: "purchase-btn",
|
|
type: "submit",
|
|
value: "Next",
|
|
"class": "next_button"
|
|
}, " Purchase ", 8 /* PROPS */, _hoisted_59)])])])], 32 /* HYDRATE_EVENTS */)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_SmartCreditPkg, {
|
|
package_id: $data.formData.package_id
|
|
}, null, 8 /* PROPS */, ["package_id"])])])]);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/PaymentModal.vue?vue&type=template&id=68f715ee":
|
|
/*!*******************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/PaymentModal.vue?vue&type=template&id=68f715ee ***!
|
|
\*******************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* binding */ render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
var _hoisted_1 = {
|
|
"class": "modal-backdrop",
|
|
id: "payment-modal-view"
|
|
};
|
|
var _hoisted_2 = {
|
|
"class": "modal"
|
|
};
|
|
var _hoisted_3 = {
|
|
"class": "modal-body"
|
|
};
|
|
var _hoisted_4 = {
|
|
"class": "row body",
|
|
id: "payment-modal"
|
|
};
|
|
var _hoisted_5 = {
|
|
"class": "center"
|
|
};
|
|
var _hoisted_6 = {
|
|
"class": "payment-container"
|
|
};
|
|
var _hoisted_7 = {
|
|
"class": "row"
|
|
};
|
|
var _hoisted_8 = {
|
|
key: 0,
|
|
"class": "col-50 text",
|
|
style: {
|
|
"text-align": "center"
|
|
}
|
|
};
|
|
var _hoisted_9 = {
|
|
style: {
|
|
"color": "red",
|
|
"text-align": "center",
|
|
"margin-top": "-20px"
|
|
}
|
|
};
|
|
var _hoisted_10 = {
|
|
"class": "row header-panel"
|
|
};
|
|
var _hoisted_11 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
"class": "row"
|
|
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", {
|
|
"class": "top-text"
|
|
}, "$24.97/mo Cancel Anytime")], -1 /* HOISTED */);
|
|
var _hoisted_12 = {
|
|
"class": "row"
|
|
};
|
|
var _hoisted_13 = {
|
|
"class": "col-50"
|
|
};
|
|
var _hoisted_14 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", {
|
|
"class": "text-center-sm",
|
|
style: {
|
|
"padding-bottom": "10px"
|
|
}
|
|
}, "Billing Information", -1 /* HOISTED */);
|
|
var _hoisted_15 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", {
|
|
"for": "fname",
|
|
"class": "text-center-sm"
|
|
}, "Customer Information", -1 /* HOISTED */);
|
|
var _hoisted_16 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", {
|
|
"for": "fname"
|
|
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
|
|
"class": "fa fa-user"
|
|
}), /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" Full Name")], -1 /* HOISTED */);
|
|
var _hoisted_17 = ["backend"];
|
|
var _hoisted_18 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", {
|
|
"for": "email"
|
|
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
|
|
"class": "fa fa-envelope"
|
|
}), /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" Email")], -1 /* HOISTED */);
|
|
var _hoisted_19 = ["backend"];
|
|
var _hoisted_20 = {
|
|
key: 0,
|
|
"class": "invalid-feedback"
|
|
};
|
|
var _hoisted_21 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", {
|
|
"for": "city"
|
|
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
|
|
"class": "fa fa-institution"
|
|
}), /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" City")], -1 /* HOISTED */);
|
|
var _hoisted_22 = ["backend"];
|
|
var _hoisted_23 = {
|
|
"class": "row"
|
|
};
|
|
var _hoisted_24 = {
|
|
"class": "col-50"
|
|
};
|
|
var _hoisted_25 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", {
|
|
"for": "state"
|
|
}, "State", -1 /* HOISTED */);
|
|
var _hoisted_26 = ["backend"];
|
|
var _hoisted_27 = {
|
|
"class": "col-50"
|
|
};
|
|
var _hoisted_28 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", {
|
|
"for": "zip"
|
|
}, "Zip", -1 /* HOISTED */);
|
|
var _hoisted_29 = ["backend"];
|
|
var _hoisted_30 = {
|
|
"class": "col-50"
|
|
};
|
|
var _hoisted_31 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", {
|
|
"class": "text-center-sm",
|
|
style: {
|
|
"margin-bottom": "10px"
|
|
}
|
|
}, "Payment", -1 /* HOISTED */);
|
|
var _hoisted_32 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", {
|
|
"for": "fname",
|
|
"class": "text-center-sm"
|
|
}, "Accepted Cards", -1 /* HOISTED */);
|
|
var _hoisted_33 = {
|
|
"class": "text-center-sm",
|
|
style: {
|
|
"margin-bottom": "10px"
|
|
}
|
|
};
|
|
var _hoisted_34 = ["src"];
|
|
var _hoisted_35 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", {
|
|
"for": "ccnum"
|
|
}, "Credit card number", -1 /* HOISTED */);
|
|
var _hoisted_36 = {
|
|
"class": "row"
|
|
};
|
|
var _hoisted_37 = {
|
|
"class": "col-50"
|
|
};
|
|
var _hoisted_38 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", {
|
|
"for": "expyear"
|
|
}, "Expiry", -1 /* HOISTED */);
|
|
var _hoisted_39 = {
|
|
"class": "col-50"
|
|
};
|
|
var _hoisted_40 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", {
|
|
"for": "cvv"
|
|
}, "CVV", -1 /* HOISTED */);
|
|
var _hoisted_41 = {
|
|
"class": "row"
|
|
};
|
|
var _hoisted_42 = {
|
|
"class": "col-50"
|
|
};
|
|
var _hoisted_43 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", {
|
|
"for": "expmonth"
|
|
}, "Amount", -1 /* HOISTED */);
|
|
var _hoisted_44 = {
|
|
"class": "row"
|
|
};
|
|
var _hoisted_45 = {
|
|
"class": "col-50"
|
|
};
|
|
var _hoisted_46 = {
|
|
"class": "aggrement"
|
|
};
|
|
var _hoisted_47 = {
|
|
"class": "terms-service-text"
|
|
};
|
|
var _hoisted_48 = {
|
|
href: "/terms-of-service",
|
|
target: "_blank"
|
|
};
|
|
var _hoisted_49 = {
|
|
key: 0
|
|
};
|
|
var _hoisted_50 = {
|
|
key: 1
|
|
};
|
|
var _hoisted_51 = {
|
|
key: 0,
|
|
style: {
|
|
"color": "red",
|
|
"font-size": "12px"
|
|
}
|
|
};
|
|
var _hoisted_52 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
"class": "row"
|
|
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
"class": "col-50 text bottom-panel"
|
|
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", {
|
|
type: "submit",
|
|
value: "Pay",
|
|
"class": "btn btn2",
|
|
style: {
|
|
"width": "unset"
|
|
}
|
|
}, "Pay")])], -1 /* HOISTED */);
|
|
var _hoisted_53 = {
|
|
"class": "row"
|
|
};
|
|
var _hoisted_54 = {
|
|
"class": "col-50"
|
|
};
|
|
var _hoisted_55 = {
|
|
"class": "col-50 bottom-panel"
|
|
};
|
|
var _hoisted_56 = ["src"];
|
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
var _component_ScPartnerCzLogo = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("ScPartnerCzLogo");
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("section", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "body", {}, function () {
|
|
return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("form", {
|
|
onSubmit: _cache[13] || (_cache[13] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function () {
|
|
return $options.paymentFormSubmit && $options.paymentFormSubmit.apply($options, arguments);
|
|
}, ["prevent"])),
|
|
autocomplete: "off",
|
|
"class": "form-element was-validated form-element--login",
|
|
method: "post",
|
|
novalidate: "novalidate"
|
|
}, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_5, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_6, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_7, [$data.message ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_8, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_9, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data.message[0]), 1 /* TEXT */)])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", {
|
|
type: "button",
|
|
"class": "close",
|
|
style: {
|
|
"width": "20px",
|
|
"height": "20px"
|
|
},
|
|
onClick: _cache[0] || (_cache[0] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function () {
|
|
return $options.closePaymentModal && $options.closePaymentModal.apply($options, arguments);
|
|
}, ["prevent"]))
|
|
}, " X ")]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_10, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ScPartnerCzLogo)]), _hoisted_11, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_12, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_13, [_hoisted_14, _hoisted_15, _hoisted_16, (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
type: "text",
|
|
placeholder: "Full Name",
|
|
name: "firstname",
|
|
backend: $data.errors.full_name,
|
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) {
|
|
return $props.data.full_name = $event;
|
|
}),
|
|
rules: ['required'],
|
|
disabled: "",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.full_name
|
|
})
|
|
}, null, 10 /* CLASS, PROPS */, _hoisted_17), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $props.data.full_name]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <label class=\"text-warning\" v-text=\"errors.full_name\"></label>"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <ValidationError :backend=\"errors.full_name\" :msg=\"v$.formData.full_name.$errors\"/>"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <input type=\"text\" id=\"fname\" name=\"firstname\" placeholder=\"John M. Doe\">"), _hoisted_18, (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
type: "text",
|
|
placeholder: "john@example.com",
|
|
name: "email",
|
|
backend: $data.errors.email,
|
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = function ($event) {
|
|
return $props.data.email = $event;
|
|
}),
|
|
rules: ['required'],
|
|
disabled: "",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.email
|
|
})
|
|
}, null, 10 /* CLASS, PROPS */, _hoisted_19), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $props.data.email]]), $data.errors.email ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_20, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data.errors.email[0]), 1 /* TEXT */)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), _hoisted_21, (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
type: "text",
|
|
placeholder: "New York",
|
|
name: "city",
|
|
backend: $data.errors.city,
|
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = function ($event) {
|
|
return $props.data.city = $event;
|
|
}),
|
|
rules: ['required'],
|
|
disabled: "",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.city
|
|
})
|
|
}, null, 10 /* CLASS, PROPS */, _hoisted_22), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $props.data.city]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_23, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_24, [_hoisted_25, (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
type: "text",
|
|
placeholder: "NY",
|
|
name: "state",
|
|
backend: $data.errors.state,
|
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = function ($event) {
|
|
return $props.data.state = $event;
|
|
}),
|
|
rules: ['required'],
|
|
disabled: "",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.state
|
|
})
|
|
}, null, 10 /* CLASS, PROPS */, _hoisted_26), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $props.data.state]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <label class=\"text-warning\" v-text=\"errors.state\"></label>"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <ValidationError :backend=\"errors.state\" :msg=\"v$.formData.state.$errors\"/>"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <input type=\"text\" id=\"state\" name=\"state\" placeholder=\"NY\">")]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_27, [_hoisted_28, (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
type: "text",
|
|
placeholder: "10001",
|
|
name: "zip_code",
|
|
backend: $data.errors.zip_code,
|
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = function ($event) {
|
|
return $props.data.zip_code = $event;
|
|
}),
|
|
rules: ['required'],
|
|
disabled: "",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.zip_code
|
|
})
|
|
}, null, 10 /* CLASS, PROPS */, _hoisted_29), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $props.data.zip_code]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <ValidationError :backend=\"errors.state\" :msg=\"v$.data.state.$errors\"/>"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <input type=\"text\" id=\"zip\" name=\"zip\" placeholder=\"10001\">")])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <label class=\"text-warning\" v-text=\"errors.city\"></label>"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <ValidationError :backend=\"errors.city\" :msg=\"v$.formData.city.$errors\"/>"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <input type=\"text\" id=\"city\" name=\"city\" placeholder=\"New York\">")]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_30, [_hoisted_31, _hoisted_32, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_33, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("img", {
|
|
src: "".concat($data.app_base_url, "/img/card.png"),
|
|
alt: "card",
|
|
"class": "provider-logo",
|
|
style: {
|
|
"height": "40px"
|
|
}
|
|
}, null, 8 /* PROPS */, _hoisted_34)]), _hoisted_35, (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.card_number
|
|
}),
|
|
placeholder: "e.g, 4111111111111111",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = function ($event) {
|
|
return $props.data.card_number = $event;
|
|
})
|
|
}, null, 2 /* CLASS */), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $props.data.card_number]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <label class=\"text-warning\" v-text=\"errors.card_number\"></label>"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_36, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_37, [_hoisted_38, (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.expiry
|
|
}),
|
|
placeholder: "e.g, DD/YY",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[7] || (_cache[7] = function ($event) {
|
|
return $props.data.expiry = $event;
|
|
}),
|
|
onKeyup: _cache[8] || (_cache[8] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function ($event) {
|
|
return $options.cardExpiryCompleted($event);
|
|
}, ["prevent"])),
|
|
maxlength: 5
|
|
}, null, 34 /* CLASS, HYDRATE_EVENTS */), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $props.data.expiry]])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_39, [_hoisted_40, (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.cvv_no
|
|
}),
|
|
placeholder: "e.g, 352",
|
|
type: "text",
|
|
"onUpdate:modelValue": _cache[9] || (_cache[9] = function ($event) {
|
|
return $props.data.cvv_no = $event;
|
|
})
|
|
}, null, 2 /* CLASS */), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $props.data.cvv_no]])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_41, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_42, [_hoisted_43, (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
autocomplete: "off",
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'warning': $data.errors.amount
|
|
}),
|
|
placeholder: "amount",
|
|
type: "text",
|
|
disabled: "",
|
|
"onUpdate:modelValue": _cache[10] || (_cache[10] = function ($event) {
|
|
return $props.data.amount = $event;
|
|
})
|
|
}, null, 2 /* CLASS */), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, $props.data.amount]])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_44, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_45, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_46, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", _hoisted_47, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
"onUpdate:modelValue": _cache[11] || (_cache[11] = function ($event) {
|
|
return $props.data.is_authorized = $event;
|
|
}),
|
|
type: "checkbox",
|
|
onChange: _cache[12] || (_cache[12] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function ($event) {
|
|
return $options.checkTermsAndService($event);
|
|
}, ["prevent"]))
|
|
}, null, 544 /* HYDRATE_EVENTS, NEED_PATCH */), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelCheckbox, $props.data.is_authorized]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" Yes I have read the "), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", _hoisted_48, [$data.reportProvider === '3' ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_49, "SmartCredit")) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(), $data.reportProvider === '1' ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_50, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data.company_Name), 1 /* TEXT */)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" terms of services")]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" for this purchase and I totally Agree and Authorize this Charge of $" + (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.data.amount), 1 /* TEXT */)]), $data.message ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_51, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data.message[1]), 1 /* TEXT */)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)])])])])]), _hoisted_52, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_53, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_54, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_55, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("img", {
|
|
src: "".concat($data.app_base_url, "/img/sequrity.png"),
|
|
alt: "security",
|
|
"class": "provider-logo",
|
|
style: {
|
|
"height": "100px"
|
|
}
|
|
}, null, 8 /* PROPS */, _hoisted_56)])])])])])])], 32 /* HYDRATE_EVENTS */)];
|
|
})])])]);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditLogo.vue?vue&type=template&id=29af55ca":
|
|
/*!**********************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditLogo.vue?vue&type=template&id=29af55ca ***!
|
|
\**********************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* binding */ render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
var _hoisted_1 = {
|
|
"class": "smart-credit-logo"
|
|
};
|
|
var _hoisted_2 = ["src"];
|
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("img", {
|
|
src: "".concat($data.img_url),
|
|
"class": "provider-logo",
|
|
alt: ""
|
|
}, null, 8 /* PROPS */, _hoisted_2), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("strong", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data["package"].labels[$props.package_id]), 1 /* TEXT */)]);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkg.vue?vue&type=template&id=7968490c":
|
|
/*!*********************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkg.vue?vue&type=template&id=7968490c ***!
|
|
\*********************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* binding */ render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
var _hoisted_1 = {
|
|
"class": "smart-credit-pkg"
|
|
};
|
|
var _hoisted_2 = {
|
|
"class": "link-area"
|
|
};
|
|
var _hoisted_3 = ["href"];
|
|
var _hoisted_4 = {
|
|
style: {
|
|
"margin-top": "65%"
|
|
},
|
|
"class": "report-card p-3 report-card--best report-card__aside mt-5 report-card--info"
|
|
};
|
|
var _hoisted_5 = {
|
|
"class": "report-card__header pb-3"
|
|
};
|
|
var _hoisted_6 = ["src"];
|
|
var _hoisted_7 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createStaticVNode)("<div class=\"report-card__points py-2 pt-3\"><ul class=\"points\"><!-- <li><i class="fas fa-check-circle"></i> <strong>Unlimited Creditzombies--><!-- Challenges</strong></li>--><li><i class=\"fas fa-check-circle\"></i> <strong>Monthly 3 Bureau Reports & Scores</strong></li></ul></div><div class=\"report-card__points py-2\"><ul class=\"points\"><li><i class=\"fas fa-check-circle\"></i> Identity Theft Insurance ($1m)</li><li><i class=\"fas fa-check-circle\"></i> Credit Monitoring & Alerts (TU)</li><li><i class=\"fas fa-check-circle\"></i> ScoreTracker</li><li><i class=\"fas fa-check-circle\"></i> ScoreBuilder</li><li><i class=\"fas fa-check-circle\"></i> ScoreBoost</li><li><i class=\"fas fa-check-circle\"></i> Money Manager</li><li><i class=\"fas fa-check-circle\"></i> Smart Credit Report</li><li><i class=\"fas fa-check-circle\"></i> PrivacyMaster</li></ul></div>", 2);
|
|
var _hoisted_9 = {
|
|
"class": "report-card__text py-2"
|
|
};
|
|
var _hoisted_10 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
"class": "report-card__action"
|
|
}, null, -1 /* HOISTED */);
|
|
|
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", {
|
|
href: "".concat($data.app_base_url, "/login")
|
|
}, " Already a member? Log In ", 8 /* PROPS */, _hoisted_3)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_5, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h5", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" :src=\"`${app_base_url}/img/smartcredit_logo.png`\""), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("strong", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("img", {
|
|
src: "".concat($data.img_url),
|
|
alt: "SmartCredit",
|
|
"class": "provider-logo"
|
|
}, null, 8 /* PROPS */, _hoisted_6), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" " + (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data["package"].labels[$props.package_id]), 1 /* TEXT */)])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <div class=\"report-card__price p-2\">"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <h4>${{package.prices[package_id]}}/mo</h4> <span>Cancel Anytime</span>"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" </div>"), _hoisted_7, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_9, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)("Includes SmartCredit Money Manager with "), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("strong", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data["package"].updateLimit[$props.package_id]), 1 /* TEXT */), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" Transunion Report & Score updates in SmartCredit.")])]), _hoisted_10])]);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkgView.vue?vue&type=template&id=07ec995e":
|
|
/*!*************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkgView.vue?vue&type=template&id=07ec995e ***!
|
|
\*************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* binding */ render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
var _hoisted_1 = {
|
|
"class": "smart-credit-pkg"
|
|
};
|
|
var _hoisted_2 = {
|
|
"class": "report-card p-3 report-card--best report-card__aside mt-5 report-card--info"
|
|
};
|
|
var _hoisted_3 = {
|
|
"class": "report-card__header pb-3"
|
|
};
|
|
var _hoisted_4 = ["src"];
|
|
var _hoisted_5 = {
|
|
"class": "report-card__price p-2"
|
|
};
|
|
var _hoisted_6 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, "Cancel Anytime", -1 /* HOISTED */);
|
|
|
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h5", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("strong", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("img", {
|
|
src: "".concat($data.app_base_url, "/img/smartcredit_logo.png"),
|
|
alt: "SmartCredit",
|
|
"class": "provider-logo"
|
|
}, null, 8 /* PROPS */, _hoisted_4), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" " + (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data["package"].labels[$props.package_id]), 1 /* TEXT */)])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_5, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h4", null, "$" + (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data["package"].prices[$props.package_id]) + "/mo", 1 /* TEXT */), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(), _hoisted_6])])]);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/Success.vue?vue&type=template&id=106e4531&scoped=true":
|
|
/*!**************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/Success.vue?vue&type=template&id=106e4531&scoped=true ***!
|
|
\**************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* binding */ render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
var _withScopeId = function _withScopeId(n) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-106e4531"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
|
|
};
|
|
var _hoisted_1 = {
|
|
"class": "container"
|
|
};
|
|
var _hoisted_2 = {
|
|
"class": "card"
|
|
};
|
|
var _hoisted_3 = {
|
|
"class": "form"
|
|
};
|
|
var _hoisted_4 = {
|
|
"class": "left-side"
|
|
};
|
|
var _hoisted_5 = {
|
|
"class": "left-heading"
|
|
};
|
|
var _hoisted_6 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createStaticVNode)("<div class=\"steps-content\" data-v-106e4531><h3 data-v-106e4531>Step <span class=\"step-number\" data-v-106e4531>3</span></h3><p class=\"step-number-content active\" data-v-106e4531>Enter your personal information to get closer to companies.</p><p class=\"step-number-content d-none\" data-v-106e4531>Get to know better by adding your diploma,certificate and education life.</p><p class=\"step-number-content d-none\" data-v-106e4531>Help companies get to know you better by telling then about your past experiences.</p><p class=\"step-number-content d-none\" data-v-106e4531>Add your profile picture and let companies find youy fast.</p></div><ul class=\"progress-bar\" data-v-106e4531><li class=\"active\" data-v-106e4531>Create Account</li><li class=\"active\" data-v-106e4531>Add Profile</li><li class=\"active\" data-v-106e4531>Credit Report</li></ul>", 2);
|
|
var _hoisted_8 = {
|
|
"class": "right-side"
|
|
};
|
|
var _hoisted_9 = {
|
|
"class": "main active"
|
|
};
|
|
var _hoisted_10 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createStaticVNode)("<svg class=\"checkmark\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 52 52\" data-v-106e4531><circle class=\"checkmark__circle\" cx=\"26\" cy=\"26\" r=\"25\" fill=\"none\" data-v-106e4531></circle><path class=\"checkmark__check\" fill=\"none\" d=\"M14.1 27.2l7.1 7.2 16.7-16.8\" data-v-106e4531></path></svg><div class=\"text congrats\" data-v-106e4531><h2 style=\"color:purple;\" data-v-106e4531>Congratulations!</h2><p style=\"color:purple;\" data-v-106e4531>On your sign up, please allow 24 hours or less for Admin to check your email and name to turn you on appropriately. </p></div>", 2);
|
|
var _hoisted_12 = {
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_13 = {
|
|
"class": "input-div buttons",
|
|
style: {
|
|
"text-align": "center"
|
|
}
|
|
};
|
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
var _component_Footer = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Footer");
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_5, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data.company_Name), 1 /* TEXT */)]), _hoisted_6]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_8, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_9, [_hoisted_10, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_12, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_13, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", {
|
|
onClick: _cache[0] || (_cache[0] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function () {
|
|
return $options.makePayment && $options.makePayment.apply($options, arguments);
|
|
}, ["prevent"])),
|
|
type: "submit",
|
|
value: "Next",
|
|
"class": "next_button"
|
|
}, " Get Started ")])])])])])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Footer)], 64 /* STABLE_FRAGMENT */);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/TopArea.vue?vue&type=template&id=3dfb8130&scoped=true":
|
|
/*!**************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/TopArea.vue?vue&type=template&id=3dfb8130&scoped=true ***!
|
|
\**************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* binding */ render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
var _withScopeId = function _withScopeId(n) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-3dfb8130"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
|
|
};
|
|
var _hoisted_1 = {
|
|
"class": "top-area"
|
|
};
|
|
var _hoisted_2 = {
|
|
"class": "img-area"
|
|
};
|
|
var _hoisted_3 = ["src"];
|
|
var _hoisted_4 = {
|
|
key: 0,
|
|
"class": "link-area"
|
|
};
|
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("img", {
|
|
"class": "login-logo",
|
|
src: "".concat($data.img_url),
|
|
alt: ""
|
|
}, null, 8 /* PROPS */, _hoisted_3)]), $data.is_show_login ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", {
|
|
href: "#",
|
|
onClick: _cache[0] || (_cache[0] = function () {
|
|
return $options.cookiesClear && $options.cookiesClear.apply($options, arguments);
|
|
})
|
|
}, " Already a member? Log In ")])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/ValidationError.vue?vue&type=template&id=f199b386":
|
|
/*!**********************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/ValidationError.vue?vue&type=template&id=f199b386 ***!
|
|
\**********************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* binding */ render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
var _hoisted_1 = {
|
|
key: 0,
|
|
"class": "field-validation-error"
|
|
};
|
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, [((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($props.msg, function (error) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", {
|
|
key: error.$uid,
|
|
"class": "field-validation-error"
|
|
}, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(error.$message), 1 /* TEXT */)]);
|
|
}), 128 /* KEYED_FRAGMENT */)), $props.backend ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.backend[0]), 1 /* TEXT */)])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)], 64 /* STABLE_FRAGMENT */);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/modal.vue?vue&type=template&id=18ecef0a&scoped=true":
|
|
/*!************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/modal.vue?vue&type=template&id=18ecef0a&scoped=true ***!
|
|
\************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* binding */ render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
var _withScopeId = function _withScopeId(n) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-18ecef0a"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
|
|
};
|
|
var _hoisted_1 = {
|
|
"class": "modal-backdrop"
|
|
};
|
|
var _hoisted_2 = {
|
|
"class": "modal"
|
|
};
|
|
var _hoisted_3 = {
|
|
"class": "modal-header"
|
|
};
|
|
var _hoisted_4 = {
|
|
"class": "modal-body"
|
|
};
|
|
var _hoisted_5 = {
|
|
key: 0,
|
|
"class": "text",
|
|
style: {
|
|
"margin-top": "10px"
|
|
}
|
|
};
|
|
var _hoisted_6 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", {
|
|
style: {
|
|
"color": "red",
|
|
"text-align": "center"
|
|
}
|
|
}, "All fields are required", -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_7 = [_hoisted_6];
|
|
var _hoisted_8 = {
|
|
key: 1,
|
|
"class": "text"
|
|
};
|
|
var _hoisted_9 = {
|
|
style: {
|
|
"color": "red",
|
|
"text-align": "center"
|
|
}
|
|
};
|
|
var _hoisted_10 = {
|
|
"class": "fieldset-body"
|
|
};
|
|
var _hoisted_11 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("legend", {
|
|
"class": "label-text"
|
|
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)("Complete The Identity Questions Below"), /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("br")], -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_12 = {
|
|
key: 0,
|
|
"class": "input-text"
|
|
};
|
|
var _hoisted_13 = {
|
|
"class": "input-div"
|
|
};
|
|
var _hoisted_14 = {
|
|
"class": "label-text"
|
|
};
|
|
var _hoisted_15 = {
|
|
"class": "radio-text"
|
|
};
|
|
var _hoisted_16 = {
|
|
"class": "radio"
|
|
};
|
|
var _hoisted_17 = ["onChange", "onUpdate:modelValue", "value"];
|
|
var _hoisted_18 = {
|
|
"class": "modal-footer"
|
|
};
|
|
var _hoisted_19 = {
|
|
"class": "input-div buttons",
|
|
style: {
|
|
"text-align": "right"
|
|
}
|
|
};
|
|
var _hoisted_20 = ["disabled"];
|
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("header", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "header", {}, function () {
|
|
return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" Complete The Identity Question ")];
|
|
}, true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <button type=\"button\" class=\"btn-close\" @click=\"close\" > x </button>")]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("section", _hoisted_4, [_ctx.isButtonDisabled ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_5, _hoisted_7)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $data.message ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_8, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_9, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data.message[0]), 1 /* TEXT */)])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "body", {}, function () {
|
|
return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("fieldset", _hoisted_10, [_hoisted_11, ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($props.questionAnswer.idVerificationCriteria, function (item, key) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", null, [$options.getQuestionCounter(key) > 0 ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_12, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_13, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", _hoisted_14, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(item.displayName), 1 /* TEXT */), ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)(item.choiceList.choice, function (subitem) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_15, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_16, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", {
|
|
type: "radio",
|
|
onChange: function onChange($event) {
|
|
return $options.radioButtonEvent($event, $options.getQuestionCounter(key));
|
|
},
|
|
"onUpdate:modelValue": function onUpdateModelValue($event) {
|
|
return $data.answers['answer' + $options.getQuestionCounter(key)] = $event;
|
|
},
|
|
value: {
|
|
id: subitem.key,
|
|
name: subitem.display
|
|
}
|
|
}, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_17), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelRadio, $data.answers['answer' + $options.getQuestionCounter(key)]]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" " + (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(subitem.display), 1 /* TEXT */)])])]);
|
|
}), 256 /* UNKEYED_FRAGMENT */))])])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]);
|
|
}), 256 /* UNKEYED_FRAGMENT */))])];
|
|
}, true)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("footer", _hoisted_18, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <div class=\"input-div buttons\" style=\"text-align: left\">"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <button type=\"button\" value=\"Back\" class=\"back_button\" @click=\"close\">"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" Skip"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" </button>"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" </div>"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_19, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", {
|
|
disabled: $data.isNotValid,
|
|
type: "submit",
|
|
value: "Next",
|
|
"class": "next_button",
|
|
onClick: _cache[0] || (_cache[0] = function () {
|
|
return $options.submitQuestion && $options.submitQuestion.apply($options, arguments);
|
|
})
|
|
}, " Submit ", 8 /* PROPS */, _hoisted_20)])])])]);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/sc_partner_cz_logo.vue?vue&type=template&id=d7b0f3a2&scoped=true":
|
|
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/sc_partner_cz_logo.vue?vue&type=template&id=d7b0f3a2&scoped=true ***!
|
|
\*************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* binding */ render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
var _withScopeId = function _withScopeId(n) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-d7b0f3a2"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
|
|
};
|
|
var _hoisted_1 = {
|
|
"class": "sc-partner-cz-logo brand-list list-inline"
|
|
};
|
|
var _hoisted_2 = {
|
|
key: 0,
|
|
"class": "brand-parent"
|
|
};
|
|
var _hoisted_3 = {
|
|
"class": "brand-link",
|
|
href: "https://www.smartcredit.com"
|
|
};
|
|
var _hoisted_4 = ["src"];
|
|
var _hoisted_5 = {
|
|
key: 1,
|
|
"class": "hidden-xs"
|
|
};
|
|
var _hoisted_6 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
"class": "separator"
|
|
}, null, -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_7 = [_hoisted_6];
|
|
var _hoisted_8 = {
|
|
key: 2,
|
|
"class": "partner-text hidden-xs"
|
|
};
|
|
var _hoisted_9 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", null, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)("Partnered"), /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("br"), /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)("with")], -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_10 = [_hoisted_9];
|
|
var _hoisted_11 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("li", {
|
|
"class": "brand-parent cobrand-parent hidden-xs"
|
|
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", {
|
|
"class": "brand-link",
|
|
"data-trigger": "focus",
|
|
tabindex: "0",
|
|
"data-original-title": "",
|
|
title: ""
|
|
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("img", {
|
|
src: "https://cdn.consumerdirect.com/live/cobrand/11885/logo-uwq6q8hx.png",
|
|
alt: "",
|
|
"class": "brand-logo",
|
|
"data-pagespeed-url-hash": "4237170943",
|
|
"data-pagespeed-onload": "pagespeed.CriticalImages.checkImageForCriticality(this);",
|
|
onload: "var elem=this;if (this==window) elem=document.body;elem.setAttribute('data-pagespeed-loaded', 1)",
|
|
"data-pagespeed-loaded": "1"
|
|
})])], -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_12 = {
|
|
key: 3,
|
|
"class": "partner-text hidden-xs"
|
|
};
|
|
var _hoisted_13 = /*#__PURE__*/_withScopeId(function () {
|
|
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", null, " Powerful Software System ", -1 /* HOISTED */);
|
|
});
|
|
var _hoisted_14 = [_hoisted_13];
|
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("ul", _hoisted_1, [$data.reportProvider === '3' ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("li", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("img", {
|
|
src: "".concat($data.img_url),
|
|
alt: "SmartCredit",
|
|
"class": "brand-logo"
|
|
}, null, 8 /* PROPS */, _hoisted_4)])])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $data.reportProvider === '3' ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("li", _hoisted_5, _hoisted_7)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $data.reportProvider === '3' ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("li", _hoisted_8, _hoisted_10)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), _hoisted_11, $data.reportProvider === '1' ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("li", _hoisted_12, _hoisted_14)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/step.vue?vue&type=template&id=04252a24":
|
|
/*!***********************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/step.vue?vue&type=template&id=04252a24 ***!
|
|
\***********************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* binding */ render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
var _hoisted_1 = {
|
|
"class": "steps-content"
|
|
};
|
|
var _hoisted_2 = {
|
|
key: 0,
|
|
"class": "step-number"
|
|
};
|
|
var _hoisted_3 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", {
|
|
"class": "step-number-content active"
|
|
}, "Enter your personal information to get closer to companies.", -1 /* HOISTED */);
|
|
var _hoisted_4 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", {
|
|
"class": "step-number-content d-none"
|
|
}, "Get to know better by adding your diploma,certificate and education life.", -1 /* HOISTED */);
|
|
var _hoisted_5 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", {
|
|
"class": "step-number-content d-none"
|
|
}, "Help companies get to know you better by telling then about your past experiences.", -1 /* HOISTED */);
|
|
var _hoisted_6 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", {
|
|
"class": "step-number-content d-none"
|
|
}, "Add your profile piccture and let companies find youy fast.", -1 /* HOISTED */);
|
|
var _hoisted_7 = {
|
|
"class": "progress-bar"
|
|
};
|
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)("Step "), $props.step > 0 ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_2, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.step), 1 /* TEXT */)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]), _hoisted_3, _hoisted_4, _hoisted_5, _hoisted_6]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("ul", _hoisted_7, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("li", {
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'active': !$props.step || $props.step >= 1
|
|
})
|
|
}, "Create Account", 2 /* CLASS */), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("li", {
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'active': $props.step >= 2
|
|
})
|
|
}, "Add Profile", 2 /* CLASS */), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("li", {
|
|
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
|
|
'active': $props.step >= 3
|
|
})
|
|
}, "Credit Report", 2 /* CLASS */)])]);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/Api/register.js":
|
|
/*!**************************************!*\
|
|
!*** ./resources/js/Api/register.js ***!
|
|
\**************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _config_axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/config/axios */ "./resources/js/config/axios.js");
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
createAccount: function createAccount(account) {
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].post('/create/account', account);
|
|
},
|
|
addProfile: function addProfile(data) {
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].post("/add/profile", data);
|
|
},
|
|
getUserInfo: function getUserInfo() {
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].get("get-user-info");
|
|
},
|
|
importCreditReportByEmail: function importCreditReportByEmail(data) {
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].post("import/credit-report", data);
|
|
},
|
|
makePayment: function makePayment(data) {
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].post("make/payment", data);
|
|
},
|
|
makePayments: function makePayments(data) {
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].post("make/payments", data);
|
|
},
|
|
getSecurityQuestion: function getSecurityQuestion() {
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].get("get/security_question");
|
|
},
|
|
customerCreateAndUpdate: function customerCreateAndUpdate(data) {
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].post("create/customer", data);
|
|
},
|
|
verifyProfile: function verifyProfile(data) {
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].post("customer/profile-verify", data);
|
|
},
|
|
getIdentityQuestion: function getIdentityQuestion() {
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].get("get/identity_question");
|
|
},
|
|
postIdentityQuestion: function postIdentityQuestion(data) {
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].post("post/identity_question", data);
|
|
},
|
|
reportProviderValidsation: function reportProviderValidsation(data) {
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].post("get/subscription", data);
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/Validation/useFormValidation.js":
|
|
/*!******************************************************!*\
|
|
!*** ./resources/js/Validation/useFormValidation.js ***!
|
|
\******************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* binding */ useFormValidation)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _vue_reactivity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/reactivity */ "./node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js");
|
|
/* harmony import */ var _validators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./validators */ "./resources/js/Validation/validators.js");
|
|
|
|
|
|
var errors = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_1__.reactive)({});
|
|
var errorMessage = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_1__.reactive)({});
|
|
function useFormValidation() {
|
|
var _useValidators = (0,_validators__WEBPACK_IMPORTED_MODULE_0__["default"])(),
|
|
isEmpty = _useValidators.isEmpty,
|
|
minLength = _useValidators.minLength,
|
|
isEmail = _useValidators.isEmail,
|
|
isNum = _useValidators.isNum,
|
|
isInt = _useValidators.isInt,
|
|
maxLength = _useValidators.maxLength;
|
|
var validateNameField = function validateNameField(fieldName, fieldValue) {
|
|
errors[fieldName] = !fieldValue ? isEmpty(fieldName, fieldValue) : minLength(fieldName, fieldValue, 4);
|
|
};
|
|
var validateEmailField = function validateEmailField(fieldName, fieldValue) {
|
|
errors[fieldName] = !fieldValue ? isEmpty(fieldName, fieldValue) : isEmail(fieldName, fieldValue);
|
|
};
|
|
var validatePhoneField = function validatePhoneField(fieldName, fieldValue) {
|
|
errors[fieldName] = !fieldValue ? isEmpty(fieldName, fieldValue) : isNum(fieldName, fieldValue);
|
|
};
|
|
var validatePasswordField = function validatePasswordField(fieldName, fieldValue) {
|
|
errors[fieldName] = !fieldValue ? isEmpty(fieldName, fieldValue) : minLength(fieldName, fieldValue, 8);
|
|
};
|
|
var validate = function validate(rules, messages, fieldName, fieldValue) {
|
|
var container = {};
|
|
container["required"] = isEmpty(fieldName, fieldValue);
|
|
container["email"] = !fieldValue ? isEmpty(fieldName, fieldValue) : isEmail(fieldName, fieldValue);
|
|
container["password"] = !fieldValue ? isEmpty(fieldName, fieldValue) : minLength(fieldName, fieldValue, 6);
|
|
container["integer"] = !fieldValue ? isEmpty(fieldName, fieldValue) : isInt(fieldName, fieldValue);
|
|
for (var i in rules) {
|
|
errors[fieldName] = "";
|
|
var value = rules[i];
|
|
if (container[value]) {
|
|
errors[fieldName] = container[value];
|
|
break;
|
|
} else {
|
|
var splited = value.split(':');
|
|
if (splited.length == 2) {
|
|
container[value] = dyanamicValidation(splited, fieldValue, fieldName);
|
|
if (container[value]) {
|
|
errors[fieldName] = container[value];
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
var dyanamicValidation = function dyanamicValidation(splited, fieldValue, fieldName) {
|
|
var result = "";
|
|
switch (splited[0]) {
|
|
case "min":
|
|
result = !fieldValue ? isEmpty(fieldName, fieldValue) : minLength(fieldName, fieldValue, splited[1]);
|
|
break;
|
|
case "max":
|
|
result = !fieldValue ? isEmpty(fieldName, fieldValue) : maxLength(fieldName, fieldValue, splited[1]);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
return result;
|
|
};
|
|
return {
|
|
errors: errors,
|
|
validate: validate
|
|
};
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/Validation/useSubmitButtonState.js":
|
|
/*!*********************************************************!*\
|
|
!*** ./resources/js/Validation/useSubmitButtonState.js ***!
|
|
\*********************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* binding */ useSubmitButtonState)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
function useSubmitButtonState(user, errors) {
|
|
var isButtonDisabled = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(function () {
|
|
var disabled = true;
|
|
for (var prop in user) {
|
|
if (!user[prop] || errors[prop]) {
|
|
disabled = true;
|
|
break;
|
|
}
|
|
disabled = false;
|
|
}
|
|
return disabled;
|
|
});
|
|
return {
|
|
isButtonDisabled: isButtonDisabled
|
|
};
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/Validation/validators.js":
|
|
/*!***********************************************!*\
|
|
!*** ./resources/js/Validation/validators.js ***!
|
|
\***********************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* binding */ useValidators)
|
|
/* harmony export */ });
|
|
function useValidators() {
|
|
var isEmpty = function isEmpty(fieldName, fieldValue) {
|
|
return !fieldValue ? "The ".concat(fieldName, " is required") : "";
|
|
};
|
|
var minLength = function minLength(fieldName, fieldValue, min) {
|
|
return fieldValue.length < min ? "The ".concat(fieldName, " field must be at least ").concat(min, " characters long") : "";
|
|
};
|
|
var maxLength = function maxLength(fieldName, fieldValue, max) {
|
|
return fieldValue.length > max ? "The ".concat(fieldName, " cannot be greater than ").concat(max, " characters long") : "";
|
|
};
|
|
var isEmail = function isEmail(fieldName, fieldValue) {
|
|
var re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
return !re.test(fieldValue) ? "The input is not a valid " + fieldName + " address" : "";
|
|
};
|
|
var isNum = function isNum(fieldName, fieldValue) {
|
|
var isNum = /^\d+$/.test(fieldValue);
|
|
return !isNum ? "The " + fieldName + " field only have numbers" : "";
|
|
};
|
|
var isInt = function isInt(fieldName, fieldValue) {
|
|
var test = /^\d+$/.test(fieldValue);
|
|
return !test ? "The " + fieldName + " must be integer" : "";
|
|
};
|
|
return {
|
|
isEmpty: isEmpty,
|
|
minLength: minLength,
|
|
isEmail: isEmail,
|
|
isNum: isNum,
|
|
isInt: isInt,
|
|
maxLength: maxLength
|
|
};
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/bootstrap.js":
|
|
/*!***********************************!*\
|
|
!*** ./resources/js/bootstrap.js ***!
|
|
\***********************************/
|
|
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
window._ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js");
|
|
|
|
/**
|
|
* We'll load the axios HTTP library which allows us to easily issue requests
|
|
* to our Laravel back-end. This library automatically handles sending the
|
|
* CSRF token as a header based on the value of the "XSRF" token cookie.
|
|
*/
|
|
|
|
window.axios = __webpack_require__(/*! axios */ "./node_modules/axios/dist/browser/axios.cjs");
|
|
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
|
|
|
/**
|
|
* Echo exposes an expressive API for subscribing to channels and listening
|
|
* for events that are broadcast by Laravel. Echo and event broadcasting
|
|
* allows your team to easily build robust real-time web applications.
|
|
*/
|
|
|
|
// import Echo from 'laravel-echo';
|
|
|
|
// window.Pusher = require('pusher-js');
|
|
|
|
// window.Echo = new Echo({
|
|
// broadcaster: 'pusher',
|
|
// key: process.env.MIX_PUSHER_APP_KEY,
|
|
// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
|
|
// forceTLS: true
|
|
// });
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/config/axios.js":
|
|
/*!**************************************!*\
|
|
!*** ./resources/js/config/axios.js ***!
|
|
\**************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! axios */ "./node_modules/axios/lib/axios.js");
|
|
/* harmony import */ var _router__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../router */ "./resources/js/router/index.js");
|
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../store */ "./resources/js/store/index.js");
|
|
/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../helper */ "./resources/js/helper/index.js");
|
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
|
|
|
|
|
|
|
|
var axiosClient = axios__WEBPACK_IMPORTED_MODULE_3__["default"].create({
|
|
baseURL: API_BASE_URL
|
|
});
|
|
var actionScope = "loading";
|
|
var requestsPending = 0;
|
|
var req = {
|
|
pending: function pending() {
|
|
requestsPending++;
|
|
_store__WEBPACK_IMPORTED_MODULE_1__["default"].dispatch('auth/setLoader', true);
|
|
},
|
|
done: function done() {
|
|
requestsPending--;
|
|
_store__WEBPACK_IMPORTED_MODULE_1__["default"].dispatch('auth/setLoader', false);
|
|
}
|
|
};
|
|
axiosClient.interceptors.request.use(function (config) {
|
|
req.pending();
|
|
var security_key = (0,_helper__WEBPACK_IMPORTED_MODULE_2__.getSecurityKey)();
|
|
if (security_key) {
|
|
config.headers['security-key'] = security_key;
|
|
}
|
|
/* const token = getToken();
|
|
|
|
config.headers.Authorization = 'Bearer ' + token;
|
|
config.headers['Content-Type'] = 'application/json';
|
|
config.headers['Accept'] = 'application/json';
|
|
config.headers['Permission-Version'] = store.getters['auth/user']?.permission_version;*/
|
|
console.log('resquest.success', config);
|
|
//console.log('request loader_status', store.getters['auth/getLoaderStatus']);
|
|
|
|
return config;
|
|
}, function (error) {
|
|
req.done();
|
|
console.log('resquest.error', error);
|
|
return Promise.reject(error);
|
|
});
|
|
axiosClient.interceptors.response.use(function (response) {
|
|
req.done();
|
|
console.log('response.success', response);
|
|
console.log('response loader_status', _store__WEBPACK_IMPORTED_MODULE_1__["default"].getters['auth/getLoaderStatus']);
|
|
return response.data;
|
|
}, /*#__PURE__*/function () {
|
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(error) {
|
|
var originalRequest;
|
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
req.done();
|
|
console.log('resquest.error', error);
|
|
originalRequest = error.config;
|
|
/*if (error.response.status == 500) {
|
|
router.push({ name: 'error-500' })
|
|
} else if (error.response.status == 401 && !originalRequest._retry) {
|
|
if (getRefreshToken()) {
|
|
const response = await store.dispatch('auth/authenticateWithRefreshToken')
|
|
if (isApiSuccess(response)) {
|
|
originalRequest._retry = true;
|
|
return axiosClient(originalRequest);
|
|
}
|
|
}
|
|
store.dispatch('auth/logout')
|
|
router.push({ name: 'error-401' })
|
|
}*/
|
|
return _context.abrupt("return", Promise.reject(error));
|
|
case 4:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function (_x) {
|
|
return _ref.apply(this, arguments);
|
|
};
|
|
}());
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (axiosClient);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/config/constants.js":
|
|
/*!******************************************!*\
|
|
!*** ./resources/js/config/constants.js ***!
|
|
\******************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ GOOGLE_CAPTCHA_SITEKEY: () => (/* binding */ GOOGLE_CAPTCHA_SITEKEY)
|
|
/* harmony export */ });
|
|
var GOOGLE_CAPTCHA_SITEKEY = "6Lei2nQhAAAAAChSi_OiYy63AxlI_vJKm0b-LyN3";
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/helper/index.js":
|
|
/*!**************************************!*\
|
|
!*** ./resources/js/helper/index.js ***!
|
|
\**************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ generateSidebarMenuItems: () => (/* binding */ generateSidebarMenuItems),
|
|
/* harmony export */ getAmount: () => (/* binding */ getAmount),
|
|
/* harmony export */ getAnswer: () => (/* binding */ getAnswer),
|
|
/* harmony export */ getBirthDate: () => (/* binding */ getBirthDate),
|
|
/* harmony export */ getCardNumber: () => (/* binding */ getCardNumber),
|
|
/* harmony export */ getCity: () => (/* binding */ getCity),
|
|
/* harmony export */ getCookie: () => (/* binding */ getCookie),
|
|
/* harmony export */ getCurrentRouteQueries: () => (/* binding */ getCurrentRouteQueries),
|
|
/* harmony export */ getCustomerToken: () => (/* binding */ getCustomerToken),
|
|
/* harmony export */ getExpiry: () => (/* binding */ getExpiry),
|
|
/* harmony export */ getFormData: () => (/* binding */ getFormData),
|
|
/* harmony export */ getFormattedDaterangeFromDates: () => (/* binding */ getFormattedDaterangeFromDates),
|
|
/* harmony export */ getFullSsn: () => (/* binding */ getFullSsn),
|
|
/* harmony export */ getLocalStorage: () => (/* binding */ getLocalStorage),
|
|
/* harmony export */ getPackageId: () => (/* binding */ getPackageId),
|
|
/* harmony export */ getPhone: () => (/* binding */ getPhone),
|
|
/* harmony export */ getQuestionId: () => (/* binding */ getQuestionId),
|
|
/* harmony export */ getReferenceNumber: () => (/* binding */ getReferenceNumber),
|
|
/* harmony export */ getRefreshToken: () => (/* binding */ getRefreshToken),
|
|
/* harmony export */ getSecurityKey: () => (/* binding */ getSecurityKey),
|
|
/* harmony export */ getState: () => (/* binding */ getState),
|
|
/* harmony export */ getStep: () => (/* binding */ getStep),
|
|
/* harmony export */ getStreetName: () => (/* binding */ getStreetName),
|
|
/* harmony export */ getStreetNo: () => (/* binding */ getStreetNo),
|
|
/* harmony export */ getToken: () => (/* binding */ getToken),
|
|
/* harmony export */ getTrackingToken: () => (/* binding */ getTrackingToken),
|
|
/* harmony export */ getUserEmail: () => (/* binding */ getUserEmail),
|
|
/* harmony export */ getUserFirstName: () => (/* binding */ getUserFirstName),
|
|
/* harmony export */ getUserId: () => (/* binding */ getUserId),
|
|
/* harmony export */ getUserLastName: () => (/* binding */ getUserLastName),
|
|
/* harmony export */ getUserPassword: () => (/* binding */ getUserPassword),
|
|
/* harmony export */ getUserQuestionAnswer: () => (/* binding */ getUserQuestionAnswer),
|
|
/* harmony export */ getZip_Code: () => (/* binding */ getZip_Code),
|
|
/* harmony export */ hasPermission: () => (/* binding */ hasPermission),
|
|
/* harmony export */ isApiSuccess: () => (/* binding */ isApiSuccess),
|
|
/* harmony export */ isSameRoute: () => (/* binding */ isSameRoute),
|
|
/* harmony export */ removeToken: () => (/* binding */ removeToken),
|
|
/* harmony export */ setAmount: () => (/* binding */ setAmount),
|
|
/* harmony export */ setAnswer: () => (/* binding */ setAnswer),
|
|
/* harmony export */ setBirthDate: () => (/* binding */ setBirthDate),
|
|
/* harmony export */ setCardNumber: () => (/* binding */ setCardNumber),
|
|
/* harmony export */ setCity: () => (/* binding */ setCity),
|
|
/* harmony export */ setCookie: () => (/* binding */ setCookie),
|
|
/* harmony export */ setCustomerToken: () => (/* binding */ setCustomerToken),
|
|
/* harmony export */ setExpiry: () => (/* binding */ setExpiry),
|
|
/* harmony export */ setFormData: () => (/* binding */ setFormData),
|
|
/* harmony export */ setFullSsn: () => (/* binding */ setFullSsn),
|
|
/* harmony export */ setLocalStorage: () => (/* binding */ setLocalStorage),
|
|
/* harmony export */ setPackageId: () => (/* binding */ setPackageId),
|
|
/* harmony export */ setPhone: () => (/* binding */ setPhone),
|
|
/* harmony export */ setQuestionId: () => (/* binding */ setQuestionId),
|
|
/* harmony export */ setReferenceNumber: () => (/* binding */ setReferenceNumber),
|
|
/* harmony export */ setRefreshToken: () => (/* binding */ setRefreshToken),
|
|
/* harmony export */ setSecurityKey: () => (/* binding */ setSecurityKey),
|
|
/* harmony export */ setState: () => (/* binding */ setState),
|
|
/* harmony export */ setStep: () => (/* binding */ setStep),
|
|
/* harmony export */ setStreetName: () => (/* binding */ setStreetName),
|
|
/* harmony export */ setStreetNo: () => (/* binding */ setStreetNo),
|
|
/* harmony export */ setToken: () => (/* binding */ setToken),
|
|
/* harmony export */ setTrackingToken: () => (/* binding */ setTrackingToken),
|
|
/* harmony export */ setUserEmail: () => (/* binding */ setUserEmail),
|
|
/* harmony export */ setUserFirstName: () => (/* binding */ setUserFirstName),
|
|
/* harmony export */ setUserId: () => (/* binding */ setUserId),
|
|
/* harmony export */ setUserLastName: () => (/* binding */ setUserLastName),
|
|
/* harmony export */ setUserPassword: () => (/* binding */ setUserPassword),
|
|
/* harmony export */ setUserQuestionAnswer: () => (/* binding */ setUserQuestionAnswer),
|
|
/* harmony export */ setZip_Code: () => (/* binding */ setZip_Code),
|
|
/* harmony export */ showNotification: () => (/* binding */ showNotification),
|
|
/* harmony export */ unsetAnswer: () => (/* binding */ unsetAnswer),
|
|
/* harmony export */ unsetBirthDate: () => (/* binding */ unsetBirthDate),
|
|
/* harmony export */ unsetCardNumber: () => (/* binding */ unsetCardNumber),
|
|
/* harmony export */ unsetCity: () => (/* binding */ unsetCity),
|
|
/* harmony export */ unsetCookie: () => (/* binding */ unsetCookie),
|
|
/* harmony export */ unsetCustomerToken: () => (/* binding */ unsetCustomerToken),
|
|
/* harmony export */ unsetExpiry: () => (/* binding */ unsetExpiry),
|
|
/* harmony export */ unsetFormData: () => (/* binding */ unsetFormData),
|
|
/* harmony export */ unsetFullSsn: () => (/* binding */ unsetFullSsn),
|
|
/* harmony export */ unsetLocalStorage: () => (/* binding */ unsetLocalStorage),
|
|
/* harmony export */ unsetQuestionId: () => (/* binding */ unsetQuestionId),
|
|
/* harmony export */ unsetReferenceNumber: () => (/* binding */ unsetReferenceNumber),
|
|
/* harmony export */ unsetState: () => (/* binding */ unsetState),
|
|
/* harmony export */ unsetStep: () => (/* binding */ unsetStep),
|
|
/* harmony export */ unsetStreetName: () => (/* binding */ unsetStreetName),
|
|
/* harmony export */ unsetStreetNo: () => (/* binding */ unsetStreetNo),
|
|
/* harmony export */ unsetTrackingToken: () => (/* binding */ unsetTrackingToken),
|
|
/* harmony export */ unsetUserEmail: () => (/* binding */ unsetUserEmail),
|
|
/* harmony export */ unsetUserFirstName: () => (/* binding */ unsetUserFirstName),
|
|
/* harmony export */ unsetUserLastName: () => (/* binding */ unsetUserLastName),
|
|
/* harmony export */ unsetUserPassword: () => (/* binding */ unsetUserPassword),
|
|
/* harmony export */ unsetUserQuestionAnswer: () => (/* binding */ unsetUserQuestionAnswer)
|
|
/* harmony export */ });
|
|
/* harmony import */ var js_cookie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! js-cookie */ "./node_modules/js-cookie/dist/js.cookie.mjs");
|
|
/* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./state */ "./resources/js/helper/state.js");
|
|
|
|
|
|
var setCookie = function setCookie(key, value) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set(key, value);
|
|
};
|
|
var getCookie = function getCookie(key) {
|
|
return js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get(key);
|
|
};
|
|
var unsetCookie = function unsetCookie(key) {
|
|
return js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].remove(key);
|
|
};
|
|
var setLocalStorage = function setLocalStorage(key, value) {
|
|
localStorage.setItem(key, value);
|
|
};
|
|
var getLocalStorage = function getLocalStorage(key) {
|
|
return localStorage.getItem(key);
|
|
};
|
|
var unsetLocalStorage = function unsetLocalStorage(key) {
|
|
return localStorage.removeItem(key);
|
|
};
|
|
var getAmount = function getAmount() {
|
|
return js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('amount');
|
|
};
|
|
var setAmount = function setAmount(amount) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('amount', amount);
|
|
};
|
|
var getSecurityKey = function getSecurityKey() {
|
|
return getCookie('security_key'); //Cookies.get('security_key');
|
|
};
|
|
|
|
var setSecurityKey = function setSecurityKey(key) {
|
|
setCookie('security_key', key);
|
|
//Cookies.set('security_key', key);
|
|
};
|
|
|
|
var setPackageId = function setPackageId(package_id) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('package_id', package_id);
|
|
};
|
|
var getPackageId = function getPackageId() {
|
|
//return Cookies.get('package_id');
|
|
return 2;
|
|
};
|
|
var setStep = function setStep(step) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('step', step);
|
|
};
|
|
var getStep = function getStep() {
|
|
return js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('step');
|
|
};
|
|
var setToken = function setToken(token) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('access_token', token);
|
|
};
|
|
var unsetStep = function unsetStep() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].remove('step');
|
|
};
|
|
var setUserId = function setUserId(user_id) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('user_id', user_id);
|
|
};
|
|
var setUserEmail = function setUserEmail(email) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('user_email', email);
|
|
};
|
|
var getUserId = function getUserId() {
|
|
return js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('user_id');
|
|
};
|
|
var getUserEmail = function getUserEmail() {
|
|
return js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('user_email');
|
|
};
|
|
var setRefreshToken = function setRefreshToken(token) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('refresh_token', token);
|
|
};
|
|
var getToken = function getToken() {
|
|
return js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('access_token');
|
|
};
|
|
var getRefreshToken = function getRefreshToken() {
|
|
return js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('refresh_token');
|
|
};
|
|
var removeToken = function removeToken() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].remove('access_token');
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].remove('refresh_token');
|
|
};
|
|
var isApiSuccess = function isApiSuccess(response) {
|
|
return response.statuscode == 100;
|
|
};
|
|
var setUserFirstName = function setUserFirstName(name) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('user_first_name', name);
|
|
};
|
|
var setUserLastName = function setUserLastName(name) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('user_last_name', name);
|
|
};
|
|
var setUserPassword = function setUserPassword(password) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('user_password', password);
|
|
};
|
|
var setFormData = function setFormData(form_data) {
|
|
setCookie('user_input_data', form_data);
|
|
};
|
|
var getFormData = function getFormData() {
|
|
return getCookie('user_input_data');
|
|
};
|
|
var unsetFormData = function unsetFormData() {
|
|
unsetCookie('user_input_data');
|
|
};
|
|
var setUserQuestionAnswer = function setUserQuestionAnswer(data) {
|
|
setCookie('user_answer_data', data);
|
|
};
|
|
var getUserQuestionAnswer = function getUserQuestionAnswer() {
|
|
return getCookie('user_answer_data');
|
|
};
|
|
var unsetUserQuestionAnswer = function unsetUserQuestionAnswer() {
|
|
unsetCookie('user_answer_data');
|
|
};
|
|
var setCardNumber = function setCardNumber(cardNumber) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('card_number', cardNumber);
|
|
};
|
|
var setExpiry = function setExpiry(expiry) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('expiry', expiry);
|
|
};
|
|
var setFullSsn = function setFullSsn(expiry) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('full_ssn', expiry);
|
|
};
|
|
var setPhone = function setPhone(phone) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('phone', phone);
|
|
};
|
|
var setZip_Code = function setZip_Code(zip_code) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('zip_code', zip_code);
|
|
};
|
|
var setStreetNo = function setStreetNo(data) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('street_no', data);
|
|
};
|
|
var setStreetName = function setStreetName(data) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('street_name', data);
|
|
};
|
|
var setCity = function setCity(data) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('city', data);
|
|
};
|
|
var setState = function setState(data) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('state', data);
|
|
};
|
|
var setBirthDate = function setBirthDate(data) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('birth_date', data);
|
|
};
|
|
var setQuestionId = function setQuestionId(data) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('question_id', data);
|
|
};
|
|
var setAnswer = function setAnswer(data) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('answer', data);
|
|
};
|
|
var getFullSsn = function getFullSsn() {
|
|
return js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('full_ssn');
|
|
};
|
|
var getUserFirstName = function getUserFirstName() {
|
|
return js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('user_first_name');
|
|
};
|
|
var getUserLastName = function getUserLastName() {
|
|
return js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('user_last_name');
|
|
};
|
|
var getUserPassword = function getUserPassword() {
|
|
return js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('user_password');
|
|
};
|
|
var getCardNumber = function getCardNumber() {
|
|
return js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('card_number');
|
|
};
|
|
var getExpiry = function getExpiry() {
|
|
return js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('expiry');
|
|
};
|
|
var getPhone = function getPhone() {
|
|
return js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('phone');
|
|
};
|
|
var getZip_Code = function getZip_Code() {
|
|
return js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('zip_code');
|
|
};
|
|
var getStreetNo = function getStreetNo() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('street_no');
|
|
};
|
|
var getStreetName = function getStreetName() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('street_name');
|
|
};
|
|
var getCity = function getCity() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('city');
|
|
};
|
|
var getState = function getState() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('state');
|
|
};
|
|
var getBirthDate = function getBirthDate() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('birth_date');
|
|
};
|
|
var getQuestionId = function getQuestionId() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('question_id');
|
|
};
|
|
var getAnswer = function getAnswer() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('answer');
|
|
};
|
|
var setTrackingToken = function setTrackingToken(value) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('tracking_token', value);
|
|
};
|
|
var getTrackingToken = function getTrackingToken() {
|
|
return js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('tracking_token');
|
|
};
|
|
var unsetTrackingToken = function unsetTrackingToken() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].remove('tracking_token');
|
|
};
|
|
var setCustomerToken = function setCustomerToken(value) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('customer_token', value);
|
|
};
|
|
var getCustomerToken = function getCustomerToken() {
|
|
return js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('customer_token');
|
|
};
|
|
var unsetCustomerToken = function unsetCustomerToken() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].remove('customer_token');
|
|
};
|
|
var setReferenceNumber = function setReferenceNumber(value) {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set('reference_number', value);
|
|
};
|
|
var getReferenceNumber = function getReferenceNumber() {
|
|
return js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get('reference_number');
|
|
};
|
|
var unsetReferenceNumber = function unsetReferenceNumber() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].remove('reference_number');
|
|
};
|
|
var unsetUserFirstName = function unsetUserFirstName() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].remove('user_first_name');
|
|
};
|
|
var unsetUserLastName = function unsetUserLastName() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].remove('user_last_name');
|
|
};
|
|
var unsetUserEmail = function unsetUserEmail() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].remove('user_email');
|
|
};
|
|
var unsetUserPassword = function unsetUserPassword() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].remove('user_password');
|
|
};
|
|
var unsetExpiry = function unsetExpiry() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].remove('expiry');
|
|
};
|
|
var unsetCardNumber = function unsetCardNumber() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].remove('card_number');
|
|
};
|
|
var unsetFullSsn = function unsetFullSsn() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].remove('full_ssn');
|
|
};
|
|
var unsetStreetNo = function unsetStreetNo() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].remove('street_no');
|
|
};
|
|
var unsetStreetName = function unsetStreetName() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].remove('street_name');
|
|
};
|
|
var unsetCity = function unsetCity() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].remove('city');
|
|
};
|
|
var unsetState = function unsetState() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].remove('state');
|
|
};
|
|
var unsetBirthDate = function unsetBirthDate() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].remove('birth_date');
|
|
};
|
|
var unsetQuestionId = function unsetQuestionId() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].remove('question_id');
|
|
};
|
|
var unsetAnswer = function unsetAnswer() {
|
|
js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].remove('answer');
|
|
};
|
|
var generateSidebarMenuItems = function generateSidebarMenuItems() {
|
|
return [{
|
|
title: "Dashboard",
|
|
route: "dashboard",
|
|
icon_classes: "sidebar-item-icon ti-home",
|
|
permit: true,
|
|
is_active: isSameRoute('dashboard')
|
|
}, {
|
|
title: "Merchants",
|
|
route: "merchants",
|
|
icon_classes: "sidebar-item-icon fa fa-users",
|
|
permit: true,
|
|
is_active: isSameRoute('merchants')
|
|
}, {
|
|
title: "Transactions",
|
|
aria_expands: ["all-transactions", "refunds", "chargeback"].includes(router.currentRoute.value.name),
|
|
sub_routes: ["all-transactions", "refunds", "chargeback"],
|
|
submenu: [{
|
|
title: "All Transactions",
|
|
route: "all-transactions",
|
|
permit: hasPermission(constants.permissions.show_all_transaction_of_merchant),
|
|
is_active: isSameRoute('all-transactions')
|
|
}, {
|
|
title: "Refunds",
|
|
route: "refunds",
|
|
permit: hasPermission(constants.permissions.show_merchant_refunds),
|
|
is_active: isSameRoute('refunds')
|
|
}, {
|
|
title: "Chargeback",
|
|
route: "chargeback",
|
|
permit: hasPermission(constants.permissions.show_merchant_chargebacks),
|
|
is_active: isSameRoute('chargeback')
|
|
}],
|
|
permit: true
|
|
}, {
|
|
title: "Information",
|
|
route: "information",
|
|
icon_classes: "sidebar-item-icon ti-info",
|
|
permit: true,
|
|
is_active: isSameRoute('information')
|
|
}];
|
|
};
|
|
var hasPermission = function hasPermission(permission) {
|
|
var _store$getters$authG;
|
|
return (_store$getters$authG = store.getters['auth/getPermissions'][permission === null || permission === void 0 ? void 0 : permission.code]) === null || _store$getters$authG === void 0 ? void 0 : _store$getters$authG.permit;
|
|
};
|
|
var getCurrentRouteQueries = function getCurrentRouteQueries(queriesProxy) {
|
|
return Object.assign({}, queriesProxy);
|
|
};
|
|
var isSameRoute = function isSameRoute(route_name) {
|
|
return router.currentRoute.value.name === route_name;
|
|
};
|
|
var getFormattedDaterangeFromDates = function getFormattedDaterangeFromDates() {
|
|
var start_date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Date(new Date().setDate(new Date().getDate() - 30));
|
|
var end_date = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Date();
|
|
return "".concat(start_date.getFullYear(), "/").concat(start_date.getMonth() + 1, "/").concat(start_date.getDate(), " - ").concat(end_date.getFullYear(), "/").concat(end_date.getMonth() + 1, "/").concat(end_date.getDate());
|
|
};
|
|
var showNotification = function showNotification(action, message) {
|
|
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "default";
|
|
notify({
|
|
title: action,
|
|
text: message,
|
|
type: type
|
|
});
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/helper/package.js":
|
|
/*!****************************************!*\
|
|
!*** ./resources/js/helper/package.js ***!
|
|
\****************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
labels: {
|
|
"1": "Basic",
|
|
"2": "Premium",
|
|
"3": ""
|
|
},
|
|
prices: {
|
|
"1": "19.97",
|
|
"2": "24.97",
|
|
"3": "14.99"
|
|
},
|
|
updateLimit: {
|
|
"1": "2 monthly",
|
|
"2": "Unlimited",
|
|
"3": ""
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/helper/report_provider.js":
|
|
/*!************************************************!*\
|
|
!*** ./resources/js/helper/report_provider.js ***!
|
|
\************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
labels: {
|
|
"3": "SmartCredit",
|
|
"1": "Identity IQ"
|
|
},
|
|
SmartCreditPoints: ["Identity Theft Insurance ($1m)", "Credit Monitoring & Alerts (TU)", "ScoreTracker", "ScoreBuilder", "ScoreBoost", "Money Manager", "Smart Credit Report", "PrivacyMaster"],
|
|
IdentityIQPoints: ["Access to the powerful proprietary Metro 2 Method 5 points of Compliance process", "Auto-import software systems", "Full library of training", "Auto load letters", "Auto import items into letters", "Processing reminder system", "Customer support", "Facebook group help"]
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/helper/state.js":
|
|
/*!**************************************!*\
|
|
!*** ./resources/js/helper/state.js ***!
|
|
\**************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ([{
|
|
"id": "AA",
|
|
"value": "AA"
|
|
}, {
|
|
"id": "AE",
|
|
"value": "AE"
|
|
}, {
|
|
"id": "AL",
|
|
"value": "AL"
|
|
}, {
|
|
"id": "AK",
|
|
"value": "AK"
|
|
}, {
|
|
"id": "AP",
|
|
"value": "AP"
|
|
}, {
|
|
"id": "AR",
|
|
"value": "AR"
|
|
}, {
|
|
"id": "AZ",
|
|
"value": "AZ"
|
|
}, {
|
|
"id": "CA",
|
|
"value": "CA"
|
|
}, {
|
|
"id": "CO",
|
|
"value": "CO"
|
|
}, {
|
|
"id": "CT",
|
|
"value": "CT"
|
|
}, {
|
|
"id": "DC",
|
|
"value": "DC"
|
|
}, {
|
|
"id": "DE",
|
|
"value": "DE"
|
|
}, {
|
|
"id": "FL",
|
|
"value": "FL"
|
|
}, {
|
|
"id": "GA",
|
|
"value": "GA"
|
|
}, {
|
|
"id": "GU",
|
|
"value": "GU"
|
|
}, {
|
|
"id": "HI",
|
|
"value": "HI"
|
|
}, {
|
|
"id": "IA",
|
|
"value": "IA"
|
|
}, {
|
|
"id": "ID",
|
|
"value": "ID"
|
|
}, {
|
|
"id": "IL",
|
|
"value": "IL"
|
|
}, {
|
|
"id": "IN",
|
|
"value": "IN"
|
|
}, {
|
|
"id": "KS",
|
|
"value": "KS"
|
|
}, {
|
|
"id": "KY",
|
|
"value": "KY"
|
|
}, {
|
|
"id": "LA",
|
|
"value": "LA"
|
|
}, {
|
|
"id": "MA",
|
|
"value": "MA"
|
|
}, {
|
|
"id": "MD",
|
|
"value": "MD"
|
|
}, {
|
|
"id": "ME",
|
|
"value": "ME"
|
|
}, {
|
|
"id": "MI",
|
|
"value": "MI"
|
|
}, {
|
|
"id": "MN",
|
|
"value": "MN"
|
|
}, {
|
|
"id": "MO",
|
|
"value": "MO"
|
|
}, {
|
|
"id": "MS",
|
|
"value": "MS"
|
|
}, {
|
|
"id": "MT",
|
|
"value": "MT"
|
|
}, {
|
|
"id": "NC",
|
|
"value": "NC"
|
|
}, {
|
|
"id": "ND",
|
|
"value": "ND"
|
|
}, {
|
|
"id": "NE",
|
|
"value": "NE"
|
|
}, {
|
|
"id": "NH",
|
|
"value": "NH"
|
|
}, {
|
|
"id": "NJ",
|
|
"value": "NJ"
|
|
}, {
|
|
"id": "NM",
|
|
"value": "NM"
|
|
}, {
|
|
"id": "NV",
|
|
"value": "NV"
|
|
}, {
|
|
"id": "NY",
|
|
"value": "NY"
|
|
}, {
|
|
"id": "OK",
|
|
"value": "OK"
|
|
}, {
|
|
"id": "OH",
|
|
"value": "OH"
|
|
}, {
|
|
"id": "OR",
|
|
"value": "OR"
|
|
}, {
|
|
"id": "PA",
|
|
"value": "PA"
|
|
}, {
|
|
"id": "PR",
|
|
"value": "PR"
|
|
}, {
|
|
"id": "RI",
|
|
"value": "RI"
|
|
}, {
|
|
"id": "SC",
|
|
"value": "SC"
|
|
}, {
|
|
"id": "SD",
|
|
"value": "SD"
|
|
}, {
|
|
"id": "TN",
|
|
"value": "TN"
|
|
}, {
|
|
"id": "TX",
|
|
"value": "TX"
|
|
}, {
|
|
"id": "UT",
|
|
"value": "UT"
|
|
}, {
|
|
"id": "VA",
|
|
"value": "VA"
|
|
}, {
|
|
"id": "VI",
|
|
"value": "VI"
|
|
}, {
|
|
"id": "VT",
|
|
"value": "VT"
|
|
}, {
|
|
"id": "WA",
|
|
"value": "WA"
|
|
}, {
|
|
"id": "WI",
|
|
"value": "WI"
|
|
}, {
|
|
"id": "WV",
|
|
"value": "WV"
|
|
}, {
|
|
"id": "WY",
|
|
"value": "WY"
|
|
}]);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/router/index.js":
|
|
/*!**************************************!*\
|
|
!*** ./resources/js/router/index.js ***!
|
|
\**************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue-router */ "./node_modules/vue-router/dist/vue-router.mjs");
|
|
/* harmony import */ var _routes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./routes */ "./resources/js/router/routes.js");
|
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../store */ "./resources/js/store/index.js");
|
|
/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../helper */ "./resources/js/helper/index.js");
|
|
|
|
|
|
|
|
|
|
var router = (0,vue_router__WEBPACK_IMPORTED_MODULE_3__.createRouter)({
|
|
history: (0,vue_router__WEBPACK_IMPORTED_MODULE_3__.createWebHistory)(APP_BASE_ROUTE),
|
|
routes: _routes__WEBPACK_IMPORTED_MODULE_0__["default"]
|
|
});
|
|
function isAuthenticated() {
|
|
return _store__WEBPACK_IMPORTED_MODULE_1__["default"].getters['auth/authenticated'];
|
|
}
|
|
router.beforeEach(function (to, from, next) {
|
|
/*if (!isAuthenticated() && to.matched.some(record => record.meta.requires_auth)) {
|
|
next({ name: 'login' })
|
|
} else if (isAuthenticated() && to.matched.some(record => record.meta.is_auth_route)) {
|
|
next({ name: 'dashboard' })
|
|
}
|
|
next()*/
|
|
var step = (0,_helper__WEBPACK_IMPORTED_MODULE_2__.getStep)();
|
|
// console.clear()
|
|
// console.log(from.path,to.path)
|
|
if (to.name == "add-profile") {
|
|
if (!step) {
|
|
next({
|
|
name: 'create-account'
|
|
});
|
|
} else if (step == 3) {
|
|
next({
|
|
name: 'choose-package'
|
|
});
|
|
} else if (step == 4) {
|
|
next({
|
|
name: 'create-cr-account'
|
|
});
|
|
}
|
|
} else if (to.name == "choose-package") {
|
|
if (!step) {
|
|
next({
|
|
name: 'create-account'
|
|
});
|
|
} else if (step == 2) {
|
|
next({
|
|
name: 'add-profile'
|
|
});
|
|
} else if (step == 4) {
|
|
next({
|
|
name: 'create-cr-account'
|
|
});
|
|
}
|
|
} else if (to.name == "create-account") {
|
|
if (step == 2) {
|
|
next({
|
|
name: 'add-profile'
|
|
});
|
|
} else if (step == 3) {
|
|
next({
|
|
name: 'choose-package'
|
|
});
|
|
} else if (step == 4) {
|
|
next({
|
|
name: 'create-cr-account'
|
|
});
|
|
}
|
|
} else if (to.name == "success") {
|
|
if (!step) {
|
|
next({
|
|
name: 'create-account'
|
|
});
|
|
}
|
|
} else if (to.name == "create-cr-account") {
|
|
if (!step) {
|
|
next({
|
|
name: 'create-account'
|
|
});
|
|
} else if (step == 2) {
|
|
next({
|
|
name: 'add-profile'
|
|
});
|
|
} else if (step == 3) {
|
|
next({
|
|
name: 'choose-package'
|
|
});
|
|
} else if (step == 5) {
|
|
next({
|
|
name: 'make-payment'
|
|
});
|
|
}
|
|
} else if (to.name == "make-payment") {
|
|
if (!step) {
|
|
next({
|
|
name: 'create-account'
|
|
});
|
|
} else if (step == 2) {
|
|
next({
|
|
name: 'add-profile'
|
|
});
|
|
} else if (step == 3) {
|
|
next({
|
|
name: 'choose-package'
|
|
});
|
|
} else if (step == 4) {
|
|
next({
|
|
name: 'create-cr-account'
|
|
});
|
|
}
|
|
}
|
|
next();
|
|
});
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (router);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/router/routes.js":
|
|
/*!***************************************!*\
|
|
!*** ./resources/js/router/routes.js ***!
|
|
\***************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _components_partials_CreateAccount__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/partials/CreateAccount */ "./resources/js/components/partials/CreateAccount.vue");
|
|
/* harmony import */ var _components_partials_AddProfile__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/partials/AddProfile */ "./resources/js/components/partials/AddProfile.vue");
|
|
/* harmony import */ var _components_partials_ChoosePackage__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/partials/ChoosePackage */ "./resources/js/components/partials/ChoosePackage.vue");
|
|
/* harmony import */ var _components_partials_CreateCreditReportAccount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../components/partials/CreateCreditReportAccount */ "./resources/js/components/partials/CreateCreditReportAccount.vue");
|
|
/* harmony import */ var _components_partials_Success__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../components/partials/Success */ "./resources/js/components/partials/Success.vue");
|
|
/* harmony import */ var _components_partials_MakePayment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../components/partials/MakePayment */ "./resources/js/components/partials/MakePayment.vue");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var routes = [{
|
|
path: '/',
|
|
redirect: {
|
|
name: 'create-account'
|
|
}
|
|
}, {
|
|
path: '/create/account',
|
|
name: 'create-account',
|
|
component: _components_partials_CreateAccount__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
meta: {
|
|
is_step: false
|
|
}
|
|
}, {
|
|
path: '/add/profile',
|
|
name: 'add-profile',
|
|
component: _components_partials_AddProfile__WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
meta: {
|
|
is_step: true
|
|
}
|
|
}, {
|
|
path: '/choose/package',
|
|
name: 'choose-package',
|
|
component: _components_partials_ChoosePackage__WEBPACK_IMPORTED_MODULE_2__["default"],
|
|
meta: {
|
|
is_step: true
|
|
}
|
|
}, {
|
|
path: '/create/cr-account',
|
|
name: 'create-cr-account',
|
|
component: _components_partials_CreateCreditReportAccount__WEBPACK_IMPORTED_MODULE_3__["default"],
|
|
meta: {
|
|
is_step: true
|
|
}
|
|
}, {
|
|
path: '/success',
|
|
name: 'success',
|
|
component: _components_partials_Success__WEBPACK_IMPORTED_MODULE_4__["default"],
|
|
meta: {
|
|
is_step: true
|
|
}
|
|
}, {
|
|
path: '/make/payment',
|
|
name: 'make-payment',
|
|
component: _components_partials_MakePayment__WEBPACK_IMPORTED_MODULE_5__["default"],
|
|
meta: {
|
|
is_step: true
|
|
}
|
|
}];
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (routes);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/store/auth/actions.js":
|
|
/*!********************************************!*\
|
|
!*** ./resources/js/store/auth/actions.js ***!
|
|
\********************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ authUser: () => (/* binding */ authUser),
|
|
/* harmony export */ authenticateWithRefreshToken: () => (/* binding */ authenticateWithRefreshToken),
|
|
/* harmony export */ isModalShow: () => (/* binding */ isModalShow),
|
|
/* harmony export */ loadPermissions: () => (/* binding */ loadPermissions),
|
|
/* harmony export */ login: () => (/* binding */ login),
|
|
/* harmony export */ logout: () => (/* binding */ logout),
|
|
/* harmony export */ resendOTP: () => (/* binding */ resendOTP),
|
|
/* harmony export */ setLoader: () => (/* binding */ setLoader),
|
|
/* harmony export */ userFormData: () => (/* binding */ userFormData),
|
|
/* harmony export */ verifyOTP: () => (/* binding */ verifyOTP)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _config_axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/config/axios */ "./resources/js/config/axios.js");
|
|
/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/helper */ "./resources/js/helper/index.js");
|
|
|
|
|
|
var login = function login(_ref, formData) {
|
|
var commit = _ref.commit;
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].post('login', formData).then(function (response) {
|
|
if ((0,_helper__WEBPACK_IMPORTED_MODULE_1__.isApiSuccess)(response)) {
|
|
commit('SET_USER', response.data.user);
|
|
commit('SET_AUTHENTICATED', false);
|
|
}
|
|
return Promise.resolve(response);
|
|
})["catch"](function (exception) {
|
|
commit('SET_USER', {});
|
|
commit('SET_AUTHENTICATED', false);
|
|
console.log('Login Action Exception', exception);
|
|
});
|
|
};
|
|
var verifyOTP = function verifyOTP(_ref2, formData) {
|
|
var commit = _ref2.commit;
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].post('verifysms', formData).then(function (response) {
|
|
if ((0,_helper__WEBPACK_IMPORTED_MODULE_1__.isApiSuccess)(response)) {
|
|
commit('SET_AUTHENTICATED', true);
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.setToken)(response.data.access_token);
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.setRefreshToken)(response.data.refresh_token);
|
|
}
|
|
return Promise.resolve(response);
|
|
})["catch"](function (exception) {
|
|
console.log('verifyOTP Action Exception', exception);
|
|
});
|
|
};
|
|
var authenticateWithRefreshToken = function authenticateWithRefreshToken(_ref3) {
|
|
var commit = _ref3.commit;
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].post('refreshtoken', {
|
|
refresh_token: (0,_helper__WEBPACK_IMPORTED_MODULE_1__.getRefreshToken)()
|
|
}).then(function (response) {
|
|
if ((0,_helper__WEBPACK_IMPORTED_MODULE_1__.isApiSuccess)(response)) {
|
|
commit('SET_AUTHENTICATED', true);
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.setToken)(response.data.access_token);
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.setRefreshToken)(response.data.refresh_token);
|
|
}
|
|
return Promise.resolve(response);
|
|
})["catch"](function (exception) {
|
|
console.log('authenticateWithRefreshToken Action Exception', exception);
|
|
});
|
|
};
|
|
var resendOTP = function resendOTP(_ref4, formData) {
|
|
var commit = _ref4.commit;
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].post('resendotp', formData).then(function (response) {
|
|
return Promise.resolve(response);
|
|
})["catch"](function (exception) {
|
|
console.log('Login Action Exception', exception);
|
|
});
|
|
};
|
|
var authUser = function authUser(_ref5) {
|
|
var commit = _ref5.commit;
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].get('get-authinfo').then(function (response) {
|
|
commit('SET_AUTHENTICATED', true);
|
|
commit('SET_USER', response.data.user);
|
|
commit('SET_PERMISSIONS', response.data.permissions);
|
|
return Promise.resolve(response);
|
|
})["catch"](function (exception) {
|
|
console.log('Get Auth User Action Exception', exception);
|
|
});
|
|
};
|
|
var logout = function logout(_ref6) {
|
|
var commit = _ref6.commit;
|
|
commit('SET_USER', {});
|
|
commit('SET_AUTHENTICATED', false);
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.removeToken)();
|
|
};
|
|
var setLoader = function setLoader(_ref7, status) {
|
|
var commit = _ref7.commit;
|
|
commit('SET_LOADER', status);
|
|
};
|
|
var loadPermissions = function loadPermissions(_ref8) {
|
|
var commit = _ref8.commit;
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].get('getpermission').then(function (response) {
|
|
commit('SET_PERMISSIONS', response.data.permissions);
|
|
return Promise.resolve(response);
|
|
})["catch"](function (exception) {
|
|
console.log('Permissions API Exception', exception);
|
|
});
|
|
};
|
|
var isModalShow = function isModalShow(_ref9, status) {
|
|
var commit = _ref9.commit;
|
|
commit('SHOW_MODAL', status);
|
|
};
|
|
var userFormData = function userFormData(_ref10, value) {
|
|
var commit = _ref10.commit;
|
|
commit('SET_USER_FORM_DATA', value);
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/store/auth/getters.js":
|
|
/*!********************************************!*\
|
|
!*** ./resources/js/store/auth/getters.js ***!
|
|
\********************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ authenticated: () => (/* binding */ authenticated),
|
|
/* harmony export */ getLoaderStatus: () => (/* binding */ getLoaderStatus),
|
|
/* harmony export */ getModalShowStatus: () => (/* binding */ getModalShowStatus),
|
|
/* harmony export */ getPermissions: () => (/* binding */ getPermissions),
|
|
/* harmony export */ getUserFormData: () => (/* binding */ getUserFormData),
|
|
/* harmony export */ user: () => (/* binding */ user)
|
|
/* harmony export */ });
|
|
var authenticated = function authenticated(state) {
|
|
return state.authenticated;
|
|
};
|
|
var user = function user(state) {
|
|
return state.user;
|
|
};
|
|
var getLoaderStatus = function getLoaderStatus(state) {
|
|
return state.loader;
|
|
};
|
|
var getPermissions = function getPermissions(state) {
|
|
return state.permissions;
|
|
};
|
|
var getModalShowStatus = function getModalShowStatus(state) {
|
|
return state.isModalShow;
|
|
};
|
|
var getUserFormData = function getUserFormData(state) {
|
|
return state.userFormData;
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/store/auth/index.js":
|
|
/*!******************************************!*\
|
|
!*** ./resources/js/store/auth/index.js ***!
|
|
\******************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./state */ "./resources/js/store/auth/state.js");
|
|
/* harmony import */ var _getters__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getters */ "./resources/js/store/auth/getters.js");
|
|
/* harmony import */ var _mutations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mutations */ "./resources/js/store/auth/mutations.js");
|
|
/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./actions */ "./resources/js/store/auth/actions.js");
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
namespaced: true,
|
|
state: _state__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
getters: _getters__WEBPACK_IMPORTED_MODULE_1__,
|
|
mutations: _mutations__WEBPACK_IMPORTED_MODULE_2__,
|
|
actions: _actions__WEBPACK_IMPORTED_MODULE_3__
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/store/auth/mutations.js":
|
|
/*!**********************************************!*\
|
|
!*** ./resources/js/store/auth/mutations.js ***!
|
|
\**********************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ SET_AUTHENTICATED: () => (/* binding */ SET_AUTHENTICATED),
|
|
/* harmony export */ SET_LOADER: () => (/* binding */ SET_LOADER),
|
|
/* harmony export */ SET_PERMISSIONS: () => (/* binding */ SET_PERMISSIONS),
|
|
/* harmony export */ SET_USER: () => (/* binding */ SET_USER),
|
|
/* harmony export */ SET_USER_FORM_DATA: () => (/* binding */ SET_USER_FORM_DATA),
|
|
/* harmony export */ SHOW_MODAL: () => (/* binding */ SHOW_MODAL)
|
|
/* harmony export */ });
|
|
var SET_AUTHENTICATED = function SET_AUTHENTICATED(state, value) {
|
|
state.authenticated = value;
|
|
};
|
|
var SET_USER = function SET_USER(state, value) {
|
|
state.user = value;
|
|
};
|
|
var SET_LOADER = function SET_LOADER(state, value) {
|
|
state.loader = value;
|
|
};
|
|
var SET_PERMISSIONS = function SET_PERMISSIONS(state, value) {
|
|
state.permissions = value;
|
|
};
|
|
var SHOW_MODAL = function SHOW_MODAL(state, value) {
|
|
state.isModalShow = value;
|
|
};
|
|
var SET_USER_FORM_DATA = function SET_USER_FORM_DATA(state, value) {
|
|
state.userFormData = value;
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/store/auth/state.js":
|
|
/*!******************************************!*\
|
|
!*** ./resources/js/store/auth/state.js ***!
|
|
\******************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
authenticated: false,
|
|
user: {},
|
|
permissions: {},
|
|
loader: false,
|
|
isModalShow: false,
|
|
userFormData: {}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/store/dashboard/actions.js":
|
|
/*!*************************************************!*\
|
|
!*** ./resources/js/store/dashboard/actions.js ***!
|
|
\*************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ approveChargebackRequest: () => (/* binding */ approveChargebackRequest),
|
|
/* harmony export */ load: () => (/* binding */ load),
|
|
/* harmony export */ refundRequest: () => (/* binding */ refundRequest),
|
|
/* harmony export */ rejectChargebackRequest: () => (/* binding */ rejectChargebackRequest)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _config_axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../config/axios */ "./resources/js/config/axios.js");
|
|
/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../helper */ "./resources/js/helper/index.js");
|
|
|
|
|
|
var load = function load(_ref) {
|
|
var commit = _ref.commit;
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].get('dashboard').then(function (response) {
|
|
if ((0,_helper__WEBPACK_IMPORTED_MODULE_1__.isApiSuccess)(response)) {
|
|
commit('SET_MERCHANTS', response.data.merchants);
|
|
commit('SET_ANNOUNCEMENTS', response.data.announcements);
|
|
}
|
|
return Promise.resolve(response);
|
|
})["catch"](function (exception) {
|
|
commit('SET_MERCHANTS', []);
|
|
commit('SET_ANNOUNCEMENTS', []);
|
|
console.log('Dashboard Data Load Exception: ', exception);
|
|
});
|
|
};
|
|
var approveChargebackRequest = function approveChargebackRequest(_ref2, payload) {
|
|
var commit = _ref2.commit;
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].post('chargeback/approve', payload).then(function (response) {
|
|
return Promise.resolve(response);
|
|
})["catch"](function (exception) {
|
|
console.log('Approve Chargeback Request Exception: ', exception);
|
|
});
|
|
};
|
|
var rejectChargebackRequest = function rejectChargebackRequest(_ref3, payload) {
|
|
var commit = _ref3.commit;
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].post('chargeback/reject', payload).then(function (response) {
|
|
return Promise.resolve(response);
|
|
})["catch"](function (exception) {
|
|
console.log('Reject Chargeback Request Exception: ', exception);
|
|
});
|
|
};
|
|
var refundRequest = function refundRequest(_ref4, payload) {
|
|
var commit = _ref4.commit;
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].post('refundrequest', payload, {
|
|
headers: {
|
|
'Content-Type': 'multipart/form-data'
|
|
}
|
|
}).then(function (response) {
|
|
return Promise.resolve(response);
|
|
})["catch"](function (exception) {
|
|
console.log('Refund Request Exception: ', exception);
|
|
});
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/store/dashboard/getters.js":
|
|
/*!*************************************************!*\
|
|
!*** ./resources/js/store/dashboard/getters.js ***!
|
|
\*************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ announcements: () => (/* binding */ announcements),
|
|
/* harmony export */ getSidebarMenuItems: () => (/* binding */ getSidebarMenuItems),
|
|
/* harmony export */ merchants: () => (/* binding */ merchants)
|
|
/* harmony export */ });
|
|
var merchants = function merchants(state) {
|
|
return state.merchants;
|
|
};
|
|
var announcements = function announcements(state) {
|
|
return state.announcements;
|
|
};
|
|
var getSidebarMenuItems = function getSidebarMenuItems(state) {
|
|
return state.sidebar_menu_items;
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/store/dashboard/index.js":
|
|
/*!***********************************************!*\
|
|
!*** ./resources/js/store/dashboard/index.js ***!
|
|
\***********************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./state */ "./resources/js/store/dashboard/state.js");
|
|
/* harmony import */ var _getters__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getters */ "./resources/js/store/dashboard/getters.js");
|
|
/* harmony import */ var _mutations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mutations */ "./resources/js/store/dashboard/mutations.js");
|
|
/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./actions */ "./resources/js/store/dashboard/actions.js");
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
namespaced: true,
|
|
state: _state__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
getters: _getters__WEBPACK_IMPORTED_MODULE_1__,
|
|
mutations: _mutations__WEBPACK_IMPORTED_MODULE_2__,
|
|
actions: _actions__WEBPACK_IMPORTED_MODULE_3__
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/store/dashboard/mutations.js":
|
|
/*!***************************************************!*\
|
|
!*** ./resources/js/store/dashboard/mutations.js ***!
|
|
\***************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ SET_ANNOUNCEMENTS: () => (/* binding */ SET_ANNOUNCEMENTS),
|
|
/* harmony export */ SET_MERCHANTS: () => (/* binding */ SET_MERCHANTS),
|
|
/* harmony export */ SET_SIDEBAR_MENU_ITEMS: () => (/* binding */ SET_SIDEBAR_MENU_ITEMS)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/helper */ "./resources/js/helper/index.js");
|
|
|
|
var SET_MERCHANTS = function SET_MERCHANTS(state, value) {
|
|
state.merchants = value;
|
|
};
|
|
var SET_ANNOUNCEMENTS = function SET_ANNOUNCEMENTS(state, value) {
|
|
state.announcements = value;
|
|
};
|
|
var SET_SIDEBAR_MENU_ITEMS = function SET_SIDEBAR_MENU_ITEMS(state) {
|
|
state.sidebar_menu_items = (0,_helper__WEBPACK_IMPORTED_MODULE_0__.generateSidebarMenuItems)();
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/store/dashboard/state.js":
|
|
/*!***********************************************!*\
|
|
!*** ./resources/js/store/dashboard/state.js ***!
|
|
\***********************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
merchants: [],
|
|
announcements: [],
|
|
sidebar_menu_items: []
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/store/global/actions.js":
|
|
/*!**********************************************!*\
|
|
!*** ./resources/js/store/global/actions.js ***!
|
|
\**********************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ allTransactions: () => (/* binding */ allTransactions),
|
|
/* harmony export */ loadChargebackTransactions: () => (/* binding */ loadChargebackTransactions),
|
|
/* harmony export */ loadIntegratorInformation: () => (/* binding */ loadIntegratorInformation),
|
|
/* harmony export */ loadMerchants: () => (/* binding */ loadMerchants),
|
|
/* harmony export */ loadRefundedTransactions: () => (/* binding */ loadRefundedTransactions)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _config_axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/config/axios */ "./resources/js/config/axios.js");
|
|
|
|
var loadMerchants = function loadMerchants(_ref, filter_data) {
|
|
var commit = _ref.commit;
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].post('merchantlist', filter_data).then(function (response) {
|
|
return Promise.resolve(response);
|
|
})["catch"](function (exception) {
|
|
console.log('Merchants API Exception', exception);
|
|
});
|
|
};
|
|
var allTransactions = function allTransactions(_ref2, filter_data) {
|
|
var commit = _ref2.commit;
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].post('alltransaction', filter_data).then(function (response) {
|
|
return Promise.resolve(response);
|
|
})["catch"](function (exception) {
|
|
console.log('All Transaction API Exception', exception);
|
|
});
|
|
};
|
|
var loadRefundedTransactions = function loadRefundedTransactions(_ref3, filter_data) {
|
|
var commit = _ref3.commit;
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].post('refundedtransaction', filter_data).then(function (response) {
|
|
return Promise.resolve(response);
|
|
})["catch"](function (exception) {
|
|
console.log('Refunded API Exception', exception);
|
|
});
|
|
};
|
|
var loadChargebackTransactions = function loadChargebackTransactions(_ref4, filter_data) {
|
|
var commit = _ref4.commit;
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].get('chargeback/list', {
|
|
params: filter_data
|
|
}).then(function (response) {
|
|
return Promise.resolve(response);
|
|
})["catch"](function (exception) {
|
|
console.log('Chargeback API Exception', exception);
|
|
});
|
|
};
|
|
var loadIntegratorInformation = function loadIntegratorInformation() {
|
|
return _config_axios__WEBPACK_IMPORTED_MODULE_0__["default"].get('integratorinfo').then(function (response) {
|
|
return Promise.resolve(response);
|
|
})["catch"](function (exception) {
|
|
console.log('Integrator Information API Exception', exception);
|
|
});
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/store/global/getters.js":
|
|
/*!**********************************************!*\
|
|
!*** ./resources/js/store/global/getters.js ***!
|
|
\**********************************************/
|
|
/***/ (() => {
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/store/global/index.js":
|
|
/*!********************************************!*\
|
|
!*** ./resources/js/store/global/index.js ***!
|
|
\********************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./state */ "./resources/js/store/global/state.js");
|
|
/* harmony import */ var _getters__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getters */ "./resources/js/store/global/getters.js");
|
|
/* harmony import */ var _getters__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_getters__WEBPACK_IMPORTED_MODULE_1__);
|
|
/* harmony import */ var _mutations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mutations */ "./resources/js/store/global/mutations.js");
|
|
/* harmony import */ var _mutations__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_mutations__WEBPACK_IMPORTED_MODULE_2__);
|
|
/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./actions */ "./resources/js/store/global/actions.js");
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
namespaced: true,
|
|
state: _state__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
getters: _getters__WEBPACK_IMPORTED_MODULE_1__,
|
|
mutations: _mutations__WEBPACK_IMPORTED_MODULE_2__,
|
|
actions: _actions__WEBPACK_IMPORTED_MODULE_3__
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/store/global/mutations.js":
|
|
/*!************************************************!*\
|
|
!*** ./resources/js/store/global/mutations.js ***!
|
|
\************************************************/
|
|
/***/ (() => {
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/store/global/state.js":
|
|
/*!********************************************!*\
|
|
!*** ./resources/js/store/global/state.js ***!
|
|
\********************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/store/index.js":
|
|
/*!*************************************!*\
|
|
!*** ./resources/js/store/index.js ***!
|
|
\*************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vuex */ "./node_modules/vuex/dist/vuex.esm-bundler.js");
|
|
/* harmony import */ var _auth__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./auth */ "./resources/js/store/auth/index.js");
|
|
/* harmony import */ var _dashboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dashboard */ "./resources/js/store/dashboard/index.js");
|
|
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./global */ "./resources/js/store/global/index.js");
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,vuex__WEBPACK_IMPORTED_MODULE_3__.createStore)({
|
|
modules: {
|
|
auth: _auth__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
dashboard: _dashboard__WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
global: _global__WEBPACK_IMPORTED_MODULE_2__["default"]
|
|
}
|
|
}));
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/base64-js/index.js":
|
|
/*!*****************************************!*\
|
|
!*** ./node_modules/base64-js/index.js ***!
|
|
\*****************************************/
|
|
/***/ ((__unused_webpack_module, exports) => {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.byteLength = byteLength
|
|
exports.toByteArray = toByteArray
|
|
exports.fromByteArray = fromByteArray
|
|
|
|
var lookup = []
|
|
var revLookup = []
|
|
var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
|
|
|
|
var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
|
|
for (var i = 0, len = code.length; i < len; ++i) {
|
|
lookup[i] = code[i]
|
|
revLookup[code.charCodeAt(i)] = i
|
|
}
|
|
|
|
// Support decoding URL-safe base64 strings, as Node.js does.
|
|
// See: https://en.wikipedia.org/wiki/Base64#URL_applications
|
|
revLookup['-'.charCodeAt(0)] = 62
|
|
revLookup['_'.charCodeAt(0)] = 63
|
|
|
|
function getLens (b64) {
|
|
var len = b64.length
|
|
|
|
if (len % 4 > 0) {
|
|
throw new Error('Invalid string. Length must be a multiple of 4')
|
|
}
|
|
|
|
// Trim off extra bytes after placeholder bytes are found
|
|
// See: https://github.com/beatgammit/base64-js/issues/42
|
|
var validLen = b64.indexOf('=')
|
|
if (validLen === -1) validLen = len
|
|
|
|
var placeHoldersLen = validLen === len
|
|
? 0
|
|
: 4 - (validLen % 4)
|
|
|
|
return [validLen, placeHoldersLen]
|
|
}
|
|
|
|
// base64 is 4/3 + up to two characters of the original data
|
|
function byteLength (b64) {
|
|
var lens = getLens(b64)
|
|
var validLen = lens[0]
|
|
var placeHoldersLen = lens[1]
|
|
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
|
|
}
|
|
|
|
function _byteLength (b64, validLen, placeHoldersLen) {
|
|
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
|
|
}
|
|
|
|
function toByteArray (b64) {
|
|
var tmp
|
|
var lens = getLens(b64)
|
|
var validLen = lens[0]
|
|
var placeHoldersLen = lens[1]
|
|
|
|
var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
|
|
|
|
var curByte = 0
|
|
|
|
// if there are placeholders, only get up to the last complete 4 chars
|
|
var len = placeHoldersLen > 0
|
|
? validLen - 4
|
|
: validLen
|
|
|
|
var i
|
|
for (i = 0; i < len; i += 4) {
|
|
tmp =
|
|
(revLookup[b64.charCodeAt(i)] << 18) |
|
|
(revLookup[b64.charCodeAt(i + 1)] << 12) |
|
|
(revLookup[b64.charCodeAt(i + 2)] << 6) |
|
|
revLookup[b64.charCodeAt(i + 3)]
|
|
arr[curByte++] = (tmp >> 16) & 0xFF
|
|
arr[curByte++] = (tmp >> 8) & 0xFF
|
|
arr[curByte++] = tmp & 0xFF
|
|
}
|
|
|
|
if (placeHoldersLen === 2) {
|
|
tmp =
|
|
(revLookup[b64.charCodeAt(i)] << 2) |
|
|
(revLookup[b64.charCodeAt(i + 1)] >> 4)
|
|
arr[curByte++] = tmp & 0xFF
|
|
}
|
|
|
|
if (placeHoldersLen === 1) {
|
|
tmp =
|
|
(revLookup[b64.charCodeAt(i)] << 10) |
|
|
(revLookup[b64.charCodeAt(i + 1)] << 4) |
|
|
(revLookup[b64.charCodeAt(i + 2)] >> 2)
|
|
arr[curByte++] = (tmp >> 8) & 0xFF
|
|
arr[curByte++] = tmp & 0xFF
|
|
}
|
|
|
|
return arr
|
|
}
|
|
|
|
function tripletToBase64 (num) {
|
|
return lookup[num >> 18 & 0x3F] +
|
|
lookup[num >> 12 & 0x3F] +
|
|
lookup[num >> 6 & 0x3F] +
|
|
lookup[num & 0x3F]
|
|
}
|
|
|
|
function encodeChunk (uint8, start, end) {
|
|
var tmp
|
|
var output = []
|
|
for (var i = start; i < end; i += 3) {
|
|
tmp =
|
|
((uint8[i] << 16) & 0xFF0000) +
|
|
((uint8[i + 1] << 8) & 0xFF00) +
|
|
(uint8[i + 2] & 0xFF)
|
|
output.push(tripletToBase64(tmp))
|
|
}
|
|
return output.join('')
|
|
}
|
|
|
|
function fromByteArray (uint8) {
|
|
var tmp
|
|
var len = uint8.length
|
|
var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
|
|
var parts = []
|
|
var maxChunkLength = 16383 // must be multiple of 3
|
|
|
|
// go through the array every three bytes, we'll deal with trailing stuff later
|
|
for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
|
|
parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
|
|
}
|
|
|
|
// pad the end with zeros, but make sure to not forget the extra bytes
|
|
if (extraBytes === 1) {
|
|
tmp = uint8[len - 1]
|
|
parts.push(
|
|
lookup[tmp >> 2] +
|
|
lookup[(tmp << 4) & 0x3F] +
|
|
'=='
|
|
)
|
|
} else if (extraBytes === 2) {
|
|
tmp = (uint8[len - 2] << 8) + uint8[len - 1]
|
|
parts.push(
|
|
lookup[tmp >> 10] +
|
|
lookup[(tmp >> 4) & 0x3F] +
|
|
lookup[(tmp << 2) & 0x3F] +
|
|
'='
|
|
)
|
|
}
|
|
|
|
return parts.join('')
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/buffer/index.js":
|
|
/*!**************************************!*\
|
|
!*** ./node_modules/buffer/index.js ***!
|
|
\**************************************/
|
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
/*!
|
|
* The buffer module from node.js, for the browser.
|
|
*
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
* @license MIT
|
|
*/
|
|
/* eslint-disable no-proto */
|
|
|
|
|
|
|
|
var base64 = __webpack_require__(/*! base64-js */ "./node_modules/base64-js/index.js")
|
|
var ieee754 = __webpack_require__(/*! ieee754 */ "./node_modules/ieee754/index.js")
|
|
var isArray = __webpack_require__(/*! isarray */ "./node_modules/isarray/index.js")
|
|
|
|
exports.Buffer = Buffer
|
|
exports.SlowBuffer = SlowBuffer
|
|
exports.INSPECT_MAX_BYTES = 50
|
|
|
|
/**
|
|
* If `Buffer.TYPED_ARRAY_SUPPORT`:
|
|
* === true Use Uint8Array implementation (fastest)
|
|
* === false Use Object implementation (most compatible, even IE6)
|
|
*
|
|
* Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
|
|
* Opera 11.6+, iOS 4.2+.
|
|
*
|
|
* Due to various browser bugs, sometimes the Object implementation will be used even
|
|
* when the browser supports typed arrays.
|
|
*
|
|
* Note:
|
|
*
|
|
* - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
|
|
* See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
|
|
*
|
|
* - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
|
|
*
|
|
* - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
|
|
* incorrect length in some situations.
|
|
|
|
* We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
|
|
* get the Object implementation, which is slower but behaves correctly.
|
|
*/
|
|
Buffer.TYPED_ARRAY_SUPPORT = __webpack_require__.g.TYPED_ARRAY_SUPPORT !== undefined
|
|
? __webpack_require__.g.TYPED_ARRAY_SUPPORT
|
|
: typedArraySupport()
|
|
|
|
/*
|
|
* Export kMaxLength after typed array support is determined.
|
|
*/
|
|
exports.kMaxLength = kMaxLength()
|
|
|
|
function typedArraySupport () {
|
|
try {
|
|
var arr = new Uint8Array(1)
|
|
arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
|
|
return arr.foo() === 42 && // typed array instances can be augmented
|
|
typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
|
|
arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
|
|
} catch (e) {
|
|
return false
|
|
}
|
|
}
|
|
|
|
function kMaxLength () {
|
|
return Buffer.TYPED_ARRAY_SUPPORT
|
|
? 0x7fffffff
|
|
: 0x3fffffff
|
|
}
|
|
|
|
function createBuffer (that, length) {
|
|
if (kMaxLength() < length) {
|
|
throw new RangeError('Invalid typed array length')
|
|
}
|
|
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
|
// Return an augmented `Uint8Array` instance, for best performance
|
|
that = new Uint8Array(length)
|
|
that.__proto__ = Buffer.prototype
|
|
} else {
|
|
// Fallback: Return an object instance of the Buffer class
|
|
if (that === null) {
|
|
that = new Buffer(length)
|
|
}
|
|
that.length = length
|
|
}
|
|
|
|
return that
|
|
}
|
|
|
|
/**
|
|
* The Buffer constructor returns instances of `Uint8Array` that have their
|
|
* prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
|
|
* `Uint8Array`, so the returned instances will have all the node `Buffer` methods
|
|
* and the `Uint8Array` methods. Square bracket notation works as expected -- it
|
|
* returns a single octet.
|
|
*
|
|
* The `Uint8Array` prototype remains unmodified.
|
|
*/
|
|
|
|
function Buffer (arg, encodingOrOffset, length) {
|
|
if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
|
|
return new Buffer(arg, encodingOrOffset, length)
|
|
}
|
|
|
|
// Common case.
|
|
if (typeof arg === 'number') {
|
|
if (typeof encodingOrOffset === 'string') {
|
|
throw new Error(
|
|
'If encoding is specified then the first argument must be a string'
|
|
)
|
|
}
|
|
return allocUnsafe(this, arg)
|
|
}
|
|
return from(this, arg, encodingOrOffset, length)
|
|
}
|
|
|
|
Buffer.poolSize = 8192 // not used by this implementation
|
|
|
|
// TODO: Legacy, not needed anymore. Remove in next major version.
|
|
Buffer._augment = function (arr) {
|
|
arr.__proto__ = Buffer.prototype
|
|
return arr
|
|
}
|
|
|
|
function from (that, value, encodingOrOffset, length) {
|
|
if (typeof value === 'number') {
|
|
throw new TypeError('"value" argument must not be a number')
|
|
}
|
|
|
|
if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
|
|
return fromArrayBuffer(that, value, encodingOrOffset, length)
|
|
}
|
|
|
|
if (typeof value === 'string') {
|
|
return fromString(that, value, encodingOrOffset)
|
|
}
|
|
|
|
return fromObject(that, value)
|
|
}
|
|
|
|
/**
|
|
* Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
|
|
* if value is a number.
|
|
* Buffer.from(str[, encoding])
|
|
* Buffer.from(array)
|
|
* Buffer.from(buffer)
|
|
* Buffer.from(arrayBuffer[, byteOffset[, length]])
|
|
**/
|
|
Buffer.from = function (value, encodingOrOffset, length) {
|
|
return from(null, value, encodingOrOffset, length)
|
|
}
|
|
|
|
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
|
Buffer.prototype.__proto__ = Uint8Array.prototype
|
|
Buffer.__proto__ = Uint8Array
|
|
if (typeof Symbol !== 'undefined' && Symbol.species &&
|
|
Buffer[Symbol.species] === Buffer) {
|
|
// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
|
|
Object.defineProperty(Buffer, Symbol.species, {
|
|
value: null,
|
|
configurable: true
|
|
})
|
|
}
|
|
}
|
|
|
|
function assertSize (size) {
|
|
if (typeof size !== 'number') {
|
|
throw new TypeError('"size" argument must be a number')
|
|
} else if (size < 0) {
|
|
throw new RangeError('"size" argument must not be negative')
|
|
}
|
|
}
|
|
|
|
function alloc (that, size, fill, encoding) {
|
|
assertSize(size)
|
|
if (size <= 0) {
|
|
return createBuffer(that, size)
|
|
}
|
|
if (fill !== undefined) {
|
|
// Only pay attention to encoding if it's a string. This
|
|
// prevents accidentally sending in a number that would
|
|
// be interpretted as a start offset.
|
|
return typeof encoding === 'string'
|
|
? createBuffer(that, size).fill(fill, encoding)
|
|
: createBuffer(that, size).fill(fill)
|
|
}
|
|
return createBuffer(that, size)
|
|
}
|
|
|
|
/**
|
|
* Creates a new filled Buffer instance.
|
|
* alloc(size[, fill[, encoding]])
|
|
**/
|
|
Buffer.alloc = function (size, fill, encoding) {
|
|
return alloc(null, size, fill, encoding)
|
|
}
|
|
|
|
function allocUnsafe (that, size) {
|
|
assertSize(size)
|
|
that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
|
|
if (!Buffer.TYPED_ARRAY_SUPPORT) {
|
|
for (var i = 0; i < size; ++i) {
|
|
that[i] = 0
|
|
}
|
|
}
|
|
return that
|
|
}
|
|
|
|
/**
|
|
* Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
|
|
* */
|
|
Buffer.allocUnsafe = function (size) {
|
|
return allocUnsafe(null, size)
|
|
}
|
|
/**
|
|
* Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
|
|
*/
|
|
Buffer.allocUnsafeSlow = function (size) {
|
|
return allocUnsafe(null, size)
|
|
}
|
|
|
|
function fromString (that, string, encoding) {
|
|
if (typeof encoding !== 'string' || encoding === '') {
|
|
encoding = 'utf8'
|
|
}
|
|
|
|
if (!Buffer.isEncoding(encoding)) {
|
|
throw new TypeError('"encoding" must be a valid string encoding')
|
|
}
|
|
|
|
var length = byteLength(string, encoding) | 0
|
|
that = createBuffer(that, length)
|
|
|
|
var actual = that.write(string, encoding)
|
|
|
|
if (actual !== length) {
|
|
// Writing a hex string, for example, that contains invalid characters will
|
|
// cause everything after the first invalid character to be ignored. (e.g.
|
|
// 'abxxcd' will be treated as 'ab')
|
|
that = that.slice(0, actual)
|
|
}
|
|
|
|
return that
|
|
}
|
|
|
|
function fromArrayLike (that, array) {
|
|
var length = array.length < 0 ? 0 : checked(array.length) | 0
|
|
that = createBuffer(that, length)
|
|
for (var i = 0; i < length; i += 1) {
|
|
that[i] = array[i] & 255
|
|
}
|
|
return that
|
|
}
|
|
|
|
function fromArrayBuffer (that, array, byteOffset, length) {
|
|
array.byteLength // this throws if `array` is not a valid ArrayBuffer
|
|
|
|
if (byteOffset < 0 || array.byteLength < byteOffset) {
|
|
throw new RangeError('\'offset\' is out of bounds')
|
|
}
|
|
|
|
if (array.byteLength < byteOffset + (length || 0)) {
|
|
throw new RangeError('\'length\' is out of bounds')
|
|
}
|
|
|
|
if (byteOffset === undefined && length === undefined) {
|
|
array = new Uint8Array(array)
|
|
} else if (length === undefined) {
|
|
array = new Uint8Array(array, byteOffset)
|
|
} else {
|
|
array = new Uint8Array(array, byteOffset, length)
|
|
}
|
|
|
|
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
|
// Return an augmented `Uint8Array` instance, for best performance
|
|
that = array
|
|
that.__proto__ = Buffer.prototype
|
|
} else {
|
|
// Fallback: Return an object instance of the Buffer class
|
|
that = fromArrayLike(that, array)
|
|
}
|
|
return that
|
|
}
|
|
|
|
function fromObject (that, obj) {
|
|
if (Buffer.isBuffer(obj)) {
|
|
var len = checked(obj.length) | 0
|
|
that = createBuffer(that, len)
|
|
|
|
if (that.length === 0) {
|
|
return that
|
|
}
|
|
|
|
obj.copy(that, 0, 0, len)
|
|
return that
|
|
}
|
|
|
|
if (obj) {
|
|
if ((typeof ArrayBuffer !== 'undefined' &&
|
|
obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
|
|
if (typeof obj.length !== 'number' || isnan(obj.length)) {
|
|
return createBuffer(that, 0)
|
|
}
|
|
return fromArrayLike(that, obj)
|
|
}
|
|
|
|
if (obj.type === 'Buffer' && isArray(obj.data)) {
|
|
return fromArrayLike(that, obj.data)
|
|
}
|
|
}
|
|
|
|
throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
|
|
}
|
|
|
|
function checked (length) {
|
|
// Note: cannot use `length < kMaxLength()` here because that fails when
|
|
// length is NaN (which is otherwise coerced to zero.)
|
|
if (length >= kMaxLength()) {
|
|
throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
|
|
'size: 0x' + kMaxLength().toString(16) + ' bytes')
|
|
}
|
|
return length | 0
|
|
}
|
|
|
|
function SlowBuffer (length) {
|
|
if (+length != length) { // eslint-disable-line eqeqeq
|
|
length = 0
|
|
}
|
|
return Buffer.alloc(+length)
|
|
}
|
|
|
|
Buffer.isBuffer = function isBuffer (b) {
|
|
return !!(b != null && b._isBuffer)
|
|
}
|
|
|
|
Buffer.compare = function compare (a, b) {
|
|
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
|
|
throw new TypeError('Arguments must be Buffers')
|
|
}
|
|
|
|
if (a === b) return 0
|
|
|
|
var x = a.length
|
|
var y = b.length
|
|
|
|
for (var i = 0, len = Math.min(x, y); i < len; ++i) {
|
|
if (a[i] !== b[i]) {
|
|
x = a[i]
|
|
y = b[i]
|
|
break
|
|
}
|
|
}
|
|
|
|
if (x < y) return -1
|
|
if (y < x) return 1
|
|
return 0
|
|
}
|
|
|
|
Buffer.isEncoding = function isEncoding (encoding) {
|
|
switch (String(encoding).toLowerCase()) {
|
|
case 'hex':
|
|
case 'utf8':
|
|
case 'utf-8':
|
|
case 'ascii':
|
|
case 'latin1':
|
|
case 'binary':
|
|
case 'base64':
|
|
case 'ucs2':
|
|
case 'ucs-2':
|
|
case 'utf16le':
|
|
case 'utf-16le':
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
Buffer.concat = function concat (list, length) {
|
|
if (!isArray(list)) {
|
|
throw new TypeError('"list" argument must be an Array of Buffers')
|
|
}
|
|
|
|
if (list.length === 0) {
|
|
return Buffer.alloc(0)
|
|
}
|
|
|
|
var i
|
|
if (length === undefined) {
|
|
length = 0
|
|
for (i = 0; i < list.length; ++i) {
|
|
length += list[i].length
|
|
}
|
|
}
|
|
|
|
var buffer = Buffer.allocUnsafe(length)
|
|
var pos = 0
|
|
for (i = 0; i < list.length; ++i) {
|
|
var buf = list[i]
|
|
if (!Buffer.isBuffer(buf)) {
|
|
throw new TypeError('"list" argument must be an Array of Buffers')
|
|
}
|
|
buf.copy(buffer, pos)
|
|
pos += buf.length
|
|
}
|
|
return buffer
|
|
}
|
|
|
|
function byteLength (string, encoding) {
|
|
if (Buffer.isBuffer(string)) {
|
|
return string.length
|
|
}
|
|
if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
|
|
(ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
|
|
return string.byteLength
|
|
}
|
|
if (typeof string !== 'string') {
|
|
string = '' + string
|
|
}
|
|
|
|
var len = string.length
|
|
if (len === 0) return 0
|
|
|
|
// Use a for loop to avoid recursion
|
|
var loweredCase = false
|
|
for (;;) {
|
|
switch (encoding) {
|
|
case 'ascii':
|
|
case 'latin1':
|
|
case 'binary':
|
|
return len
|
|
case 'utf8':
|
|
case 'utf-8':
|
|
case undefined:
|
|
return utf8ToBytes(string).length
|
|
case 'ucs2':
|
|
case 'ucs-2':
|
|
case 'utf16le':
|
|
case 'utf-16le':
|
|
return len * 2
|
|
case 'hex':
|
|
return len >>> 1
|
|
case 'base64':
|
|
return base64ToBytes(string).length
|
|
default:
|
|
if (loweredCase) return utf8ToBytes(string).length // assume utf8
|
|
encoding = ('' + encoding).toLowerCase()
|
|
loweredCase = true
|
|
}
|
|
}
|
|
}
|
|
Buffer.byteLength = byteLength
|
|
|
|
function slowToString (encoding, start, end) {
|
|
var loweredCase = false
|
|
|
|
// No need to verify that "this.length <= MAX_UINT32" since it's a read-only
|
|
// property of a typed array.
|
|
|
|
// This behaves neither like String nor Uint8Array in that we set start/end
|
|
// to their upper/lower bounds if the value passed is out of range.
|
|
// undefined is handled specially as per ECMA-262 6th Edition,
|
|
// Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
|
|
if (start === undefined || start < 0) {
|
|
start = 0
|
|
}
|
|
// Return early if start > this.length. Done here to prevent potential uint32
|
|
// coercion fail below.
|
|
if (start > this.length) {
|
|
return ''
|
|
}
|
|
|
|
if (end === undefined || end > this.length) {
|
|
end = this.length
|
|
}
|
|
|
|
if (end <= 0) {
|
|
return ''
|
|
}
|
|
|
|
// Force coersion to uint32. This will also coerce falsey/NaN values to 0.
|
|
end >>>= 0
|
|
start >>>= 0
|
|
|
|
if (end <= start) {
|
|
return ''
|
|
}
|
|
|
|
if (!encoding) encoding = 'utf8'
|
|
|
|
while (true) {
|
|
switch (encoding) {
|
|
case 'hex':
|
|
return hexSlice(this, start, end)
|
|
|
|
case 'utf8':
|
|
case 'utf-8':
|
|
return utf8Slice(this, start, end)
|
|
|
|
case 'ascii':
|
|
return asciiSlice(this, start, end)
|
|
|
|
case 'latin1':
|
|
case 'binary':
|
|
return latin1Slice(this, start, end)
|
|
|
|
case 'base64':
|
|
return base64Slice(this, start, end)
|
|
|
|
case 'ucs2':
|
|
case 'ucs-2':
|
|
case 'utf16le':
|
|
case 'utf-16le':
|
|
return utf16leSlice(this, start, end)
|
|
|
|
default:
|
|
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
|
|
encoding = (encoding + '').toLowerCase()
|
|
loweredCase = true
|
|
}
|
|
}
|
|
}
|
|
|
|
// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
|
|
// Buffer instances.
|
|
Buffer.prototype._isBuffer = true
|
|
|
|
function swap (b, n, m) {
|
|
var i = b[n]
|
|
b[n] = b[m]
|
|
b[m] = i
|
|
}
|
|
|
|
Buffer.prototype.swap16 = function swap16 () {
|
|
var len = this.length
|
|
if (len % 2 !== 0) {
|
|
throw new RangeError('Buffer size must be a multiple of 16-bits')
|
|
}
|
|
for (var i = 0; i < len; i += 2) {
|
|
swap(this, i, i + 1)
|
|
}
|
|
return this
|
|
}
|
|
|
|
Buffer.prototype.swap32 = function swap32 () {
|
|
var len = this.length
|
|
if (len % 4 !== 0) {
|
|
throw new RangeError('Buffer size must be a multiple of 32-bits')
|
|
}
|
|
for (var i = 0; i < len; i += 4) {
|
|
swap(this, i, i + 3)
|
|
swap(this, i + 1, i + 2)
|
|
}
|
|
return this
|
|
}
|
|
|
|
Buffer.prototype.swap64 = function swap64 () {
|
|
var len = this.length
|
|
if (len % 8 !== 0) {
|
|
throw new RangeError('Buffer size must be a multiple of 64-bits')
|
|
}
|
|
for (var i = 0; i < len; i += 8) {
|
|
swap(this, i, i + 7)
|
|
swap(this, i + 1, i + 6)
|
|
swap(this, i + 2, i + 5)
|
|
swap(this, i + 3, i + 4)
|
|
}
|
|
return this
|
|
}
|
|
|
|
Buffer.prototype.toString = function toString () {
|
|
var length = this.length | 0
|
|
if (length === 0) return ''
|
|
if (arguments.length === 0) return utf8Slice(this, 0, length)
|
|
return slowToString.apply(this, arguments)
|
|
}
|
|
|
|
Buffer.prototype.equals = function equals (b) {
|
|
if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
|
|
if (this === b) return true
|
|
return Buffer.compare(this, b) === 0
|
|
}
|
|
|
|
Buffer.prototype.inspect = function inspect () {
|
|
var str = ''
|
|
var max = exports.INSPECT_MAX_BYTES
|
|
if (this.length > 0) {
|
|
str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
|
|
if (this.length > max) str += ' ... '
|
|
}
|
|
return '<Buffer ' + str + '>'
|
|
}
|
|
|
|
Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
|
|
if (!Buffer.isBuffer(target)) {
|
|
throw new TypeError('Argument must be a Buffer')
|
|
}
|
|
|
|
if (start === undefined) {
|
|
start = 0
|
|
}
|
|
if (end === undefined) {
|
|
end = target ? target.length : 0
|
|
}
|
|
if (thisStart === undefined) {
|
|
thisStart = 0
|
|
}
|
|
if (thisEnd === undefined) {
|
|
thisEnd = this.length
|
|
}
|
|
|
|
if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
|
|
throw new RangeError('out of range index')
|
|
}
|
|
|
|
if (thisStart >= thisEnd && start >= end) {
|
|
return 0
|
|
}
|
|
if (thisStart >= thisEnd) {
|
|
return -1
|
|
}
|
|
if (start >= end) {
|
|
return 1
|
|
}
|
|
|
|
start >>>= 0
|
|
end >>>= 0
|
|
thisStart >>>= 0
|
|
thisEnd >>>= 0
|
|
|
|
if (this === target) return 0
|
|
|
|
var x = thisEnd - thisStart
|
|
var y = end - start
|
|
var len = Math.min(x, y)
|
|
|
|
var thisCopy = this.slice(thisStart, thisEnd)
|
|
var targetCopy = target.slice(start, end)
|
|
|
|
for (var i = 0; i < len; ++i) {
|
|
if (thisCopy[i] !== targetCopy[i]) {
|
|
x = thisCopy[i]
|
|
y = targetCopy[i]
|
|
break
|
|
}
|
|
}
|
|
|
|
if (x < y) return -1
|
|
if (y < x) return 1
|
|
return 0
|
|
}
|
|
|
|
// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
|
|
// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
|
|
//
|
|
// Arguments:
|
|
// - buffer - a Buffer to search
|
|
// - val - a string, Buffer, or number
|
|
// - byteOffset - an index into `buffer`; will be clamped to an int32
|
|
// - encoding - an optional encoding, relevant is val is a string
|
|
// - dir - true for indexOf, false for lastIndexOf
|
|
function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
|
|
// Empty buffer means no match
|
|
if (buffer.length === 0) return -1
|
|
|
|
// Normalize byteOffset
|
|
if (typeof byteOffset === 'string') {
|
|
encoding = byteOffset
|
|
byteOffset = 0
|
|
} else if (byteOffset > 0x7fffffff) {
|
|
byteOffset = 0x7fffffff
|
|
} else if (byteOffset < -0x80000000) {
|
|
byteOffset = -0x80000000
|
|
}
|
|
byteOffset = +byteOffset // Coerce to Number.
|
|
if (isNaN(byteOffset)) {
|
|
// byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
|
|
byteOffset = dir ? 0 : (buffer.length - 1)
|
|
}
|
|
|
|
// Normalize byteOffset: negative offsets start from the end of the buffer
|
|
if (byteOffset < 0) byteOffset = buffer.length + byteOffset
|
|
if (byteOffset >= buffer.length) {
|
|
if (dir) return -1
|
|
else byteOffset = buffer.length - 1
|
|
} else if (byteOffset < 0) {
|
|
if (dir) byteOffset = 0
|
|
else return -1
|
|
}
|
|
|
|
// Normalize val
|
|
if (typeof val === 'string') {
|
|
val = Buffer.from(val, encoding)
|
|
}
|
|
|
|
// Finally, search either indexOf (if dir is true) or lastIndexOf
|
|
if (Buffer.isBuffer(val)) {
|
|
// Special case: looking for empty string/buffer always fails
|
|
if (val.length === 0) {
|
|
return -1
|
|
}
|
|
return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
|
|
} else if (typeof val === 'number') {
|
|
val = val & 0xFF // Search for a byte value [0-255]
|
|
if (Buffer.TYPED_ARRAY_SUPPORT &&
|
|
typeof Uint8Array.prototype.indexOf === 'function') {
|
|
if (dir) {
|
|
return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
|
|
} else {
|
|
return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
|
|
}
|
|
}
|
|
return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
|
|
}
|
|
|
|
throw new TypeError('val must be string, number or Buffer')
|
|
}
|
|
|
|
function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
|
|
var indexSize = 1
|
|
var arrLength = arr.length
|
|
var valLength = val.length
|
|
|
|
if (encoding !== undefined) {
|
|
encoding = String(encoding).toLowerCase()
|
|
if (encoding === 'ucs2' || encoding === 'ucs-2' ||
|
|
encoding === 'utf16le' || encoding === 'utf-16le') {
|
|
if (arr.length < 2 || val.length < 2) {
|
|
return -1
|
|
}
|
|
indexSize = 2
|
|
arrLength /= 2
|
|
valLength /= 2
|
|
byteOffset /= 2
|
|
}
|
|
}
|
|
|
|
function read (buf, i) {
|
|
if (indexSize === 1) {
|
|
return buf[i]
|
|
} else {
|
|
return buf.readUInt16BE(i * indexSize)
|
|
}
|
|
}
|
|
|
|
var i
|
|
if (dir) {
|
|
var foundIndex = -1
|
|
for (i = byteOffset; i < arrLength; i++) {
|
|
if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
|
|
if (foundIndex === -1) foundIndex = i
|
|
if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
|
|
} else {
|
|
if (foundIndex !== -1) i -= i - foundIndex
|
|
foundIndex = -1
|
|
}
|
|
}
|
|
} else {
|
|
if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
|
|
for (i = byteOffset; i >= 0; i--) {
|
|
var found = true
|
|
for (var j = 0; j < valLength; j++) {
|
|
if (read(arr, i + j) !== read(val, j)) {
|
|
found = false
|
|
break
|
|
}
|
|
}
|
|
if (found) return i
|
|
}
|
|
}
|
|
|
|
return -1
|
|
}
|
|
|
|
Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
|
|
return this.indexOf(val, byteOffset, encoding) !== -1
|
|
}
|
|
|
|
Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
|
|
return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
|
|
}
|
|
|
|
Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
|
|
return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
|
|
}
|
|
|
|
function hexWrite (buf, string, offset, length) {
|
|
offset = Number(offset) || 0
|
|
var remaining = buf.length - offset
|
|
if (!length) {
|
|
length = remaining
|
|
} else {
|
|
length = Number(length)
|
|
if (length > remaining) {
|
|
length = remaining
|
|
}
|
|
}
|
|
|
|
// must be an even number of digits
|
|
var strLen = string.length
|
|
if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
|
|
|
|
if (length > strLen / 2) {
|
|
length = strLen / 2
|
|
}
|
|
for (var i = 0; i < length; ++i) {
|
|
var parsed = parseInt(string.substr(i * 2, 2), 16)
|
|
if (isNaN(parsed)) return i
|
|
buf[offset + i] = parsed
|
|
}
|
|
return i
|
|
}
|
|
|
|
function utf8Write (buf, string, offset, length) {
|
|
return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
|
|
}
|
|
|
|
function asciiWrite (buf, string, offset, length) {
|
|
return blitBuffer(asciiToBytes(string), buf, offset, length)
|
|
}
|
|
|
|
function latin1Write (buf, string, offset, length) {
|
|
return asciiWrite(buf, string, offset, length)
|
|
}
|
|
|
|
function base64Write (buf, string, offset, length) {
|
|
return blitBuffer(base64ToBytes(string), buf, offset, length)
|
|
}
|
|
|
|
function ucs2Write (buf, string, offset, length) {
|
|
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
|
|
}
|
|
|
|
Buffer.prototype.write = function write (string, offset, length, encoding) {
|
|
// Buffer#write(string)
|
|
if (offset === undefined) {
|
|
encoding = 'utf8'
|
|
length = this.length
|
|
offset = 0
|
|
// Buffer#write(string, encoding)
|
|
} else if (length === undefined && typeof offset === 'string') {
|
|
encoding = offset
|
|
length = this.length
|
|
offset = 0
|
|
// Buffer#write(string, offset[, length][, encoding])
|
|
} else if (isFinite(offset)) {
|
|
offset = offset | 0
|
|
if (isFinite(length)) {
|
|
length = length | 0
|
|
if (encoding === undefined) encoding = 'utf8'
|
|
} else {
|
|
encoding = length
|
|
length = undefined
|
|
}
|
|
// legacy write(string, encoding, offset, length) - remove in v0.13
|
|
} else {
|
|
throw new Error(
|
|
'Buffer.write(string, encoding, offset[, length]) is no longer supported'
|
|
)
|
|
}
|
|
|
|
var remaining = this.length - offset
|
|
if (length === undefined || length > remaining) length = remaining
|
|
|
|
if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
|
|
throw new RangeError('Attempt to write outside buffer bounds')
|
|
}
|
|
|
|
if (!encoding) encoding = 'utf8'
|
|
|
|
var loweredCase = false
|
|
for (;;) {
|
|
switch (encoding) {
|
|
case 'hex':
|
|
return hexWrite(this, string, offset, length)
|
|
|
|
case 'utf8':
|
|
case 'utf-8':
|
|
return utf8Write(this, string, offset, length)
|
|
|
|
case 'ascii':
|
|
return asciiWrite(this, string, offset, length)
|
|
|
|
case 'latin1':
|
|
case 'binary':
|
|
return latin1Write(this, string, offset, length)
|
|
|
|
case 'base64':
|
|
// Warning: maxLength not taken into account in base64Write
|
|
return base64Write(this, string, offset, length)
|
|
|
|
case 'ucs2':
|
|
case 'ucs-2':
|
|
case 'utf16le':
|
|
case 'utf-16le':
|
|
return ucs2Write(this, string, offset, length)
|
|
|
|
default:
|
|
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
|
|
encoding = ('' + encoding).toLowerCase()
|
|
loweredCase = true
|
|
}
|
|
}
|
|
}
|
|
|
|
Buffer.prototype.toJSON = function toJSON () {
|
|
return {
|
|
type: 'Buffer',
|
|
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
}
|
|
}
|
|
|
|
function base64Slice (buf, start, end) {
|
|
if (start === 0 && end === buf.length) {
|
|
return base64.fromByteArray(buf)
|
|
} else {
|
|
return base64.fromByteArray(buf.slice(start, end))
|
|
}
|
|
}
|
|
|
|
function utf8Slice (buf, start, end) {
|
|
end = Math.min(buf.length, end)
|
|
var res = []
|
|
|
|
var i = start
|
|
while (i < end) {
|
|
var firstByte = buf[i]
|
|
var codePoint = null
|
|
var bytesPerSequence = (firstByte > 0xEF) ? 4
|
|
: (firstByte > 0xDF) ? 3
|
|
: (firstByte > 0xBF) ? 2
|
|
: 1
|
|
|
|
if (i + bytesPerSequence <= end) {
|
|
var secondByte, thirdByte, fourthByte, tempCodePoint
|
|
|
|
switch (bytesPerSequence) {
|
|
case 1:
|
|
if (firstByte < 0x80) {
|
|
codePoint = firstByte
|
|
}
|
|
break
|
|
case 2:
|
|
secondByte = buf[i + 1]
|
|
if ((secondByte & 0xC0) === 0x80) {
|
|
tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
|
|
if (tempCodePoint > 0x7F) {
|
|
codePoint = tempCodePoint
|
|
}
|
|
}
|
|
break
|
|
case 3:
|
|
secondByte = buf[i + 1]
|
|
thirdByte = buf[i + 2]
|
|
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
|
|
tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
|
|
if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
|
|
codePoint = tempCodePoint
|
|
}
|
|
}
|
|
break
|
|
case 4:
|
|
secondByte = buf[i + 1]
|
|
thirdByte = buf[i + 2]
|
|
fourthByte = buf[i + 3]
|
|
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
|
|
tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
|
|
if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
|
|
codePoint = tempCodePoint
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if (codePoint === null) {
|
|
// we did not generate a valid codePoint so insert a
|
|
// replacement char (U+FFFD) and advance only 1 byte
|
|
codePoint = 0xFFFD
|
|
bytesPerSequence = 1
|
|
} else if (codePoint > 0xFFFF) {
|
|
// encode to utf16 (surrogate pair dance)
|
|
codePoint -= 0x10000
|
|
res.push(codePoint >>> 10 & 0x3FF | 0xD800)
|
|
codePoint = 0xDC00 | codePoint & 0x3FF
|
|
}
|
|
|
|
res.push(codePoint)
|
|
i += bytesPerSequence
|
|
}
|
|
|
|
return decodeCodePointsArray(res)
|
|
}
|
|
|
|
// Based on http://stackoverflow.com/a/22747272/680742, the browser with
|
|
// the lowest limit is Chrome, with 0x10000 args.
|
|
// We go 1 magnitude less, for safety
|
|
var MAX_ARGUMENTS_LENGTH = 0x1000
|
|
|
|
function decodeCodePointsArray (codePoints) {
|
|
var len = codePoints.length
|
|
if (len <= MAX_ARGUMENTS_LENGTH) {
|
|
return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
|
|
}
|
|
|
|
// Decode in chunks to avoid "call stack size exceeded".
|
|
var res = ''
|
|
var i = 0
|
|
while (i < len) {
|
|
res += String.fromCharCode.apply(
|
|
String,
|
|
codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
|
|
)
|
|
}
|
|
return res
|
|
}
|
|
|
|
function asciiSlice (buf, start, end) {
|
|
var ret = ''
|
|
end = Math.min(buf.length, end)
|
|
|
|
for (var i = start; i < end; ++i) {
|
|
ret += String.fromCharCode(buf[i] & 0x7F)
|
|
}
|
|
return ret
|
|
}
|
|
|
|
function latin1Slice (buf, start, end) {
|
|
var ret = ''
|
|
end = Math.min(buf.length, end)
|
|
|
|
for (var i = start; i < end; ++i) {
|
|
ret += String.fromCharCode(buf[i])
|
|
}
|
|
return ret
|
|
}
|
|
|
|
function hexSlice (buf, start, end) {
|
|
var len = buf.length
|
|
|
|
if (!start || start < 0) start = 0
|
|
if (!end || end < 0 || end > len) end = len
|
|
|
|
var out = ''
|
|
for (var i = start; i < end; ++i) {
|
|
out += toHex(buf[i])
|
|
}
|
|
return out
|
|
}
|
|
|
|
function utf16leSlice (buf, start, end) {
|
|
var bytes = buf.slice(start, end)
|
|
var res = ''
|
|
for (var i = 0; i < bytes.length; i += 2) {
|
|
res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
|
|
}
|
|
return res
|
|
}
|
|
|
|
Buffer.prototype.slice = function slice (start, end) {
|
|
var len = this.length
|
|
start = ~~start
|
|
end = end === undefined ? len : ~~end
|
|
|
|
if (start < 0) {
|
|
start += len
|
|
if (start < 0) start = 0
|
|
} else if (start > len) {
|
|
start = len
|
|
}
|
|
|
|
if (end < 0) {
|
|
end += len
|
|
if (end < 0) end = 0
|
|
} else if (end > len) {
|
|
end = len
|
|
}
|
|
|
|
if (end < start) end = start
|
|
|
|
var newBuf
|
|
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
|
newBuf = this.subarray(start, end)
|
|
newBuf.__proto__ = Buffer.prototype
|
|
} else {
|
|
var sliceLen = end - start
|
|
newBuf = new Buffer(sliceLen, undefined)
|
|
for (var i = 0; i < sliceLen; ++i) {
|
|
newBuf[i] = this[i + start]
|
|
}
|
|
}
|
|
|
|
return newBuf
|
|
}
|
|
|
|
/*
|
|
* Need to make sure that buffer isn't trying to write out of bounds.
|
|
*/
|
|
function checkOffset (offset, ext, length) {
|
|
if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
|
|
if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
|
|
}
|
|
|
|
Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
|
|
offset = offset | 0
|
|
byteLength = byteLength | 0
|
|
if (!noAssert) checkOffset(offset, byteLength, this.length)
|
|
|
|
var val = this[offset]
|
|
var mul = 1
|
|
var i = 0
|
|
while (++i < byteLength && (mul *= 0x100)) {
|
|
val += this[offset + i] * mul
|
|
}
|
|
|
|
return val
|
|
}
|
|
|
|
Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
|
|
offset = offset | 0
|
|
byteLength = byteLength | 0
|
|
if (!noAssert) {
|
|
checkOffset(offset, byteLength, this.length)
|
|
}
|
|
|
|
var val = this[offset + --byteLength]
|
|
var mul = 1
|
|
while (byteLength > 0 && (mul *= 0x100)) {
|
|
val += this[offset + --byteLength] * mul
|
|
}
|
|
|
|
return val
|
|
}
|
|
|
|
Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
|
|
if (!noAssert) checkOffset(offset, 1, this.length)
|
|
return this[offset]
|
|
}
|
|
|
|
Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
|
|
if (!noAssert) checkOffset(offset, 2, this.length)
|
|
return this[offset] | (this[offset + 1] << 8)
|
|
}
|
|
|
|
Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
|
|
if (!noAssert) checkOffset(offset, 2, this.length)
|
|
return (this[offset] << 8) | this[offset + 1]
|
|
}
|
|
|
|
Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
|
|
if (!noAssert) checkOffset(offset, 4, this.length)
|
|
|
|
return ((this[offset]) |
|
|
(this[offset + 1] << 8) |
|
|
(this[offset + 2] << 16)) +
|
|
(this[offset + 3] * 0x1000000)
|
|
}
|
|
|
|
Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
|
|
if (!noAssert) checkOffset(offset, 4, this.length)
|
|
|
|
return (this[offset] * 0x1000000) +
|
|
((this[offset + 1] << 16) |
|
|
(this[offset + 2] << 8) |
|
|
this[offset + 3])
|
|
}
|
|
|
|
Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
|
|
offset = offset | 0
|
|
byteLength = byteLength | 0
|
|
if (!noAssert) checkOffset(offset, byteLength, this.length)
|
|
|
|
var val = this[offset]
|
|
var mul = 1
|
|
var i = 0
|
|
while (++i < byteLength && (mul *= 0x100)) {
|
|
val += this[offset + i] * mul
|
|
}
|
|
mul *= 0x80
|
|
|
|
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
|
|
|
|
return val
|
|
}
|
|
|
|
Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
|
|
offset = offset | 0
|
|
byteLength = byteLength | 0
|
|
if (!noAssert) checkOffset(offset, byteLength, this.length)
|
|
|
|
var i = byteLength
|
|
var mul = 1
|
|
var val = this[offset + --i]
|
|
while (i > 0 && (mul *= 0x100)) {
|
|
val += this[offset + --i] * mul
|
|
}
|
|
mul *= 0x80
|
|
|
|
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
|
|
|
|
return val
|
|
}
|
|
|
|
Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
|
|
if (!noAssert) checkOffset(offset, 1, this.length)
|
|
if (!(this[offset] & 0x80)) return (this[offset])
|
|
return ((0xff - this[offset] + 1) * -1)
|
|
}
|
|
|
|
Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
|
|
if (!noAssert) checkOffset(offset, 2, this.length)
|
|
var val = this[offset] | (this[offset + 1] << 8)
|
|
return (val & 0x8000) ? val | 0xFFFF0000 : val
|
|
}
|
|
|
|
Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
|
|
if (!noAssert) checkOffset(offset, 2, this.length)
|
|
var val = this[offset + 1] | (this[offset] << 8)
|
|
return (val & 0x8000) ? val | 0xFFFF0000 : val
|
|
}
|
|
|
|
Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
|
|
if (!noAssert) checkOffset(offset, 4, this.length)
|
|
|
|
return (this[offset]) |
|
|
(this[offset + 1] << 8) |
|
|
(this[offset + 2] << 16) |
|
|
(this[offset + 3] << 24)
|
|
}
|
|
|
|
Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
|
|
if (!noAssert) checkOffset(offset, 4, this.length)
|
|
|
|
return (this[offset] << 24) |
|
|
(this[offset + 1] << 16) |
|
|
(this[offset + 2] << 8) |
|
|
(this[offset + 3])
|
|
}
|
|
|
|
Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
|
|
if (!noAssert) checkOffset(offset, 4, this.length)
|
|
return ieee754.read(this, offset, true, 23, 4)
|
|
}
|
|
|
|
Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
|
|
if (!noAssert) checkOffset(offset, 4, this.length)
|
|
return ieee754.read(this, offset, false, 23, 4)
|
|
}
|
|
|
|
Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
|
|
if (!noAssert) checkOffset(offset, 8, this.length)
|
|
return ieee754.read(this, offset, true, 52, 8)
|
|
}
|
|
|
|
Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
|
|
if (!noAssert) checkOffset(offset, 8, this.length)
|
|
return ieee754.read(this, offset, false, 52, 8)
|
|
}
|
|
|
|
function checkInt (buf, value, offset, ext, max, min) {
|
|
if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
|
|
if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
|
|
if (offset + ext > buf.length) throw new RangeError('Index out of range')
|
|
}
|
|
|
|
Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
|
|
value = +value
|
|
offset = offset | 0
|
|
byteLength = byteLength | 0
|
|
if (!noAssert) {
|
|
var maxBytes = Math.pow(2, 8 * byteLength) - 1
|
|
checkInt(this, value, offset, byteLength, maxBytes, 0)
|
|
}
|
|
|
|
var mul = 1
|
|
var i = 0
|
|
this[offset] = value & 0xFF
|
|
while (++i < byteLength && (mul *= 0x100)) {
|
|
this[offset + i] = (value / mul) & 0xFF
|
|
}
|
|
|
|
return offset + byteLength
|
|
}
|
|
|
|
Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
|
|
value = +value
|
|
offset = offset | 0
|
|
byteLength = byteLength | 0
|
|
if (!noAssert) {
|
|
var maxBytes = Math.pow(2, 8 * byteLength) - 1
|
|
checkInt(this, value, offset, byteLength, maxBytes, 0)
|
|
}
|
|
|
|
var i = byteLength - 1
|
|
var mul = 1
|
|
this[offset + i] = value & 0xFF
|
|
while (--i >= 0 && (mul *= 0x100)) {
|
|
this[offset + i] = (value / mul) & 0xFF
|
|
}
|
|
|
|
return offset + byteLength
|
|
}
|
|
|
|
Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
|
|
value = +value
|
|
offset = offset | 0
|
|
if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
|
|
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
|
|
this[offset] = (value & 0xff)
|
|
return offset + 1
|
|
}
|
|
|
|
function objectWriteUInt16 (buf, value, offset, littleEndian) {
|
|
if (value < 0) value = 0xffff + value + 1
|
|
for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
|
|
buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
|
|
(littleEndian ? i : 1 - i) * 8
|
|
}
|
|
}
|
|
|
|
Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
|
|
value = +value
|
|
offset = offset | 0
|
|
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
|
|
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
|
this[offset] = (value & 0xff)
|
|
this[offset + 1] = (value >>> 8)
|
|
} else {
|
|
objectWriteUInt16(this, value, offset, true)
|
|
}
|
|
return offset + 2
|
|
}
|
|
|
|
Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
|
|
value = +value
|
|
offset = offset | 0
|
|
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
|
|
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
|
this[offset] = (value >>> 8)
|
|
this[offset + 1] = (value & 0xff)
|
|
} else {
|
|
objectWriteUInt16(this, value, offset, false)
|
|
}
|
|
return offset + 2
|
|
}
|
|
|
|
function objectWriteUInt32 (buf, value, offset, littleEndian) {
|
|
if (value < 0) value = 0xffffffff + value + 1
|
|
for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
|
|
buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
|
|
}
|
|
}
|
|
|
|
Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
|
|
value = +value
|
|
offset = offset | 0
|
|
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
|
|
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
|
this[offset + 3] = (value >>> 24)
|
|
this[offset + 2] = (value >>> 16)
|
|
this[offset + 1] = (value >>> 8)
|
|
this[offset] = (value & 0xff)
|
|
} else {
|
|
objectWriteUInt32(this, value, offset, true)
|
|
}
|
|
return offset + 4
|
|
}
|
|
|
|
Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
|
|
value = +value
|
|
offset = offset | 0
|
|
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
|
|
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
|
this[offset] = (value >>> 24)
|
|
this[offset + 1] = (value >>> 16)
|
|
this[offset + 2] = (value >>> 8)
|
|
this[offset + 3] = (value & 0xff)
|
|
} else {
|
|
objectWriteUInt32(this, value, offset, false)
|
|
}
|
|
return offset + 4
|
|
}
|
|
|
|
Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
|
|
value = +value
|
|
offset = offset | 0
|
|
if (!noAssert) {
|
|
var limit = Math.pow(2, 8 * byteLength - 1)
|
|
|
|
checkInt(this, value, offset, byteLength, limit - 1, -limit)
|
|
}
|
|
|
|
var i = 0
|
|
var mul = 1
|
|
var sub = 0
|
|
this[offset] = value & 0xFF
|
|
while (++i < byteLength && (mul *= 0x100)) {
|
|
if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
|
|
sub = 1
|
|
}
|
|
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
|
|
}
|
|
|
|
return offset + byteLength
|
|
}
|
|
|
|
Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
|
|
value = +value
|
|
offset = offset | 0
|
|
if (!noAssert) {
|
|
var limit = Math.pow(2, 8 * byteLength - 1)
|
|
|
|
checkInt(this, value, offset, byteLength, limit - 1, -limit)
|
|
}
|
|
|
|
var i = byteLength - 1
|
|
var mul = 1
|
|
var sub = 0
|
|
this[offset + i] = value & 0xFF
|
|
while (--i >= 0 && (mul *= 0x100)) {
|
|
if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
|
|
sub = 1
|
|
}
|
|
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
|
|
}
|
|
|
|
return offset + byteLength
|
|
}
|
|
|
|
Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
|
|
value = +value
|
|
offset = offset | 0
|
|
if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
|
|
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
|
|
if (value < 0) value = 0xff + value + 1
|
|
this[offset] = (value & 0xff)
|
|
return offset + 1
|
|
}
|
|
|
|
Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
|
|
value = +value
|
|
offset = offset | 0
|
|
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
|
|
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
|
this[offset] = (value & 0xff)
|
|
this[offset + 1] = (value >>> 8)
|
|
} else {
|
|
objectWriteUInt16(this, value, offset, true)
|
|
}
|
|
return offset + 2
|
|
}
|
|
|
|
Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
|
|
value = +value
|
|
offset = offset | 0
|
|
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
|
|
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
|
this[offset] = (value >>> 8)
|
|
this[offset + 1] = (value & 0xff)
|
|
} else {
|
|
objectWriteUInt16(this, value, offset, false)
|
|
}
|
|
return offset + 2
|
|
}
|
|
|
|
Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
|
|
value = +value
|
|
offset = offset | 0
|
|
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
|
|
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
|
this[offset] = (value & 0xff)
|
|
this[offset + 1] = (value >>> 8)
|
|
this[offset + 2] = (value >>> 16)
|
|
this[offset + 3] = (value >>> 24)
|
|
} else {
|
|
objectWriteUInt32(this, value, offset, true)
|
|
}
|
|
return offset + 4
|
|
}
|
|
|
|
Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
|
|
value = +value
|
|
offset = offset | 0
|
|
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
|
|
if (value < 0) value = 0xffffffff + value + 1
|
|
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
|
this[offset] = (value >>> 24)
|
|
this[offset + 1] = (value >>> 16)
|
|
this[offset + 2] = (value >>> 8)
|
|
this[offset + 3] = (value & 0xff)
|
|
} else {
|
|
objectWriteUInt32(this, value, offset, false)
|
|
}
|
|
return offset + 4
|
|
}
|
|
|
|
function checkIEEE754 (buf, value, offset, ext, max, min) {
|
|
if (offset + ext > buf.length) throw new RangeError('Index out of range')
|
|
if (offset < 0) throw new RangeError('Index out of range')
|
|
}
|
|
|
|
function writeFloat (buf, value, offset, littleEndian, noAssert) {
|
|
if (!noAssert) {
|
|
checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
|
|
}
|
|
ieee754.write(buf, value, offset, littleEndian, 23, 4)
|
|
return offset + 4
|
|
}
|
|
|
|
Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
|
|
return writeFloat(this, value, offset, true, noAssert)
|
|
}
|
|
|
|
Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
|
|
return writeFloat(this, value, offset, false, noAssert)
|
|
}
|
|
|
|
function writeDouble (buf, value, offset, littleEndian, noAssert) {
|
|
if (!noAssert) {
|
|
checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
|
|
}
|
|
ieee754.write(buf, value, offset, littleEndian, 52, 8)
|
|
return offset + 8
|
|
}
|
|
|
|
Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
|
|
return writeDouble(this, value, offset, true, noAssert)
|
|
}
|
|
|
|
Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
|
|
return writeDouble(this, value, offset, false, noAssert)
|
|
}
|
|
|
|
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
|
|
Buffer.prototype.copy = function copy (target, targetStart, start, end) {
|
|
if (!start) start = 0
|
|
if (!end && end !== 0) end = this.length
|
|
if (targetStart >= target.length) targetStart = target.length
|
|
if (!targetStart) targetStart = 0
|
|
if (end > 0 && end < start) end = start
|
|
|
|
// Copy 0 bytes; we're done
|
|
if (end === start) return 0
|
|
if (target.length === 0 || this.length === 0) return 0
|
|
|
|
// Fatal error conditions
|
|
if (targetStart < 0) {
|
|
throw new RangeError('targetStart out of bounds')
|
|
}
|
|
if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
|
|
if (end < 0) throw new RangeError('sourceEnd out of bounds')
|
|
|
|
// Are we oob?
|
|
if (end > this.length) end = this.length
|
|
if (target.length - targetStart < end - start) {
|
|
end = target.length - targetStart + start
|
|
}
|
|
|
|
var len = end - start
|
|
var i
|
|
|
|
if (this === target && start < targetStart && targetStart < end) {
|
|
// descending copy from end
|
|
for (i = len - 1; i >= 0; --i) {
|
|
target[i + targetStart] = this[i + start]
|
|
}
|
|
} else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
|
|
// ascending copy from start
|
|
for (i = 0; i < len; ++i) {
|
|
target[i + targetStart] = this[i + start]
|
|
}
|
|
} else {
|
|
Uint8Array.prototype.set.call(
|
|
target,
|
|
this.subarray(start, start + len),
|
|
targetStart
|
|
)
|
|
}
|
|
|
|
return len
|
|
}
|
|
|
|
// Usage:
|
|
// buffer.fill(number[, offset[, end]])
|
|
// buffer.fill(buffer[, offset[, end]])
|
|
// buffer.fill(string[, offset[, end]][, encoding])
|
|
Buffer.prototype.fill = function fill (val, start, end, encoding) {
|
|
// Handle string cases:
|
|
if (typeof val === 'string') {
|
|
if (typeof start === 'string') {
|
|
encoding = start
|
|
start = 0
|
|
end = this.length
|
|
} else if (typeof end === 'string') {
|
|
encoding = end
|
|
end = this.length
|
|
}
|
|
if (val.length === 1) {
|
|
var code = val.charCodeAt(0)
|
|
if (code < 256) {
|
|
val = code
|
|
}
|
|
}
|
|
if (encoding !== undefined && typeof encoding !== 'string') {
|
|
throw new TypeError('encoding must be a string')
|
|
}
|
|
if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
|
|
throw new TypeError('Unknown encoding: ' + encoding)
|
|
}
|
|
} else if (typeof val === 'number') {
|
|
val = val & 255
|
|
}
|
|
|
|
// Invalid ranges are not set to a default, so can range check early.
|
|
if (start < 0 || this.length < start || this.length < end) {
|
|
throw new RangeError('Out of range index')
|
|
}
|
|
|
|
if (end <= start) {
|
|
return this
|
|
}
|
|
|
|
start = start >>> 0
|
|
end = end === undefined ? this.length : end >>> 0
|
|
|
|
if (!val) val = 0
|
|
|
|
var i
|
|
if (typeof val === 'number') {
|
|
for (i = start; i < end; ++i) {
|
|
this[i] = val
|
|
}
|
|
} else {
|
|
var bytes = Buffer.isBuffer(val)
|
|
? val
|
|
: utf8ToBytes(new Buffer(val, encoding).toString())
|
|
var len = bytes.length
|
|
for (i = 0; i < end - start; ++i) {
|
|
this[i + start] = bytes[i % len]
|
|
}
|
|
}
|
|
|
|
return this
|
|
}
|
|
|
|
// HELPER FUNCTIONS
|
|
// ================
|
|
|
|
var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
|
|
|
|
function base64clean (str) {
|
|
// Node strips out invalid characters like \n and \t from the string, base64-js does not
|
|
str = stringtrim(str).replace(INVALID_BASE64_RE, '')
|
|
// Node converts strings with length < 2 to ''
|
|
if (str.length < 2) return ''
|
|
// Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
|
|
while (str.length % 4 !== 0) {
|
|
str = str + '='
|
|
}
|
|
return str
|
|
}
|
|
|
|
function stringtrim (str) {
|
|
if (str.trim) return str.trim()
|
|
return str.replace(/^\s+|\s+$/g, '')
|
|
}
|
|
|
|
function toHex (n) {
|
|
if (n < 16) return '0' + n.toString(16)
|
|
return n.toString(16)
|
|
}
|
|
|
|
function utf8ToBytes (string, units) {
|
|
units = units || Infinity
|
|
var codePoint
|
|
var length = string.length
|
|
var leadSurrogate = null
|
|
var bytes = []
|
|
|
|
for (var i = 0; i < length; ++i) {
|
|
codePoint = string.charCodeAt(i)
|
|
|
|
// is surrogate component
|
|
if (codePoint > 0xD7FF && codePoint < 0xE000) {
|
|
// last char was a lead
|
|
if (!leadSurrogate) {
|
|
// no lead yet
|
|
if (codePoint > 0xDBFF) {
|
|
// unexpected trail
|
|
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
|
continue
|
|
} else if (i + 1 === length) {
|
|
// unpaired lead
|
|
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
|
continue
|
|
}
|
|
|
|
// valid lead
|
|
leadSurrogate = codePoint
|
|
|
|
continue
|
|
}
|
|
|
|
// 2 leads in a row
|
|
if (codePoint < 0xDC00) {
|
|
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
|
leadSurrogate = codePoint
|
|
continue
|
|
}
|
|
|
|
// valid surrogate pair
|
|
codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
|
|
} else if (leadSurrogate) {
|
|
// valid bmp char, but last char was a lead
|
|
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
|
}
|
|
|
|
leadSurrogate = null
|
|
|
|
// encode utf8
|
|
if (codePoint < 0x80) {
|
|
if ((units -= 1) < 0) break
|
|
bytes.push(codePoint)
|
|
} else if (codePoint < 0x800) {
|
|
if ((units -= 2) < 0) break
|
|
bytes.push(
|
|
codePoint >> 0x6 | 0xC0,
|
|
codePoint & 0x3F | 0x80
|
|
)
|
|
} else if (codePoint < 0x10000) {
|
|
if ((units -= 3) < 0) break
|
|
bytes.push(
|
|
codePoint >> 0xC | 0xE0,
|
|
codePoint >> 0x6 & 0x3F | 0x80,
|
|
codePoint & 0x3F | 0x80
|
|
)
|
|
} else if (codePoint < 0x110000) {
|
|
if ((units -= 4) < 0) break
|
|
bytes.push(
|
|
codePoint >> 0x12 | 0xF0,
|
|
codePoint >> 0xC & 0x3F | 0x80,
|
|
codePoint >> 0x6 & 0x3F | 0x80,
|
|
codePoint & 0x3F | 0x80
|
|
)
|
|
} else {
|
|
throw new Error('Invalid code point')
|
|
}
|
|
}
|
|
|
|
return bytes
|
|
}
|
|
|
|
function asciiToBytes (str) {
|
|
var byteArray = []
|
|
for (var i = 0; i < str.length; ++i) {
|
|
// Node's code seems to be doing this and not & 0x7F..
|
|
byteArray.push(str.charCodeAt(i) & 0xFF)
|
|
}
|
|
return byteArray
|
|
}
|
|
|
|
function utf16leToBytes (str, units) {
|
|
var c, hi, lo
|
|
var byteArray = []
|
|
for (var i = 0; i < str.length; ++i) {
|
|
if ((units -= 2) < 0) break
|
|
|
|
c = str.charCodeAt(i)
|
|
hi = c >> 8
|
|
lo = c % 256
|
|
byteArray.push(lo)
|
|
byteArray.push(hi)
|
|
}
|
|
|
|
return byteArray
|
|
}
|
|
|
|
function base64ToBytes (str) {
|
|
return base64.toByteArray(base64clean(str))
|
|
}
|
|
|
|
function blitBuffer (src, dst, offset, length) {
|
|
for (var i = 0; i < length; ++i) {
|
|
if ((i + offset >= dst.length) || (i >= src.length)) break
|
|
dst[i + offset] = src[i]
|
|
}
|
|
return i
|
|
}
|
|
|
|
function isnan (val) {
|
|
return val !== val // eslint-disable-line no-self-compare
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/sweetalert2/dist/sweetalert2.min.css":
|
|
/*!*******************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/sweetalert2/dist/sweetalert2.min.css ***!
|
|
\*******************************************************************************************************************************************************************************************/
|
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
// Imports
|
|
|
|
var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
// Module
|
|
___CSS_LOADER_EXPORT___.push([module.id, ".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:rgba(0,0,0,.4)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-styled):focus{outline:none}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em;text-align:center}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:rgba(0,0,0,.2)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em}div:where(.swal2-container) button:where(.swal2-close){z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:none;background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) .swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) input:where(.swal2-input)::-moz-placeholder, div:where(.swal2-container) input:where(.swal2-file)::-moz-placeholder, div:where(.swal2-container) textarea:where(.swal2-textarea)::-moz-placeholder{color:#ccc}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:#fff}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#facea8;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#9de0f6;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#c9dae1;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}\n", ""]);
|
|
// Exports
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./resources/css/loader.css":
|
|
/*!******************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./resources/css/loader.css ***!
|
|
\******************************************************************************************************************************************************************/
|
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
// Imports
|
|
|
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
// Module
|
|
___CSS_LOADER_EXPORT___.push([module.id, "/* (A) FULL SCREEN WRAPPER */\r\n#spinner {\r\n position: fixed;\r\n top: 0; left: 0;\r\n width: 100vw; height: 100vh;\r\n z-index: 5000000000;\r\n background: rgba(16, 16, 16, 0.5);\r\n transition: opacity 0.2s;\r\n}\r\n\r\n/* (B) CENTER LOADING SPINNER */\r\n#spinner img {\r\n position: absolute;\r\n top: 50%; left: 50%;\r\n transform: translate(-50%);\r\n}\r\n\r\n\r\n/* (X) DOES NOT QUITE MATTER */\r\nhtml, body {\r\n margin: 0;\r\n padding: 0;\r\n}\r\n#loading {\r\n display: block;\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n z-index: 500000000000000;\r\n width: 100vw;\r\n height: 100vh;\r\n background-color: rgba(16, 16, 16, 0.5);\r\n /*background-image: url(https://i.stack.imgur.com/FhHRx.gif);*/\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}\r\n", ""]);
|
|
// Exports
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./resources/css/payment.css":
|
|
/*!*******************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./resources/css/payment.css ***!
|
|
\*******************************************************************************************************************************************************************/
|
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
// Imports
|
|
|
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
___CSS_LOADER_EXPORT___.push([module.id, "@import url(https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css);"]);
|
|
// Module
|
|
___CSS_LOADER_EXPORT___.push([module.id, ".modal-backdrop {\r\n position: fixed;\r\n top: 0;\r\n bottom: 0;\r\n left: 0;\r\n right: 0;\r\n background-color: rgba(0, 0, 0, 0.3);\r\n display: flex;\r\n justify-content: center;\r\n z-index: 100000000;\r\n overflow: auto;\r\n}\r\n\r\n.modal {\r\n /*overflow-x: auto;*/\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\n.modal-body {\r\n position: relative;\r\n padding: 20px 10px;\r\n}\r\n\r\n#payment-modal {\r\n font-family: Arial;\r\n font-size: 17px;\r\n padding: 8px;\r\n}\r\n\r\n\r\n#payment-modal * {\r\n box-sizing: border-box;\r\n}\r\n\r\n#payment-modal .row { /* IE10 */\r\n display: flex; /* IE10 */\r\n flex-wrap: wrap;\r\n margin: 0 -16px;\r\n}\r\n\r\n#payment-modal .col-25 { /* IE10 */\r\n flex: 25%;\r\n}\r\n\r\n#payment-modal .col-50 { /* IE10 */\r\n flex: 50%;\r\n}\r\n\r\n#payment-modal .col-75 { /* IE10 */\r\n flex: 75%;\r\n}\r\n\r\n#payment-modal\r\n.col-25,\r\n.col-50,\r\n.col-75 {\r\n padding: 0 16px;\r\n}\r\n\r\n#payment-modal .payment-container {\r\n /* background-color: #f2f2f2; */\r\n font-family: 'Roboto', sans-serif;\r\n color: #2A3F54;\r\n padding: 5px 20px 15px 20px;\r\n border: 1px solid lightgrey;\r\n border-radius: 3px;\r\n background: #fff;\r\n padding: 10px 25px;\r\n box-shadow: 0 10px 10px 10px rgb(0 0 0 / 10%);\r\n border-radius: 20px;\r\n}\r\n\r\n#payment-modal input[type=text] {\r\n width: 100%;\r\n margin-bottom: 20px;\r\n padding: 12px;\r\n border: 1px solid #ccc;\r\n border-radius: 3px;\r\n}\r\n\r\n#payment-modal label {\r\n margin-bottom: 10px;\r\n display: block;\r\n}\r\n\r\n#payment-modal .icon-container {\r\n margin-bottom: 20px;\r\n padding: 7px 0;\r\n font-size: 24px;\r\n}\r\n\r\n#payment-modal .btn {\r\n background-color: #FF440A !important;\r\n color: white;\r\n padding: 12px;\r\n margin: 10px 0;\r\n border: none;\r\n width: 100%;\r\n border-radius: 3px;\r\n cursor: pointer;\r\n font-size: 17px;\r\n}\r\n\r\n#payment-modal .btn:hover {\r\n background-color: #45a049;\r\n}\r\n\r\n#payment-modal a {\r\n color: #2196F3;\r\n}\r\n\r\n#payment-modal hr {\r\n border: 1px solid lightgrey;\r\n}\r\n\r\n#payment-modal span.price {\r\n float: right;\r\n color: grey;\r\n}\r\n#payment-modal .bottom-panel{\r\n text-align: center;\r\n}\r\n#payment-modal .smart-credit-pkg{\r\n width: 250px !important;\r\n margin-top: -20px !important;\r\n margin-left: 15px !important;\r\n padding-top: 0 !important;\r\n padding-right: 0 !important;\r\n}\r\n#payment-modal .top-text{\r\n text-align: left;\r\n font-weight: bold;\r\n padding-bottom: 15px;\r\n margin-left: 15px;\r\n color: darkblue;\r\n}\r\n/* Responsive layout - when the screen is less than 800px wide, make the two columns stack on top of each other instead of next to each other (also change the direction - make the \"cart\" column go on top) */\r\n@media (max-width: 800px) {\r\n #payment-modal .row {\r\n flex-direction: column-reverse;\r\n }\r\n #payment-modal .col-25 {\r\n margin-bottom: 20px;\r\n }\r\n\r\n #payment-modal .main{\r\n margin: 15px !important;\r\n }\r\n\r\n #payment-modal .container{\r\n border-radius: 0;\r\n }\r\n #payment-modal .text-center-sm{\r\n text-align: center !important;\r\n }\r\n #payment-modal .bottom-panel{\r\n text-align: center !important;\r\n }\r\n #payment-modal .smart-credit-pkg{\r\n width: 95% !important;\r\n margin-top: -20px !important;\r\n padding-top: 0 !important;\r\n padding-right: 0 !important;\r\n }\r\n #payment-modal .top-text{\r\n text-align: center;\r\n font-weight: bold;\r\n padding-bottom: 15px;\r\n color: darkblue;\r\n }\r\n #payment-modal .header-panel{\r\n text-align: center;\r\n }\r\n}\r\n@media (max-width: 700px) {\r\n #payment-modal .row {\r\n display: flow-root;\r\n flex-wrap: wrap;\r\n margin: 0 -16px;\r\n }\r\n}\r\n@media (min-width: 400px) {\r\n\r\n}\r\n\r\n\r\n#payment-modal .center{\r\n margin: 0 auto;\r\n}\r\n\r\n#payment-modal .text-center {\r\n text-align: center !important;\r\n}\r\n\r\n#payment-modal .btn2 {\r\n background-color: #FF440A !important;\r\n text-align: center;\r\n text-decoration: none;\r\n font-weight: 800;\r\n font-size: 1em;\r\n text-transform: uppercase;\r\n color: #fff;\r\n border-radius: 7px;\r\n margin: 20px;\r\n padding: 10px 100px;\r\n background-size: 200% auto;\r\n border: none;\r\n color: white;\r\n box-shadow: 0 4px 6px rgb(50 50 93 / 11%), 0 1px 3px rgb(0 0 0 / 8%);\r\n background-image: linear-gradient(to right, #FF440A 0%, #dc3d0c 50%, #9e2d0a 100%);\r\n background-image: -o-linear-gradient(to right, #FF440A 0%, #dc3d0c 50%, #9e2d0a 100%);\r\n transition: 0.35s;\r\n -webkit-transition: 0.35s;\r\n}\r\n", ""]);
|
|
// Exports
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./resources/css/register.css":
|
|
/*!********************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./resources/css/register.css ***!
|
|
\********************************************************************************************************************************************************************/
|
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
// Imports
|
|
|
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
___CSS_LOADER_EXPORT___.push([module.id, "@import url(https://fonts.googleapis.com/css2?family=Poppins:wght@200&display=swap);"]);
|
|
// Module
|
|
___CSS_LOADER_EXPORT___.push([module.id, "*{\r\n padding:0;\r\n margin:0;\r\n}\r\n.container{\r\n min-height:100vh;\r\n display:flex;\r\n justify-content:center;\r\n align-items:center;\r\n background-color:#eee;\r\n}\r\n.container .card{\r\n height:500px;\r\n width:1100px;\r\n background-color:#fff;\r\n position:relative;\r\n box-shadow:0 15px 30px rgba(0,0,0,0.1);\r\n font-family: 'Poppins', sans-serif;\r\n border-radius:20px;\r\n}\r\n.container .card .form{\r\n width:100%;\r\n height:100%;\r\n\r\n display:flex;\r\n}\r\n.container .card .left-side{\r\n width:35%;\r\n background-image: -webkit-linear-gradient(-90deg, #8ba8e0 0%, #4e74f2 100%);\r\n height:100%;\r\n border-top-left-radius:20px;\r\n border-bottom-left-radius:20px;\r\n padding:20px 30px;\r\n box-sizing:border-box;\r\n\r\n}\r\n/*left-side-start*/\r\n.left-heading{\r\n color:#fff;\r\n\r\n}\r\n.steps-content{\r\n margin-top:30px;\r\n color:#fff;\r\n}\r\n.steps-content p{\r\n font-size:12px;\r\n margin-top:15px;\r\n}\r\n.progress-bar{\r\n list-style:none;\r\n /*color:#fff;*/\r\n margin-top:30px;\r\n font-size:13px;\r\n font-weight:700;\r\n counter-reset:container 0;\r\n}\r\n.progress-bar li{\r\n position:relative;\r\n margin-left:40px;\r\n margin-top:50px;\r\n counter-increment:container 1;\r\n color:#4f6581;\r\n}\r\n.progress-bar li::before{\r\n content:counter(container);\r\n line-height:25px;\r\n text-align:center;\r\n position:absolute;\r\n height:25px;\r\n width:25px;\r\n border:1px solid #4f6581;\r\n border-radius:50%;\r\n left:-40px;\r\n top:-5px;\r\n z-index:10;\r\n background-color:#4A8ACD;\r\n\r\n\r\n}\r\n\r\n\r\n.progress-bar li::after{\r\n content: '';\r\n position: absolute;\r\n height: 90px;\r\n width: 2px;\r\n background-color: #4f6581;\r\n z-index: 1;\r\n left: -27px;\r\n top: -70px;\r\n}\r\n\r\n\r\n.progress-bar li.active::after{\r\n background-color: #fff;\r\n\r\n}\r\n\r\n.progress-bar li:first-child:after{\r\n display:none;\r\n}\r\n\r\n/*.progress-bar li:last-child:after{*/\r\n/* display:none; */\r\n/*}*/\r\n.progress-bar li.active::before{\r\n color:#fff;\r\n border:1px solid #fff;\r\n}\r\n.progress-bar li.active{\r\n color:#fff;\r\n}\r\n.d-none{\r\n display:none;\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/*left-side-end*/\r\n.container .card .right-side{\r\n width:65%;\r\n background-color:#fff;\r\n height:100%;\r\n border-radius:20px;\r\n}\r\n/*right-side-start*/\r\n.main{\r\n display:none;\r\n}\r\n.active{\r\n display:block;\r\n}\r\n.main{\r\n padding:40px;\r\n}\r\n.main small{\r\n display:flex;\r\n justify-content:center;\r\n align-items:center;\r\n margin-top:2px;\r\n height:30px;\r\n width:30px;\r\n background-color:#ccc;\r\n border-radius:50%;\r\n color:yellow;\r\n font-size:19px;\r\n}\r\n.text{\r\n margin-top:20px;\r\n}\r\n.congrats{\r\n text-align:center;\r\n color: #0b0b0b;\r\n}\r\n.text p{\r\n margin-top:10px;\r\n font-size:13px;\r\n font-weight:700;\r\n color:#cbced4;\r\n}\r\n.input-text{\r\n margin:30px 0;\r\n display:flex;\r\n gap:20px;\r\n}\r\n\r\n.input-text .input-div{\r\n width:100%;\r\n position:relative;\r\n\r\n}\r\n\r\n\r\n\r\ninput[type=\"text\"],input[type=\"password\"]{\r\n width:100%;\r\n height:40px;\r\n border:none;\r\n outline:0;\r\n border-radius:5px;\r\n border:1px solid #cbced4;\r\n gap:20px;\r\n box-sizing:border-box;\r\n padding:0px 10px;\r\n}\r\nselect{\r\n width:100%;\r\n height:40px;\r\n border:none;\r\n outline:0;\r\n border-radius:5px;\r\n border:1px solid #cbced4;\r\n gap:20px;\r\n box-sizing:border-box;\r\n padding:0px 10px;\r\n}\r\n.input-text .input-div span{\r\n position:absolute;\r\n top:10px;\r\n left:10px;\r\n font-size:12px;\r\n transition:all 0.5s;\r\n}\r\n.input-div input:focus ~ span,.input-div input:valid ~ span {\r\n top:-15px;\r\n left:6px;\r\n font-size:10px;\r\n font-weight:600;\r\n}\r\n\r\n.input-div span{\r\n top:-15px;\r\n left:6px;\r\n font-size:10px;\r\n}\r\n.buttons button{\r\n height:40px;\r\n width:100px;\r\n border:none;\r\n border-radius:5px;\r\n background-color:#0075ff;\r\n font-size:12px;\r\n color:#fff;\r\n cursor:pointer;\r\n}\r\n.button_space{\r\n display:flex;\r\n gap:20px;\r\n\r\n}\r\n.button_space button:nth-child(1){\r\n background-color:#fff;\r\n color:#000;\r\n border:1px solid#000;\r\n}\r\n.user_card{\r\n margin-top:20px;\r\n margin-bottom:40px;\r\n height:200px;\r\n width:100%;\r\n border:1px solid #c7d3d9;\r\n border-radius:10px;\r\n display:flex;\r\n overflow:hidden;\r\n position:relative;\r\n box-sizing:border-box;\r\n}\r\n.user_card span{\r\n height:80px;\r\n width:100%;\r\n background-color:#dfeeff;\r\n}\r\n.circle{\r\n position:absolute;\r\n top:40px;\r\n left:60px;\r\n}\r\n.circle span{\r\n height:70px;\r\n width:70px;\r\n background-color:#fff;\r\n display:flex;\r\n justify-content:center;\r\n align-items:center;\r\n border:2px solid #fff;\r\n border-radius:50%;\r\n}\r\n.circle span img{\r\n width:100%;\r\n height:100%;\r\n border-radius:50%;\r\n -o-object-fit:cover;\r\n object-fit:cover;\r\n}\r\n.social{\r\n display:flex;\r\n position:absolute;\r\n top:100px;\r\n right:10px;\r\n}\r\n.social span{\r\n height:30px;\r\n width:30px;\r\n border-radius:7px;\r\n background-color:#fff;\r\n border:1px solid #cbd6dc;\r\n display:flex;\r\n justify-content:center;\r\n align-items:center;\r\n margin-left:10px;\r\n color:#cbd6dc;\r\n\r\n}\r\n.social span i{\r\n cursor:pointer;\r\n}\r\n.heart{\r\n color:red !important;\r\n}\r\n.share{\r\n color:red !important;\r\n}\r\n.user_name{\r\n position:absolute;\r\n top:110px;\r\n margin:10px;\r\n padding:0 30px;\r\n display:flex;\r\n flex-direction:column;\r\n width:100%;\r\n\r\n}\r\n.user_name h3{\r\n color:#4c5b68;\r\n}\r\n.detail{\r\n /*margin-top:10px;*/\r\n display:flex;\r\n justify-content:space-between;\r\n margin-right:50px;\r\n}\r\n.detail p{\r\n font-size:12px;\r\n font-weight:700;\r\n\r\n}\r\n.detail p a{\r\n text-decoration:none;\r\n color:blue;\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n.checkmark__circle {\r\n stroke-dasharray: 166;\r\n stroke-dashoffset: 166;\r\n stroke-width: 2;\r\n stroke-miterlimit: 10;\r\n stroke: #7ac142;\r\n fill: none;\r\n animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;\r\n}\r\n\r\n.checkmark {\r\n width: 56px;\r\n height: 56px;\r\n border-radius: 50%;\r\n display: block;\r\n stroke-width: 2;\r\n stroke: #fff;\r\n stroke-miterlimit: 10;\r\n margin: 10% auto;\r\n box-shadow: inset 0px 0px 0px #7ac142;\r\n animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;\r\n}\r\n\r\n.checkmark__check {\r\n transform-origin: 50% 50%;\r\n stroke-dasharray: 48;\r\n stroke-dashoffset: 48;\r\n animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;\r\n}\r\n\r\n@keyframes stroke {\r\n 100% {\r\n stroke-dashoffset: 0;\r\n }\r\n}\r\n@keyframes scale {\r\n 0%, 100% {\r\n transform: none;\r\n }\r\n 50% {\r\n transform: scale3d(1.1, 1.1, 1);\r\n }\r\n}\r\n@keyframes fill {\r\n 100% {\r\n box-shadow: inset 0px 0px 0px 30px #7ac142;\r\n }\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n.warning{\r\n border:1px solid red !important;\r\n}\r\n\r\n\r\n/*right-side-end*/\r\n@media (max-width:750px) {\r\n .container{\r\n height:scroll;\r\n\r\n\r\n }\r\n .container .card {\r\n max-width: 350px;\r\n height:auto !important;\r\n margin:30px 0;\r\n }\r\n .container .card .right-side {\r\n width:100%;\r\n\r\n }\r\n .input-text{\r\n display:block;\r\n }\r\n\r\n .input-text .input-div{\r\n margin-top:20px;\r\n\r\n }\r\n\r\n .container .card .left-side {\r\n\r\n display: none;\r\n }\r\n}\r\n\r\n.error{\r\n color: red;\r\n font-weight: bold;\r\n font-size: 12px;\r\n}\r\n\r\n.field-validation-error{\r\n top: 50px;\r\n position: absolute;\r\n width: 100%;\r\n padding: 0;\r\n margin: 0;\r\n color: red;\r\n font-weight: bold;\r\n}\r\n\r\n.field-validation-error span{\r\n left: 0 !important;\r\n}\r\n\r\n.next_button{\r\n background-color: #FF440A !important;\r\n color: white;\r\n font-weight: bold;\r\n}\r\n\r\nbutton:disabled{\r\n opacity: .5;\r\n}\r\n\r\n.top-area{\r\n display: flex;\r\n}\r\n.link-area{\r\n width: 100%;\r\n text-align: right;\r\n}\r\n\r\n.link-area a{\r\n color: #82aee2;\r\n text-decoration: none;\r\n background-color: transparent;\r\n font-family: \"Lato\",-apple-system,system-ui,BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,sans-serif;\r\n font-size: 1rem;\r\n font-weight: 400;\r\n}\r\n\r\ninput:-moz-read-only{\r\n background: lightgrey;\r\n}\r\n\r\ninput:read-only{\r\n background: lightgrey;\r\n}\r\n\r\n/* my custom css*/\r\n.container .card .form {\r\n background-image: -webkit-linear-gradient(-90deg, #54c7dc 0%, #4361c2 100%);\r\n height: 100%;\r\n border-radius: 20px;\r\n box-sizing: border-box;\r\n}\r\n\r\n.container .card{\r\n height: auto;\r\n margin: 15px;\r\n}\r\n\r\n.container .card .right-side {\r\n width: 65%;\r\n background-color: #fff;\r\n height: auto;\r\n border-radius: 20px;\r\n border-top-left-radius: 0;\r\n border-bottom-left-radius: 0;\r\n}\r\n\r\n.container .card .left-side{\r\n height: auto;\r\n}\r\n\r\n.edit-text{\r\n text-align: right;\r\n font-size: 13px;\r\n font-weight: bold;\r\n}\r\n.label-text{\r\n text-align: left;\r\n font-size: 13px;\r\n font-weight: bold;\r\n margin-left: 5px;\r\n}\r\n.radio-text{\r\n text-align: left;\r\n font-size: 13px;\r\n font-weight: bold;\r\n margin-left: 10px;\r\n}\r\n\r\n\r\n/* my custom css*/\r\n", ""]);
|
|
// Exports
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./resources/css/spinner.css":
|
|
/*!*******************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./resources/css/spinner.css ***!
|
|
\*******************************************************************************************************************************************************************/
|
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
// Imports
|
|
|
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
// Module
|
|
___CSS_LOADER_EXPORT___.push([module.id, "@keyframes spinner-loader {\r\n 0% {\r\n transform: rotate(0deg);\r\n }\r\n 100% {\r\n transform: rotate(360deg);\r\n }\r\n}\r\n/* :not(:required) hides this rule from IE9 and below */\r\n.spinner-loader:not(:required) {\r\n animation: spinner-loader 1500ms infinite linear;\r\n border-radius: 0.5em;\r\n box-shadow: rgba(0, 0, 51, 0.3) 1.5em 0 0 0, rgba(0, 0, 51, 0.3) 1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) 0 1.5em 0 0, rgba(0, 0, 51, 0.3) -1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) -1.5em 0 0 0, rgba(0, 0, 51, 0.3) -1.1em -1.1em 0 0, rgba(0, 0, 51, 0.3) 0 -1.5em 0 0, rgba(0, 0, 51, 0.3) 1.1em -1.1em 0 0;\r\n display: inline-block;\r\n font-size: 10px;\r\n width: 1em;\r\n height: 1em;\r\n margin: 1.5em;\r\n overflow: hidden;\r\n text-indent: 100%;\r\n}\r\n@keyframes refreshing-loader {\r\n 0% {\r\n transform: rotate(0deg);\r\n }\r\n 100% {\r\n transform: rotate(360deg);\r\n }\r\n}\r\n/* :not(:required) hides this rule from IE9 and below */\r\n.refreshing-loader:not(:required) {\r\n animation: refreshing-loader 1000ms infinite linear;\r\n border-radius: 2.4em;\r\n border: 0.4em solid #9ac;\r\n border-left-color: transparent;\r\n color: transparent;\r\n display: inline-block;\r\n font-size: 10px;\r\n line-height: 1.2;\r\n width: 3em;\r\n height: 3em;\r\n text-indent: 100%;\r\n}\r\n.refreshing-loader:not(:required):after {\r\n display: block;\r\n border: 0.5em solid transparent;\r\n border-top-color: #9ac;\r\n border-left-color: #9ac;\r\n content: '';\r\n width: 0;\r\n height: 0;\r\n overflow: hidden;\r\n margin-left: -0.2em;\r\n margin-top: 1em;\r\n}\r\n@keyframes throbber-loader {\r\n 0% {\r\n background: #dde2e7;\r\n }\r\n 10% {\r\n background: #6b9dc8;\r\n }\r\n 40% {\r\n background: #dde2e7;\r\n }\r\n}\r\n/* :not(:required) hides these rules from IE9 and below */\r\n.throbber-loader:not(:required) {\r\n animation: throbber-loader 2000ms 300ms infinite ease-out;\r\n background: #dde2e7;\r\n display: inline-block;\r\n position: relative;\r\n text-indent: -9999px;\r\n width: 0.9em;\r\n height: 1.5em;\r\n margin: 0 1.6em;\r\n}\r\n.throbber-loader:not(:required):before, .throbber-loader:not(:required):after {\r\n background: #dde2e7;\r\n content: '\\x200B';\r\n display: inline-block;\r\n width: 0.9em;\r\n height: 1.5em;\r\n position: absolute;\r\n top: 0;\r\n}\r\n.throbber-loader:not(:required):before {\r\n animation: throbber-loader 2000ms 150ms infinite ease-out;\r\n left: -1.6em;\r\n}\r\n.throbber-loader:not(:required):after {\r\n animation: throbber-loader 2000ms 450ms infinite ease-out;\r\n right: -1.6em;\r\n}\r\n@keyframes heartbeat-loader {\r\n 0% {\r\n transform: rotate(45deg) scale(1);\r\n }\r\n 14% {\r\n transform: rotate(45deg) scale(1.3);\r\n }\r\n 28% {\r\n transform: rotate(45deg) scale(1);\r\n }\r\n 42% {\r\n transform: rotate(45deg) scale(1.3);\r\n }\r\n 70% {\r\n transform: rotate(45deg) scale(1);\r\n }\r\n}\r\n/* :not(:required) hides this rule from IE9 and below */\r\n.heartbeat-loader:not(:required) {\r\n animation: heartbeat-loader 1300ms ease 0s infinite normal;\r\n display: inline-block;\r\n position: relative;\r\n overflow: hidden;\r\n text-indent: -9999px;\r\n width: 36px;\r\n height: 36px;\r\n transform: rotate(45deg) scale(1);\r\n transform-origin: 50% 50%;\r\n}\r\n.heartbeat-loader:not(:required):after, .heartbeat-loader:not(:required):before {\r\n position: absolute;\r\n content: \"\";\r\n background: #e87;\r\n}\r\n.heartbeat-loader:not(:required):before {\r\n border-top-left-radius: 12px;\r\n border-bottom-left-radius: 12px;\r\n top: 12px;\r\n left: 0;\r\n width: 36px;\r\n height: 24px;\r\n}\r\n.heartbeat-loader:not(:required):after {\r\n border-top-left-radius: 12px;\r\n border-top-right-radius: 12px;\r\n top: 0;\r\n left: 12px;\r\n width: 24px;\r\n height: 12px;\r\n}\r\n@keyframes gauge-loader {\r\n 0% {\r\n transform: rotate(-50deg);\r\n }\r\n 10% {\r\n transform: rotate(20deg);\r\n }\r\n 20% {\r\n transform: rotate(60deg);\r\n }\r\n 24% {\r\n transform: rotate(60deg);\r\n }\r\n 40% {\r\n transform: rotate(-20deg);\r\n }\r\n 54% {\r\n transform: rotate(70deg);\r\n }\r\n 56% {\r\n transform: rotate(78deg);\r\n }\r\n 58% {\r\n transform: rotate(73deg);\r\n }\r\n 60% {\r\n transform: rotate(75deg);\r\n }\r\n 62% {\r\n transform: rotate(70deg);\r\n }\r\n 70% {\r\n transform: rotate(-20deg);\r\n }\r\n 80% {\r\n transform: rotate(20deg);\r\n }\r\n 83% {\r\n transform: rotate(25deg);\r\n }\r\n 86% {\r\n transform: rotate(20deg);\r\n }\r\n 89% {\r\n transform: rotate(25deg);\r\n }\r\n 100% {\r\n transform: rotate(-50deg);\r\n }\r\n}\r\n/* :not(:required) hides this rule from IE9 and below */\r\n.gauge-loader:not(:required) {\r\n background: #6ca;\r\n border-top-left-radius: 32px;\r\n border-top-right-radius: 32px;\r\n display: inline-block;\r\n width: 64px;\r\n height: 32px;\r\n overflow: hidden;\r\n position: relative;\r\n text-indent: -9999px;\r\n}\r\n.gauge-loader:not(:required)::before {\r\n animation: gauge-loader 4000ms infinite ease;\r\n background: white;\r\n border-radius: 2px;\r\n content: '';\r\n position: absolute;\r\n left: 30px;\r\n top: 5.33333px;\r\n width: 4px;\r\n height: 26.66667px;\r\n transform-origin: 50% 100%;\r\n}\r\n.gauge-loader:not(:required)::after {\r\n content: '';\r\n background: white;\r\n border-radius: 8px;\r\n position: absolute;\r\n left: 25.6px;\r\n top: 25.6px;\r\n width: 12.8px;\r\n height: 12.8px;\r\n}\r\n@keyframes timer-loader {\r\n 0% {\r\n transform: rotate(0deg);\r\n }\r\n 100% {\r\n transform: rotate(360deg);\r\n }\r\n}\r\n/* :not(:required) hides this rule from IE9 and below */\r\n.timer-loader:not(:required) {\r\n border: 6px solid #c8d;\r\n border-radius: 24px;\r\n box-sizing: border-box;\r\n display: inline-block;\r\n overflow: hidden;\r\n position: relative;\r\n text-indent: -9999px;\r\n width: 48px;\r\n height: 48px;\r\n}\r\n.timer-loader:not(:required)::before {\r\n animation: timer-loader 1250ms infinite linear;\r\n transform-origin: 3px 3px;\r\n background: #c8d;\r\n border-radius: 3px;\r\n content: '';\r\n display: block;\r\n position: absolute;\r\n width: 6px;\r\n height: 19.2px;\r\n left: 15px;\r\n top: 15px;\r\n}\r\n.timer-loader:not(:required)::after {\r\n animation: timer-loader 15000ms infinite linear;\r\n transform-origin: 3px 3px;\r\n background: #c8d;\r\n border-radius: 3px;\r\n content: '';\r\n display: block;\r\n position: absolute;\r\n width: 6px;\r\n height: 16px;\r\n left: 15px;\r\n top: 15px;\r\n}\r\n@keyframes three-quarters-loader {\r\n 0% {\r\n transform: rotate(0deg);\r\n }\r\n 100% {\r\n transform: rotate(360deg);\r\n }\r\n}\r\n/* :not(:required) hides this rule from IE9 and below */\r\n.three-quarters-loader:not(:required) {\r\n animation: three-quarters-loader 1250ms infinite linear;\r\n border: 8px solid #38e;\r\n border-right-color: transparent;\r\n border-radius: 16px;\r\n box-sizing: border-box;\r\n display: inline-block;\r\n position: relative;\r\n overflow: hidden;\r\n text-indent: -9999px;\r\n width: 32px;\r\n height: 32px;\r\n}\r\n@keyframes wobblebar-loader {\r\n 0% {\r\n left: 4px;\r\n }\r\n 3% {\r\n left: 104px;\r\n }\r\n 6% {\r\n left: 4px;\r\n }\r\n 9% {\r\n left: 104px;\r\n }\r\n 12% {\r\n left: 4px;\r\n }\r\n 15% {\r\n left: 104px;\r\n }\r\n 18% {\r\n left: 32px;\r\n }\r\n 27% {\r\n left: 32px;\r\n }\r\n 30% {\r\n left: 104px;\r\n }\r\n 33% {\r\n left: 4px;\r\n }\r\n 36% {\r\n left: 104px;\r\n }\r\n 39% {\r\n left: 4px;\r\n }\r\n 42% {\r\n left: 104px;\r\n }\r\n 45% {\r\n left: 4px;\r\n }\r\n 48% {\r\n left: 104px;\r\n }\r\n 51% {\r\n left: 52px;\r\n }\r\n 63% {\r\n left: 52px;\r\n }\r\n 66% {\r\n left: 4px;\r\n }\r\n 69% {\r\n left: 104px;\r\n }\r\n 72% {\r\n left: 4px;\r\n }\r\n 75% {\r\n left: 104px;\r\n }\r\n 78% {\r\n left: 4px;\r\n }\r\n 81% {\r\n left: 104px;\r\n }\r\n 84% {\r\n left: 72px;\r\n }\r\n 94% {\r\n left: 72px;\r\n }\r\n 97% {\r\n left: 104px;\r\n }\r\n}\r\n/* :not(:required) hides this rule from IE9 and below */\r\n.wobblebar-loader:not(:required) {\r\n background: #a9d;\r\n border-radius: 10.66667px;\r\n display: inline-block;\r\n overflow: hidden;\r\n text-indent: -9999px;\r\n width: 128px;\r\n height: 21.33333px;\r\n position: relative;\r\n}\r\n.wobblebar-loader:not(:required)::after {\r\n animation: wobblebar-loader 15000ms infinite ease;\r\n background: white;\r\n display: block;\r\n border-radius: 7.11111px;\r\n content: '';\r\n position: absolute;\r\n top: 3.55556px;\r\n left: 4px;\r\n width: 21.33333px;\r\n height: 14.22222px;\r\n}\r\n@keyframes atebits-loader {\r\n 0% {\r\n transform: rotate(0deg);\r\n }\r\n 3% {\r\n transform: rotate(90deg);\r\n }\r\n 10% {\r\n transform: rotate(90deg);\r\n }\r\n 13% {\r\n transform: rotate(180deg);\r\n }\r\n 20% {\r\n transform: rotate(180deg);\r\n }\r\n 23% {\r\n transform: rotate(90deg);\r\n }\r\n 30% {\r\n transform: rotate(90deg);\r\n }\r\n 33% {\r\n transform: rotate(180deg);\r\n }\r\n 40% {\r\n transform: rotate(180deg);\r\n }\r\n 43% {\r\n transform: rotate(270deg);\r\n }\r\n 50% {\r\n transform: rotate(270deg);\r\n }\r\n 53% {\r\n transform: rotate(180deg);\r\n }\r\n 60% {\r\n transform: rotate(180deg);\r\n }\r\n 63% {\r\n transform: rotate(90deg);\r\n }\r\n 70% {\r\n transform: rotate(90deg);\r\n }\r\n 73% {\r\n transform: rotate(0deg);\r\n }\r\n 80% {\r\n transform: rotate(0deg);\r\n }\r\n 83% {\r\n transform: rotate(-90deg);\r\n }\r\n 90% {\r\n transform: rotate(-90deg);\r\n }\r\n 93% {\r\n transform: rotate(0deg);\r\n }\r\n}\r\n/* :not(:required) hides this rule from IE9 and below */\r\n.atebits-loader:not(:required) {\r\n background: rgba(0, 0, 0, 0.5);\r\n display: inline-block;\r\n width: 9px;\r\n height: 9px;\r\n overflow: hidden;\r\n position: relative;\r\n text-indent: -9999px;\r\n box-shadow: rgba(0, 0, 0, 0.5) -12px -12px 0 0, rgba(0, 0, 0, 0.5) 12px -12px 0 0, rgba(0, 0, 0, 0.5) -12px 0 0 0, rgba(0, 0, 0, 0.5) 12px 0 0 0, rgba(0, 0, 0, 0.5) -12px 12px 0 0, rgba(0, 0, 0, 0.5) 0 12px 0 0, rgba(0, 0, 0, 0.5) 12px 12px 0 0;\r\n animation: atebits-loader 8s infinite ease-in-out;\r\n transform-origin: 50% 50%;\r\n}\r\n@keyframes whirly-loader {\r\n 0% {\r\n transform: rotate(0deg);\r\n }\r\n 100% {\r\n transform: rotate(360deg);\r\n }\r\n}\r\n/* :not(:required) hides this rule from IE9 and below */\r\n.whirly-loader:not(:required) {\r\n overflow: hidden;\r\n position: relative;\r\n text-indent: -9999px;\r\n display: inline-block;\r\n width: 8px;\r\n height: 8px;\r\n background: transparent;\r\n border-radius: 100%;\r\n box-shadow: #e66 0px 26px 0 6px, #e66 0.90971px 26.05079px 0 5.93333px, #e66 1.82297px 26.06967px 0 5.86667px, #e66 2.73865px 26.05647px 0 5.8px, #e66 3.65561px 26.01104px 0 5.73333px, #e66 4.57274px 25.93327px 0 5.66667px, #e66 5.48887px 25.8231px 0 5.6px, #e66 6.40287px 25.68049px 0 5.53333px, #e66 7.31358px 25.50548px 0 5.46667px, #e66 8.21985px 25.2981px 0 5.4px, #e66 9.12054px 25.05847px 0 5.33333px, #e66 10.01448px 24.78672px 0 5.26667px, #e66 10.90054px 24.48302px 0 5.2px, #e66 11.77757px 24.1476px 0 5.13333px, #e66 12.64443px 23.78072px 0 5.06667px, #e66 13.5px 23.38269px 0 5px, #e66 14.34315px 22.95384px 0 4.93333px, #e66 15.17277px 22.49455px 0 4.86667px, #e66 15.98776px 22.00526px 0 4.8px, #e66 16.78704px 21.48643px 0 4.73333px, #e66 17.56953px 20.93855px 0 4.66667px, #e66 18.33418px 20.36217px 0 4.6px, #e66 19.07995px 19.75787px 0 4.53333px, #e66 19.80582px 19.12626px 0 4.46667px, #e66 20.5108px 18.468px 0 4.4px, #e66 21.1939px 17.78379px 0 4.33333px, #e66 21.85416px 17.07434px 0 4.26667px, #e66 22.49067px 16.34043px 0 4.2px, #e66 23.10251px 15.58284px 0 4.13333px, #e66 23.68881px 14.80241px 0 4.06667px, #e66 24.24871px 14px 0 4px, #e66 24.7814px 13.1765px 0 3.93333px, #e66 25.28607px 12.33284px 0 3.86667px, #e66 25.76198px 11.46997px 0 3.8px, #e66 26.2084px 10.58888px 0 3.73333px, #e66 26.62462px 9.69057px 0 3.66667px, #e66 27.01001px 8.77608px 0 3.6px, #e66 27.36392px 7.84648px 0 3.53333px, #e66 27.68577px 6.90284px 0 3.46667px, #e66 27.97502px 5.94627px 0 3.4px, #e66 28.23116px 4.97791px 0 3.33333px, #e66 28.4537px 3.99891px 0 3.26667px, #e66 28.64223px 3.01042px 0 3.2px, #e66 28.79635px 2.01364px 0 3.13333px, #e66 28.91571px 1.00976px 0 3.06667px, #e66 29px 0px 0 3px, #e66 29.04896px -1.01441px 0 2.93333px, #e66 29.06237px -2.03224px 0 2.86667px, #e66 29.04004px -3.05223px 0 2.8px, #e66 28.98185px -4.07313px 0 2.73333px, #e66 28.88769px -5.09368px 0 2.66667px, #e66 28.75754px -6.1126px 0 2.6px, #e66 28.59138px -7.12863px 0 2.53333px, #e66 28.38926px -8.14049px 0 2.46667px, #e66 28.15127px -9.1469px 0 2.4px, #e66 27.87755px -10.1466px 0 2.33333px, #e66 27.56827px -11.1383px 0 2.26667px, #e66 27.22365px -12.12075px 0 2.2px, #e66 26.84398px -13.09268px 0 2.13333px, #e66 26.42956px -14.05285px 0 2.06667px, #e66 25.98076px -15px 0 2px, #e66 25.49798px -15.93291px 0 1.93333px, #e66 24.98167px -16.85035px 0 1.86667px, #e66 24.43231px -17.75111px 0 1.8px, #e66 23.85046px -18.63402px 0 1.73333px, #e66 23.23668px -19.49789px 0 1.66667px, #e66 22.5916px -20.34157px 0 1.6px, #e66 21.91589px -21.16393px 0 1.53333px, #e66 21.21024px -21.96384px 0 1.46667px, #e66 20.4754px -22.74023px 0 1.4px, #e66 19.71215px -23.49203px 0 1.33333px, #e66 18.92133px -24.2182px 0 1.26667px, #e66 18.10379px -24.91772px 0 1.2px, #e66 17.26042px -25.58963px 0 1.13333px, #e66 16.39217px -26.23295px 0 1.06667px, #e66 15.5px -26.84679px 0 1px, #e66 14.58492px -27.43024px 0 0.93333px, #e66 13.64796px -27.98245px 0 0.86667px, #e66 12.69018px -28.50262px 0 0.8px, #e66 11.7127px -28.98995px 0 0.73333px, #e66 10.71663px -29.4437px 0 0.66667px, #e66 9.70313px -29.86317px 0 0.6px, #e66 8.67339px -30.2477px 0 0.53333px, #e66 7.6286px -30.59666px 0 0.46667px, #e66 6.57001px -30.90946px 0 0.4px, #e66 5.49886px -31.18558px 0 0.33333px, #e66 4.41643px -31.42451px 0 0.26667px, #e66 3.32401px -31.6258px 0 0.2px, #e66 2.22291px -31.78904px 0 0.13333px, #e66 1.11446px -31.91388px 0 0.06667px, #e66 0px -32px 0 0px, #e66 -1.11911px -32.04713px 0 -0.06667px, #e66 -2.24151px -32.05506px 0 -0.13333px, #e66 -3.36582px -32.02361px 0 -0.2px, #e66 -4.49065px -31.95265px 0 -0.26667px, #e66 -5.61462px -31.84212px 0 -0.33333px, #e66 -6.73634px -31.69198px 0 -0.4px, #e66 -7.8544px -31.50227px 0 -0.46667px, #e66 -8.9674px -31.27305px 0 -0.53333px, #e66 -10.07395px -31.00444px 0 -0.6px, #e66 -11.17266px -30.69663px 0 -0.66667px, #e66 -12.26212px -30.34982px 0 -0.73333px, #e66 -13.34096px -29.96429px 0 -0.8px, #e66 -14.4078px -29.54036px 0 -0.86667px, #e66 -15.46126px -29.07841px 0 -0.93333px, #e66 -16.5px -28.57884px 0 -1px, #e66 -17.52266px -28.04212px 0 -1.06667px, #e66 -18.52792px -27.46878px 0 -1.13333px, #e66 -19.51447px -26.85936px 0 -1.2px, #e66 -20.48101px -26.21449px 0 -1.26667px, #e66 -21.42625px -25.53481px 0 -1.33333px, #e66 -22.34896px -24.82104px 0 -1.4px, #e66 -23.2479px -24.07391px 0 -1.46667px, #e66 -24.12186px -23.29421px 0 -1.53333px, #e66 -24.96967px -22.48279px 0 -1.6px, #e66 -25.79016px -21.64052px 0 -1.66667px, #e66 -26.58223px -20.76831px 0 -1.73333px, #e66 -27.34477px -19.86714px 0 -1.8px, #e66 -28.07674px -18.938px 0 -1.86667px, #e66 -28.7771px -17.98193px 0 -1.93333px, #e66 -29.44486px -17px 0 -2px, #e66 -30.07908px -15.99333px 0 -2.06667px, #e66 -30.67884px -14.96307px 0 -2.13333px, #e66 -31.24325px -13.91039px 0 -2.2px, #e66 -31.7715px -12.83652px 0 -2.26667px, #e66 -32.26278px -11.74269px 0 -2.33333px, #e66 -32.71634px -10.63018px 0 -2.4px, #e66 -33.13149px -9.5003px 0 -2.46667px, #e66 -33.50755px -8.35437px 0 -2.53333px, #e66 -33.84391px -7.19374px 0 -2.6px, #e66 -34.14px -6.0198px 0 -2.66667px, #e66 -34.39531px -4.83395px 0 -2.73333px, #e66 -34.60936px -3.63759px 0 -2.8px, #e66 -34.78173px -2.43218px 0 -2.86667px, #e66 -34.91205px -1.21916px 0 -2.93333px, #e66 -35px 0px 0 -3px, #e66 -35.04531px 1.22381px 0 -3.06667px, #e66 -35.04775px 2.45078px 0 -3.13333px, #e66 -35.00717px 3.6794px 0 -3.2px, #e66 -34.92345px 4.90817px 0 -3.26667px, #e66 -34.79654px 6.13557px 0 -3.33333px, #e66 -34.62643px 7.36007px 0 -3.4px, #e66 -34.41316px 8.58016px 0 -3.46667px, #e66 -34.15683px 9.79431px 0 -3.53333px, #e66 -33.85761px 11.001px 0 -3.6px, #e66 -33.5157px 12.19872px 0 -3.66667px, #e66 -33.13137px 13.38594px 0 -3.73333px, #e66 -32.70493px 14.56117px 0 -3.8px, #e66 -32.23675px 15.72291px 0 -3.86667px, #e66 -31.72725px 16.86968px 0 -3.93333px, #e66 -31.17691px 18px 0 -4px, #e66 -30.58627px 19.11242px 0 -4.06667px, #e66 -29.95589px 20.2055px 0 -4.13333px, #e66 -29.28642px 21.27783px 0 -4.2px, #e66 -28.57852px 22.32799px 0 -4.26667px, #e66 -27.83295px 23.35462px 0 -4.33333px, #e66 -27.05047px 24.35635px 0 -4.4px, #e66 -26.23192px 25.33188px 0 -4.46667px, #e66 -25.37819px 26.27988px 0 -4.53333px, #e66 -24.49018px 27.1991px 0 -4.6px, #e66 -23.56888px 28.0883px 0 -4.66667px, #e66 -22.6153px 28.94626px 0 -4.73333px, #e66 -21.6305px 29.77183px 0 -4.8px, #e66 -20.61558px 30.56385px 0 -4.86667px, #e66 -19.57168px 31.32124px 0 -4.93333px, #e66 -18.5px 32.04294px 0 -5px, #e66 -17.40175px 32.72792px 0 -5.06667px, #e66 -16.27818px 33.37522px 0 -5.13333px, #e66 -15.1306px 33.98389px 0 -5.2px, #e66 -13.96034px 34.55305px 0 -5.26667px, #e66 -12.76875px 35.08186px 0 -5.33333px, #e66 -11.55724px 35.56951px 0 -5.4px, #e66 -10.32721px 36.01527px 0 -5.46667px, #e66 -9.08014px 36.41843px 0 -5.53333px, #e66 -7.81748px 36.77835px 0 -5.6px, #e66 -6.54075px 37.09443px 0 -5.66667px, #e66 -5.25147px 37.36612px 0 -5.73333px, #e66 -3.95118px 37.59293px 0 -5.8px, #e66 -2.64145px 37.77443px 0 -5.86667px, #e66 -1.32385px 37.91023px 0 -5.93333px;\r\n animation: whirly-loader 1.25s infinite linear;\r\n transform-origin: 50% 50%;\r\n}\r\n@keyframes flower-loader {\r\n 0% {\r\n transform: rotate(0deg);\r\n box-shadow: white 0 0 15px 0, #fd8 -12px -12px 0 4px, #fd8 12px -12px 0 4px, #fd8 12px 12px 0 4px, #fd8 -12px 12px 0 4px;\r\n }\r\n 50% {\r\n transform: rotate(1080deg);\r\n box-shadow: white 0 0 15px 0, #fd8 12px 12px 0 4px, #fd8 -12px 12px 0 4px, #fd8 -12px -12px 0 4px, #fd8 12px -12px 0 4px;\r\n }\r\n}\r\n/* :not(:required) hides this rule from IE9 and below */\r\n.flower-loader:not(:required) {\r\n overflow: hidden;\r\n position: relative;\r\n text-indent: -9999px;\r\n display: inline-block;\r\n width: 16px;\r\n height: 16px;\r\n background: #e96;\r\n border-radius: 100%;\r\n box-shadow: white 0 0 15px 0, #fd8 -12px -12px 0 4px, #fd8 12px -12px 0 4px, #fd8 12px 12px 0 4px, #fd8 -12px 12px 0 4px;\r\n animation: flower-loader 5s infinite ease-in-out;\r\n transform-origin: 50% 50%;\r\n}\r\n@keyframes dots-loader {\r\n 0% {\r\n box-shadow: #f86 -14px -14px 0 7px, #fc6 14px -14px 0 7px, #6d7 14px 14px 0 7px, #4ae -14px 14px 0 7px;\r\n }\r\n 8.33% {\r\n box-shadow: #f86 14px -14px 0 7px, #fc6 14px -14px 0 7px, #6d7 14px 14px 0 7px, #4ae -14px 14px 0 7px;\r\n }\r\n 16.67% {\r\n box-shadow: #f86 14px 14px 0 7px, #fc6 14px 14px 0 7px, #6d7 14px 14px 0 7px, #4ae -14px 14px 0 7px;\r\n }\r\n 25% {\r\n box-shadow: #f86 -14px 14px 0 7px, #fc6 -14px 14px 0 7px, #6d7 -14px 14px 0 7px, #4ae -14px 14px 0 7px;\r\n }\r\n 33.33% {\r\n box-shadow: #f86 -14px -14px 0 7px, #fc6 -14px 14px 0 7px, #6d7 -14px -14px 0 7px, #4ae -14px -14px 0 7px;\r\n }\r\n 41.67% {\r\n box-shadow: #f86 14px -14px 0 7px, #fc6 -14px 14px 0 7px, #6d7 -14px -14px 0 7px, #4ae 14px -14px 0 7px;\r\n }\r\n 50% {\r\n box-shadow: #f86 14px 14px 0 7px, #fc6 -14px 14px 0 7px, #6d7 -14px -14px 0 7px, #4ae 14px -14px 0 7px;\r\n }\r\n 58.33% {\r\n box-shadow: #f86 -14px 14px 0 7px, #fc6 -14px 14px 0 7px, #6d7 -14px -14px 0 7px, #4ae 14px -14px 0 7px;\r\n }\r\n 66.67% {\r\n box-shadow: #f86 -14px -14px 0 7px, #fc6 -14px -14px 0 7px, #6d7 -14px -14px 0 7px, #4ae 14px -14px 0 7px;\r\n }\r\n 75% {\r\n box-shadow: #f86 14px -14px 0 7px, #fc6 14px -14px 0 7px, #6d7 14px -14px 0 7px, #4ae 14px -14px 0 7px;\r\n }\r\n 83.33% {\r\n box-shadow: #f86 14px 14px 0 7px, #fc6 14px -14px 0 7px, #6d7 14px 14px 0 7px, #4ae 14px 14px 0 7px;\r\n }\r\n 91.67% {\r\n box-shadow: #f86 -14px 14px 0 7px, #fc6 14px -14px 0 7px, #6d7 14px 14px 0 7px, #4ae -14px 14px 0 7px;\r\n }\r\n 100% {\r\n box-shadow: #f86 -14px -14px 0 7px, #fc6 14px -14px 0 7px, #6d7 14px 14px 0 7px, #4ae -14px 14px 0 7px;\r\n }\r\n}\r\n/* :not(:required) hides this rule from IE9 and below */\r\n.dots-loader:not(:required) {\r\n overflow: hidden;\r\n position: relative;\r\n text-indent: -9999px;\r\n display: inline-block;\r\n width: 7px;\r\n height: 7px;\r\n background: transparent;\r\n border-radius: 100%;\r\n box-shadow: #f86 -14px -14px 0 7px, #fc6 14px -14px 0 7px, #6d7 14px 14px 0 7px, #4ae -14px 14px 0 7px;\r\n animation: dots-loader 5s infinite ease-in-out;\r\n transform-origin: 50% 50%;\r\n}\r\n@keyframes circles-loader {\r\n 0% {\r\n transform: rotate(-720deg);\r\n }\r\n 50% {\r\n transform: rotate(720deg);\r\n }\r\n}\r\n/* :not(:required) hides this rule from IE9 and below */\r\n.circles-loader:not(:required) {\r\n position: relative;\r\n text-indent: -9999px;\r\n display: inline-block;\r\n width: 25px;\r\n height: 25px;\r\n background: rgba(255, 204, 51, 0.9);\r\n border-radius: 100%;\r\n animation: circles-loader 3s infinite ease-in-out;\r\n transform-origin: 50% 100%;\r\n}\r\n.circles-loader:not(:required)::before {\r\n background: rgba(255, 102, 0, 0.6);\r\n border-radius: 100%;\r\n content: '';\r\n position: absolute;\r\n width: 25px;\r\n height: 25px;\r\n top: 18.75px;\r\n left: -10.82532px;\r\n}\r\n.circles-loader:not(:required)::after {\r\n background: rgba(255, 51, 0, 0.4);\r\n border-radius: 100%;\r\n content: '';\r\n position: absolute;\r\n width: 25px;\r\n height: 25px;\r\n top: 18.75px;\r\n left: 10.82532px;\r\n}\r\n@keyframes plus-loader-top {\r\n 2.5% {\r\n background: #f86;\r\n transform: rotateY(0deg);\r\n animation-timing-function: ease-in;\r\n }\r\n 13.75% {\r\n background: #ff430d;\r\n transform: rotateY(90deg);\r\n animation-timing-function: step-start;\r\n }\r\n 13.76% {\r\n background: #ffae0d;\r\n transform: rotateY(90deg);\r\n animation-timing-function: ease-out;\r\n }\r\n 25% {\r\n background: #fc6;\r\n transform: rotateY(180deg);\r\n }\r\n 27.5% {\r\n background: #fc6;\r\n transform: rotateY(180deg);\r\n animation-timing-function: ease-in;\r\n }\r\n 41.25% {\r\n background: #ffae0d;\r\n transform: rotateY(90deg);\r\n animation-timing-function: step-start;\r\n }\r\n 41.26% {\r\n background: #2cc642;\r\n transform: rotateY(90deg);\r\n animation-timing-function: ease-out;\r\n }\r\n 50% {\r\n background: #6d7;\r\n transform: rotateY(0deg);\r\n }\r\n 52.5% {\r\n background: #6d7;\r\n transform: rotateY(0deg);\r\n animation-timing-function: ease-in;\r\n }\r\n 63.75% {\r\n background: #2cc642;\r\n transform: rotateY(90deg);\r\n animation-timing-function: step-start;\r\n }\r\n 63.76% {\r\n background: #1386d2;\r\n transform: rotateY(90deg);\r\n animation-timing-function: ease-out;\r\n }\r\n 75% {\r\n background: #4ae;\r\n transform: rotateY(180deg);\r\n }\r\n 77.5% {\r\n background: #4ae;\r\n transform: rotateY(180deg);\r\n animation-timing-function: ease-in;\r\n }\r\n 91.25% {\r\n background: #1386d2;\r\n transform: rotateY(90deg);\r\n animation-timing-function: step-start;\r\n }\r\n 91.26% {\r\n background: #ff430d;\r\n transform: rotateY(90deg);\r\n animation-timing-function: ease-in;\r\n }\r\n 100% {\r\n background: #f86;\r\n transform: rotateY(0deg);\r\n animation-timing-function: step-start;\r\n }\r\n}\r\n@keyframes plus-loader-bottom {\r\n 0% {\r\n background: #fc6;\r\n animation-timing-function: step-start;\r\n }\r\n 50% {\r\n background: #fc6;\r\n animation-timing-function: step-start;\r\n }\r\n 75% {\r\n background: #4ae;\r\n animation-timing-function: step-start;\r\n }\r\n 100% {\r\n background: #4ae;\r\n animation-timing-function: step-start;\r\n }\r\n}\r\n@keyframes plus-loader-background {\r\n 0% {\r\n background: #f86;\r\n transform: rotateZ(180deg);\r\n }\r\n 25% {\r\n background: #f86;\r\n transform: rotateZ(180deg);\r\n animation-timing-function: step-start;\r\n }\r\n 27.5% {\r\n background: #6d7;\r\n transform: rotateZ(90deg);\r\n }\r\n 50% {\r\n background: #6d7;\r\n transform: rotateZ(90deg);\r\n animation-timing-function: step-start;\r\n }\r\n 52.5% {\r\n background: #6d7;\r\n transform: rotateZ(0deg);\r\n }\r\n 75% {\r\n background: #6d7;\r\n transform: rotateZ(0deg);\r\n animation-timing-function: step-start;\r\n }\r\n 77.5% {\r\n background: #f86;\r\n transform: rotateZ(270deg);\r\n }\r\n 100% {\r\n background: #f86;\r\n transform: rotateZ(270deg);\r\n animation-timing-function: step-start;\r\n }\r\n}\r\n/* :not(:required) hides this rule from IE9 and below */\r\n.plus-loader:not(:required) {\r\n overflow: hidden;\r\n position: relative;\r\n text-indent: -9999px;\r\n display: inline-block;\r\n width: 48px;\r\n height: 48px;\r\n background: #f86;\r\n border-radius: 24px;\r\n transform: rotateZ(90deg);\r\n transform-origin: 50% 50%;\r\n animation: plus-loader-background 3s infinite ease-in-out;\r\n}\r\n.plus-loader:not(:required)::after {\r\n background: #f86;\r\n border-radius: 24px 0 0 24px;\r\n content: '';\r\n position: absolute;\r\n right: 50%;\r\n top: 0;\r\n width: 50%;\r\n height: 100%;\r\n transform-origin: 100% 50%;\r\n animation: plus-loader-top 3s infinite linear;\r\n}\r\n.plus-loader:not(:required)::before {\r\n background: #fc6;\r\n border-radius: 24px 0 0 24px;\r\n content: '';\r\n position: absolute;\r\n right: 50%;\r\n top: 0;\r\n width: 50%;\r\n height: 100%;\r\n transform-origin: 100% 50%;\r\n animation: plus-loader-bottom 3s infinite linear;\r\n}\r\n@keyframes ball-loader {\r\n 0% {\r\n transform: translate3d(0, 0, 0) scale3d(1, 1, 1);\r\n animation-timing-function: ease-in;\r\n }\r\n 45% {\r\n transform: translate3d(0, 150px, -10px) scale3d(1, 0.95, 1);\r\n animation-timing-function: ease-in;\r\n }\r\n 50% {\r\n transform: translate3d(0, 150px, -10px) scale3d(1, 0.5, 1);\r\n animation-timing-function: linear;\r\n }\r\n 55% {\r\n transform: translate3d(0, 150px, -10px) scale3d(1, 1.25, 1);\r\n animation-timing-function: ease-out;\r\n }\r\n}\r\n@keyframes ball-loader-highlight {\r\n 0% {\r\n transform: skew(-20deg, 0) translate3d(0, 2.5px, 1px);\r\n animation-timing-function: ease-in;\r\n }\r\n 45% {\r\n transform: skew(-30deg, 0) translate3d(0, 0, 1px);\r\n animation-timing-function: ease-in;\r\n }\r\n 50% {\r\n transform: skew(-30deg, 0) translate3d(0, 0, 1px);\r\n animation-timing-function: linear;\r\n }\r\n 55% {\r\n transform: skew(-30deg, 0) translate3d(0, 0, 1px);\r\n animation-timing-function: ease-out;\r\n }\r\n 100% {\r\n transform: skew(-20deg, 0) translate3d(0, 2.5px, 1px);\r\n animation-timing-function: ease-in;\r\n }\r\n}\r\n@keyframes ball-loader-shadow {\r\n 0% {\r\n transform: translate3d(66.66667px, 66.66667px, -1px) scale3d(1.25, 1.25, 1);\r\n animation-timing-function: ease-in;\r\n }\r\n 45% {\r\n transform: translate3d(12.5px, -15px, -1px);\r\n animation-timing-function: ease-in;\r\n }\r\n 50% {\r\n transform: translate3d(12.5px, -15px, -1px) scale3d(1, 1, 1);\r\n animation-timing-function: linear;\r\n }\r\n 55% {\r\n transform: translate3d(12.5px, -15px, -1px);\r\n animation-timing-function: ease-out;\r\n }\r\n 100% {\r\n transform: translate3d(66.66667px, 66.66667px, -1px) scale3d(1.25, 1.25, 1);\r\n animation-timing-function: ease-in;\r\n }\r\n}\r\n/* :not(:required) hides this rule from IE9 and below */\r\n.ball-loader:not(:required) {\r\n position: relative;\r\n display: inline-block;\r\n font-size: 0;\r\n letter-spacing: -1px;\r\n border-radius: 100%;\r\n background: #f86;\r\n width: 50px;\r\n height: 50px;\r\n transform-style: preserve-3d;\r\n transform: translate3d(0, 0, 0) scale3d(1, 1, 1);\r\n transform-origin: 0 100%;\r\n animation: ball-loader 1500ms infinite linear;\r\n}\r\n.ball-loader:not(:required)::after {\r\n content: '';\r\n position: absolute;\r\n top: 4.5px;\r\n left: 5.5px;\r\n width: 15px;\r\n height: 15px;\r\n background: #ffb099;\r\n border-radius: 100%;\r\n transform: skew(-20deg, 0) translate3d(0, 2.5px, 1px);\r\n animation: ball-loader-highlight 1500ms infinite linear;\r\n}\r\n.ball-loader:not(:required)::before {\r\n content: '';\r\n position: absolute;\r\n top: 50px;\r\n left: 5.5px;\r\n width: 50px;\r\n height: 15px;\r\n background: rgba(0, 0, 0, 0.2);\r\n border-radius: 100%;\r\n transform: translate3d(66.66667px, 66.66667px, -1px) scale3d(1.25, 1.25, 1);\r\n animation: ball-loader-shadow 1500ms infinite linear;\r\n filter: blur(1px);\r\n}\r\n@keyframes hexdots-loader {\r\n 0% {\r\n box-shadow: #666666 0 -30px 0 7px, #999 0 -30px 0 7px, #999 26px -15px 0 7px, #999 26px 15px 0 7px, #999 0 30px 0 7px, #999 -26px 15px 0 7px, #999 -26px -15px 0 7px;\r\n }\r\n 8.33% {\r\n box-shadow: #666666 26px -15px 0 7px, #999 26px -15px 0 7px, #999 26px -15px 0 7px, #999 26px 15px 0 7px, #999 0 30px 0 7px, #999 -26px 15px 0 7px, #999 -26px -15px 0 7px;\r\n }\r\n 16.67% {\r\n box-shadow: #666666 26px 15px 0 7px, #999 26px 15px 0 7px, #999 26px 15px 0 7px, #999 26px 15px 0 7px, #999 0 30px 0 7px, #999 -26px 15px 0 7px, #999 -26px -15px 0 7px;\r\n }\r\n 25% {\r\n box-shadow: #666666 0 30px 0 7px, #999 0 30px 0 7px, #999 0 30px 0 7px, #999 0 30px 0 7px, #999 0 30px 0 7px, #999 -26px 15px 0 7px, #999 -26px -15px 0 7px;\r\n }\r\n 33.33% {\r\n box-shadow: #666666 -26px 15px 0 7px, #999 -26px 15px 0 7px, #999 -26px 15px 0 7px, #999 -26px 15px 0 7px, #999 -26px 15px 0 7px, #999 -26px 15px 0 7px, #999 -26px -15px 0 7px;\r\n }\r\n 41.67% {\r\n box-shadow: #666666 -26px -15px 0 7px, #999 -26px -15px 0 7px, #999 -26px -15px 0 7px, #999 -26px -15px 0 7px, #999 -26px -15px 0 7px, #999 -26px -15px 0 7px, #999 -26px -15px 0 7px;\r\n }\r\n 50% {\r\n box-shadow: #666666 0 -30px 0 7px, #999 0 -30px 0 7px, #999 0 -30px 0 7px, #999 0 -30px 0 7px, #999 0 -30px 0 7px, #999 0 -30px 0 7px, #999 0 -30px 0 7px;\r\n }\r\n 58.33% {\r\n box-shadow: #666666 26px -15px 0 7px, #999 0 -30px 0 7px, #999 26px -15px 0 7px, #999 26px -15px 0 7px, #999 26px -15px 0 7px, #999 26px -15px 0 7px, #999 26px -15px 0 7px;\r\n }\r\n 66.67% {\r\n box-shadow: #666666 26px 15px 0 7px, #999 0 -30px 0 7px, #999 26px -15px 0 7px, #999 26px 15px 0 7px, #999 26px 15px 0 7px, #999 26px 15px 0 7px, #999 26px 15px 0 7px;\r\n }\r\n 75% {\r\n box-shadow: #666666 0 30px 0 7px, #999 0 -30px 0 7px, #999 26px -15px 0 7px, #999 26px 15px 0 7px, #999 0 30px 0 7px, #999 0 30px 0 7px, #999 0 30px 0 7px;\r\n }\r\n 83.33% {\r\n box-shadow: #666666 -26px 15px 0 7px, #999 0 -30px 0 7px, #999 26px -15px 0 7px, #999 26px 15px 0 7px, #999 0 30px 0 7px, #999 -26px 15px 0 7px, #999 -26px 15px 0 7px;\r\n }\r\n 91.67% {\r\n box-shadow: #666666 -26px -15px 0 7px, #999 0 -30px 0 7px, #999 26px -15px 0 7px, #999 26px 15px 0 7px, #999 0 30px 0 7px, #999 -26px 15px 0 7px, #999 -26px -15px 0 7px;\r\n }\r\n 100% {\r\n box-shadow: #666666 0 -30px 0 7px, #999 0 -30px 0 7px, #999 26px -15px 0 7px, #999 26px 15px 0 7px, #999 0 30px 0 7px, #999 -26px 15px 0 7px, #999 -26px -15px 0 7px;\r\n }\r\n}\r\n/* :not(:required) hides this rule from IE9 and below */\r\n.hexdots-loader:not(:required) {\r\n overflow: hidden;\r\n position: relative;\r\n text-indent: -9999px;\r\n display: inline-block;\r\n width: 7px;\r\n height: 7px;\r\n background: transparent;\r\n border-radius: 100%;\r\n box-shadow: #666666 0 -30px 0 7px, #999 26px -15px 0 7px, #999 26px 15px 0 7px, #999 0 30px 0 7px, #999 0 30px 0 7px, #999 0 30px 0 7px;\r\n animation: hexdots-loader 5s infinite ease-in-out;\r\n transform-origin: 50% 50%;\r\n}\r\n\r\n/* :not(:required) hides this rule from IE9 and below */\r\n.inner-circles-loader:not(:required) {\r\n transform: translate3d(0, 0, 0);\r\n position: relative;\r\n display: inline-block;\r\n width: 50px;\r\n height: 50px;\r\n background: rgba(25, 165, 152, 0.5);\r\n border-radius: 50%;\r\n overflow: hidden;\r\n text-indent: -9999px;\r\n /* Hides inner circles outside base circle at safari */\r\n -webkit-mask-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC);\r\n}\r\n.inner-circles-loader:not(:required):before, .inner-circles-loader:not(:required):after {\r\n content: '';\r\n position: absolute;\r\n top: 0;\r\n display: inline-block;\r\n width: 50px;\r\n height: 50px;\r\n border-radius: 50%;\r\n}\r\n.inner-circles-loader:not(:required):before {\r\n animation: inner-circles-loader 3s infinite;\r\n transform-origin: 0 50%;\r\n left: 0;\r\n background: #c7efcf;\r\n}\r\n.inner-circles-loader:not(:required):after {\r\n animation: inner-circles-loader 3s 0.2s reverse infinite;\r\n transform-origin: 100% 50%;\r\n right: 0;\r\n background: #eef5db;\r\n}\r\n@keyframes inner-circles-loader {\r\n 0% {\r\n transform: rotate(0deg);\r\n }\r\n 50% {\r\n transform: rotate(360deg);\r\n }\r\n 100% {\r\n transform: rotate(0deg);\r\n }\r\n}\r\n@keyframes pong-loader {\r\n 0% {\r\n left: 5px;\r\n top: 0;\r\n }\r\n 25% {\r\n left: 65px;\r\n top: 20px;\r\n }\r\n 50% {\r\n left: 5px;\r\n }\r\n 62.5% {\r\n top: 50px;\r\n }\r\n 75% {\r\n left: 65px;\r\n top: 70%;\r\n }\r\n 100% {\r\n left: 5px;\r\n top: 0%;\r\n }\r\n}\r\n@keyframes pong-loader-paddle-1 {\r\n 0% {\r\n box-shadow: inset #353c39 0 5px 0 0, inset #353c39 0 -35px 0 0, inset #353c39 -3px 0 0 0, inset #8cdb8b -10px 0 0 0;\r\n }\r\n 25% {\r\n box-shadow: inset #353c39 0 15px 0 0, inset #353c39 0 -25px 0 0, inset #353c39 -3px 0 0 0, inset #8cdb8b -10px 0 0 0;\r\n }\r\n 50% {\r\n box-shadow: inset #353c39 0 0 0 0, inset #353c39 0 -40px 0 0, inset #353c39 -3px 0 0 0, inset #8cdb8b -10px 0 0 0;\r\n }\r\n 62.5% {\r\n box-shadow: inset #353c39 0 10px 0 0, inset #353c39 0 -30px 0 0, inset #353c39 -3px 0 0 0, inset #8cdb8b -10px 0 0 0;\r\n }\r\n 75% {\r\n box-shadow: inset #353c39 0 40px 0 0, inset #353c39 0 0 0 0, inset #353c39 -3px 0 0 0, inset #8cdb8b -10px 0 0 0;\r\n }\r\n 100% {\r\n box-shadow: inset #353c39 0 5px 0 0, inset #353c39 0 -35px 0 0, inset #353c39 -3px 0 0 0, inset #8cdb8b -10px 0 0 0;\r\n }\r\n}\r\n@keyframes pong-loader-paddle-2 {\r\n 0% {\r\n box-shadow: inset #353c39 0 0 0 0, inset #353c39 0 -40px 0 0, inset #353c39 3px 0 0 0, inset #8cdb8b -10px 0 0 0;\r\n }\r\n 50% {\r\n box-shadow: inset #353c39 0 30px 0 0, inset #353c39 0 -10px 0 0, inset #353c39 3px 0 0 0, inset #8cdb8b -10px 0 0 0;\r\n }\r\n 62.5% {\r\n box-shadow: inset #353c39 0 40px 0 0, inset #353c39 0 0 0 0, inset #353c39 3px 0 0 0, inset #8cdb8b -10px 0 0 0;\r\n }\r\n 75% {\r\n box-shadow: inset #353c39 0 20px 0 0, inset #353c39 0 -20px 0 0, inset #353c39 3px 0 0 0, inset #8cdb8b -10px 0 0 0;\r\n }\r\n 100% {\r\n box-shadow: inset #353c39 0 0 0 0, inset #353c39 0 -40px 0 0, inset #353c39 3px 0 0 0, inset #8cdb8b -10px 0 0 0;\r\n }\r\n}\r\n/* :not(:required) hides this rule from IE9 and below */\r\n.pong-loader:not(:required) {\r\n width: 80px;\r\n height: 60px;\r\n background: #353c39;\r\n position: relative;\r\n display: inline-block;\r\n overflow: hidden;\r\n text-indent: 100%;\r\n box-shadow: inset #353c39 0 0 0 0, inset #353c39 0 -40px 0 0, inset #353c39 -3px 0 0 0, inset #8cdb8b -10px 0 0 0;\r\n animation: pong-loader-paddle-1 1500ms infinite linear;\r\n}\r\n.pong-loader:not(:required):before {\r\n animation: pong-loader-paddle-2 1500ms infinite linear;\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n display: block;\r\n content: \"\";\r\n width: 10px;\r\n height: 100%;\r\n box-shadow: inset #353c39 0 0 0 0, inset #353c39 0 -40px 0 0, inset #353c39 -3px 0 0 0, inset #8cdb8b -10px 0 0 0;\r\n}\r\n.pong-loader:not(:required):after {\r\n content: \"\";\r\n display: block;\r\n animation: pong-loader 1500ms infinite linear;\r\n border-radius: 50%;\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n width: 10px;\r\n height: 10px;\r\n background: #8cdb8b;\r\n}\r\n\r\n.pulse-loader:not(:required) {\r\n display: inline-block;\r\n width: 50px;\r\n height: 50px;\r\n animation: pulse-loader 0.7s linear infinite alternate;\r\n border: 2px solid #e67e22;\r\n border-radius: 50%;\r\n overflow: hidden;\r\n text-indent: 50px;\r\n}\r\n@keyframes pulse-loader {\r\n 0% {\r\n box-shadow: #e67e22 0 0 0px 20px;\r\n }\r\n 40% {\r\n box-shadow: none;\r\n }\r\n 100% {\r\n box-shadow: #e67e22 0 0 0px 25px inset;\r\n }\r\n}\r\n/* :not(:required) hides this rule from IE9 and below */\r\n.spinning-pixels-loader:not(:required) {\r\n animation: spinning-pixels 2s linear infinite;\r\n width: 10px;\r\n height: 10px;\r\n font-size: 0;\r\n display: inline-block;\r\n background: #f35626;\r\n box-shadow: 15px 15px 0 0 #f35626, -15px -15px 0 0 #f35626, 15px -15px 0 0 #f35626, -15px 15px 0 0 #f35626, 0 15px 0 0 #f35626, 15px 0 0 0 #f35626, -15px 0 0 0 #f35626, 0 -15px 0 0 #f35626;\r\n}\r\n@keyframes spinning-pixels {\r\n 0% {\r\n filter: hue-rotate(0deg);\r\n }\r\n 50% {\r\n box-shadow: 20px 20px 0 0 #f35626, -20px -20px 0 0 #f35626, 20px -20px 0 0 #f35626, -20px 20px 0 0 #f35626, 0 10px 0 0 #f35626, 10px 0 0 0 #f35626, -10px 0 0 0 #f35626, 0 -10px 0 0 #f35626;\r\n }\r\n 75% {\r\n box-shadow: 20px 20px 0 0 #f35626, -20px -20px 0 0 #f35626, 20px -20px 0 0 #f35626, -20px 20px 0 0 #f35626, 0 10px 0 0 #f35626, 10px 0 0 0 #f35626, -10px 0 0 0 #f35626, 0 -10px 0 0 #f35626;\r\n }\r\n 100% {\r\n transform: rotate(360deg);\r\n filter: hue-rotate(360deg);\r\n }\r\n}\r\n/* :not(:required) hides this rule from IE9 and below */\r\n.echo-loader:not(:required) {\r\n width: 40px;\r\n height: 40px;\r\n border: 6px solid #FF0000;\r\n border-radius: 50%;\r\n animation: echo-loader 1.4s ease-in;\r\n animation-iteration-count: infinite;\r\n display: inline-block;\r\n text-indent: 100%;\r\n overflow: hidden;\r\n}\r\n@keyframes echo-loader {\r\n 0% {\r\n transform: scale(0);\r\n opacity: 0.0;\r\n }\r\n 25% {\r\n transform: scale(0);\r\n opacity: .1;\r\n }\r\n 50% {\r\n transform: scale(0.1);\r\n opacity: .3;\r\n }\r\n 75% {\r\n transform: scale(0.5);\r\n opacity: .5;\r\n }\r\n 100% {\r\n transform: scale(1);\r\n opacity: 0;\r\n }\r\n}\r\n\r\n#loading{\r\n text-align: center;\r\n padding: 300px 0 0 0;\r\n}\r\n", ""]);
|
|
// Exports
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/AddProfile.vue?vue&type=style&index=0&id=41f2e48a&scoped=true&lang=css":
|
|
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/AddProfile.vue?vue&type=style&index=0&id=41f2e48a&scoped=true&lang=css ***!
|
|
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
// Imports
|
|
|
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
// Module
|
|
___CSS_LOADER_EXPORT___.push([module.id, "\n.container .card[data-v-41f2e48a] {\r\n width: 1300px;\n}\n.input-text[data-v-41f2e48a] {\r\n margin: 15px 0;\r\n display: flex;\r\n gap: 20px;\n}\n.container .card .form[data-v-41f2e48a] {\r\n background-image: unset;\n}\n.container .card .left-side[data-v-41f2e48a] {\r\n width: 25%;\r\n background-image: -webkit-linear-gradient(-90deg, #8ba8e0 0%, #4e74f2 100%);\n}\n.container .card .right-side[data-v-41f2e48a] {\r\n width: 50%;\n}\n@media (max-width: 750px) {\n.container .card .right-side[data-v-41f2e48a] {\r\n width: 100%;\r\n border-bottom-left-radius: 20px !important;\r\n border-top-right-radius: 0px !important;\n}\n.container .card .left-side[data-v-41f2e48a] {\r\n display: block;\r\n width: 100%;\r\n border-top-left-radius: 20px !important;\r\n border-top-right-radius: 20px !important;\r\n border-bottom-left-radius: 0px !important;\r\n border-bottom-right-radius: 0px !important;\n}\n.container .card .form[data-v-41f2e48a] {\r\n display: block;\n}\n.smart-credit-pkg[data-v-41f2e48a] {\r\n width: 100%;\r\n padding-top: 1%;\r\n padding-right: 0px;\n}\n}\r\n\r\n", ""]);
|
|
// Exports
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/ChoosePackage.vue?vue&type=style&index=0&id=7b3e7646&scoped=true&lang=css":
|
|
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/ChoosePackage.vue?vue&type=style&index=0&id=7b3e7646&scoped=true&lang=css ***!
|
|
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_css_credit_report_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! -!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../css/credit_report.css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./resources/css/credit_report.css");
|
|
// Imports
|
|
|
|
|
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
___CSS_LOADER_EXPORT___.i(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_css_credit_report_css__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
|
// Module
|
|
___CSS_LOADER_EXPORT___.push([module.id, "\n.container .card[data-v-7b3e7646] {\r\n height: 600px;\n}\n.listing[data-v-7b3e7646]{\r\n font-family: \"Lato\", -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n}\n.text-white[data-v-7b3e7646]{\r\n color: white;\n}\n.package-1[data-v-7b3e7646]{\r\n background-color: #FF440A;\n}\n.listing-highlight[data-v-7b3e7646]{\r\n -webkit-transform: scale(1.1);\r\n transition: all 0.4s ease-in-out;\n}\n.package-1 .shape[data-v-7b3e7646] {\r\n border-style: solid;\r\n border-width: 0 100px 55px 0;\r\n float: right;\r\n height: 0;\r\n width: 0;\r\n transform: rotate(360deg);\n}\n.package-1 .shape-text[data-v-7b3e7646] {\r\n color: #FF440A;\r\n font-size: 12px;\r\n font-weight: bold;\r\n position: relative;\r\n right: -45px;\r\n top: -2px;\r\n white-space: nowrap;\r\n transform: rotate(28deg);\n}\n.package-1.listing-primary .shape[data-v-7b3e7646]{\r\n border-color: transparent #fff transparent transparent;\n}\r\n", ""]);
|
|
// Exports
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateAccount.vue?vue&type=style&index=0&id=bd535982&scoped=true&lang=css":
|
|
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateAccount.vue?vue&type=style&index=0&id=bd535982&scoped=true&lang=css ***!
|
|
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
// Imports
|
|
|
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
// Module
|
|
___CSS_LOADER_EXPORT___.push([module.id, "\n@media (max-width: 750px) {\n.container .card .right-side[data-v-bd535982] {\r\n width: 100%;\r\n border-radius: 0 !important;\n}\n.container .card .left-side[data-v-bd535982] {\r\n display: block;\r\n width: 100%;\r\n border-radius: 0 !important;\n}\n.container .card .form[data-v-bd535982] {\r\n display: block;\n}\n}\n.error-text[data-v-bd535982] {\r\n color: red;\r\n text-align: center\n}\r\n", ""]);
|
|
// Exports
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateCreditReportAccount.vue?vue&type=style&index=0&id=cbb5871c&scoped=true&lang=css":
|
|
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateCreditReportAccount.vue?vue&type=style&index=0&id=cbb5871c&scoped=true&lang=css ***!
|
|
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
// Imports
|
|
|
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
// Module
|
|
___CSS_LOADER_EXPORT___.push([module.id, "\n.next_button[data-v-cbb5871c]{\r\n width: 200px;\n}\n.container .card[data-v-cbb5871c] {\r\n height: 550px;\n}\r\n", ""]);
|
|
// Exports
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/IdentityIQPkg.vue?vue&type=style&index=0&id=f0648e98&lang=css":
|
|
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/IdentityIQPkg.vue?vue&type=style&index=0&id=f0648e98&lang=css ***!
|
|
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_css_smartcredit_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! -!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../css/smartcredit.css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./resources/css/smartcredit.css");
|
|
// Imports
|
|
|
|
|
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
___CSS_LOADER_EXPORT___.i(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_css_smartcredit_css__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
|
// Module
|
|
___CSS_LOADER_EXPORT___.push([module.id, "\r\n\r\n", ""]);
|
|
// Exports
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/MakePayment.vue?vue&type=style&index=0&id=59807834&scoped=true&lang=css":
|
|
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/MakePayment.vue?vue&type=style&index=0&id=59807834&scoped=true&lang=css ***!
|
|
\***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
// Imports
|
|
|
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
// Module
|
|
___CSS_LOADER_EXPORT___.push([module.id, "\n.container .card[data-v-59807834] {\r\n width: 1300px;\n}\n.input-text[data-v-59807834] {\r\n margin: 15px 0;\r\n display: flex;\r\n gap: 20px;\n}\n.container .card .form[data-v-59807834] {\r\n background-image: unset;\n}\n.container .card .left-side[data-v-59807834] {\r\n width: 25%;\r\n background-image: -webkit-linear-gradient(-90deg, #8ba8e0 0%, #4e74f2 100%);\n}\n.container .card .right-side[data-v-59807834] {\r\n width: 50%;\n}\n@media (max-width: 750px) {\n.container .card .right-side[data-v-59807834] {\r\n width: 100%;\r\n border-bottom-left-radius: 20px !important;\r\n border-top-right-radius: 0px !important;\n}\n.container .card .left-side[data-v-59807834] {\r\n display: block;\r\n width: 100%;\r\n border-top-left-radius: 20px !important;\r\n border-top-right-radius: 20px !important;\r\n border-bottom-left-radius: 0px !important;\r\n border-bottom-right-radius: 0px !important;\n}\n.container .card .form[data-v-59807834] {\r\n display: block;\n}\n.smart-credit-pkg[data-v-59807834] {\r\n width: 100%;\r\n padding-top: 1%;\r\n padding-right: 0px;\n}\n}\r\n", ""]);
|
|
// Exports
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/PaymentModal.vue?vue&type=style&index=0&id=68f715ee&lang=css":
|
|
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/PaymentModal.vue?vue&type=style&index=0&id=68f715ee&lang=css ***!
|
|
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
// Imports
|
|
|
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
// Module
|
|
___CSS_LOADER_EXPORT___.push([module.id, "\n#payment-modal .smart-credit-pkg .p-3 {\r\n padding: 0px !important;\n}\n#payment-modal .smart-credit-pkg .p-2 {\r\n padding: 0px !important;\n}\n#payment-modal .terms-service-text{\r\n font-weight:bold;\r\n color:purple;\r\n font-size: 12px;\r\n margin-bottom: 5px;\r\n line-height: 1.5;\n}\n#payment-modal-view .warning{\r\n border: 1px solid red\n}\n#payment-modal-view .text-warning{\r\n color: red;\n}\n.aggrement p {\r\n margin: 20px;\r\n background-color: #eee;\r\n font-family: Arial,\"Helvetica Neue\",Helvetica,sans-serif;\n}\n.aggrement input {\r\n margin:0 0px 0 0;\r\n vertical-align: middle;\r\n position: relative;\r\n top: -1px;\n}\n.invalid-feedback {\r\n width: 100%;\r\n margin-top: -20px;\r\n font-size: .875em;\r\n color: #dc3545;\r\n margin-bottom: 10px;\n}\r\n", ""]);
|
|
// Exports
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkg.vue?vue&type=style&index=0&id=7968490c&lang=css":
|
|
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkg.vue?vue&type=style&index=0&id=7968490c&lang=css ***!
|
|
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_css_smartcredit_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! -!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../css/smartcredit.css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./resources/css/smartcredit.css");
|
|
// Imports
|
|
|
|
|
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
___CSS_LOADER_EXPORT___.i(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_css_smartcredit_css__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
|
// Module
|
|
___CSS_LOADER_EXPORT___.push([module.id, "\r\n\r\n", ""]);
|
|
// Exports
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkgView.vue?vue&type=style&index=0&id=07ec995e&lang=css":
|
|
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkgView.vue?vue&type=style&index=0&id=07ec995e&lang=css ***!
|
|
\**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_css_smartcredit_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! -!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../css/smartcredit.css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./resources/css/smartcredit.css");
|
|
// Imports
|
|
|
|
|
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
___CSS_LOADER_EXPORT___.i(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_css_smartcredit_css__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
|
// Module
|
|
___CSS_LOADER_EXPORT___.push([module.id, "\r\n\r\n", ""]);
|
|
// Exports
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/Success.vue?vue&type=style&index=0&id=106e4531&scoped=true&lang=css":
|
|
/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/Success.vue?vue&type=style&index=0&id=106e4531&scoped=true&lang=css ***!
|
|
\***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_css_credit_report_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! -!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../css/credit_report.css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./resources/css/credit_report.css");
|
|
// Imports
|
|
|
|
|
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
___CSS_LOADER_EXPORT___.i(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_css_credit_report_css__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
|
// Module
|
|
___CSS_LOADER_EXPORT___.push([module.id, "\n.container .card[data-v-106e4531] {\r\n height: 550px;\n}\n@media (max-width: 750px) {\n.container .card .right-side[data-v-106e4531] {\r\n width: 100%;\r\n border-bottom-left-radius: 20px !important;\r\n border-top-right-radius: 0px !important;\n}\n.container .card .left-side[data-v-106e4531] {\r\n display: block;\r\n width: 100%;\r\n border-top-left-radius: 20px !important;\r\n border-top-right-radius: 20px !important;\r\n border-bottom-left-radius: 0px !important;\r\n border-bottom-right-radius: 0px !important;\n}\n.container .card .form[data-v-106e4531] {\r\n display: block;\n}\n}\r\n", ""]);
|
|
// Exports
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/TopArea.vue?vue&type=style&index=0&id=3dfb8130&scoped=true&lang=css":
|
|
/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/TopArea.vue?vue&type=style&index=0&id=3dfb8130&scoped=true&lang=css ***!
|
|
\***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
// Imports
|
|
|
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
// Module
|
|
___CSS_LOADER_EXPORT___.push([module.id, "\n.login-logo[data-v-3dfb8130] {\r\n width: 150px;\r\n height: auto;\n}\r\n", ""]);
|
|
// Exports
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/modal.vue?vue&type=style&index=0&id=18ecef0a&scoped=true&lang=css":
|
|
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/modal.vue?vue&type=style&index=0&id=18ecef0a&scoped=true&lang=css ***!
|
|
\*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
// Imports
|
|
|
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
// Module
|
|
___CSS_LOADER_EXPORT___.push([module.id, "\n.modal-backdrop[data-v-18ecef0a] {\r\n position: fixed;\r\n top: 0;\r\n bottom: 0;\r\n left: 0;\r\n right: 0;\r\n background-color: rgba(0, 0, 0, 0.3);\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\n}\n.modal[data-v-18ecef0a] {\r\n width: 650px;\r\n background: #FFFFFF;\r\n box-shadow: 2px 2px 20px 1px;\r\n overflow-x: auto;\r\n display: flex;\r\n flex-direction: column;\r\n border-radius: 20px;\n}\n.modal-header[data-v-18ecef0a],\r\n.modal-footer[data-v-18ecef0a] {\r\n padding: 15px;\r\n display: flex;\n}\n.modal-header[data-v-18ecef0a] {\r\n position: relative;\r\n border-bottom: 1px solid #eeeeee;\r\n color: #4AAE9B;\r\n justify-content: space-between;\n}\n.modal-footer[data-v-18ecef0a] {\r\n border-top: 1px solid #eeeeee;\r\n flex-direction: column;\r\n justify-content: flex-end;\r\n margin: 0px 20px;\n}\n.modal-body[data-v-18ecef0a] {\r\n position: relative;\r\n padding: 0px 10px 10px 10px;\n}\n.btn-close[data-v-18ecef0a] {\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n border: none;\r\n font-size: 20px;\r\n padding: 10px;\r\n cursor: pointer;\r\n font-weight: bold;\r\n color: #4AAE9B;\r\n background: transparent;\n}\n.btn-green[data-v-18ecef0a] {\r\n color: white;\r\n background: #4AAE9B;\r\n border: 1px solid #4AAE9B;\r\n border-radius: 2px;\n}\n.fieldset-body[data-v-18ecef0a]{\r\n height:400px;\r\n overflow: auto;\r\n padding: 0px 20px;\r\n border-radius: 10px;\r\n margin: 0px 20px;\n}\r\n\r\n", ""]);
|
|
// Exports
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/sc_partner_cz_logo.vue?vue&type=style&index=0&id=d7b0f3a2&scoped=true&lang=css":
|
|
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/sc_partner_cz_logo.vue?vue&type=style&index=0&id=d7b0f3a2&scoped=true&lang=css ***!
|
|
\**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
// Imports
|
|
|
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
// Module
|
|
___CSS_LOADER_EXPORT___.push([module.id, "\n@media (min-width: 768px) {\n.sc-partner-cz-logo .brand-list[data-v-d7b0f3a2] {\r\n margin-left: -10px;\n}\n.sc-partner-cz-logo .separator[data-v-d7b0f3a2] {\r\n border-right: 1px solid #ccc;\r\n display: inline-block;\r\n height: 36px;\r\n margin: 10px 0;\n}\n}\n.sc-partner-cz-logo[data-v-d7b0f3a2]{\r\n display: inherit;\r\n list-style: none;\r\n margin:0 auto;\n}\n.sc-partner-cz-logo .brand-list[data-v-d7b0f3a2] {\r\n margin: 0;\n}\n.sc-partner-cz-logo .list-inline[data-v-d7b0f3a2] {\r\n padding-left: 0;\r\n list-style: none;\r\n margin-left: -5px;\n}\n.sc-partner-cz-logo .brand-parent[data-v-d7b0f3a2] {\r\n height: 56px;\r\n position: relative;\r\n width: 187px;\r\n transform-style: preserve-3d;\n}\n.sc-partner-cz-logo .brand-link[data-v-d7b0f3a2] {\r\n cursor: pointer;\r\n display: block;\r\n position: absolute;\r\n top: 50%;\r\n transform: translate(0, -50%);\n}\n.sc-partner-cz-logo .brand-logo[data-v-d7b0f3a2] {\r\n display: inline;\r\n height: auto;\r\n width: 167px;\n}\n.sc-partner-cz-logo.brand-list li[data-v-d7b0f3a2] {\r\n padding: 0 10px;\n}\n.sc-partner-cz-logo.brand-list .partner-text[data-v-d7b0f3a2] {\r\n padding-right: 0;\r\n vertical-align: top;\n}\n.sc-partner-cz-logo.brand-list .cobrand-parent[data-v-d7b0f3a2] {\r\n padding-left: 0;\n}\n.sc-partner-cz-logo.brand-list li[data-v-d7b0f3a2] {\r\n padding: 0 10px;\n}\n.sc-partner-cz-logo .brand-parent[data-v-d7b0f3a2] {\r\n height: 56px;\r\n position: relative;\r\n width: 187px;\r\n transform-style: preserve-3d;\n}\n.sc-partner-cz-logo.list-inline > li[data-v-d7b0f3a2] {\r\n padding-right: 5px;\r\n padding-left: 5px;\n}\n.sc-partner-cz-logo.brand-list .partner-text[data-v-d7b0f3a2] {\r\n padding-right: 0;\r\n vertical-align: top;\n}\n.sc-partner-cz-logo .partner-text p[data-v-d7b0f3a2] {\r\n font-family: \"Open Sans\", \"Lucida Grande\", \"Lucida Sans Unicode\", Helvetica, Arial, Verdana, sans-serif;\r\n font-size: 65% !important;\r\n font-style: italic !important;\r\n line-height: 10px !important;\r\n margin-bottom: 0 !important;\r\n padding: 17px 0 !important;\r\n padding-right: 10px !important;\r\n text-align: left !important;\n}\n.sc-partner-cz-logo.list-inline > li[data-v-d7b0f3a2] {\r\n display: inline-block;\r\n padding-right: 5px;\r\n padding-left: 5px;\n}\n.sc-partner-cz-logo .separator[data-v-d7b0f3a2] {\r\n border-bottom: 1px solid #E9E9E9;\n}\r\n", ""]);
|
|
// Exports
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./resources/css/credit_report.css":
|
|
/*!*******************************************************************************************************!*\
|
|
!*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./resources/css/credit_report.css ***!
|
|
\*******************************************************************************************************/
|
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
// Imports
|
|
|
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
// Module
|
|
___CSS_LOADER_EXPORT___.push([module.id, ".shape {\r\n border-style: solid;\r\n border-width: 0 70px 40px 0;\r\n float: right;\r\n height: 0px;\r\n width: 0px;\r\n -ms-transform: rotate(360deg); /* IE 9 */\r\n -o-transform: rotate(360deg); /* Opera 10.5 */\r\n -webkit-transform: rotate(360deg); /* Safari and Chrome */\r\n transform: rotate(360deg);\r\n}\r\n.listing {\r\n background: #fff;\r\n border: 1px solid #ddd;\r\n box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);\r\n margin: 15px 0;\r\n overflow: hidden;\r\n}\r\n.listing:hover {\r\n -webkit-transform: scale(1.1);\r\n -moz-transform: scale(1.1);\r\n -ms-transform: scale(1.1);\r\n -o-transform: scale(1.1);\r\n transform: rotate scale(1.1);\r\n -webkit-transition: all 0.4s ease-in-out;\r\n -moz-transition: all 0.4s ease-in-out;\r\n -o-transition: all 0.4s ease-in-out;\r\n transition: all 0.4s ease-in-out;\r\n}\r\n.shape {\r\n border-color: rgba(255,255,255,0) #d9534f rgba(255,255,255,0) rgba(255,255,255,0);\r\n}\r\n.listing-radius {\r\n border-radius: 7px;\r\n}\r\n.listing-danger {\r\n border-color: #d9534f;\r\n}\r\n.listing-danger .shape {\r\n border-color: transparent #d9533f transparent transparent;\r\n}\r\n.listing-success {\r\n border-color: #5cb85c;\r\n}\r\n.listing-success .shape {\r\n border-color: transparent #5cb75c transparent transparent;\r\n}\r\n.listing-default {\r\n border-color: #999999;\r\n}\r\n.listing-default .shape {\r\n border-color: transparent #999999 transparent transparent;\r\n}\r\n.listing-primary {\r\n border-color: #428bca;\r\n}\r\n.listing-primary .shape {\r\n border-color: transparent #318bca transparent transparent;\r\n}\r\n.listing-info {\r\n border-color: #5bc0de;\r\n}\r\n.listing-info .shape {\r\n border-color: transparent #5bc0de transparent transparent;\r\n}\r\n.listing-warning {\r\n border-color: #f0ad4e;\r\n}\r\n.listing-warning .shape {\r\n border-color: transparent #f0ad4e transparent transparent;\r\n}\r\n.shape-text {\r\n color: #fff;\r\n font-size: 12px;\r\n font-weight: bold;\r\n position: relative;\r\n right: -40px;\r\n top: 2px;\r\n white-space: nowrap;\r\n -ms-transform: rotate(30deg); /* IE 9 */\r\n -o-transform: rotate(360deg); /* Opera 10.5 */\r\n -webkit-transform: rotate(30deg); /* Safari and Chrome */\r\n transform: rotate(30deg);\r\n}\r\n.listing-content {\r\n padding: 20px;\r\n height: 100px;\r\n cursor: pointer;\r\n}\r\n\r\n.text-primary{\r\n color: #318bca;\r\n}\r\n\r\n.text-success{\r\n color: #5cb75c;\r\n}\r\n\r\n.text-danger{\r\n color: #d9533f;\r\n}\r\n\r\n.text-bold{\r\n font-weight: bold;\r\n}\r\n", ""]);
|
|
// Exports
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./resources/css/smartcredit.css":
|
|
/*!*****************************************************************************************************!*\
|
|
!*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./resources/css/smartcredit.css ***!
|
|
\*****************************************************************************************************/
|
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
// Imports
|
|
|
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
// Module
|
|
___CSS_LOADER_EXPORT___.push([module.id, "\r\n.smart-credit-pkg .sign-up-nav, .smart-credit-pkg .login-nav {\r\n display: none\r\n}\r\n\r\n.smart-credit-pkg .page-steps {\r\n background-color: #f7f8fb\r\n}\r\n\r\n.smart-credit-pkg .page-steps .smart-credit-pkg .header__name {\r\n font-size: 24px\r\n}\r\n\r\n.smart-credit-pkg .main {\r\n border-radius: 3px;\r\n height: calc(100vh - 177px);\r\n max-width: 80%;\r\n margin: 0 auto\r\n}\r\n\r\n.smart-credit-pkg .main--auto {\r\n height: auto;\r\n justify-content: center\r\n}\r\n\r\n.smart-credit-pkg .main__content {\r\n border: 2px solid #f2f2f2;\r\n background-color: #fff\r\n}\r\n\r\n.smart-credit-pkg .main__aside {\r\n background-image: linear-gradient(to bottom, #b8d7f3, #82aee2)\r\n}\r\n\r\n.smart-credit-pkg .main__aside + .smart-credit-pkg .main__content {\r\n border-left: none\r\n}\r\n\r\n@media (max-width: 1199.98px) {\r\n .smart-credit-pkg .registration-steps .smart-credit-pkg .nav-steps li + li {\r\n margin-left: 50px\r\n }\r\n\r\n p {\r\n color: #4a4a4a;\r\n line-height: 32px\r\n }\r\n\r\n .smart-credit-pkg .terms-of-list p {\r\n line-height: initial\r\n }\r\n}\r\n\r\n.smart-credit-pkg .login-text {\r\n padding: 20px;\r\n text-align: center;\r\n color: #fff\r\n}\r\n\r\n.smart-credit-pkg .login-text h3 {\r\n font-weight: 300;\r\n line-height: 1.5\r\n}\r\n\r\n.smart-credit-pkg .login-text p {\r\n color: #fff;\r\n font-size: 16px;\r\n margin-top: 15px;\r\n font-weight: bold;\r\n line-height: 2\r\n}\r\n\r\n.smart-credit-pkg .login-text p.smart-credit-pkg .extra-bold {\r\n font-size: 35px;\r\n margin-top: 15px;\r\n font-weight: bold;\r\n line-height: 2\r\n}\r\n\r\n.smart-credit-pkg .login-text .smart-credit-pkg .btn-link {\r\n font-size: 16px;\r\n padding: 0;\r\n border-radius: 0;\r\n color: #fff;\r\n border-bottom: 1px solid #fff\r\n}\r\n\r\n.smart-credit-pkg .form-element--login {\r\n width: 70%;\r\n margin: 0 auto\r\n}\r\n\r\n.smart-credit-pkg .form-element--login h2 {\r\n color: #82aee2;\r\n font-weight: 300\r\n}\r\n\r\n.smart-credit-pkg .form-element--login a {\r\n cursor: pointer\r\n}\r\n\r\n.smart-credit-pkg .action-link a {\r\n cursor: pointer\r\n}\r\n\r\n@media (max-width: 991.98px) {\r\n .smart-credit-pkg .main {\r\n max-width: 100%\r\n }\r\n}\r\n\r\n@media (max-width: 767.98px) {\r\n .smart-credit-pkg .LoginText--box.smart-credit-pkg .d-flex {\r\n display: block !important\r\n }\r\n\r\n .smart-credit-pkg .login-text {\r\n margin-top: 20px\r\n }\r\n\r\n .smart-credit-pkg .page-steps .smart-credit-pkg .navigation {\r\n display: block\r\n }\r\n\r\n .smart-credit-pkg .main {\r\n height: auto;\r\n flex-direction: column-reverse\r\n }\r\n\r\n .smart-credit-pkg .main__content, .smart-credit-pkg .main__aside {\r\n max-width: 100%\r\n }\r\n\r\n .smart-credit-pkg .main__content {\r\n border-right: none;\r\n padding: 0 30px;\r\n border-left: none\r\n }\r\n\r\n .smart-credit-pkg .main__content .smart-credit-pkg .tab-content {\r\n padding-top: .5rem !important;\r\n padding-bottom: 1rem !important\r\n }\r\n\r\n .smart-credit-pkg .registration-steps .smart-credit-pkg .nav-steps .smart-credit-pkg .nav-link {\r\n font-size: 12px\r\n }\r\n\r\n .smart-credit-pkg .login-text, .smart-credit-pkg .action-link {\r\n text-align: center\r\n }\r\n}\r\n\r\n@media (max-width: 575.98px) {\r\n .smart-credit-pkg .steps .smart-credit-pkg .container {\r\n padding-left: 0;\r\n padding-right: 0\r\n }\r\n\r\n .smart-credit-pkg .form-element {\r\n width: 100%\r\n }\r\n}\r\n\r\n.smart-credit-pkg .registration-steps {\r\n padding-top: 50px\r\n}\r\n\r\n.smart-credit-pkg .registration-steps .smart-credit-pkg .nav {\r\n margin: 50px -16px 20px;\r\n width: auto\r\n}\r\n\r\n.smart-credit-pkg .registration-steps .smart-credit-pkg .nav-steps .smart-credit-pkg .nav-link {\r\n color: #82aee2;\r\n font-weight: 300;\r\n cursor: context-menu\r\n}\r\n\r\n.smart-credit-pkg .registration-steps .smart-credit-pkg .nav-steps .smart-credit-pkg .nav-link::before {\r\n height: 12px;\r\n width: 12px;\r\n background-color: #c2c2c2;\r\n border-color: #c2c2c2\r\n}\r\n\r\n.smart-credit-pkg .registration-steps .smart-credit-pkg .nav-steps .smart-credit-pkg .nav-link.smart-credit-pkg .active {\r\n font-weight: bold\r\n}\r\n\r\n.smart-credit-pkg .registration-steps .smart-credit-pkg .nav-steps .smart-credit-pkg .nav-link.smart-credit-pkg .active::before {\r\n height: 15px;\r\n width: 15px;\r\n background: #f2f2f2;\r\n border-color: #82aee2\r\n}\r\n\r\n.smart-credit-pkg .confirm-name i {\r\n color: #82aee2\r\n}\r\n\r\n@media (max-width: 767.98px) {\r\n .smart-credit-pkg .registration-steps {\r\n padding-top: 0\r\n }\r\n\r\n .smart-credit-pkg .mt-sm--2 {\r\n margin-top: 16px\r\n }\r\n\r\n .smart-credit-pkg .registration-steps .smart-credit-pkg .nav {\r\n margin: 50px -30px 20px\r\n }\r\n}\r\n\r\n.smart-credit-pkg .main--credit {\r\n max-width: 100%;\r\n height: auto\r\n}\r\n\r\n.smart-credit-pkg .report-card {\r\n border-radius: 4px;\r\n border: solid 1px #f2f2f2;\r\n background-color: #fff;\r\n display: flex;\r\n flex-direction: column;\r\n height: auto;\r\n position: relative\r\n}\r\n\r\n.smart-credit-pkg .report-card--short {\r\n height: 85%\r\n}\r\n\r\n.smart-credit-pkg .report-card--info {\r\n border-top: 5px solid #3379d0\r\n}\r\n\r\n.smart-credit-pkg .report-card--best, .smart-credit-pkg .report-card--gray {\r\n background: #f2f2f2\r\n}\r\n\r\n.smart-credit-pkg .report-card--best .smart-credit-pkg .best-value {\r\n display: block;\r\n position: absolute;\r\n top: -38px;\r\n left: -20px\r\n}\r\n\r\n.smart-credit-pkg .report-card--danger {\r\n border-top: 5px solid #c03941\r\n}\r\n\r\n.smart-credit-pkg .report-card__header {\r\n text-align: center;\r\n border-bottom: 1px solid #82aee2\r\n}\r\n\r\n.smart-credit-pkg .report-card__header h5 {\r\n font-weight: 700;\r\n font-size: 18px;\r\n line-height: 26px;\r\n color: #3379d0;\r\n font-family: \"Open Sans\", sans-serif\r\n}\r\n\r\n.smart-credit-pkg .report-card__header h5 span {\r\n font-size: 21px\r\n}\r\n\r\n.smart-credit-pkg .report-card__header h5 sup {\r\n margin: 0 2px;\r\n top: -10px\r\n}\r\n\r\n.smart-credit-pkg .report-card__price {\r\n text-align: center;\r\n border-bottom: 1px solid #82aee2\r\n}\r\n\r\n.smart-credit-pkg .report-card__price h4 {\r\n color: #82aee2;\r\n font-size: 24px !important\r\n}\r\n\r\n.smart-credit-pkg .report-card__price span {\r\n text-transform: uppercase;\r\n font-size: 11px\r\n}\r\n\r\n.smart-credit-pkg .report-card .provider-logo {\r\n width: 50%;\r\n vertical-align: middle;\r\n border-style: none;\r\n}\r\n\r\n.smart-credit-pkg .report-card__logo {\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n margin-top: 10px;\r\n margin-bottom: 5px\r\n}\r\n\r\n.smart-credit-pkg .report-card__logo span {\r\n padding: 0 10px;\r\n color: #3379d0\r\n}\r\n\r\n.smart-credit-pkg .report-card__logo strong {\r\n font-family: \"open sans\";\r\n font-size: 18px\r\n}\r\n\r\n.smart-credit-pkg .report-card .smart-credit-pkg .provider-logo-small {\r\n width: 110px\r\n}\r\n\r\n.smart-credit-pkg .report-card__logo::before, .smart-credit-pkg .report-card__logo::after {\r\n content: \"\";\r\n flex: 1;\r\n height: 2px;\r\n background: #82aee2\r\n}\r\n\r\n.smart-credit-pkg .report-card__text {\r\n text-align: center\r\n}\r\n\r\n.smart-credit-pkg .report-card__text p {\r\n font-size: 13px;\r\n margin: 0\r\n}\r\n\r\n.smart-credit-pkg .report-card__action {\r\n text-align: center;\r\n margin-top: auto\r\n}\r\n\r\n.smart-credit-pkg .report-card__action .smart-credit-pkg .btn {\r\n border-width: 2px\r\n}\r\n\r\n.smart-credit-pkg .points {\r\n list-style: none;\r\n padding: 0;\r\n margin: 0\r\n}\r\n\r\n.smart-credit-pkg .points > li {\r\n font-size: 14px;\r\n position: relative;\r\n display: flex;\r\n align-items: center\r\n}\r\n\r\n.smart-credit-pkg .points > li i {\r\n color: #82aee2;\r\n margin-right: 5px;\r\n font-size: 16px\r\n}\r\n\r\n.smart-credit-pkg .points > li + li {\r\n margin-top: 15px\r\n}\r\n\r\n.smart-credit-pkg .best-value {\r\n display: none\r\n}\r\n\r\n.smart-credit-pkg .best-value img {\r\n width: 142px\r\n}\r\n\r\n.smart-credit-pkg .coming-soon {\r\n position: absolute;\r\n top: -38px;\r\n right: -20px\r\n}\r\n\r\n.smart-credit-pkg .coming-soon img {\r\n width: 142px\r\n}\r\n\r\n.smart-credit-pkg .coming-soon-btn {\r\n border: 2px solid #c2c2c2;\r\n color: #c2c2c2\r\n}\r\n\r\n.smart-credit-pkg .coming-soon-btn:hover {\r\n background: #c2c2c2;\r\n color: #fff;\r\n border: 2px solid #c2c2c2\r\n}\r\n\r\n.smart-credit-pkg .unavailable-btn {\r\n border: 2px solid #c2c2c2;\r\n color: #c2c2c2;\r\n word-spacing: 8px\r\n}\r\n\r\n.smart-credit-pkg .unavailable-btn:hover {\r\n background: #c2c2c2;\r\n color: #fff;\r\n border: 2px solid #c2c2c2\r\n}\r\n\r\n.smart-credit-pkg .tab-content__header {\r\n max-width: 80%;\r\n margin: 0 auto\r\n}\r\n\r\n.smart-credit-pkg .tab-content__header h4 {\r\n font-size: 22px;\r\n font-weight: bold\r\n}\r\n\r\n.smart-credit-pkg .tab-content__report h4 {\r\n font-size: 22px;\r\n font-weight: bold\r\n}\r\n\r\n.smart-credit-pkg .report-list {\r\n justify-content: center\r\n}\r\n\r\n@media (max-width: 767.98px) {\r\n .smart-credit-pkg .tab-content__header {\r\n max-width: 100%\r\n }\r\n\r\n .smart-credit-pkg .tab-content__report {\r\n padding-top: 10px\r\n }\r\n\r\n .smart-credit-pkg .tab-content__header h4 {\r\n font-size: 22px;\r\n line-height: 36px\r\n }\r\n\r\n .smart-credit-pkg .tab-content__header p br {\r\n display: none\r\n }\r\n\r\n .smart-credit-pkg .tab-content__report > h4 {\r\n margin-top: 50px;\r\n font-size: 22px;\r\n line-height: 32px;\r\n text-align: left !important\r\n }\r\n\r\n .smart-credit-pkg .report-list {\r\n padding: 0 !important\r\n }\r\n\r\n .smart-credit-pkg .report-list .smart-credit-pkg .col-md-4 + .smart-credit-pkg .col-md-4 {\r\n margin-top: 50px\r\n }\r\n\r\n .smart-credit-pkg .report-card__text p {\r\n line-height: 22px\r\n }\r\n}\r\n\r\n.smart-credit-pkg .tab-content--report {\r\n position: relative\r\n}\r\n\r\n.smart-credit-pkg .tab-content--report .smart-credit-pkg .tab-content__header .smart-credit-pkg .btn {\r\n position: absolute;\r\n left: 34px;\r\n top: 25px;\r\n font-size: 16px;\r\n padding-left: 0\r\n}\r\n\r\n.smart-credit-pkg .tab-content--report .smart-credit-pkg .tab-content__header h2 {\r\n color: #3379d0;\r\n font-weight: bold;\r\n font-family: \"Open Sans\", sans-serif\r\n}\r\n\r\n.smart-credit-pkg .tab-content--report .smart-credit-pkg .tab-content__header h2 span {\r\n font-size: 32px\r\n}\r\n\r\n.smart-credit-pkg .tab-content--report .smart-credit-pkg .tab-content__header h2 sup {\r\n font-size: 16px;\r\n top: -20px\r\n}\r\n\r\n.smart-credit-pkg .tab-content--report .smart-credit-pkg .tab-content__header p {\r\n font-size: 21px;\r\n font-weight: bold;\r\n margin: 0 auto\r\n}\r\n\r\n.smart-credit-pkg .tab-content--report .smart-credit-pkg .tab-content__header p span {\r\n font-size: 21px;\r\n font-weight: bold;\r\n font-style: italic;\r\n margin-right: 5px\r\n}\r\n\r\n.smart-credit-pkg .form-options .smart-credit-pkg .form-group > label {\r\n font-size: 18px;\r\n color: #9b9b9b;\r\n text-transform: none;\r\n margin-bottom: 25px;\r\n font-weight: normal\r\n}\r\n\r\n.smart-credit-pkg .form-options .smart-credit-pkg .form-group + .smart-credit-pkg .form-group {\r\n margin-top: 40px\r\n}\r\n\r\n.smart-credit-pkg .form-options .smart-credit-pkg .custom-radio {\r\n padding: 0\r\n}\r\n\r\n.smart-credit-pkg .form-options .smart-credit-pkg .custom-radio input[type=radio]:checked + label {\r\n border-color: #82aee2;\r\n box-shadow: inset -1px 0 0 1px #82aee2\r\n}\r\n\r\n.smart-credit-pkg .form-options .smart-credit-pkg .custom-control-label {\r\n padding: 16px 20px;\r\n display: block;\r\n border: 1px solid #e1e1e1;\r\n border-radius: 4px;\r\n border-left: 4px solid #82aee2;\r\n cursor: pointer;\r\n color: #4a4a4a;\r\n font-size: 16px;\r\n font-weight: 700\r\n}\r\n\r\n.smart-credit-pkg .form-options .smart-credit-pkg .custom-control-label::before, .smart-credit-pkg .form-options .smart-credit-pkg .custom-control-label::after {\r\n display: none\r\n}\r\n\r\n.smart-credit-pkg .form-options .smart-credit-pkg .custom-control-label:hover {\r\n box-shadow: inset -1px 0 0 1px #82aee2;\r\n border-color: #82aee2\r\n}\r\n\r\n@media (max-width: 1199.98px) {\r\n .smart-credit-pkg .form-options .smart-credit-pkg .form-group > label {\r\n margin-bottom: 18px\r\n }\r\n\r\n .smart-credit-pkg .form-options .smart-credit-pkg .form-group + .smart-credit-pkg .form-group {\r\n margin-top: 25px\r\n }\r\n}\r\n\r\n.smart-credit-pkg .form-element label {\r\n color: #82aee2\r\n}\r\n\r\n.smart-credit-pkg .form-element--personal .smart-credit-pkg .form-group label {\r\n color: #9b9b9b\r\n}\r\n\r\n.smart-credit-pkg .smart-credit-account-modal .smart-credit-pkg .modal-dialog {\r\n max-width: 420px\r\n}\r\n\r\n.smart-credit-pkg .smart-credit-account-modal .smart-credit-pkg .modal-header {\r\n display: none\r\n}\r\n\r\n.smart-credit-pkg .success-icon {\r\n margin-top: 30px\r\n}\r\n\r\n.smart-credit-pkg .success-icon i {\r\n color: #82aee2;\r\n font-size: 40px\r\n}\r\n\r\n.smart-credit-pkg .modal-success__title {\r\n color: #545454;\r\n margin: 20px 0 30px\r\n}\r\n\r\n.smart-credit-pkg .modal-success__text {\r\n color: #4a4a4a;\r\n width: 80%;\r\n margin: auto\r\n}\r\n\r\n.smart-credit-pkg .smart-credit-account-modal .smart-credit-pkg .btn {\r\n font-weight: 100\r\n}\r\n\r\n.smart-credit-pkg .credit-success {\r\n width: 60%;\r\n margin: 0 auto;\r\n text-align: center\r\n}\r\n\r\n.smart-credit-pkg .credit-success p {\r\n font-size: 20px;\r\n color: #545454\r\n}\r\n\r\n.smart-credit-pkg .credit-info a, .smart-credit-pkg .credit-info span {\r\n font-size: 14px;\r\n line-height: 24px;\r\n font-weight: 300;\r\n color: #82aee2\r\n}\r\n\r\n.smart-credit-pkg .credit-text {\r\n list-style: none;\r\n width: 70%;\r\n margin: 0 auto 20px;\r\n padding: 0;\r\n text-align: center\r\n}\r\n\r\n.smart-credit-pkg .credit-text li {\r\n position: relative;\r\n display: flex;\r\n justify-content: center;\r\n color: #4a4a4a\r\n}\r\n\r\n.smart-credit-pkg .credit-text li::before {\r\n content: \"\";\r\n background: #82aee2;\r\n width: 6px;\r\n height: 6px;\r\n border-radius: 50%;\r\n margin-right: 10px;\r\n margin-top: 10px;\r\n padding-left: 6px\r\n}\r\n\r\n.smart-credit-pkg .credit-text li + li {\r\n margin-top: 15px\r\n}\r\n\r\n@media (max-width: 1199.98px) {\r\n .smart-credit-pkg .credit-success {\r\n width: 80%\r\n }\r\n}\r\n\r\n@media (max-width: 991.98px) {\r\n .smart-credit-pkg .credit-success {\r\n width: 100%\r\n }\r\n\r\n .smart-credit-pkg .credit-success .smart-credit-pkg .text {\r\n width: 100%\r\n }\r\n}\r\n\r\n@media (max-width: 767.98px) {\r\n .smart-credit-pkg .credit-success .smart-credit-pkg .text {\r\n text-align: left;\r\n display: block\r\n }\r\n\r\n .smart-credit-pkg .credit-success .smart-credit-pkg .btn {\r\n width: 100%\r\n }\r\n\r\n .smart-credit-pkg .credit-text {\r\n width: 100%\r\n }\r\n\r\n .smart-credit-pkg .credit-info {\r\n text-align: left\r\n }\r\n\r\n .smart-credit-pkg .success-credit .smart-credit-pkg .tab-content--report .smart-credit-pkg .tab-content__header {\r\n margin-bottom: 0\r\n }\r\n\r\n .smart-credit-pkg .success-credit .smart-credit-pkg .btn {\r\n margin-bottom: 20px\r\n }\r\n}\r\n\r\n.smart-credit-pkg .credit-error .smart-credit-pkg .alert-danger {\r\n background: #dc8180;\r\n padding: 8px 20px\r\n}\r\n\r\n.smart-credit-pkg .credit-error .smart-credit-pkg .alert-danger p {\r\n color: #fff;\r\n font-size: 16px;\r\n font-weight: 100;\r\n line-height: 32px;\r\n letter-spacing:.04px;\r\n text-align: left\r\n}\r\n\r\n.smart-credit-pkg .credit-error .smart-credit-pkg .title {\r\n width: 50%;\r\n margin: 20px auto;\r\n font-size: 21px;\r\n line-height: 32px;\r\n letter-spacing:.06px;\r\n text-align: center;\r\n font-weight: bold\r\n}\r\n\r\n.smart-credit-pkg .credit-error .smart-credit-pkg .report-card__price {\r\n border: none\r\n}\r\n\r\n.smart-credit-pkg .credit-error .smart-credit-pkg .report-card__price span {\r\n display: none\r\n}\r\n\r\n.smart-credit-pkg .smart-credit-account label {\r\n color: #82aee2 !important;\r\n font-weight: bold\r\n}\r\n\r\n@media (max-width: 991.98px) {\r\n .smart-credit-pkg .credit-error .smart-credit-pkg .title {\r\n width: 100%\r\n }\r\n}\r\n\r\n@media (max-width: 767.98px) {\r\n .smart-credit-pkg .smart-credit-error .smart-credit-pkg .tab-content--report .smart-credit-pkg .tab-content__header {\r\n margin-bottom: 10px\r\n }\r\n\r\n .smart-credit-pkg .credit-error .smart-credit-pkg .report-row {\r\n margin-top: 40px !important\r\n }\r\n\r\n .smart-credit-pkg .credit-error .smart-credit-pkg .report-row__aside {\r\n margin-top: 30px\r\n }\r\n}\r\n\r\n@media (max-width: 575.98px) {\r\n .smart-credit-pkg .credit-error .smart-credit-pkg .alert-danger {\r\n margin: 0 -30px;\r\n padding: 10px 30px\r\n }\r\n}\r\n\r\n.smart-credit-pkg .smart-credit .smart-credit-pkg .tab-content--report .smart-credit-pkg .tab-content__header p {\r\n width: 90%\r\n}\r\n\r\n.smart-credit-pkg .smart-credit .smart-credit-pkg .report-row {\r\n width: 60%;\r\n margin: 0 auto\r\n}\r\n\r\n.smart-credit-pkg .smart-credit .smart-credit-pkg .btn {\r\n font-weight: 100\r\n}\r\n\r\n.smart-credit-pkg .smart-credit .smart-credit-pkg .tab-content--report .smart-credit-pkg .tab-content__header .smart-credit-pkg .btn {\r\n top: 25px\r\n}\r\n\r\n.smart-credit-pkg .inactive-btn {\r\n color: #be4948 !important;\r\n border-color: #be4948;\r\n opacity: 1 !important\r\n}\r\n\r\n.smart-credit-pkg .inactive-btn:hover {\r\n background: #be4948;\r\n border-color: #be4948;\r\n color: #fff\r\n}\r\n\r\n@media (max-width: 991.98px) {\r\n .smart-credit-pkg .smart-credit .smart-credit-pkg .report-row {\r\n width: 75%\r\n }\r\n}\r\n\r\n@media (max-width: 767.98px) {\r\n .smart-credit-pkg .smart-credit .smart-credit-pkg .tab-content--report .smart-credit-pkg .tab-content__header p {\r\n width: 100%\r\n }\r\n\r\n .smart-credit-pkg .smart-credit .smart-credit-pkg .report-row {\r\n width: 100%;\r\n margin: 35px auto 0 !important\r\n }\r\n\r\n .smart-credit-pkg .smart-credit .smart-credit-pkg .form-title {\r\n text-align: left\r\n }\r\n}\r\n\r\n.smart-credit-pkg .smart-credit .smart-credit-pkg .form-element p {\r\n font-size: 16px;\r\n color: #4a4a4a;\r\n line-height: 32px;\r\n letter-spacing:.04px;\r\n margin-bottom: 0\r\n}\r\n\r\n.smart-credit-pkg .smart-credit .smart-credit-pkg .form-element p a {\r\n font-size: 16px;\r\n color: #4a4a4a;\r\n line-height: 32px;\r\n letter-spacing:.04px;\r\n text-decoration: none\r\n}\r\n\r\n.smart-credit-pkg .credit-contact .smart-credit-pkg .tab-content--report .smart-credit-pkg .tab-content__header p {\r\n width: 80%;\r\n color: #4a4a4a\r\n}\r\n\r\n.smart-credit-pkg .credit-contact .smart-credit-pkg .tab-content--report .smart-credit-pkg .tab-content__header .smart-credit-pkg .btn {\r\n top: 25px\r\n}\r\n\r\n.smart-credit-pkg .credit-contact .smart-credit-pkg .form-title {\r\n margin-bottom: 15px\r\n}\r\n\r\n.smart-credit-pkg .credit-contact .smart-credit-pkg .form-element p {\r\n font-size: 16px;\r\n color: #4a4a4a;\r\n line-height: 32px;\r\n letter-spacing:.04px;\r\n margin-bottom: 0\r\n}\r\n\r\n.smart-credit-pkg .credit-contact .smart-credit-pkg .form-element p a {\r\n font-size: 16px;\r\n color: #4a4a4a;\r\n line-height: 32px;\r\n letter-spacing:.04px;\r\n text-decoration: none\r\n}\r\n\r\n.smart-credit-pkg .credit-contact .smart-credit-pkg .report-card__logo, .smart-credit-pkg .credit-contact .smart-credit-pkg .report-card__price {\r\n display: none\r\n}\r\n\r\n@media (max-width: 991.98px) {\r\n .smart-credit-pkg .credit-contact .smart-credit-pkg .tab-content__header {\r\n max-width: 100%\r\n }\r\n}\r\n\r\n@media (max-width: 767.98px) {\r\n .smart-credit-pkg .credit-contact .smart-credit-pkg .tab-content--report .smart-credit-pkg .tab-content__header p {\r\n width: 100%\r\n }\r\n}\r\n\r\n.smart-credit-pkg .smart-credit-page .smart-credit-pkg .form-element .smart-credit-pkg .btn.smart-credit-pkg .btn-link {\r\n font-size: 16px;\r\n text-decoration: underline !important;\r\n display: block;\r\n text-align: center;\r\n margin-top: 15px\r\n}\r\n\r\n.smart-credit-pkg .readonly {\r\n font-size: 16px;\r\n font-weight: bold;\r\n padding: 0 0 15px;\r\n border: none !important;\r\n border-bottom: 1px solid #f2f2f2 !important;\r\n box-shadow: none;\r\n border-radius: 0 !important;\r\n height: 30px;\r\n background: #fff !important\r\n}\r\n\r\n.smart-credit-pkg .terms-of-list {\r\n border: 2px solid #f2f2f2;\r\n padding: 10px;\r\n font-size: 14px;\r\n list-style: none;\r\n height: 180px;\r\n overflow-y: auto\r\n}\r\n\r\n.smart-credit-pkg .terms-of-list li + li {\r\n margin-top: 10px\r\n}\r\n\r\n.smart-credit-pkg .terms-of-list::-webkit-scrollbar-thumb {\r\n border-radius: 10px;\r\n background-color: #82aee2\r\n}\r\n\r\n.smart-credit-pkg .terms-of-list::-webkit-scrollbar-track {\r\n border-radius: 10px\r\n}\r\n\r\n.smart-credit-pkg .terms-of-list::-webkit-scrollbar {\r\n width: 6px\r\n}\r\n\r\n.smart-credit-pkg .text-wrap-indent {\r\n padding-left: 3em;\r\n text-indent: -3em;\r\n display: inline-block\r\n}\r\n\r\n.smart-credit-pkg .smartcredit-color {\r\n}\r\n\r\n.smart-credit-pkg .creditarmor-color {\r\n color: #ce1f00\r\n}\r\n\r\n.smart-credit-pkg .report-card .provider-logo {\r\n width: 50%;\r\n}\r\n\r\n.smart-credit-pkg .p-3 {\r\n padding: 1rem!important;\r\n}\r\n\r\n.smart-credit-pkg .pb-2, .smart-credit-pkg .py-2 {\r\n padding-bottom: 0.5rem!important;\r\n}\r\n\r\n.smart-credit-pkg .p-2 {\r\n padding: 0.5rem!important;\r\n}\r\n\r\n.smart-credit-pkg .pt-3, .smart-credit-pkg .py-3 {\r\n padding-top: 1rem!important;\r\n}\r\n.smart-credit-pkg .pb-2, .smart-credit-pkg .py-2 {\r\n padding-bottom: 0.5rem!important;\r\n}\r\n\r\n.smart-credit-pkg .pb-2, .smart-credit-pkg .py-2 {\r\n padding-bottom: 0.5rem!important;\r\n}\r\n.smart-credit-pkg .pt-2, .smart-credit-pkg .py-2 {\r\n padding-top: 0.5rem!important;\r\n}\r\n\r\n.smart-credit-logo {\r\n text-align: center;\r\n}\r\n\r\n.smart-credit-logo img {\r\n width: 20%;\r\n margin-bottom: -12px;\r\n}\r\n\r\n\r\n\r\n.smart-credit-pkg {\r\n width: 25%;\r\n padding-top: 3%;\r\n padding-right: 40px;\r\n font-family: \"Lato\", -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\r\n}\r\n\r\n\r\n", ""]);
|
|
// Exports
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/css-loader/dist/runtime/api.js":
|
|
/*!*****************************************************!*\
|
|
!*** ./node_modules/css-loader/dist/runtime/api.js ***!
|
|
\*****************************************************/
|
|
/***/ ((module) => {
|
|
|
|
"use strict";
|
|
|
|
|
|
/*
|
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
Author Tobias Koppers @sokra
|
|
*/
|
|
// css base code, injected by the css-loader
|
|
// eslint-disable-next-line func-names
|
|
module.exports = function (cssWithMappingToString) {
|
|
var list = []; // return the list of modules as css string
|
|
|
|
list.toString = function toString() {
|
|
return this.map(function (item) {
|
|
var content = cssWithMappingToString(item);
|
|
|
|
if (item[2]) {
|
|
return "@media ".concat(item[2], " {").concat(content, "}");
|
|
}
|
|
|
|
return content;
|
|
}).join("");
|
|
}; // import a list of modules into the list
|
|
// eslint-disable-next-line func-names
|
|
|
|
|
|
list.i = function (modules, mediaQuery, dedupe) {
|
|
if (typeof modules === "string") {
|
|
// eslint-disable-next-line no-param-reassign
|
|
modules = [[null, modules, ""]];
|
|
}
|
|
|
|
var alreadyImportedModules = {};
|
|
|
|
if (dedupe) {
|
|
for (var i = 0; i < this.length; i++) {
|
|
// eslint-disable-next-line prefer-destructuring
|
|
var id = this[i][0];
|
|
|
|
if (id != null) {
|
|
alreadyImportedModules[id] = true;
|
|
}
|
|
}
|
|
}
|
|
|
|
for (var _i = 0; _i < modules.length; _i++) {
|
|
var item = [].concat(modules[_i]);
|
|
|
|
if (dedupe && alreadyImportedModules[item[0]]) {
|
|
// eslint-disable-next-line no-continue
|
|
continue;
|
|
}
|
|
|
|
if (mediaQuery) {
|
|
if (!item[2]) {
|
|
item[2] = mediaQuery;
|
|
} else {
|
|
item[2] = "".concat(mediaQuery, " and ").concat(item[2]);
|
|
}
|
|
}
|
|
|
|
list.push(item);
|
|
}
|
|
};
|
|
|
|
return list;
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/ieee754/index.js":
|
|
/*!***************************************!*\
|
|
!*** ./node_modules/ieee754/index.js ***!
|
|
\***************************************/
|
|
/***/ ((__unused_webpack_module, exports) => {
|
|
|
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
|
|
var e, m
|
|
var eLen = (nBytes * 8) - mLen - 1
|
|
var eMax = (1 << eLen) - 1
|
|
var eBias = eMax >> 1
|
|
var nBits = -7
|
|
var i = isLE ? (nBytes - 1) : 0
|
|
var d = isLE ? -1 : 1
|
|
var s = buffer[offset + i]
|
|
|
|
i += d
|
|
|
|
e = s & ((1 << (-nBits)) - 1)
|
|
s >>= (-nBits)
|
|
nBits += eLen
|
|
for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
|
|
|
|
m = e & ((1 << (-nBits)) - 1)
|
|
e >>= (-nBits)
|
|
nBits += mLen
|
|
for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
|
|
|
|
if (e === 0) {
|
|
e = 1 - eBias
|
|
} else if (e === eMax) {
|
|
return m ? NaN : ((s ? -1 : 1) * Infinity)
|
|
} else {
|
|
m = m + Math.pow(2, mLen)
|
|
e = e - eBias
|
|
}
|
|
return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
|
|
}
|
|
|
|
exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
|
|
var e, m, c
|
|
var eLen = (nBytes * 8) - mLen - 1
|
|
var eMax = (1 << eLen) - 1
|
|
var eBias = eMax >> 1
|
|
var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
|
|
var i = isLE ? 0 : (nBytes - 1)
|
|
var d = isLE ? 1 : -1
|
|
var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
|
|
|
|
value = Math.abs(value)
|
|
|
|
if (isNaN(value) || value === Infinity) {
|
|
m = isNaN(value) ? 1 : 0
|
|
e = eMax
|
|
} else {
|
|
e = Math.floor(Math.log(value) / Math.LN2)
|
|
if (value * (c = Math.pow(2, -e)) < 1) {
|
|
e--
|
|
c *= 2
|
|
}
|
|
if (e + eBias >= 1) {
|
|
value += rt / c
|
|
} else {
|
|
value += rt * Math.pow(2, 1 - eBias)
|
|
}
|
|
if (value * c >= 2) {
|
|
e++
|
|
c /= 2
|
|
}
|
|
|
|
if (e + eBias >= eMax) {
|
|
m = 0
|
|
e = eMax
|
|
} else if (e + eBias >= 1) {
|
|
m = ((value * c) - 1) * Math.pow(2, mLen)
|
|
e = e + eBias
|
|
} else {
|
|
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
|
|
e = 0
|
|
}
|
|
}
|
|
|
|
for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
|
|
|
|
e = (e << mLen) | m
|
|
eLen += mLen
|
|
for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
|
|
|
|
buffer[offset + i - d] |= s * 128
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/isarray/index.js":
|
|
/*!***************************************!*\
|
|
!*** ./node_modules/isarray/index.js ***!
|
|
\***************************************/
|
|
/***/ ((module) => {
|
|
|
|
var toString = {}.toString;
|
|
|
|
module.exports = Array.isArray || function (arr) {
|
|
return toString.call(arr) == '[object Array]';
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/lodash/lodash.js":
|
|
/*!***************************************!*\
|
|
!*** ./node_modules/lodash/lodash.js ***!
|
|
\***************************************/
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
var __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
* @license
|
|
* Lodash <https://lodash.com/>
|
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
* Released under MIT license <https://lodash.com/license>
|
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
*/
|
|
;(function() {
|
|
|
|
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
|
var undefined;
|
|
|
|
/** Used as the semantic version number. */
|
|
var VERSION = '4.17.21';
|
|
|
|
/** Used as the size to enable large array optimizations. */
|
|
var LARGE_ARRAY_SIZE = 200;
|
|
|
|
/** Error message constants. */
|
|
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`';
|
|
|
|
/** Used to stand-in for `undefined` hash values. */
|
|
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
|
|
/** Used as the maximum memoize cache size. */
|
|
var MAX_MEMOIZE_SIZE = 500;
|
|
|
|
/** Used as the internal argument placeholder. */
|
|
var PLACEHOLDER = '__lodash_placeholder__';
|
|
|
|
/** Used to compose bitmasks for cloning. */
|
|
var CLONE_DEEP_FLAG = 1,
|
|
CLONE_FLAT_FLAG = 2,
|
|
CLONE_SYMBOLS_FLAG = 4;
|
|
|
|
/** Used to compose bitmasks for value comparisons. */
|
|
var COMPARE_PARTIAL_FLAG = 1,
|
|
COMPARE_UNORDERED_FLAG = 2;
|
|
|
|
/** Used to compose bitmasks for function metadata. */
|
|
var WRAP_BIND_FLAG = 1,
|
|
WRAP_BIND_KEY_FLAG = 2,
|
|
WRAP_CURRY_BOUND_FLAG = 4,
|
|
WRAP_CURRY_FLAG = 8,
|
|
WRAP_CURRY_RIGHT_FLAG = 16,
|
|
WRAP_PARTIAL_FLAG = 32,
|
|
WRAP_PARTIAL_RIGHT_FLAG = 64,
|
|
WRAP_ARY_FLAG = 128,
|
|
WRAP_REARG_FLAG = 256,
|
|
WRAP_FLIP_FLAG = 512;
|
|
|
|
/** Used as default options for `_.truncate`. */
|
|
var DEFAULT_TRUNC_LENGTH = 30,
|
|
DEFAULT_TRUNC_OMISSION = '...';
|
|
|
|
/** Used to detect hot functions by number of calls within a span of milliseconds. */
|
|
var HOT_COUNT = 800,
|
|
HOT_SPAN = 16;
|
|
|
|
/** Used to indicate the type of lazy iteratees. */
|
|
var LAZY_FILTER_FLAG = 1,
|
|
LAZY_MAP_FLAG = 2,
|
|
LAZY_WHILE_FLAG = 3;
|
|
|
|
/** Used as references for various `Number` constants. */
|
|
var INFINITY = 1 / 0,
|
|
MAX_SAFE_INTEGER = 9007199254740991,
|
|
MAX_INTEGER = 1.7976931348623157e+308,
|
|
NAN = 0 / 0;
|
|
|
|
/** Used as references for the maximum length and index of an array. */
|
|
var MAX_ARRAY_LENGTH = 4294967295,
|
|
MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
|
|
HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
|
|
|
|
/** Used to associate wrap methods with their bit flags. */
|
|
var wrapFlags = [
|
|
['ary', WRAP_ARY_FLAG],
|
|
['bind', WRAP_BIND_FLAG],
|
|
['bindKey', WRAP_BIND_KEY_FLAG],
|
|
['curry', WRAP_CURRY_FLAG],
|
|
['curryRight', WRAP_CURRY_RIGHT_FLAG],
|
|
['flip', WRAP_FLIP_FLAG],
|
|
['partial', WRAP_PARTIAL_FLAG],
|
|
['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
|
|
['rearg', WRAP_REARG_FLAG]
|
|
];
|
|
|
|
/** `Object#toString` result references. */
|
|
var argsTag = '[object Arguments]',
|
|
arrayTag = '[object Array]',
|
|
asyncTag = '[object AsyncFunction]',
|
|
boolTag = '[object Boolean]',
|
|
dateTag = '[object Date]',
|
|
domExcTag = '[object DOMException]',
|
|
errorTag = '[object Error]',
|
|
funcTag = '[object Function]',
|
|
genTag = '[object GeneratorFunction]',
|
|
mapTag = '[object Map]',
|
|
numberTag = '[object Number]',
|
|
nullTag = '[object Null]',
|
|
objectTag = '[object Object]',
|
|
promiseTag = '[object Promise]',
|
|
proxyTag = '[object Proxy]',
|
|
regexpTag = '[object RegExp]',
|
|
setTag = '[object Set]',
|
|
stringTag = '[object String]',
|
|
symbolTag = '[object Symbol]',
|
|
undefinedTag = '[object Undefined]',
|
|
weakMapTag = '[object WeakMap]',
|
|
weakSetTag = '[object WeakSet]';
|
|
|
|
var arrayBufferTag = '[object ArrayBuffer]',
|
|
dataViewTag = '[object DataView]',
|
|
float32Tag = '[object Float32Array]',
|
|
float64Tag = '[object Float64Array]',
|
|
int8Tag = '[object Int8Array]',
|
|
int16Tag = '[object Int16Array]',
|
|
int32Tag = '[object Int32Array]',
|
|
uint8Tag = '[object Uint8Array]',
|
|
uint8ClampedTag = '[object Uint8ClampedArray]',
|
|
uint16Tag = '[object Uint16Array]',
|
|
uint32Tag = '[object Uint32Array]';
|
|
|
|
/** Used to match empty string literals in compiled template source. */
|
|
var reEmptyStringLeading = /\b__p \+= '';/g,
|
|
reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
|
|
reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
|
|
|
|
/** Used to match HTML entities and HTML characters. */
|
|
var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
|
|
reUnescapedHtml = /[&<>"']/g,
|
|
reHasEscapedHtml = RegExp(reEscapedHtml.source),
|
|
reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
|
|
|
|
/** Used to match template delimiters. */
|
|
var reEscape = /<%-([\s\S]+?)%>/g,
|
|
reEvaluate = /<%([\s\S]+?)%>/g,
|
|
reInterpolate = /<%=([\s\S]+?)%>/g;
|
|
|
|
/** Used to match property names within property paths. */
|
|
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
reIsPlainProp = /^\w*$/,
|
|
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
|
|
/**
|
|
* Used to match `RegExp`
|
|
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
*/
|
|
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
|
|
reHasRegExpChar = RegExp(reRegExpChar.source);
|
|
|
|
/** Used to match leading whitespace. */
|
|
var reTrimStart = /^\s+/;
|
|
|
|
/** Used to match a single whitespace character. */
|
|
var reWhitespace = /\s/;
|
|
|
|
/** Used to match wrap detail comments. */
|
|
var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
|
|
reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
|
|
reSplitDetails = /,? & /;
|
|
|
|
/** Used to match words composed of alphanumeric characters. */
|
|
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
|
|
|
/**
|
|
* Used to validate the `validate` option in `_.template` variable.
|
|
*
|
|
* Forbids characters which could potentially change the meaning of the function argument definition:
|
|
* - "()," (modification of function parameters)
|
|
* - "=" (default value)
|
|
* - "[]{}" (destructuring of function parameters)
|
|
* - "/" (beginning of a comment)
|
|
* - whitespace
|
|
*/
|
|
var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
|
|
|
|
/** Used to match backslashes in property paths. */
|
|
var reEscapeChar = /\\(\\)?/g;
|
|
|
|
/**
|
|
* Used to match
|
|
* [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
|
|
*/
|
|
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
|
|
|
|
/** Used to match `RegExp` flags from their coerced string values. */
|
|
var reFlags = /\w*$/;
|
|
|
|
/** Used to detect bad signed hexadecimal string values. */
|
|
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
|
|
/** Used to detect binary string values. */
|
|
var reIsBinary = /^0b[01]+$/i;
|
|
|
|
/** Used to detect host constructors (Safari). */
|
|
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
|
|
/** Used to detect octal string values. */
|
|
var reIsOctal = /^0o[0-7]+$/i;
|
|
|
|
/** Used to detect unsigned integer values. */
|
|
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
|
|
/** Used to match Latin Unicode letters (excluding mathematical operators). */
|
|
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
|
|
/** Used to ensure capturing order of template delimiters. */
|
|
var reNoMatch = /($^)/;
|
|
|
|
/** Used to match unescaped characters in compiled string literals. */
|
|
var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
|
|
|
|
/** Used to compose unicode character classes. */
|
|
var rsAstralRange = '\\ud800-\\udfff',
|
|
rsComboMarksRange = '\\u0300-\\u036f',
|
|
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
|
rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
|
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
|
|
rsDingbatRange = '\\u2700-\\u27bf',
|
|
rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
|
|
rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
|
|
rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
|
|
rsPunctuationRange = '\\u2000-\\u206f',
|
|
rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
|
|
rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
|
|
rsVarRange = '\\ufe0e\\ufe0f',
|
|
rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
|
|
|
/** Used to compose unicode capture groups. */
|
|
var rsApos = "['\u2019]",
|
|
rsAstral = '[' + rsAstralRange + ']',
|
|
rsBreak = '[' + rsBreakRange + ']',
|
|
rsCombo = '[' + rsComboRange + ']',
|
|
rsDigits = '\\d+',
|
|
rsDingbat = '[' + rsDingbatRange + ']',
|
|
rsLower = '[' + rsLowerRange + ']',
|
|
rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
|
|
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
|
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
|
rsNonAstral = '[^' + rsAstralRange + ']',
|
|
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
rsUpper = '[' + rsUpperRange + ']',
|
|
rsZWJ = '\\u200d';
|
|
|
|
/** Used to compose unicode regexes. */
|
|
var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
|
|
rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
|
|
rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
|
|
rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
|
|
reOptMod = rsModifier + '?',
|
|
rsOptVar = '[' + rsVarRange + ']?',
|
|
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
|
|
rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
|
|
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
|
|
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
|
|
|
/** Used to match apostrophes. */
|
|
var reApos = RegExp(rsApos, 'g');
|
|
|
|
/**
|
|
* Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
|
|
* [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
|
|
*/
|
|
var reComboMark = RegExp(rsCombo, 'g');
|
|
|
|
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
|
|
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
|
|
|
|
/** Used to match complex or compound words. */
|
|
var reUnicodeWord = RegExp([
|
|
rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
|
|
rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
|
|
rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
|
|
rsUpper + '+' + rsOptContrUpper,
|
|
rsOrdUpper,
|
|
rsOrdLower,
|
|
rsDigits,
|
|
rsEmoji
|
|
].join('|'), 'g');
|
|
|
|
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
|
|
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
|
|
|
|
/** Used to detect strings that need a more robust regexp to match words. */
|
|
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
|
|
|
/** Used to assign default `context` object properties. */
|
|
var contextProps = [
|
|
'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
|
|
'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
|
|
'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
|
|
'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
|
|
'_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
|
|
];
|
|
|
|
/** Used to make template sourceURLs easier to identify. */
|
|
var templateCounter = -1;
|
|
|
|
/** Used to identify `toStringTag` values of typed arrays. */
|
|
var typedArrayTags = {};
|
|
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
|
|
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
|
|
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
|
|
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
|
|
typedArrayTags[uint32Tag] = true;
|
|
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
|
|
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
|
|
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
|
|
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
|
|
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
|
|
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
|
|
typedArrayTags[setTag] = typedArrayTags[stringTag] =
|
|
typedArrayTags[weakMapTag] = false;
|
|
|
|
/** Used to identify `toStringTag` values supported by `_.clone`. */
|
|
var cloneableTags = {};
|
|
cloneableTags[argsTag] = cloneableTags[arrayTag] =
|
|
cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
|
|
cloneableTags[boolTag] = cloneableTags[dateTag] =
|
|
cloneableTags[float32Tag] = cloneableTags[float64Tag] =
|
|
cloneableTags[int8Tag] = cloneableTags[int16Tag] =
|
|
cloneableTags[int32Tag] = cloneableTags[mapTag] =
|
|
cloneableTags[numberTag] = cloneableTags[objectTag] =
|
|
cloneableTags[regexpTag] = cloneableTags[setTag] =
|
|
cloneableTags[stringTag] = cloneableTags[symbolTag] =
|
|
cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
|
|
cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
|
cloneableTags[errorTag] = cloneableTags[funcTag] =
|
|
cloneableTags[weakMapTag] = false;
|
|
|
|
/** Used to map Latin Unicode letters to basic Latin letters. */
|
|
var deburredLetters = {
|
|
// Latin-1 Supplement block.
|
|
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
|
|
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
|
|
'\xc7': 'C', '\xe7': 'c',
|
|
'\xd0': 'D', '\xf0': 'd',
|
|
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
|
|
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
|
|
'\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
|
|
'\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
|
|
'\xd1': 'N', '\xf1': 'n',
|
|
'\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
|
|
'\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
|
|
'\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
|
|
'\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
|
|
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
|
|
'\xc6': 'Ae', '\xe6': 'ae',
|
|
'\xde': 'Th', '\xfe': 'th',
|
|
'\xdf': 'ss',
|
|
// Latin Extended-A block.
|
|
'\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
|
|
'\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
|
|
'\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
|
|
'\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
|
|
'\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
|
|
'\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
|
|
'\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
|
|
'\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
|
|
'\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
|
|
'\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
|
|
'\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
|
|
'\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
|
|
'\u0134': 'J', '\u0135': 'j',
|
|
'\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
|
|
'\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
|
|
'\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
|
|
'\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
|
|
'\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
|
|
'\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
|
|
'\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
|
|
'\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
|
|
'\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
|
|
'\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
|
|
'\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
|
|
'\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
|
|
'\u0163': 't', '\u0165': 't', '\u0167': 't',
|
|
'\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
|
|
'\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
|
|
'\u0174': 'W', '\u0175': 'w',
|
|
'\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
|
|
'\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
|
|
'\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
|
|
'\u0132': 'IJ', '\u0133': 'ij',
|
|
'\u0152': 'Oe', '\u0153': 'oe',
|
|
'\u0149': "'n", '\u017f': 's'
|
|
};
|
|
|
|
/** Used to map characters to HTML entities. */
|
|
var htmlEscapes = {
|
|
'&': '&',
|
|
'<': '<',
|
|
'>': '>',
|
|
'"': '"',
|
|
"'": '''
|
|
};
|
|
|
|
/** Used to map HTML entities to characters. */
|
|
var htmlUnescapes = {
|
|
'&': '&',
|
|
'<': '<',
|
|
'>': '>',
|
|
'"': '"',
|
|
''': "'"
|
|
};
|
|
|
|
/** Used to escape characters for inclusion in compiled string literals. */
|
|
var stringEscapes = {
|
|
'\\': '\\',
|
|
"'": "'",
|
|
'\n': 'n',
|
|
'\r': 'r',
|
|
'\u2028': 'u2028',
|
|
'\u2029': 'u2029'
|
|
};
|
|
|
|
/** Built-in method references without a dependency on `root`. */
|
|
var freeParseFloat = parseFloat,
|
|
freeParseInt = parseInt;
|
|
|
|
/** Detect free variable `global` from Node.js. */
|
|
var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
|
|
|
|
/** Detect free variable `self`. */
|
|
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
|
|
/** Used as a reference to the global object. */
|
|
var root = freeGlobal || freeSelf || Function('return this')();
|
|
|
|
/** Detect free variable `exports`. */
|
|
var freeExports = true && exports && !exports.nodeType && exports;
|
|
|
|
/** Detect free variable `module`. */
|
|
var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module;
|
|
|
|
/** Detect the popular CommonJS extension `module.exports`. */
|
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
|
|
/** Detect free variable `process` from Node.js. */
|
|
var freeProcess = moduleExports && freeGlobal.process;
|
|
|
|
/** Used to access faster Node.js helpers. */
|
|
var nodeUtil = (function() {
|
|
try {
|
|
// Use `util.types` for Node.js 10+.
|
|
var types = freeModule && freeModule.require && freeModule.require('util').types;
|
|
|
|
if (types) {
|
|
return types;
|
|
}
|
|
|
|
// Legacy `process.binding('util')` for Node.js < 10.
|
|
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
|
} catch (e) {}
|
|
}());
|
|
|
|
/* Node.js helper references. */
|
|
var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
|
|
nodeIsDate = nodeUtil && nodeUtil.isDate,
|
|
nodeIsMap = nodeUtil && nodeUtil.isMap,
|
|
nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
|
|
nodeIsSet = nodeUtil && nodeUtil.isSet,
|
|
nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
|
|
/*--------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
* A faster alternative to `Function#apply`, this function invokes `func`
|
|
* with the `this` binding of `thisArg` and the arguments of `args`.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to invoke.
|
|
* @param {*} thisArg The `this` binding of `func`.
|
|
* @param {Array} args The arguments to invoke `func` with.
|
|
* @returns {*} Returns the result of `func`.
|
|
*/
|
|
function apply(func, thisArg, args) {
|
|
switch (args.length) {
|
|
case 0: return func.call(thisArg);
|
|
case 1: return func.call(thisArg, args[0]);
|
|
case 2: return func.call(thisArg, args[0], args[1]);
|
|
case 3: return func.call(thisArg, args[0], args[1], args[2]);
|
|
}
|
|
return func.apply(thisArg, args);
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `baseAggregator` for arrays.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to iterate over.
|
|
* @param {Function} setter The function to set `accumulator` values.
|
|
* @param {Function} iteratee The iteratee to transform keys.
|
|
* @param {Object} accumulator The initial aggregated object.
|
|
* @returns {Function} Returns `accumulator`.
|
|
*/
|
|
function arrayAggregator(array, setter, iteratee, accumulator) {
|
|
var index = -1,
|
|
length = array == null ? 0 : array.length;
|
|
|
|
while (++index < length) {
|
|
var value = array[index];
|
|
setter(accumulator, value, iteratee(value), array);
|
|
}
|
|
return accumulator;
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `_.forEach` for arrays without support for
|
|
* iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {Array} Returns `array`.
|
|
*/
|
|
function arrayEach(array, iteratee) {
|
|
var index = -1,
|
|
length = array == null ? 0 : array.length;
|
|
|
|
while (++index < length) {
|
|
if (iteratee(array[index], index, array) === false) {
|
|
break;
|
|
}
|
|
}
|
|
return array;
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `_.forEachRight` for arrays without support for
|
|
* iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {Array} Returns `array`.
|
|
*/
|
|
function arrayEachRight(array, iteratee) {
|
|
var length = array == null ? 0 : array.length;
|
|
|
|
while (length--) {
|
|
if (iteratee(array[length], length, array) === false) {
|
|
break;
|
|
}
|
|
}
|
|
return array;
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `_.every` for arrays without support for
|
|
* iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to iterate over.
|
|
* @param {Function} predicate The function invoked per iteration.
|
|
* @returns {boolean} Returns `true` if all elements pass the predicate check,
|
|
* else `false`.
|
|
*/
|
|
function arrayEvery(array, predicate) {
|
|
var index = -1,
|
|
length = array == null ? 0 : array.length;
|
|
|
|
while (++index < length) {
|
|
if (!predicate(array[index], index, array)) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `_.filter` for arrays without support for
|
|
* iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to iterate over.
|
|
* @param {Function} predicate The function invoked per iteration.
|
|
* @returns {Array} Returns the new filtered array.
|
|
*/
|
|
function arrayFilter(array, predicate) {
|
|
var index = -1,
|
|
length = array == null ? 0 : array.length,
|
|
resIndex = 0,
|
|
result = [];
|
|
|
|
while (++index < length) {
|
|
var value = array[index];
|
|
if (predicate(value, index, array)) {
|
|
result[resIndex++] = value;
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `_.includes` for arrays without support for
|
|
* specifying an index to search from.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to inspect.
|
|
* @param {*} target The value to search for.
|
|
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
|
*/
|
|
function arrayIncludes(array, value) {
|
|
var length = array == null ? 0 : array.length;
|
|
return !!length && baseIndexOf(array, value, 0) > -1;
|
|
}
|
|
|
|
/**
|
|
* This function is like `arrayIncludes` except that it accepts a comparator.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to inspect.
|
|
* @param {*} target The value to search for.
|
|
* @param {Function} comparator The comparator invoked per element.
|
|
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
|
*/
|
|
function arrayIncludesWith(array, value, comparator) {
|
|
var index = -1,
|
|
length = array == null ? 0 : array.length;
|
|
|
|
while (++index < length) {
|
|
if (comparator(value, array[index])) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `_.map` for arrays without support for iteratee
|
|
* shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {Array} Returns the new mapped array.
|
|
*/
|
|
function arrayMap(array, iteratee) {
|
|
var index = -1,
|
|
length = array == null ? 0 : array.length,
|
|
result = Array(length);
|
|
|
|
while (++index < length) {
|
|
result[index] = iteratee(array[index], index, array);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Appends the elements of `values` to `array`.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to modify.
|
|
* @param {Array} values The values to append.
|
|
* @returns {Array} Returns `array`.
|
|
*/
|
|
function arrayPush(array, values) {
|
|
var index = -1,
|
|
length = values.length,
|
|
offset = array.length;
|
|
|
|
while (++index < length) {
|
|
array[offset + index] = values[index];
|
|
}
|
|
return array;
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `_.reduce` for arrays without support for
|
|
* iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @param {*} [accumulator] The initial value.
|
|
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
|
* the initial value.
|
|
* @returns {*} Returns the accumulated value.
|
|
*/
|
|
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
var index = -1,
|
|
length = array == null ? 0 : array.length;
|
|
|
|
if (initAccum && length) {
|
|
accumulator = array[++index];
|
|
}
|
|
while (++index < length) {
|
|
accumulator = iteratee(accumulator, array[index], index, array);
|
|
}
|
|
return accumulator;
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `_.reduceRight` for arrays without support for
|
|
* iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @param {*} [accumulator] The initial value.
|
|
* @param {boolean} [initAccum] Specify using the last element of `array` as
|
|
* the initial value.
|
|
* @returns {*} Returns the accumulated value.
|
|
*/
|
|
function arrayReduceRight(array, iteratee, accumulator, initAccum) {
|
|
var length = array == null ? 0 : array.length;
|
|
if (initAccum && length) {
|
|
accumulator = array[--length];
|
|
}
|
|
while (length--) {
|
|
accumulator = iteratee(accumulator, array[length], length, array);
|
|
}
|
|
return accumulator;
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `_.some` for arrays without support for iteratee
|
|
* shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to iterate over.
|
|
* @param {Function} predicate The function invoked per iteration.
|
|
* @returns {boolean} Returns `true` if any element passes the predicate check,
|
|
* else `false`.
|
|
*/
|
|
function arraySome(array, predicate) {
|
|
var index = -1,
|
|
length = array == null ? 0 : array.length;
|
|
|
|
while (++index < length) {
|
|
if (predicate(array[index], index, array)) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* Gets the size of an ASCII `string`.
|
|
*
|
|
* @private
|
|
* @param {string} string The string inspect.
|
|
* @returns {number} Returns the string size.
|
|
*/
|
|
var asciiSize = baseProperty('length');
|
|
|
|
/**
|
|
* Converts an ASCII `string` to an array.
|
|
*
|
|
* @private
|
|
* @param {string} string The string to convert.
|
|
* @returns {Array} Returns the converted array.
|
|
*/
|
|
function asciiToArray(string) {
|
|
return string.split('');
|
|
}
|
|
|
|
/**
|
|
* Splits an ASCII `string` into an array of its words.
|
|
*
|
|
* @private
|
|
* @param {string} The string to inspect.
|
|
* @returns {Array} Returns the words of `string`.
|
|
*/
|
|
function asciiWords(string) {
|
|
return string.match(reAsciiWord) || [];
|
|
}
|
|
|
|
/**
|
|
* The base implementation of methods like `_.findKey` and `_.findLastKey`,
|
|
* without support for iteratee shorthands, which iterates over `collection`
|
|
* using `eachFunc`.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to inspect.
|
|
* @param {Function} predicate The function invoked per iteration.
|
|
* @param {Function} eachFunc The function to iterate over `collection`.
|
|
* @returns {*} Returns the found element or its key, else `undefined`.
|
|
*/
|
|
function baseFindKey(collection, predicate, eachFunc) {
|
|
var result;
|
|
eachFunc(collection, function(value, key, collection) {
|
|
if (predicate(value, key, collection)) {
|
|
result = key;
|
|
return false;
|
|
}
|
|
});
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.findIndex` and `_.findLastIndex` without
|
|
* support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to inspect.
|
|
* @param {Function} predicate The function invoked per iteration.
|
|
* @param {number} fromIndex The index to search from.
|
|
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
*/
|
|
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
var length = array.length,
|
|
index = fromIndex + (fromRight ? 1 : -1);
|
|
|
|
while ((fromRight ? index-- : ++index < length)) {
|
|
if (predicate(array[index], index, array)) {
|
|
return index;
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to inspect.
|
|
* @param {*} value The value to search for.
|
|
* @param {number} fromIndex The index to search from.
|
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
*/
|
|
function baseIndexOf(array, value, fromIndex) {
|
|
return value === value
|
|
? strictIndexOf(array, value, fromIndex)
|
|
: baseFindIndex(array, baseIsNaN, fromIndex);
|
|
}
|
|
|
|
/**
|
|
* This function is like `baseIndexOf` except that it accepts a comparator.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to inspect.
|
|
* @param {*} value The value to search for.
|
|
* @param {number} fromIndex The index to search from.
|
|
* @param {Function} comparator The comparator invoked per element.
|
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
*/
|
|
function baseIndexOfWith(array, value, fromIndex, comparator) {
|
|
var index = fromIndex - 1,
|
|
length = array.length;
|
|
|
|
while (++index < length) {
|
|
if (comparator(array[index], value)) {
|
|
return index;
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.isNaN` without support for number objects.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
|
|
*/
|
|
function baseIsNaN(value) {
|
|
return value !== value;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.mean` and `_.meanBy` without support for
|
|
* iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {number} Returns the mean.
|
|
*/
|
|
function baseMean(array, iteratee) {
|
|
var length = array == null ? 0 : array.length;
|
|
return length ? (baseSum(array, iteratee) / length) : NAN;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.property` without support for deep paths.
|
|
*
|
|
* @private
|
|
* @param {string} key The key of the property to get.
|
|
* @returns {Function} Returns the new accessor function.
|
|
*/
|
|
function baseProperty(key) {
|
|
return function(object) {
|
|
return object == null ? undefined : object[key];
|
|
};
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.propertyOf` without support for deep paths.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Function} Returns the new accessor function.
|
|
*/
|
|
function basePropertyOf(object) {
|
|
return function(key) {
|
|
return object == null ? undefined : object[key];
|
|
};
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.reduce` and `_.reduceRight`, without support
|
|
* for iteratee shorthands, which iterates over `collection` using `eachFunc`.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @param {*} accumulator The initial value.
|
|
* @param {boolean} initAccum Specify using the first or last element of
|
|
* `collection` as the initial value.
|
|
* @param {Function} eachFunc The function to iterate over `collection`.
|
|
* @returns {*} Returns the accumulated value.
|
|
*/
|
|
function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
|
|
eachFunc(collection, function(value, index, collection) {
|
|
accumulator = initAccum
|
|
? (initAccum = false, value)
|
|
: iteratee(accumulator, value, index, collection);
|
|
});
|
|
return accumulator;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.sortBy` which uses `comparer` to define the
|
|
* sort order of `array` and replaces criteria objects with their corresponding
|
|
* values.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to sort.
|
|
* @param {Function} comparer The function to define sort order.
|
|
* @returns {Array} Returns `array`.
|
|
*/
|
|
function baseSortBy(array, comparer) {
|
|
var length = array.length;
|
|
|
|
array.sort(comparer);
|
|
while (length--) {
|
|
array[length] = array[length].value;
|
|
}
|
|
return array;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.sum` and `_.sumBy` without support for
|
|
* iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {number} Returns the sum.
|
|
*/
|
|
function baseSum(array, iteratee) {
|
|
var result,
|
|
index = -1,
|
|
length = array.length;
|
|
|
|
while (++index < length) {
|
|
var current = iteratee(array[index]);
|
|
if (current !== undefined) {
|
|
result = result === undefined ? current : (result + current);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.times` without support for iteratee shorthands
|
|
* or max array length checks.
|
|
*
|
|
* @private
|
|
* @param {number} n The number of times to invoke `iteratee`.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {Array} Returns the array of results.
|
|
*/
|
|
function baseTimes(n, iteratee) {
|
|
var index = -1,
|
|
result = Array(n);
|
|
|
|
while (++index < n) {
|
|
result[index] = iteratee(index);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
|
|
* of key-value pairs for `object` corresponding to the property names of `props`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @param {Array} props The property names to get values for.
|
|
* @returns {Object} Returns the key-value pairs.
|
|
*/
|
|
function baseToPairs(object, props) {
|
|
return arrayMap(props, function(key) {
|
|
return [key, object[key]];
|
|
});
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.trim`.
|
|
*
|
|
* @private
|
|
* @param {string} string The string to trim.
|
|
* @returns {string} Returns the trimmed string.
|
|
*/
|
|
function baseTrim(string) {
|
|
return string
|
|
? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
|
|
: string;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.unary` without support for storing metadata.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to cap arguments for.
|
|
* @returns {Function} Returns the new capped function.
|
|
*/
|
|
function baseUnary(func) {
|
|
return function(value) {
|
|
return func(value);
|
|
};
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.values` and `_.valuesIn` which creates an
|
|
* array of `object` property values corresponding to the property names
|
|
* of `props`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @param {Array} props The property names to get values for.
|
|
* @returns {Object} Returns the array of property values.
|
|
*/
|
|
function baseValues(object, props) {
|
|
return arrayMap(props, function(key) {
|
|
return object[key];
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Checks if a `cache` value for `key` exists.
|
|
*
|
|
* @private
|
|
* @param {Object} cache The cache to query.
|
|
* @param {string} key The key of the entry to check.
|
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
*/
|
|
function cacheHas(cache, key) {
|
|
return cache.has(key);
|
|
}
|
|
|
|
/**
|
|
* Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
|
|
* that is not found in the character symbols.
|
|
*
|
|
* @private
|
|
* @param {Array} strSymbols The string symbols to inspect.
|
|
* @param {Array} chrSymbols The character symbols to find.
|
|
* @returns {number} Returns the index of the first unmatched string symbol.
|
|
*/
|
|
function charsStartIndex(strSymbols, chrSymbols) {
|
|
var index = -1,
|
|
length = strSymbols.length;
|
|
|
|
while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
|
|
return index;
|
|
}
|
|
|
|
/**
|
|
* Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
|
|
* that is not found in the character symbols.
|
|
*
|
|
* @private
|
|
* @param {Array} strSymbols The string symbols to inspect.
|
|
* @param {Array} chrSymbols The character symbols to find.
|
|
* @returns {number} Returns the index of the last unmatched string symbol.
|
|
*/
|
|
function charsEndIndex(strSymbols, chrSymbols) {
|
|
var index = strSymbols.length;
|
|
|
|
while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
|
|
return index;
|
|
}
|
|
|
|
/**
|
|
* Gets the number of `placeholder` occurrences in `array`.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to inspect.
|
|
* @param {*} placeholder The placeholder to search for.
|
|
* @returns {number} Returns the placeholder count.
|
|
*/
|
|
function countHolders(array, placeholder) {
|
|
var length = array.length,
|
|
result = 0;
|
|
|
|
while (length--) {
|
|
if (array[length] === placeholder) {
|
|
++result;
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
|
|
* letters to basic Latin letters.
|
|
*
|
|
* @private
|
|
* @param {string} letter The matched letter to deburr.
|
|
* @returns {string} Returns the deburred letter.
|
|
*/
|
|
var deburrLetter = basePropertyOf(deburredLetters);
|
|
|
|
/**
|
|
* Used by `_.escape` to convert characters to HTML entities.
|
|
*
|
|
* @private
|
|
* @param {string} chr The matched character to escape.
|
|
* @returns {string} Returns the escaped character.
|
|
*/
|
|
var escapeHtmlChar = basePropertyOf(htmlEscapes);
|
|
|
|
/**
|
|
* Used by `_.template` to escape characters for inclusion in compiled string literals.
|
|
*
|
|
* @private
|
|
* @param {string} chr The matched character to escape.
|
|
* @returns {string} Returns the escaped character.
|
|
*/
|
|
function escapeStringChar(chr) {
|
|
return '\\' + stringEscapes[chr];
|
|
}
|
|
|
|
/**
|
|
* Gets the value at `key` of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} [object] The object to query.
|
|
* @param {string} key The key of the property to get.
|
|
* @returns {*} Returns the property value.
|
|
*/
|
|
function getValue(object, key) {
|
|
return object == null ? undefined : object[key];
|
|
}
|
|
|
|
/**
|
|
* Checks if `string` contains Unicode symbols.
|
|
*
|
|
* @private
|
|
* @param {string} string The string to inspect.
|
|
* @returns {boolean} Returns `true` if a symbol is found, else `false`.
|
|
*/
|
|
function hasUnicode(string) {
|
|
return reHasUnicode.test(string);
|
|
}
|
|
|
|
/**
|
|
* Checks if `string` contains a word composed of Unicode symbols.
|
|
*
|
|
* @private
|
|
* @param {string} string The string to inspect.
|
|
* @returns {boolean} Returns `true` if a word is found, else `false`.
|
|
*/
|
|
function hasUnicodeWord(string) {
|
|
return reHasUnicodeWord.test(string);
|
|
}
|
|
|
|
/**
|
|
* Converts `iterator` to an array.
|
|
*
|
|
* @private
|
|
* @param {Object} iterator The iterator to convert.
|
|
* @returns {Array} Returns the converted array.
|
|
*/
|
|
function iteratorToArray(iterator) {
|
|
var data,
|
|
result = [];
|
|
|
|
while (!(data = iterator.next()).done) {
|
|
result.push(data.value);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Converts `map` to its key-value pairs.
|
|
*
|
|
* @private
|
|
* @param {Object} map The map to convert.
|
|
* @returns {Array} Returns the key-value pairs.
|
|
*/
|
|
function mapToArray(map) {
|
|
var index = -1,
|
|
result = Array(map.size);
|
|
|
|
map.forEach(function(value, key) {
|
|
result[++index] = [key, value];
|
|
});
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Creates a unary function that invokes `func` with its argument transformed.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to wrap.
|
|
* @param {Function} transform The argument transform.
|
|
* @returns {Function} Returns the new function.
|
|
*/
|
|
function overArg(func, transform) {
|
|
return function(arg) {
|
|
return func(transform(arg));
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Replaces all `placeholder` elements in `array` with an internal placeholder
|
|
* and returns an array of their indexes.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to modify.
|
|
* @param {*} placeholder The placeholder to replace.
|
|
* @returns {Array} Returns the new array of placeholder indexes.
|
|
*/
|
|
function replaceHolders(array, placeholder) {
|
|
var index = -1,
|
|
length = array.length,
|
|
resIndex = 0,
|
|
result = [];
|
|
|
|
while (++index < length) {
|
|
var value = array[index];
|
|
if (value === placeholder || value === PLACEHOLDER) {
|
|
array[index] = PLACEHOLDER;
|
|
result[resIndex++] = index;
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Converts `set` to an array of its values.
|
|
*
|
|
* @private
|
|
* @param {Object} set The set to convert.
|
|
* @returns {Array} Returns the values.
|
|
*/
|
|
function setToArray(set) {
|
|
var index = -1,
|
|
result = Array(set.size);
|
|
|
|
set.forEach(function(value) {
|
|
result[++index] = value;
|
|
});
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Converts `set` to its value-value pairs.
|
|
*
|
|
* @private
|
|
* @param {Object} set The set to convert.
|
|
* @returns {Array} Returns the value-value pairs.
|
|
*/
|
|
function setToPairs(set) {
|
|
var index = -1,
|
|
result = Array(set.size);
|
|
|
|
set.forEach(function(value) {
|
|
result[++index] = [value, value];
|
|
});
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `_.indexOf` which performs strict equality
|
|
* comparisons of values, i.e. `===`.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to inspect.
|
|
* @param {*} value The value to search for.
|
|
* @param {number} fromIndex The index to search from.
|
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
*/
|
|
function strictIndexOf(array, value, fromIndex) {
|
|
var index = fromIndex - 1,
|
|
length = array.length;
|
|
|
|
while (++index < length) {
|
|
if (array[index] === value) {
|
|
return index;
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `_.lastIndexOf` which performs strict equality
|
|
* comparisons of values, i.e. `===`.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to inspect.
|
|
* @param {*} value The value to search for.
|
|
* @param {number} fromIndex The index to search from.
|
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
*/
|
|
function strictLastIndexOf(array, value, fromIndex) {
|
|
var index = fromIndex + 1;
|
|
while (index--) {
|
|
if (array[index] === value) {
|
|
return index;
|
|
}
|
|
}
|
|
return index;
|
|
}
|
|
|
|
/**
|
|
* Gets the number of symbols in `string`.
|
|
*
|
|
* @private
|
|
* @param {string} string The string to inspect.
|
|
* @returns {number} Returns the string size.
|
|
*/
|
|
function stringSize(string) {
|
|
return hasUnicode(string)
|
|
? unicodeSize(string)
|
|
: asciiSize(string);
|
|
}
|
|
|
|
/**
|
|
* Converts `string` to an array.
|
|
*
|
|
* @private
|
|
* @param {string} string The string to convert.
|
|
* @returns {Array} Returns the converted array.
|
|
*/
|
|
function stringToArray(string) {
|
|
return hasUnicode(string)
|
|
? unicodeToArray(string)
|
|
: asciiToArray(string);
|
|
}
|
|
|
|
/**
|
|
* Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
|
|
* character of `string`.
|
|
*
|
|
* @private
|
|
* @param {string} string The string to inspect.
|
|
* @returns {number} Returns the index of the last non-whitespace character.
|
|
*/
|
|
function trimmedEndIndex(string) {
|
|
var index = string.length;
|
|
|
|
while (index-- && reWhitespace.test(string.charAt(index))) {}
|
|
return index;
|
|
}
|
|
|
|
/**
|
|
* Used by `_.unescape` to convert HTML entities to characters.
|
|
*
|
|
* @private
|
|
* @param {string} chr The matched character to unescape.
|
|
* @returns {string} Returns the unescaped character.
|
|
*/
|
|
var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
|
|
|
|
/**
|
|
* Gets the size of a Unicode `string`.
|
|
*
|
|
* @private
|
|
* @param {string} string The string inspect.
|
|
* @returns {number} Returns the string size.
|
|
*/
|
|
function unicodeSize(string) {
|
|
var result = reUnicode.lastIndex = 0;
|
|
while (reUnicode.test(string)) {
|
|
++result;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Converts a Unicode `string` to an array.
|
|
*
|
|
* @private
|
|
* @param {string} string The string to convert.
|
|
* @returns {Array} Returns the converted array.
|
|
*/
|
|
function unicodeToArray(string) {
|
|
return string.match(reUnicode) || [];
|
|
}
|
|
|
|
/**
|
|
* Splits a Unicode `string` into an array of its words.
|
|
*
|
|
* @private
|
|
* @param {string} The string to inspect.
|
|
* @returns {Array} Returns the words of `string`.
|
|
*/
|
|
function unicodeWords(string) {
|
|
return string.match(reUnicodeWord) || [];
|
|
}
|
|
|
|
/*--------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
* Create a new pristine `lodash` function using the `context` object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 1.1.0
|
|
* @category Util
|
|
* @param {Object} [context=root] The context object.
|
|
* @returns {Function} Returns a new `lodash` function.
|
|
* @example
|
|
*
|
|
* _.mixin({ 'foo': _.constant('foo') });
|
|
*
|
|
* var lodash = _.runInContext();
|
|
* lodash.mixin({ 'bar': lodash.constant('bar') });
|
|
*
|
|
* _.isFunction(_.foo);
|
|
* // => true
|
|
* _.isFunction(_.bar);
|
|
* // => false
|
|
*
|
|
* lodash.isFunction(lodash.foo);
|
|
* // => false
|
|
* lodash.isFunction(lodash.bar);
|
|
* // => true
|
|
*
|
|
* // Create a suped-up `defer` in Node.js.
|
|
* var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
|
|
*/
|
|
var runInContext = (function runInContext(context) {
|
|
context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
|
|
|
|
/** Built-in constructor references. */
|
|
var Array = context.Array,
|
|
Date = context.Date,
|
|
Error = context.Error,
|
|
Function = context.Function,
|
|
Math = context.Math,
|
|
Object = context.Object,
|
|
RegExp = context.RegExp,
|
|
String = context.String,
|
|
TypeError = context.TypeError;
|
|
|
|
/** Used for built-in method references. */
|
|
var arrayProto = Array.prototype,
|
|
funcProto = Function.prototype,
|
|
objectProto = Object.prototype;
|
|
|
|
/** Used to detect overreaching core-js shims. */
|
|
var coreJsData = context['__core-js_shared__'];
|
|
|
|
/** Used to resolve the decompiled source of functions. */
|
|
var funcToString = funcProto.toString;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/** Used to generate unique IDs. */
|
|
var idCounter = 0;
|
|
|
|
/** Used to detect methods masquerading as native. */
|
|
var maskSrcKey = (function() {
|
|
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
|
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
}());
|
|
|
|
/**
|
|
* Used to resolve the
|
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
* of values.
|
|
*/
|
|
var nativeObjectToString = objectProto.toString;
|
|
|
|
/** Used to infer the `Object` constructor. */
|
|
var objectCtorString = funcToString.call(Object);
|
|
|
|
/** Used to restore the original `_` reference in `_.noConflict`. */
|
|
var oldDash = root._;
|
|
|
|
/** Used to detect if a method is native. */
|
|
var reIsNative = RegExp('^' +
|
|
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
|
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
);
|
|
|
|
/** Built-in value references. */
|
|
var Buffer = moduleExports ? context.Buffer : undefined,
|
|
Symbol = context.Symbol,
|
|
Uint8Array = context.Uint8Array,
|
|
allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
|
|
getPrototype = overArg(Object.getPrototypeOf, Object),
|
|
objectCreate = Object.create,
|
|
propertyIsEnumerable = objectProto.propertyIsEnumerable,
|
|
splice = arrayProto.splice,
|
|
spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
|
|
symIterator = Symbol ? Symbol.iterator : undefined,
|
|
symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
|
|
|
var defineProperty = (function() {
|
|
try {
|
|
var func = getNative(Object, 'defineProperty');
|
|
func({}, '', {});
|
|
return func;
|
|
} catch (e) {}
|
|
}());
|
|
|
|
/** Mocked built-ins. */
|
|
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
|
|
ctxNow = Date && Date.now !== root.Date.now && Date.now,
|
|
ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
|
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
var nativeCeil = Math.ceil,
|
|
nativeFloor = Math.floor,
|
|
nativeGetSymbols = Object.getOwnPropertySymbols,
|
|
nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
|
|
nativeIsFinite = context.isFinite,
|
|
nativeJoin = arrayProto.join,
|
|
nativeKeys = overArg(Object.keys, Object),
|
|
nativeMax = Math.max,
|
|
nativeMin = Math.min,
|
|
nativeNow = Date.now,
|
|
nativeParseInt = context.parseInt,
|
|
nativeRandom = Math.random,
|
|
nativeReverse = arrayProto.reverse;
|
|
|
|
/* Built-in method references that are verified to be native. */
|
|
var DataView = getNative(context, 'DataView'),
|
|
Map = getNative(context, 'Map'),
|
|
Promise = getNative(context, 'Promise'),
|
|
Set = getNative(context, 'Set'),
|
|
WeakMap = getNative(context, 'WeakMap'),
|
|
nativeCreate = getNative(Object, 'create');
|
|
|
|
/** Used to store function metadata. */
|
|
var metaMap = WeakMap && new WeakMap;
|
|
|
|
/** Used to lookup unminified function names. */
|
|
var realNames = {};
|
|
|
|
/** Used to detect maps, sets, and weakmaps. */
|
|
var dataViewCtorString = toSource(DataView),
|
|
mapCtorString = toSource(Map),
|
|
promiseCtorString = toSource(Promise),
|
|
setCtorString = toSource(Set),
|
|
weakMapCtorString = toSource(WeakMap);
|
|
|
|
/** Used to convert symbols to primitives and strings. */
|
|
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
|
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
|
|
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
|
|
/*------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
* Creates a `lodash` object which wraps `value` to enable implicit method
|
|
* chain sequences. Methods that operate on and return arrays, collections,
|
|
* and functions can be chained together. Methods that retrieve a single value
|
|
* or may return a primitive value will automatically end the chain sequence
|
|
* and return the unwrapped value. Otherwise, the value must be unwrapped
|
|
* with `_#value`.
|
|
*
|
|
* Explicit chain sequences, which must be unwrapped with `_#value`, may be
|
|
* enabled using `_.chain`.
|
|
*
|
|
* The execution of chained methods is lazy, that is, it's deferred until
|
|
* `_#value` is implicitly or explicitly called.
|
|
*
|
|
* Lazy evaluation allows several methods to support shortcut fusion.
|
|
* Shortcut fusion is an optimization to merge iteratee calls; this avoids
|
|
* the creation of intermediate arrays and can greatly reduce the number of
|
|
* iteratee executions. Sections of a chain sequence qualify for shortcut
|
|
* fusion if the section is applied to an array and iteratees accept only
|
|
* one argument. The heuristic for whether a section qualifies for shortcut
|
|
* fusion is subject to change.
|
|
*
|
|
* Chaining is supported in custom builds as long as the `_#value` method is
|
|
* directly or indirectly included in the build.
|
|
*
|
|
* In addition to lodash methods, wrappers have `Array` and `String` methods.
|
|
*
|
|
* The wrapper `Array` methods are:
|
|
* `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
|
|
*
|
|
* The wrapper `String` methods are:
|
|
* `replace` and `split`
|
|
*
|
|
* The wrapper methods that support shortcut fusion are:
|
|
* `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
|
|
* `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
|
|
* `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
|
|
*
|
|
* The chainable wrapper methods are:
|
|
* `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
|
|
* `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
|
|
* `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
|
|
* `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
|
|
* `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
|
|
* `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
|
|
* `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
|
|
* `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
|
|
* `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
|
|
* `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
|
|
* `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
|
|
* `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
|
|
* `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
|
|
* `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
|
|
* `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
|
|
* `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
|
|
* `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
|
|
* `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
|
|
* `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
|
|
* `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
|
|
* `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
|
|
* `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
|
|
* `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
|
|
* `zipObject`, `zipObjectDeep`, and `zipWith`
|
|
*
|
|
* The wrapper methods that are **not** chainable by default are:
|
|
* `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
|
|
* `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
|
|
* `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
|
|
* `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
|
|
* `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
|
|
* `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
|
|
* `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
|
|
* `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
|
|
* `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
|
|
* `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
|
|
* `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
|
|
* `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
|
|
* `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
|
|
* `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
|
|
* `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
|
|
* `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
|
|
* `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
|
|
* `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
|
|
* `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
|
|
* `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
|
|
* `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
|
|
* `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
|
|
* `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
|
|
* `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
|
|
* `upperFirst`, `value`, and `words`
|
|
*
|
|
* @name _
|
|
* @constructor
|
|
* @category Seq
|
|
* @param {*} value The value to wrap in a `lodash` instance.
|
|
* @returns {Object} Returns the new `lodash` wrapper instance.
|
|
* @example
|
|
*
|
|
* function square(n) {
|
|
* return n * n;
|
|
* }
|
|
*
|
|
* var wrapped = _([1, 2, 3]);
|
|
*
|
|
* // Returns an unwrapped value.
|
|
* wrapped.reduce(_.add);
|
|
* // => 6
|
|
*
|
|
* // Returns a wrapped value.
|
|
* var squares = wrapped.map(square);
|
|
*
|
|
* _.isArray(squares);
|
|
* // => false
|
|
*
|
|
* _.isArray(squares.value());
|
|
* // => true
|
|
*/
|
|
function lodash(value) {
|
|
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
|
|
if (value instanceof LodashWrapper) {
|
|
return value;
|
|
}
|
|
if (hasOwnProperty.call(value, '__wrapped__')) {
|
|
return wrapperClone(value);
|
|
}
|
|
}
|
|
return new LodashWrapper(value);
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.create` without support for assigning
|
|
* properties to the created object.
|
|
*
|
|
* @private
|
|
* @param {Object} proto The object to inherit from.
|
|
* @returns {Object} Returns the new object.
|
|
*/
|
|
var baseCreate = (function() {
|
|
function object() {}
|
|
return function(proto) {
|
|
if (!isObject(proto)) {
|
|
return {};
|
|
}
|
|
if (objectCreate) {
|
|
return objectCreate(proto);
|
|
}
|
|
object.prototype = proto;
|
|
var result = new object;
|
|
object.prototype = undefined;
|
|
return result;
|
|
};
|
|
}());
|
|
|
|
/**
|
|
* The function whose prototype chain sequence wrappers inherit from.
|
|
*
|
|
* @private
|
|
*/
|
|
function baseLodash() {
|
|
// No operation performed.
|
|
}
|
|
|
|
/**
|
|
* The base constructor for creating `lodash` wrapper objects.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to wrap.
|
|
* @param {boolean} [chainAll] Enable explicit method chain sequences.
|
|
*/
|
|
function LodashWrapper(value, chainAll) {
|
|
this.__wrapped__ = value;
|
|
this.__actions__ = [];
|
|
this.__chain__ = !!chainAll;
|
|
this.__index__ = 0;
|
|
this.__values__ = undefined;
|
|
}
|
|
|
|
/**
|
|
* By default, the template delimiters used by lodash are like those in
|
|
* embedded Ruby (ERB) as well as ES2015 template strings. Change the
|
|
* following template settings to use alternative delimiters.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @type {Object}
|
|
*/
|
|
lodash.templateSettings = {
|
|
|
|
/**
|
|
* Used to detect `data` property values to be HTML-escaped.
|
|
*
|
|
* @memberOf _.templateSettings
|
|
* @type {RegExp}
|
|
*/
|
|
'escape': reEscape,
|
|
|
|
/**
|
|
* Used to detect code to be evaluated.
|
|
*
|
|
* @memberOf _.templateSettings
|
|
* @type {RegExp}
|
|
*/
|
|
'evaluate': reEvaluate,
|
|
|
|
/**
|
|
* Used to detect `data` property values to inject.
|
|
*
|
|
* @memberOf _.templateSettings
|
|
* @type {RegExp}
|
|
*/
|
|
'interpolate': reInterpolate,
|
|
|
|
/**
|
|
* Used to reference the data object in the template text.
|
|
*
|
|
* @memberOf _.templateSettings
|
|
* @type {string}
|
|
*/
|
|
'variable': '',
|
|
|
|
/**
|
|
* Used to import variables into the compiled template.
|
|
*
|
|
* @memberOf _.templateSettings
|
|
* @type {Object}
|
|
*/
|
|
'imports': {
|
|
|
|
/**
|
|
* A reference to the `lodash` function.
|
|
*
|
|
* @memberOf _.templateSettings.imports
|
|
* @type {Function}
|
|
*/
|
|
'_': lodash
|
|
}
|
|
};
|
|
|
|
// Ensure wrappers are instances of `baseLodash`.
|
|
lodash.prototype = baseLodash.prototype;
|
|
lodash.prototype.constructor = lodash;
|
|
|
|
LodashWrapper.prototype = baseCreate(baseLodash.prototype);
|
|
LodashWrapper.prototype.constructor = LodashWrapper;
|
|
|
|
/*------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
* Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
|
|
*
|
|
* @private
|
|
* @constructor
|
|
* @param {*} value The value to wrap.
|
|
*/
|
|
function LazyWrapper(value) {
|
|
this.__wrapped__ = value;
|
|
this.__actions__ = [];
|
|
this.__dir__ = 1;
|
|
this.__filtered__ = false;
|
|
this.__iteratees__ = [];
|
|
this.__takeCount__ = MAX_ARRAY_LENGTH;
|
|
this.__views__ = [];
|
|
}
|
|
|
|
/**
|
|
* Creates a clone of the lazy wrapper object.
|
|
*
|
|
* @private
|
|
* @name clone
|
|
* @memberOf LazyWrapper
|
|
* @returns {Object} Returns the cloned `LazyWrapper` object.
|
|
*/
|
|
function lazyClone() {
|
|
var result = new LazyWrapper(this.__wrapped__);
|
|
result.__actions__ = copyArray(this.__actions__);
|
|
result.__dir__ = this.__dir__;
|
|
result.__filtered__ = this.__filtered__;
|
|
result.__iteratees__ = copyArray(this.__iteratees__);
|
|
result.__takeCount__ = this.__takeCount__;
|
|
result.__views__ = copyArray(this.__views__);
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Reverses the direction of lazy iteration.
|
|
*
|
|
* @private
|
|
* @name reverse
|
|
* @memberOf LazyWrapper
|
|
* @returns {Object} Returns the new reversed `LazyWrapper` object.
|
|
*/
|
|
function lazyReverse() {
|
|
if (this.__filtered__) {
|
|
var result = new LazyWrapper(this);
|
|
result.__dir__ = -1;
|
|
result.__filtered__ = true;
|
|
} else {
|
|
result = this.clone();
|
|
result.__dir__ *= -1;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Extracts the unwrapped value from its lazy wrapper.
|
|
*
|
|
* @private
|
|
* @name value
|
|
* @memberOf LazyWrapper
|
|
* @returns {*} Returns the unwrapped value.
|
|
*/
|
|
function lazyValue() {
|
|
var array = this.__wrapped__.value(),
|
|
dir = this.__dir__,
|
|
isArr = isArray(array),
|
|
isRight = dir < 0,
|
|
arrLength = isArr ? array.length : 0,
|
|
view = getView(0, arrLength, this.__views__),
|
|
start = view.start,
|
|
end = view.end,
|
|
length = end - start,
|
|
index = isRight ? end : (start - 1),
|
|
iteratees = this.__iteratees__,
|
|
iterLength = iteratees.length,
|
|
resIndex = 0,
|
|
takeCount = nativeMin(length, this.__takeCount__);
|
|
|
|
if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
|
|
return baseWrapperValue(array, this.__actions__);
|
|
}
|
|
var result = [];
|
|
|
|
outer:
|
|
while (length-- && resIndex < takeCount) {
|
|
index += dir;
|
|
|
|
var iterIndex = -1,
|
|
value = array[index];
|
|
|
|
while (++iterIndex < iterLength) {
|
|
var data = iteratees[iterIndex],
|
|
iteratee = data.iteratee,
|
|
type = data.type,
|
|
computed = iteratee(value);
|
|
|
|
if (type == LAZY_MAP_FLAG) {
|
|
value = computed;
|
|
} else if (!computed) {
|
|
if (type == LAZY_FILTER_FLAG) {
|
|
continue outer;
|
|
} else {
|
|
break outer;
|
|
}
|
|
}
|
|
}
|
|
result[resIndex++] = value;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
// Ensure `LazyWrapper` is an instance of `baseLodash`.
|
|
LazyWrapper.prototype = baseCreate(baseLodash.prototype);
|
|
LazyWrapper.prototype.constructor = LazyWrapper;
|
|
|
|
/*------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
* Creates a hash object.
|
|
*
|
|
* @private
|
|
* @constructor
|
|
* @param {Array} [entries] The key-value pairs to cache.
|
|
*/
|
|
function Hash(entries) {
|
|
var index = -1,
|
|
length = entries == null ? 0 : entries.length;
|
|
|
|
this.clear();
|
|
while (++index < length) {
|
|
var entry = entries[index];
|
|
this.set(entry[0], entry[1]);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Removes all key-value entries from the hash.
|
|
*
|
|
* @private
|
|
* @name clear
|
|
* @memberOf Hash
|
|
*/
|
|
function hashClear() {
|
|
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
this.size = 0;
|
|
}
|
|
|
|
/**
|
|
* Removes `key` and its value from the hash.
|
|
*
|
|
* @private
|
|
* @name delete
|
|
* @memberOf Hash
|
|
* @param {Object} hash The hash to modify.
|
|
* @param {string} key The key of the value to remove.
|
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
*/
|
|
function hashDelete(key) {
|
|
var result = this.has(key) && delete this.__data__[key];
|
|
this.size -= result ? 1 : 0;
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Gets the hash value for `key`.
|
|
*
|
|
* @private
|
|
* @name get
|
|
* @memberOf Hash
|
|
* @param {string} key The key of the value to get.
|
|
* @returns {*} Returns the entry value.
|
|
*/
|
|
function hashGet(key) {
|
|
var data = this.__data__;
|
|
if (nativeCreate) {
|
|
var result = data[key];
|
|
return result === HASH_UNDEFINED ? undefined : result;
|
|
}
|
|
return hasOwnProperty.call(data, key) ? data[key] : undefined;
|
|
}
|
|
|
|
/**
|
|
* Checks if a hash value for `key` exists.
|
|
*
|
|
* @private
|
|
* @name has
|
|
* @memberOf Hash
|
|
* @param {string} key The key of the entry to check.
|
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
*/
|
|
function hashHas(key) {
|
|
var data = this.__data__;
|
|
return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
|
}
|
|
|
|
/**
|
|
* Sets the hash `key` to `value`.
|
|
*
|
|
* @private
|
|
* @name set
|
|
* @memberOf Hash
|
|
* @param {string} key The key of the value to set.
|
|
* @param {*} value The value to set.
|
|
* @returns {Object} Returns the hash instance.
|
|
*/
|
|
function hashSet(key, value) {
|
|
var data = this.__data__;
|
|
this.size += this.has(key) ? 0 : 1;
|
|
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
|
return this;
|
|
}
|
|
|
|
// Add methods to `Hash`.
|
|
Hash.prototype.clear = hashClear;
|
|
Hash.prototype['delete'] = hashDelete;
|
|
Hash.prototype.get = hashGet;
|
|
Hash.prototype.has = hashHas;
|
|
Hash.prototype.set = hashSet;
|
|
|
|
/*------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
* Creates an list cache object.
|
|
*
|
|
* @private
|
|
* @constructor
|
|
* @param {Array} [entries] The key-value pairs to cache.
|
|
*/
|
|
function ListCache(entries) {
|
|
var index = -1,
|
|
length = entries == null ? 0 : entries.length;
|
|
|
|
this.clear();
|
|
while (++index < length) {
|
|
var entry = entries[index];
|
|
this.set(entry[0], entry[1]);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Removes all key-value entries from the list cache.
|
|
*
|
|
* @private
|
|
* @name clear
|
|
* @memberOf ListCache
|
|
*/
|
|
function listCacheClear() {
|
|
this.__data__ = [];
|
|
this.size = 0;
|
|
}
|
|
|
|
/**
|
|
* Removes `key` and its value from the list cache.
|
|
*
|
|
* @private
|
|
* @name delete
|
|
* @memberOf ListCache
|
|
* @param {string} key The key of the value to remove.
|
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
*/
|
|
function listCacheDelete(key) {
|
|
var data = this.__data__,
|
|
index = assocIndexOf(data, key);
|
|
|
|
if (index < 0) {
|
|
return false;
|
|
}
|
|
var lastIndex = data.length - 1;
|
|
if (index == lastIndex) {
|
|
data.pop();
|
|
} else {
|
|
splice.call(data, index, 1);
|
|
}
|
|
--this.size;
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Gets the list cache value for `key`.
|
|
*
|
|
* @private
|
|
* @name get
|
|
* @memberOf ListCache
|
|
* @param {string} key The key of the value to get.
|
|
* @returns {*} Returns the entry value.
|
|
*/
|
|
function listCacheGet(key) {
|
|
var data = this.__data__,
|
|
index = assocIndexOf(data, key);
|
|
|
|
return index < 0 ? undefined : data[index][1];
|
|
}
|
|
|
|
/**
|
|
* Checks if a list cache value for `key` exists.
|
|
*
|
|
* @private
|
|
* @name has
|
|
* @memberOf ListCache
|
|
* @param {string} key The key of the entry to check.
|
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
*/
|
|
function listCacheHas(key) {
|
|
return assocIndexOf(this.__data__, key) > -1;
|
|
}
|
|
|
|
/**
|
|
* Sets the list cache `key` to `value`.
|
|
*
|
|
* @private
|
|
* @name set
|
|
* @memberOf ListCache
|
|
* @param {string} key The key of the value to set.
|
|
* @param {*} value The value to set.
|
|
* @returns {Object} Returns the list cache instance.
|
|
*/
|
|
function listCacheSet(key, value) {
|
|
var data = this.__data__,
|
|
index = assocIndexOf(data, key);
|
|
|
|
if (index < 0) {
|
|
++this.size;
|
|
data.push([key, value]);
|
|
} else {
|
|
data[index][1] = value;
|
|
}
|
|
return this;
|
|
}
|
|
|
|
// Add methods to `ListCache`.
|
|
ListCache.prototype.clear = listCacheClear;
|
|
ListCache.prototype['delete'] = listCacheDelete;
|
|
ListCache.prototype.get = listCacheGet;
|
|
ListCache.prototype.has = listCacheHas;
|
|
ListCache.prototype.set = listCacheSet;
|
|
|
|
/*------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
* Creates a map cache object to store key-value pairs.
|
|
*
|
|
* @private
|
|
* @constructor
|
|
* @param {Array} [entries] The key-value pairs to cache.
|
|
*/
|
|
function MapCache(entries) {
|
|
var index = -1,
|
|
length = entries == null ? 0 : entries.length;
|
|
|
|
this.clear();
|
|
while (++index < length) {
|
|
var entry = entries[index];
|
|
this.set(entry[0], entry[1]);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Removes all key-value entries from the map.
|
|
*
|
|
* @private
|
|
* @name clear
|
|
* @memberOf MapCache
|
|
*/
|
|
function mapCacheClear() {
|
|
this.size = 0;
|
|
this.__data__ = {
|
|
'hash': new Hash,
|
|
'map': new (Map || ListCache),
|
|
'string': new Hash
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Removes `key` and its value from the map.
|
|
*
|
|
* @private
|
|
* @name delete
|
|
* @memberOf MapCache
|
|
* @param {string} key The key of the value to remove.
|
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
*/
|
|
function mapCacheDelete(key) {
|
|
var result = getMapData(this, key)['delete'](key);
|
|
this.size -= result ? 1 : 0;
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Gets the map value for `key`.
|
|
*
|
|
* @private
|
|
* @name get
|
|
* @memberOf MapCache
|
|
* @param {string} key The key of the value to get.
|
|
* @returns {*} Returns the entry value.
|
|
*/
|
|
function mapCacheGet(key) {
|
|
return getMapData(this, key).get(key);
|
|
}
|
|
|
|
/**
|
|
* Checks if a map value for `key` exists.
|
|
*
|
|
* @private
|
|
* @name has
|
|
* @memberOf MapCache
|
|
* @param {string} key The key of the entry to check.
|
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
*/
|
|
function mapCacheHas(key) {
|
|
return getMapData(this, key).has(key);
|
|
}
|
|
|
|
/**
|
|
* Sets the map `key` to `value`.
|
|
*
|
|
* @private
|
|
* @name set
|
|
* @memberOf MapCache
|
|
* @param {string} key The key of the value to set.
|
|
* @param {*} value The value to set.
|
|
* @returns {Object} Returns the map cache instance.
|
|
*/
|
|
function mapCacheSet(key, value) {
|
|
var data = getMapData(this, key),
|
|
size = data.size;
|
|
|
|
data.set(key, value);
|
|
this.size += data.size == size ? 0 : 1;
|
|
return this;
|
|
}
|
|
|
|
// Add methods to `MapCache`.
|
|
MapCache.prototype.clear = mapCacheClear;
|
|
MapCache.prototype['delete'] = mapCacheDelete;
|
|
MapCache.prototype.get = mapCacheGet;
|
|
MapCache.prototype.has = mapCacheHas;
|
|
MapCache.prototype.set = mapCacheSet;
|
|
|
|
/*------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
*
|
|
* Creates an array cache object to store unique values.
|
|
*
|
|
* @private
|
|
* @constructor
|
|
* @param {Array} [values] The values to cache.
|
|
*/
|
|
function SetCache(values) {
|
|
var index = -1,
|
|
length = values == null ? 0 : values.length;
|
|
|
|
this.__data__ = new MapCache;
|
|
while (++index < length) {
|
|
this.add(values[index]);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Adds `value` to the array cache.
|
|
*
|
|
* @private
|
|
* @name add
|
|
* @memberOf SetCache
|
|
* @alias push
|
|
* @param {*} value The value to cache.
|
|
* @returns {Object} Returns the cache instance.
|
|
*/
|
|
function setCacheAdd(value) {
|
|
this.__data__.set(value, HASH_UNDEFINED);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is in the array cache.
|
|
*
|
|
* @private
|
|
* @name has
|
|
* @memberOf SetCache
|
|
* @param {*} value The value to search for.
|
|
* @returns {number} Returns `true` if `value` is found, else `false`.
|
|
*/
|
|
function setCacheHas(value) {
|
|
return this.__data__.has(value);
|
|
}
|
|
|
|
// Add methods to `SetCache`.
|
|
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
|
SetCache.prototype.has = setCacheHas;
|
|
|
|
/*------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
* Creates a stack cache object to store key-value pairs.
|
|
*
|
|
* @private
|
|
* @constructor
|
|
* @param {Array} [entries] The key-value pairs to cache.
|
|
*/
|
|
function Stack(entries) {
|
|
var data = this.__data__ = new ListCache(entries);
|
|
this.size = data.size;
|
|
}
|
|
|
|
/**
|
|
* Removes all key-value entries from the stack.
|
|
*
|
|
* @private
|
|
* @name clear
|
|
* @memberOf Stack
|
|
*/
|
|
function stackClear() {
|
|
this.__data__ = new ListCache;
|
|
this.size = 0;
|
|
}
|
|
|
|
/**
|
|
* Removes `key` and its value from the stack.
|
|
*
|
|
* @private
|
|
* @name delete
|
|
* @memberOf Stack
|
|
* @param {string} key The key of the value to remove.
|
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
*/
|
|
function stackDelete(key) {
|
|
var data = this.__data__,
|
|
result = data['delete'](key);
|
|
|
|
this.size = data.size;
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Gets the stack value for `key`.
|
|
*
|
|
* @private
|
|
* @name get
|
|
* @memberOf Stack
|
|
* @param {string} key The key of the value to get.
|
|
* @returns {*} Returns the entry value.
|
|
*/
|
|
function stackGet(key) {
|
|
return this.__data__.get(key);
|
|
}
|
|
|
|
/**
|
|
* Checks if a stack value for `key` exists.
|
|
*
|
|
* @private
|
|
* @name has
|
|
* @memberOf Stack
|
|
* @param {string} key The key of the entry to check.
|
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
*/
|
|
function stackHas(key) {
|
|
return this.__data__.has(key);
|
|
}
|
|
|
|
/**
|
|
* Sets the stack `key` to `value`.
|
|
*
|
|
* @private
|
|
* @name set
|
|
* @memberOf Stack
|
|
* @param {string} key The key of the value to set.
|
|
* @param {*} value The value to set.
|
|
* @returns {Object} Returns the stack cache instance.
|
|
*/
|
|
function stackSet(key, value) {
|
|
var data = this.__data__;
|
|
if (data instanceof ListCache) {
|
|
var pairs = data.__data__;
|
|
if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
|
|
pairs.push([key, value]);
|
|
this.size = ++data.size;
|
|
return this;
|
|
}
|
|
data = this.__data__ = new MapCache(pairs);
|
|
}
|
|
data.set(key, value);
|
|
this.size = data.size;
|
|
return this;
|
|
}
|
|
|
|
// Add methods to `Stack`.
|
|
Stack.prototype.clear = stackClear;
|
|
Stack.prototype['delete'] = stackDelete;
|
|
Stack.prototype.get = stackGet;
|
|
Stack.prototype.has = stackHas;
|
|
Stack.prototype.set = stackSet;
|
|
|
|
/*------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
* Creates an array of the enumerable property names of the array-like `value`.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to query.
|
|
* @param {boolean} inherited Specify returning inherited property names.
|
|
* @returns {Array} Returns the array of property names.
|
|
*/
|
|
function arrayLikeKeys(value, inherited) {
|
|
var isArr = isArray(value),
|
|
isArg = !isArr && isArguments(value),
|
|
isBuff = !isArr && !isArg && isBuffer(value),
|
|
isType = !isArr && !isArg && !isBuff && isTypedArray(value),
|
|
skipIndexes = isArr || isArg || isBuff || isType,
|
|
result = skipIndexes ? baseTimes(value.length, String) : [],
|
|
length = result.length;
|
|
|
|
for (var key in value) {
|
|
if ((inherited || hasOwnProperty.call(value, key)) &&
|
|
!(skipIndexes && (
|
|
// Safari 9 has enumerable `arguments.length` in strict mode.
|
|
key == 'length' ||
|
|
// Node.js 0.10 has enumerable non-index properties on buffers.
|
|
(isBuff && (key == 'offset' || key == 'parent')) ||
|
|
// PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
(isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
|
|
// Skip index properties.
|
|
isIndex(key, length)
|
|
))) {
|
|
result.push(key);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `_.sample` for arrays.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to sample.
|
|
* @returns {*} Returns the random element.
|
|
*/
|
|
function arraySample(array) {
|
|
var length = array.length;
|
|
return length ? array[baseRandom(0, length - 1)] : undefined;
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `_.sampleSize` for arrays.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to sample.
|
|
* @param {number} n The number of elements to sample.
|
|
* @returns {Array} Returns the random elements.
|
|
*/
|
|
function arraySampleSize(array, n) {
|
|
return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `_.shuffle` for arrays.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to shuffle.
|
|
* @returns {Array} Returns the new shuffled array.
|
|
*/
|
|
function arrayShuffle(array) {
|
|
return shuffleSelf(copyArray(array));
|
|
}
|
|
|
|
/**
|
|
* This function is like `assignValue` except that it doesn't assign
|
|
* `undefined` values.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to modify.
|
|
* @param {string} key The key of the property to assign.
|
|
* @param {*} value The value to assign.
|
|
*/
|
|
function assignMergeValue(object, key, value) {
|
|
if ((value !== undefined && !eq(object[key], value)) ||
|
|
(value === undefined && !(key in object))) {
|
|
baseAssignValue(object, key, value);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Assigns `value` to `key` of `object` if the existing value is not equivalent
|
|
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
* for equality comparisons.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to modify.
|
|
* @param {string} key The key of the property to assign.
|
|
* @param {*} value The value to assign.
|
|
*/
|
|
function assignValue(object, key, value) {
|
|
var objValue = object[key];
|
|
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
|
|
(value === undefined && !(key in object))) {
|
|
baseAssignValue(object, key, value);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to inspect.
|
|
* @param {*} key The key to search for.
|
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
*/
|
|
function assocIndexOf(array, key) {
|
|
var length = array.length;
|
|
while (length--) {
|
|
if (eq(array[length][0], key)) {
|
|
return length;
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
/**
|
|
* Aggregates elements of `collection` on `accumulator` with keys transformed
|
|
* by `iteratee` and values set by `setter`.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} setter The function to set `accumulator` values.
|
|
* @param {Function} iteratee The iteratee to transform keys.
|
|
* @param {Object} accumulator The initial aggregated object.
|
|
* @returns {Function} Returns `accumulator`.
|
|
*/
|
|
function baseAggregator(collection, setter, iteratee, accumulator) {
|
|
baseEach(collection, function(value, key, collection) {
|
|
setter(accumulator, value, iteratee(value), collection);
|
|
});
|
|
return accumulator;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.assign` without support for multiple sources
|
|
* or `customizer` functions.
|
|
*
|
|
* @private
|
|
* @param {Object} object The destination object.
|
|
* @param {Object} source The source object.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
function baseAssign(object, source) {
|
|
return object && copyObject(source, keys(source), object);
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.assignIn` without support for multiple sources
|
|
* or `customizer` functions.
|
|
*
|
|
* @private
|
|
* @param {Object} object The destination object.
|
|
* @param {Object} source The source object.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
function baseAssignIn(object, source) {
|
|
return object && copyObject(source, keysIn(source), object);
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
* value checks.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to modify.
|
|
* @param {string} key The key of the property to assign.
|
|
* @param {*} value The value to assign.
|
|
*/
|
|
function baseAssignValue(object, key, value) {
|
|
if (key == '__proto__' && defineProperty) {
|
|
defineProperty(object, key, {
|
|
'configurable': true,
|
|
'enumerable': true,
|
|
'value': value,
|
|
'writable': true
|
|
});
|
|
} else {
|
|
object[key] = value;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.at` without support for individual paths.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to iterate over.
|
|
* @param {string[]} paths The property paths to pick.
|
|
* @returns {Array} Returns the picked elements.
|
|
*/
|
|
function baseAt(object, paths) {
|
|
var index = -1,
|
|
length = paths.length,
|
|
result = Array(length),
|
|
skip = object == null;
|
|
|
|
while (++index < length) {
|
|
result[index] = skip ? undefined : get(object, paths[index]);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.clamp` which doesn't coerce arguments.
|
|
*
|
|
* @private
|
|
* @param {number} number The number to clamp.
|
|
* @param {number} [lower] The lower bound.
|
|
* @param {number} upper The upper bound.
|
|
* @returns {number} Returns the clamped number.
|
|
*/
|
|
function baseClamp(number, lower, upper) {
|
|
if (number === number) {
|
|
if (upper !== undefined) {
|
|
number = number <= upper ? number : upper;
|
|
}
|
|
if (lower !== undefined) {
|
|
number = number >= lower ? number : lower;
|
|
}
|
|
}
|
|
return number;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
|
|
* traversed objects.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to clone.
|
|
* @param {boolean} bitmask The bitmask flags.
|
|
* 1 - Deep clone
|
|
* 2 - Flatten inherited properties
|
|
* 4 - Clone symbols
|
|
* @param {Function} [customizer] The function to customize cloning.
|
|
* @param {string} [key] The key of `value`.
|
|
* @param {Object} [object] The parent object of `value`.
|
|
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
|
|
* @returns {*} Returns the cloned value.
|
|
*/
|
|
function baseClone(value, bitmask, customizer, key, object, stack) {
|
|
var result,
|
|
isDeep = bitmask & CLONE_DEEP_FLAG,
|
|
isFlat = bitmask & CLONE_FLAT_FLAG,
|
|
isFull = bitmask & CLONE_SYMBOLS_FLAG;
|
|
|
|
if (customizer) {
|
|
result = object ? customizer(value, key, object, stack) : customizer(value);
|
|
}
|
|
if (result !== undefined) {
|
|
return result;
|
|
}
|
|
if (!isObject(value)) {
|
|
return value;
|
|
}
|
|
var isArr = isArray(value);
|
|
if (isArr) {
|
|
result = initCloneArray(value);
|
|
if (!isDeep) {
|
|
return copyArray(value, result);
|
|
}
|
|
} else {
|
|
var tag = getTag(value),
|
|
isFunc = tag == funcTag || tag == genTag;
|
|
|
|
if (isBuffer(value)) {
|
|
return cloneBuffer(value, isDeep);
|
|
}
|
|
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
|
result = (isFlat || isFunc) ? {} : initCloneObject(value);
|
|
if (!isDeep) {
|
|
return isFlat
|
|
? copySymbolsIn(value, baseAssignIn(result, value))
|
|
: copySymbols(value, baseAssign(result, value));
|
|
}
|
|
} else {
|
|
if (!cloneableTags[tag]) {
|
|
return object ? value : {};
|
|
}
|
|
result = initCloneByTag(value, tag, isDeep);
|
|
}
|
|
}
|
|
// Check for circular references and return its corresponding clone.
|
|
stack || (stack = new Stack);
|
|
var stacked = stack.get(value);
|
|
if (stacked) {
|
|
return stacked;
|
|
}
|
|
stack.set(value, result);
|
|
|
|
if (isSet(value)) {
|
|
value.forEach(function(subValue) {
|
|
result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
|
});
|
|
} else if (isMap(value)) {
|
|
value.forEach(function(subValue, key) {
|
|
result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
|
});
|
|
}
|
|
|
|
var keysFunc = isFull
|
|
? (isFlat ? getAllKeysIn : getAllKeys)
|
|
: (isFlat ? keysIn : keys);
|
|
|
|
var props = isArr ? undefined : keysFunc(value);
|
|
arrayEach(props || value, function(subValue, key) {
|
|
if (props) {
|
|
key = subValue;
|
|
subValue = value[key];
|
|
}
|
|
// Recursively populate clone (susceptible to call stack limits).
|
|
assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
|
});
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.conforms` which doesn't clone `source`.
|
|
*
|
|
* @private
|
|
* @param {Object} source The object of property predicates to conform to.
|
|
* @returns {Function} Returns the new spec function.
|
|
*/
|
|
function baseConforms(source) {
|
|
var props = keys(source);
|
|
return function(object) {
|
|
return baseConformsTo(object, source, props);
|
|
};
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.conformsTo` which accepts `props` to check.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to inspect.
|
|
* @param {Object} source The object of property predicates to conform to.
|
|
* @returns {boolean} Returns `true` if `object` conforms, else `false`.
|
|
*/
|
|
function baseConformsTo(object, source, props) {
|
|
var length = props.length;
|
|
if (object == null) {
|
|
return !length;
|
|
}
|
|
object = Object(object);
|
|
while (length--) {
|
|
var key = props[length],
|
|
predicate = source[key],
|
|
value = object[key];
|
|
|
|
if ((value === undefined && !(key in object)) || !predicate(value)) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.delay` and `_.defer` which accepts `args`
|
|
* to provide to `func`.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to delay.
|
|
* @param {number} wait The number of milliseconds to delay invocation.
|
|
* @param {Array} args The arguments to provide to `func`.
|
|
* @returns {number|Object} Returns the timer id or timeout object.
|
|
*/
|
|
function baseDelay(func, wait, args) {
|
|
if (typeof func != 'function') {
|
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
}
|
|
return setTimeout(function() { func.apply(undefined, args); }, wait);
|
|
}
|
|
|
|
/**
|
|
* The base implementation of methods like `_.difference` without support
|
|
* for excluding multiple arrays or iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to inspect.
|
|
* @param {Array} values The values to exclude.
|
|
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
* @param {Function} [comparator] The comparator invoked per element.
|
|
* @returns {Array} Returns the new array of filtered values.
|
|
*/
|
|
function baseDifference(array, values, iteratee, comparator) {
|
|
var index = -1,
|
|
includes = arrayIncludes,
|
|
isCommon = true,
|
|
length = array.length,
|
|
result = [],
|
|
valuesLength = values.length;
|
|
|
|
if (!length) {
|
|
return result;
|
|
}
|
|
if (iteratee) {
|
|
values = arrayMap(values, baseUnary(iteratee));
|
|
}
|
|
if (comparator) {
|
|
includes = arrayIncludesWith;
|
|
isCommon = false;
|
|
}
|
|
else if (values.length >= LARGE_ARRAY_SIZE) {
|
|
includes = cacheHas;
|
|
isCommon = false;
|
|
values = new SetCache(values);
|
|
}
|
|
outer:
|
|
while (++index < length) {
|
|
var value = array[index],
|
|
computed = iteratee == null ? value : iteratee(value);
|
|
|
|
value = (comparator || value !== 0) ? value : 0;
|
|
if (isCommon && computed === computed) {
|
|
var valuesIndex = valuesLength;
|
|
while (valuesIndex--) {
|
|
if (values[valuesIndex] === computed) {
|
|
continue outer;
|
|
}
|
|
}
|
|
result.push(value);
|
|
}
|
|
else if (!includes(values, computed, comparator)) {
|
|
result.push(value);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.forEach` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {Array|Object} Returns `collection`.
|
|
*/
|
|
var baseEach = createBaseEach(baseForOwn);
|
|
|
|
/**
|
|
* The base implementation of `_.forEachRight` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {Array|Object} Returns `collection`.
|
|
*/
|
|
var baseEachRight = createBaseEach(baseForOwnRight, true);
|
|
|
|
/**
|
|
* The base implementation of `_.every` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} predicate The function invoked per iteration.
|
|
* @returns {boolean} Returns `true` if all elements pass the predicate check,
|
|
* else `false`
|
|
*/
|
|
function baseEvery(collection, predicate) {
|
|
var result = true;
|
|
baseEach(collection, function(value, index, collection) {
|
|
result = !!predicate(value, index, collection);
|
|
return result;
|
|
});
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of methods like `_.max` and `_.min` which accepts a
|
|
* `comparator` to determine the extremum value.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to iterate over.
|
|
* @param {Function} iteratee The iteratee invoked per iteration.
|
|
* @param {Function} comparator The comparator used to compare values.
|
|
* @returns {*} Returns the extremum value.
|
|
*/
|
|
function baseExtremum(array, iteratee, comparator) {
|
|
var index = -1,
|
|
length = array.length;
|
|
|
|
while (++index < length) {
|
|
var value = array[index],
|
|
current = iteratee(value);
|
|
|
|
if (current != null && (computed === undefined
|
|
? (current === current && !isSymbol(current))
|
|
: comparator(current, computed)
|
|
)) {
|
|
var computed = current,
|
|
result = value;
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.fill` without an iteratee call guard.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to fill.
|
|
* @param {*} value The value to fill `array` with.
|
|
* @param {number} [start=0] The start position.
|
|
* @param {number} [end=array.length] The end position.
|
|
* @returns {Array} Returns `array`.
|
|
*/
|
|
function baseFill(array, value, start, end) {
|
|
var length = array.length;
|
|
|
|
start = toInteger(start);
|
|
if (start < 0) {
|
|
start = -start > length ? 0 : (length + start);
|
|
}
|
|
end = (end === undefined || end > length) ? length : toInteger(end);
|
|
if (end < 0) {
|
|
end += length;
|
|
}
|
|
end = start > end ? 0 : toLength(end);
|
|
while (start < end) {
|
|
array[start++] = value;
|
|
}
|
|
return array;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.filter` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} predicate The function invoked per iteration.
|
|
* @returns {Array} Returns the new filtered array.
|
|
*/
|
|
function baseFilter(collection, predicate) {
|
|
var result = [];
|
|
baseEach(collection, function(value, index, collection) {
|
|
if (predicate(value, index, collection)) {
|
|
result.push(value);
|
|
}
|
|
});
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.flatten` with support for restricting flattening.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to flatten.
|
|
* @param {number} depth The maximum recursion depth.
|
|
* @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
|
|
* @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
|
|
* @param {Array} [result=[]] The initial result value.
|
|
* @returns {Array} Returns the new flattened array.
|
|
*/
|
|
function baseFlatten(array, depth, predicate, isStrict, result) {
|
|
var index = -1,
|
|
length = array.length;
|
|
|
|
predicate || (predicate = isFlattenable);
|
|
result || (result = []);
|
|
|
|
while (++index < length) {
|
|
var value = array[index];
|
|
if (depth > 0 && predicate(value)) {
|
|
if (depth > 1) {
|
|
// Recursively flatten arrays (susceptible to call stack limits).
|
|
baseFlatten(value, depth - 1, predicate, isStrict, result);
|
|
} else {
|
|
arrayPush(result, value);
|
|
}
|
|
} else if (!isStrict) {
|
|
result[result.length] = value;
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `baseForOwn` which iterates over `object`
|
|
* properties returned by `keysFunc` and invokes `iteratee` for each property.
|
|
* Iteratee functions may exit iteration early by explicitly returning `false`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
var baseFor = createBaseFor();
|
|
|
|
/**
|
|
* This function is like `baseFor` except that it iterates over properties
|
|
* in the opposite order.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
var baseForRight = createBaseFor(true);
|
|
|
|
/**
|
|
* The base implementation of `_.forOwn` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
function baseForOwn(object, iteratee) {
|
|
return object && baseFor(object, iteratee, keys);
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.forOwnRight` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
function baseForOwnRight(object, iteratee) {
|
|
return object && baseForRight(object, iteratee, keys);
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.functions` which creates an array of
|
|
* `object` function property names filtered from `props`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to inspect.
|
|
* @param {Array} props The property names to filter.
|
|
* @returns {Array} Returns the function names.
|
|
*/
|
|
function baseFunctions(object, props) {
|
|
return arrayFilter(props, function(key) {
|
|
return isFunction(object[key]);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.get` without support for default values.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @param {Array|string} path The path of the property to get.
|
|
* @returns {*} Returns the resolved value.
|
|
*/
|
|
function baseGet(object, path) {
|
|
path = castPath(path, object);
|
|
|
|
var index = 0,
|
|
length = path.length;
|
|
|
|
while (object != null && index < length) {
|
|
object = object[toKey(path[index++])];
|
|
}
|
|
return (index && index == length) ? object : undefined;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
|
|
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
|
|
* symbols of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
* @param {Function} symbolsFunc The function to get the symbols of `object`.
|
|
* @returns {Array} Returns the array of property names and symbols.
|
|
*/
|
|
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
var result = keysFunc(object);
|
|
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to query.
|
|
* @returns {string} Returns the `toStringTag`.
|
|
*/
|
|
function baseGetTag(value) {
|
|
if (value == null) {
|
|
return value === undefined ? undefinedTag : nullTag;
|
|
}
|
|
return (symToStringTag && symToStringTag in Object(value))
|
|
? getRawTag(value)
|
|
: objectToString(value);
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.gt` which doesn't coerce arguments.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to compare.
|
|
* @param {*} other The other value to compare.
|
|
* @returns {boolean} Returns `true` if `value` is greater than `other`,
|
|
* else `false`.
|
|
*/
|
|
function baseGt(value, other) {
|
|
return value > other;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.has` without support for deep paths.
|
|
*
|
|
* @private
|
|
* @param {Object} [object] The object to query.
|
|
* @param {Array|string} key The key to check.
|
|
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
|
*/
|
|
function baseHas(object, key) {
|
|
return object != null && hasOwnProperty.call(object, key);
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.hasIn` without support for deep paths.
|
|
*
|
|
* @private
|
|
* @param {Object} [object] The object to query.
|
|
* @param {Array|string} key The key to check.
|
|
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
|
*/
|
|
function baseHasIn(object, key) {
|
|
return object != null && key in Object(object);
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.inRange` which doesn't coerce arguments.
|
|
*
|
|
* @private
|
|
* @param {number} number The number to check.
|
|
* @param {number} start The start of the range.
|
|
* @param {number} end The end of the range.
|
|
* @returns {boolean} Returns `true` if `number` is in the range, else `false`.
|
|
*/
|
|
function baseInRange(number, start, end) {
|
|
return number >= nativeMin(start, end) && number < nativeMax(start, end);
|
|
}
|
|
|
|
/**
|
|
* The base implementation of methods like `_.intersection`, without support
|
|
* for iteratee shorthands, that accepts an array of arrays to inspect.
|
|
*
|
|
* @private
|
|
* @param {Array} arrays The arrays to inspect.
|
|
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
* @param {Function} [comparator] The comparator invoked per element.
|
|
* @returns {Array} Returns the new array of shared values.
|
|
*/
|
|
function baseIntersection(arrays, iteratee, comparator) {
|
|
var includes = comparator ? arrayIncludesWith : arrayIncludes,
|
|
length = arrays[0].length,
|
|
othLength = arrays.length,
|
|
othIndex = othLength,
|
|
caches = Array(othLength),
|
|
maxLength = Infinity,
|
|
result = [];
|
|
|
|
while (othIndex--) {
|
|
var array = arrays[othIndex];
|
|
if (othIndex && iteratee) {
|
|
array = arrayMap(array, baseUnary(iteratee));
|
|
}
|
|
maxLength = nativeMin(array.length, maxLength);
|
|
caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
|
|
? new SetCache(othIndex && array)
|
|
: undefined;
|
|
}
|
|
array = arrays[0];
|
|
|
|
var index = -1,
|
|
seen = caches[0];
|
|
|
|
outer:
|
|
while (++index < length && result.length < maxLength) {
|
|
var value = array[index],
|
|
computed = iteratee ? iteratee(value) : value;
|
|
|
|
value = (comparator || value !== 0) ? value : 0;
|
|
if (!(seen
|
|
? cacheHas(seen, computed)
|
|
: includes(result, computed, comparator)
|
|
)) {
|
|
othIndex = othLength;
|
|
while (--othIndex) {
|
|
var cache = caches[othIndex];
|
|
if (!(cache
|
|
? cacheHas(cache, computed)
|
|
: includes(arrays[othIndex], computed, comparator))
|
|
) {
|
|
continue outer;
|
|
}
|
|
}
|
|
if (seen) {
|
|
seen.push(computed);
|
|
}
|
|
result.push(value);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.invert` and `_.invertBy` which inverts
|
|
* `object` with values transformed by `iteratee` and set by `setter`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to iterate over.
|
|
* @param {Function} setter The function to set `accumulator` values.
|
|
* @param {Function} iteratee The iteratee to transform values.
|
|
* @param {Object} accumulator The initial inverted object.
|
|
* @returns {Function} Returns `accumulator`.
|
|
*/
|
|
function baseInverter(object, setter, iteratee, accumulator) {
|
|
baseForOwn(object, function(value, key, object) {
|
|
setter(accumulator, iteratee(value), key, object);
|
|
});
|
|
return accumulator;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.invoke` without support for individual
|
|
* method arguments.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @param {Array|string} path The path of the method to invoke.
|
|
* @param {Array} args The arguments to invoke the method with.
|
|
* @returns {*} Returns the result of the invoked method.
|
|
*/
|
|
function baseInvoke(object, path, args) {
|
|
path = castPath(path, object);
|
|
object = parent(object, path);
|
|
var func = object == null ? object : object[toKey(last(path))];
|
|
return func == null ? undefined : apply(func, object, args);
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.isArguments`.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
*/
|
|
function baseIsArguments(value) {
|
|
return isObjectLike(value) && baseGetTag(value) == argsTag;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.isArrayBuffer` without Node.js optimizations.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
|
|
*/
|
|
function baseIsArrayBuffer(value) {
|
|
return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.isDate` without Node.js optimizations.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a date object, else `false`.
|
|
*/
|
|
function baseIsDate(value) {
|
|
return isObjectLike(value) && baseGetTag(value) == dateTag;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.isEqual` which supports partial comparisons
|
|
* and tracks traversed objects.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to compare.
|
|
* @param {*} other The other value to compare.
|
|
* @param {boolean} bitmask The bitmask flags.
|
|
* 1 - Unordered comparison
|
|
* 2 - Partial comparison
|
|
* @param {Function} [customizer] The function to customize comparisons.
|
|
* @param {Object} [stack] Tracks traversed `value` and `other` objects.
|
|
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
*/
|
|
function baseIsEqual(value, other, bitmask, customizer, stack) {
|
|
if (value === other) {
|
|
return true;
|
|
}
|
|
if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
|
|
return value !== value && other !== other;
|
|
}
|
|
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `baseIsEqual` for arrays and objects which performs
|
|
* deep comparisons and tracks traversed objects enabling objects with circular
|
|
* references to be compared.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to compare.
|
|
* @param {Object} other The other object to compare.
|
|
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
* @param {Function} customizer The function to customize comparisons.
|
|
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
* @param {Object} [stack] Tracks traversed `object` and `other` objects.
|
|
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
*/
|
|
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
var objIsArr = isArray(object),
|
|
othIsArr = isArray(other),
|
|
objTag = objIsArr ? arrayTag : getTag(object),
|
|
othTag = othIsArr ? arrayTag : getTag(other);
|
|
|
|
objTag = objTag == argsTag ? objectTag : objTag;
|
|
othTag = othTag == argsTag ? objectTag : othTag;
|
|
|
|
var objIsObj = objTag == objectTag,
|
|
othIsObj = othTag == objectTag,
|
|
isSameTag = objTag == othTag;
|
|
|
|
if (isSameTag && isBuffer(object)) {
|
|
if (!isBuffer(other)) {
|
|
return false;
|
|
}
|
|
objIsArr = true;
|
|
objIsObj = false;
|
|
}
|
|
if (isSameTag && !objIsObj) {
|
|
stack || (stack = new Stack);
|
|
return (objIsArr || isTypedArray(object))
|
|
? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
|
|
: equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
}
|
|
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
|
|
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
|
|
othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
|
|
|
|
if (objIsWrapped || othIsWrapped) {
|
|
var objUnwrapped = objIsWrapped ? object.value() : object,
|
|
othUnwrapped = othIsWrapped ? other.value() : other;
|
|
|
|
stack || (stack = new Stack);
|
|
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
|
}
|
|
}
|
|
if (!isSameTag) {
|
|
return false;
|
|
}
|
|
stack || (stack = new Stack);
|
|
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.isMap` without Node.js optimizations.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a map, else `false`.
|
|
*/
|
|
function baseIsMap(value) {
|
|
return isObjectLike(value) && getTag(value) == mapTag;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.isMatch` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to inspect.
|
|
* @param {Object} source The object of property values to match.
|
|
* @param {Array} matchData The property names, values, and compare flags to match.
|
|
* @param {Function} [customizer] The function to customize comparisons.
|
|
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
|
|
*/
|
|
function baseIsMatch(object, source, matchData, customizer) {
|
|
var index = matchData.length,
|
|
length = index,
|
|
noCustomizer = !customizer;
|
|
|
|
if (object == null) {
|
|
return !length;
|
|
}
|
|
object = Object(object);
|
|
while (index--) {
|
|
var data = matchData[index];
|
|
if ((noCustomizer && data[2])
|
|
? data[1] !== object[data[0]]
|
|
: !(data[0] in object)
|
|
) {
|
|
return false;
|
|
}
|
|
}
|
|
while (++index < length) {
|
|
data = matchData[index];
|
|
var key = data[0],
|
|
objValue = object[key],
|
|
srcValue = data[1];
|
|
|
|
if (noCustomizer && data[2]) {
|
|
if (objValue === undefined && !(key in object)) {
|
|
return false;
|
|
}
|
|
} else {
|
|
var stack = new Stack;
|
|
if (customizer) {
|
|
var result = customizer(objValue, srcValue, key, object, source, stack);
|
|
}
|
|
if (!(result === undefined
|
|
? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
|
|
: result
|
|
)) {
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.isNative` without bad shim checks.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
* else `false`.
|
|
*/
|
|
function baseIsNative(value) {
|
|
if (!isObject(value) || isMasked(value)) {
|
|
return false;
|
|
}
|
|
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
return pattern.test(toSource(value));
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.isRegExp` without Node.js optimizations.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
|
|
*/
|
|
function baseIsRegExp(value) {
|
|
return isObjectLike(value) && baseGetTag(value) == regexpTag;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.isSet` without Node.js optimizations.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a set, else `false`.
|
|
*/
|
|
function baseIsSet(value) {
|
|
return isObjectLike(value) && getTag(value) == setTag;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.isTypedArray` without Node.js optimizations.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
*/
|
|
function baseIsTypedArray(value) {
|
|
return isObjectLike(value) &&
|
|
isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.iteratee`.
|
|
*
|
|
* @private
|
|
* @param {*} [value=_.identity] The value to convert to an iteratee.
|
|
* @returns {Function} Returns the iteratee.
|
|
*/
|
|
function baseIteratee(value) {
|
|
// Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
|
|
// See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
|
|
if (typeof value == 'function') {
|
|
return value;
|
|
}
|
|
if (value == null) {
|
|
return identity;
|
|
}
|
|
if (typeof value == 'object') {
|
|
return isArray(value)
|
|
? baseMatchesProperty(value[0], value[1])
|
|
: baseMatches(value);
|
|
}
|
|
return property(value);
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of property names.
|
|
*/
|
|
function baseKeys(object) {
|
|
if (!isPrototype(object)) {
|
|
return nativeKeys(object);
|
|
}
|
|
var result = [];
|
|
for (var key in Object(object)) {
|
|
if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
|
result.push(key);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of property names.
|
|
*/
|
|
function baseKeysIn(object) {
|
|
if (!isObject(object)) {
|
|
return nativeKeysIn(object);
|
|
}
|
|
var isProto = isPrototype(object),
|
|
result = [];
|
|
|
|
for (var key in object) {
|
|
if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
|
|
result.push(key);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.lt` which doesn't coerce arguments.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to compare.
|
|
* @param {*} other The other value to compare.
|
|
* @returns {boolean} Returns `true` if `value` is less than `other`,
|
|
* else `false`.
|
|
*/
|
|
function baseLt(value, other) {
|
|
return value < other;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.map` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {Array} Returns the new mapped array.
|
|
*/
|
|
function baseMap(collection, iteratee) {
|
|
var index = -1,
|
|
result = isArrayLike(collection) ? Array(collection.length) : [];
|
|
|
|
baseEach(collection, function(value, key, collection) {
|
|
result[++index] = iteratee(value, key, collection);
|
|
});
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.matches` which doesn't clone `source`.
|
|
*
|
|
* @private
|
|
* @param {Object} source The object of property values to match.
|
|
* @returns {Function} Returns the new spec function.
|
|
*/
|
|
function baseMatches(source) {
|
|
var matchData = getMatchData(source);
|
|
if (matchData.length == 1 && matchData[0][2]) {
|
|
return matchesStrictComparable(matchData[0][0], matchData[0][1]);
|
|
}
|
|
return function(object) {
|
|
return object === source || baseIsMatch(object, source, matchData);
|
|
};
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
|
|
*
|
|
* @private
|
|
* @param {string} path The path of the property to get.
|
|
* @param {*} srcValue The value to match.
|
|
* @returns {Function} Returns the new spec function.
|
|
*/
|
|
function baseMatchesProperty(path, srcValue) {
|
|
if (isKey(path) && isStrictComparable(srcValue)) {
|
|
return matchesStrictComparable(toKey(path), srcValue);
|
|
}
|
|
return function(object) {
|
|
var objValue = get(object, path);
|
|
return (objValue === undefined && objValue === srcValue)
|
|
? hasIn(object, path)
|
|
: baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
|
};
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.merge` without support for multiple sources.
|
|
*
|
|
* @private
|
|
* @param {Object} object The destination object.
|
|
* @param {Object} source The source object.
|
|
* @param {number} srcIndex The index of `source`.
|
|
* @param {Function} [customizer] The function to customize merged values.
|
|
* @param {Object} [stack] Tracks traversed source values and their merged
|
|
* counterparts.
|
|
*/
|
|
function baseMerge(object, source, srcIndex, customizer, stack) {
|
|
if (object === source) {
|
|
return;
|
|
}
|
|
baseFor(source, function(srcValue, key) {
|
|
stack || (stack = new Stack);
|
|
if (isObject(srcValue)) {
|
|
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
|
}
|
|
else {
|
|
var newValue = customizer
|
|
? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
|
|
: undefined;
|
|
|
|
if (newValue === undefined) {
|
|
newValue = srcValue;
|
|
}
|
|
assignMergeValue(object, key, newValue);
|
|
}
|
|
}, keysIn);
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `baseMerge` for arrays and objects which performs
|
|
* deep merges and tracks traversed objects enabling objects with circular
|
|
* references to be merged.
|
|
*
|
|
* @private
|
|
* @param {Object} object The destination object.
|
|
* @param {Object} source The source object.
|
|
* @param {string} key The key of the value to merge.
|
|
* @param {number} srcIndex The index of `source`.
|
|
* @param {Function} mergeFunc The function to merge values.
|
|
* @param {Function} [customizer] The function to customize assigned values.
|
|
* @param {Object} [stack] Tracks traversed source values and their merged
|
|
* counterparts.
|
|
*/
|
|
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
|
|
var objValue = safeGet(object, key),
|
|
srcValue = safeGet(source, key),
|
|
stacked = stack.get(srcValue);
|
|
|
|
if (stacked) {
|
|
assignMergeValue(object, key, stacked);
|
|
return;
|
|
}
|
|
var newValue = customizer
|
|
? customizer(objValue, srcValue, (key + ''), object, source, stack)
|
|
: undefined;
|
|
|
|
var isCommon = newValue === undefined;
|
|
|
|
if (isCommon) {
|
|
var isArr = isArray(srcValue),
|
|
isBuff = !isArr && isBuffer(srcValue),
|
|
isTyped = !isArr && !isBuff && isTypedArray(srcValue);
|
|
|
|
newValue = srcValue;
|
|
if (isArr || isBuff || isTyped) {
|
|
if (isArray(objValue)) {
|
|
newValue = objValue;
|
|
}
|
|
else if (isArrayLikeObject(objValue)) {
|
|
newValue = copyArray(objValue);
|
|
}
|
|
else if (isBuff) {
|
|
isCommon = false;
|
|
newValue = cloneBuffer(srcValue, true);
|
|
}
|
|
else if (isTyped) {
|
|
isCommon = false;
|
|
newValue = cloneTypedArray(srcValue, true);
|
|
}
|
|
else {
|
|
newValue = [];
|
|
}
|
|
}
|
|
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
|
|
newValue = objValue;
|
|
if (isArguments(objValue)) {
|
|
newValue = toPlainObject(objValue);
|
|
}
|
|
else if (!isObject(objValue) || isFunction(objValue)) {
|
|
newValue = initCloneObject(srcValue);
|
|
}
|
|
}
|
|
else {
|
|
isCommon = false;
|
|
}
|
|
}
|
|
if (isCommon) {
|
|
// Recursively merge objects and arrays (susceptible to call stack limits).
|
|
stack.set(srcValue, newValue);
|
|
mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
|
|
stack['delete'](srcValue);
|
|
}
|
|
assignMergeValue(object, key, newValue);
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.nth` which doesn't coerce arguments.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to query.
|
|
* @param {number} n The index of the element to return.
|
|
* @returns {*} Returns the nth element of `array`.
|
|
*/
|
|
function baseNth(array, n) {
|
|
var length = array.length;
|
|
if (!length) {
|
|
return;
|
|
}
|
|
n += n < 0 ? length : 0;
|
|
return isIndex(n, length) ? array[n] : undefined;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.orderBy` without param guards.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
|
|
* @param {string[]} orders The sort orders of `iteratees`.
|
|
* @returns {Array} Returns the new sorted array.
|
|
*/
|
|
function baseOrderBy(collection, iteratees, orders) {
|
|
if (iteratees.length) {
|
|
iteratees = arrayMap(iteratees, function(iteratee) {
|
|
if (isArray(iteratee)) {
|
|
return function(value) {
|
|
return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
|
|
}
|
|
}
|
|
return iteratee;
|
|
});
|
|
} else {
|
|
iteratees = [identity];
|
|
}
|
|
|
|
var index = -1;
|
|
iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
|
|
|
|
var result = baseMap(collection, function(value, key, collection) {
|
|
var criteria = arrayMap(iteratees, function(iteratee) {
|
|
return iteratee(value);
|
|
});
|
|
return { 'criteria': criteria, 'index': ++index, 'value': value };
|
|
});
|
|
|
|
return baseSortBy(result, function(object, other) {
|
|
return compareMultiple(object, other, orders);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.pick` without support for individual
|
|
* property identifiers.
|
|
*
|
|
* @private
|
|
* @param {Object} object The source object.
|
|
* @param {string[]} paths The property paths to pick.
|
|
* @returns {Object} Returns the new object.
|
|
*/
|
|
function basePick(object, paths) {
|
|
return basePickBy(object, paths, function(value, path) {
|
|
return hasIn(object, path);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.pickBy` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Object} object The source object.
|
|
* @param {string[]} paths The property paths to pick.
|
|
* @param {Function} predicate The function invoked per property.
|
|
* @returns {Object} Returns the new object.
|
|
*/
|
|
function basePickBy(object, paths, predicate) {
|
|
var index = -1,
|
|
length = paths.length,
|
|
result = {};
|
|
|
|
while (++index < length) {
|
|
var path = paths[index],
|
|
value = baseGet(object, path);
|
|
|
|
if (predicate(value, path)) {
|
|
baseSet(result, castPath(path, object), value);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `baseProperty` which supports deep paths.
|
|
*
|
|
* @private
|
|
* @param {Array|string} path The path of the property to get.
|
|
* @returns {Function} Returns the new accessor function.
|
|
*/
|
|
function basePropertyDeep(path) {
|
|
return function(object) {
|
|
return baseGet(object, path);
|
|
};
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.pullAllBy` without support for iteratee
|
|
* shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to modify.
|
|
* @param {Array} values The values to remove.
|
|
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
* @param {Function} [comparator] The comparator invoked per element.
|
|
* @returns {Array} Returns `array`.
|
|
*/
|
|
function basePullAll(array, values, iteratee, comparator) {
|
|
var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
|
|
index = -1,
|
|
length = values.length,
|
|
seen = array;
|
|
|
|
if (array === values) {
|
|
values = copyArray(values);
|
|
}
|
|
if (iteratee) {
|
|
seen = arrayMap(array, baseUnary(iteratee));
|
|
}
|
|
while (++index < length) {
|
|
var fromIndex = 0,
|
|
value = values[index],
|
|
computed = iteratee ? iteratee(value) : value;
|
|
|
|
while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
|
|
if (seen !== array) {
|
|
splice.call(seen, fromIndex, 1);
|
|
}
|
|
splice.call(array, fromIndex, 1);
|
|
}
|
|
}
|
|
return array;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.pullAt` without support for individual
|
|
* indexes or capturing the removed elements.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to modify.
|
|
* @param {number[]} indexes The indexes of elements to remove.
|
|
* @returns {Array} Returns `array`.
|
|
*/
|
|
function basePullAt(array, indexes) {
|
|
var length = array ? indexes.length : 0,
|
|
lastIndex = length - 1;
|
|
|
|
while (length--) {
|
|
var index = indexes[length];
|
|
if (length == lastIndex || index !== previous) {
|
|
var previous = index;
|
|
if (isIndex(index)) {
|
|
splice.call(array, index, 1);
|
|
} else {
|
|
baseUnset(array, index);
|
|
}
|
|
}
|
|
}
|
|
return array;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.random` without support for returning
|
|
* floating-point numbers.
|
|
*
|
|
* @private
|
|
* @param {number} lower The lower bound.
|
|
* @param {number} upper The upper bound.
|
|
* @returns {number} Returns the random number.
|
|
*/
|
|
function baseRandom(lower, upper) {
|
|
return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.range` and `_.rangeRight` which doesn't
|
|
* coerce arguments.
|
|
*
|
|
* @private
|
|
* @param {number} start The start of the range.
|
|
* @param {number} end The end of the range.
|
|
* @param {number} step The value to increment or decrement by.
|
|
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
* @returns {Array} Returns the range of numbers.
|
|
*/
|
|
function baseRange(start, end, step, fromRight) {
|
|
var index = -1,
|
|
length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
|
|
result = Array(length);
|
|
|
|
while (length--) {
|
|
result[fromRight ? length : ++index] = start;
|
|
start += step;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.repeat` which doesn't coerce arguments.
|
|
*
|
|
* @private
|
|
* @param {string} string The string to repeat.
|
|
* @param {number} n The number of times to repeat the string.
|
|
* @returns {string} Returns the repeated string.
|
|
*/
|
|
function baseRepeat(string, n) {
|
|
var result = '';
|
|
if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
|
|
return result;
|
|
}
|
|
// Leverage the exponentiation by squaring algorithm for a faster repeat.
|
|
// See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
|
|
do {
|
|
if (n % 2) {
|
|
result += string;
|
|
}
|
|
n = nativeFloor(n / 2);
|
|
if (n) {
|
|
string += string;
|
|
}
|
|
} while (n);
|
|
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to apply a rest parameter to.
|
|
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
|
* @returns {Function} Returns the new function.
|
|
*/
|
|
function baseRest(func, start) {
|
|
return setToString(overRest(func, start, identity), func + '');
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.sample`.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to sample.
|
|
* @returns {*} Returns the random element.
|
|
*/
|
|
function baseSample(collection) {
|
|
return arraySample(values(collection));
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.sampleSize` without param guards.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to sample.
|
|
* @param {number} n The number of elements to sample.
|
|
* @returns {Array} Returns the random elements.
|
|
*/
|
|
function baseSampleSize(collection, n) {
|
|
var array = values(collection);
|
|
return shuffleSelf(array, baseClamp(n, 0, array.length));
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.set`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to modify.
|
|
* @param {Array|string} path The path of the property to set.
|
|
* @param {*} value The value to set.
|
|
* @param {Function} [customizer] The function to customize path creation.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
function baseSet(object, path, value, customizer) {
|
|
if (!isObject(object)) {
|
|
return object;
|
|
}
|
|
path = castPath(path, object);
|
|
|
|
var index = -1,
|
|
length = path.length,
|
|
lastIndex = length - 1,
|
|
nested = object;
|
|
|
|
while (nested != null && ++index < length) {
|
|
var key = toKey(path[index]),
|
|
newValue = value;
|
|
|
|
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
return object;
|
|
}
|
|
|
|
if (index != lastIndex) {
|
|
var objValue = nested[key];
|
|
newValue = customizer ? customizer(objValue, key, nested) : undefined;
|
|
if (newValue === undefined) {
|
|
newValue = isObject(objValue)
|
|
? objValue
|
|
: (isIndex(path[index + 1]) ? [] : {});
|
|
}
|
|
}
|
|
assignValue(nested, key, newValue);
|
|
nested = nested[key];
|
|
}
|
|
return object;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `setData` without support for hot loop shorting.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to associate metadata with.
|
|
* @param {*} data The metadata.
|
|
* @returns {Function} Returns `func`.
|
|
*/
|
|
var baseSetData = !metaMap ? identity : function(func, data) {
|
|
metaMap.set(func, data);
|
|
return func;
|
|
};
|
|
|
|
/**
|
|
* The base implementation of `setToString` without support for hot loop shorting.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to modify.
|
|
* @param {Function} string The `toString` result.
|
|
* @returns {Function} Returns `func`.
|
|
*/
|
|
var baseSetToString = !defineProperty ? identity : function(func, string) {
|
|
return defineProperty(func, 'toString', {
|
|
'configurable': true,
|
|
'enumerable': false,
|
|
'value': constant(string),
|
|
'writable': true
|
|
});
|
|
};
|
|
|
|
/**
|
|
* The base implementation of `_.shuffle`.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to shuffle.
|
|
* @returns {Array} Returns the new shuffled array.
|
|
*/
|
|
function baseShuffle(collection) {
|
|
return shuffleSelf(values(collection));
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.slice` without an iteratee call guard.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to slice.
|
|
* @param {number} [start=0] The start position.
|
|
* @param {number} [end=array.length] The end position.
|
|
* @returns {Array} Returns the slice of `array`.
|
|
*/
|
|
function baseSlice(array, start, end) {
|
|
var index = -1,
|
|
length = array.length;
|
|
|
|
if (start < 0) {
|
|
start = -start > length ? 0 : (length + start);
|
|
}
|
|
end = end > length ? length : end;
|
|
if (end < 0) {
|
|
end += length;
|
|
}
|
|
length = start > end ? 0 : ((end - start) >>> 0);
|
|
start >>>= 0;
|
|
|
|
var result = Array(length);
|
|
while (++index < length) {
|
|
result[index] = array[index + start];
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.some` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} predicate The function invoked per iteration.
|
|
* @returns {boolean} Returns `true` if any element passes the predicate check,
|
|
* else `false`.
|
|
*/
|
|
function baseSome(collection, predicate) {
|
|
var result;
|
|
|
|
baseEach(collection, function(value, index, collection) {
|
|
result = predicate(value, index, collection);
|
|
return !result;
|
|
});
|
|
return !!result;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
|
|
* performs a binary search of `array` to determine the index at which `value`
|
|
* should be inserted into `array` in order to maintain its sort order.
|
|
*
|
|
* @private
|
|
* @param {Array} array The sorted array to inspect.
|
|
* @param {*} value The value to evaluate.
|
|
* @param {boolean} [retHighest] Specify returning the highest qualified index.
|
|
* @returns {number} Returns the index at which `value` should be inserted
|
|
* into `array`.
|
|
*/
|
|
function baseSortedIndex(array, value, retHighest) {
|
|
var low = 0,
|
|
high = array == null ? low : array.length;
|
|
|
|
if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
|
|
while (low < high) {
|
|
var mid = (low + high) >>> 1,
|
|
computed = array[mid];
|
|
|
|
if (computed !== null && !isSymbol(computed) &&
|
|
(retHighest ? (computed <= value) : (computed < value))) {
|
|
low = mid + 1;
|
|
} else {
|
|
high = mid;
|
|
}
|
|
}
|
|
return high;
|
|
}
|
|
return baseSortedIndexBy(array, value, identity, retHighest);
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
|
|
* which invokes `iteratee` for `value` and each element of `array` to compute
|
|
* their sort ranking. The iteratee is invoked with one argument; (value).
|
|
*
|
|
* @private
|
|
* @param {Array} array The sorted array to inspect.
|
|
* @param {*} value The value to evaluate.
|
|
* @param {Function} iteratee The iteratee invoked per element.
|
|
* @param {boolean} [retHighest] Specify returning the highest qualified index.
|
|
* @returns {number} Returns the index at which `value` should be inserted
|
|
* into `array`.
|
|
*/
|
|
function baseSortedIndexBy(array, value, iteratee, retHighest) {
|
|
var low = 0,
|
|
high = array == null ? 0 : array.length;
|
|
if (high === 0) {
|
|
return 0;
|
|
}
|
|
|
|
value = iteratee(value);
|
|
var valIsNaN = value !== value,
|
|
valIsNull = value === null,
|
|
valIsSymbol = isSymbol(value),
|
|
valIsUndefined = value === undefined;
|
|
|
|
while (low < high) {
|
|
var mid = nativeFloor((low + high) / 2),
|
|
computed = iteratee(array[mid]),
|
|
othIsDefined = computed !== undefined,
|
|
othIsNull = computed === null,
|
|
othIsReflexive = computed === computed,
|
|
othIsSymbol = isSymbol(computed);
|
|
|
|
if (valIsNaN) {
|
|
var setLow = retHighest || othIsReflexive;
|
|
} else if (valIsUndefined) {
|
|
setLow = othIsReflexive && (retHighest || othIsDefined);
|
|
} else if (valIsNull) {
|
|
setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
|
|
} else if (valIsSymbol) {
|
|
setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
|
|
} else if (othIsNull || othIsSymbol) {
|
|
setLow = false;
|
|
} else {
|
|
setLow = retHighest ? (computed <= value) : (computed < value);
|
|
}
|
|
if (setLow) {
|
|
low = mid + 1;
|
|
} else {
|
|
high = mid;
|
|
}
|
|
}
|
|
return nativeMin(high, MAX_ARRAY_INDEX);
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
|
|
* support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to inspect.
|
|
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
* @returns {Array} Returns the new duplicate free array.
|
|
*/
|
|
function baseSortedUniq(array, iteratee) {
|
|
var index = -1,
|
|
length = array.length,
|
|
resIndex = 0,
|
|
result = [];
|
|
|
|
while (++index < length) {
|
|
var value = array[index],
|
|
computed = iteratee ? iteratee(value) : value;
|
|
|
|
if (!index || !eq(computed, seen)) {
|
|
var seen = computed;
|
|
result[resIndex++] = value === 0 ? 0 : value;
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.toNumber` which doesn't ensure correct
|
|
* conversions of binary, hexadecimal, or octal string values.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to process.
|
|
* @returns {number} Returns the number.
|
|
*/
|
|
function baseToNumber(value) {
|
|
if (typeof value == 'number') {
|
|
return value;
|
|
}
|
|
if (isSymbol(value)) {
|
|
return NAN;
|
|
}
|
|
return +value;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.toString` which doesn't convert nullish
|
|
* values to empty strings.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to process.
|
|
* @returns {string} Returns the string.
|
|
*/
|
|
function baseToString(value) {
|
|
// Exit early for strings to avoid a performance hit in some environments.
|
|
if (typeof value == 'string') {
|
|
return value;
|
|
}
|
|
if (isArray(value)) {
|
|
// Recursively convert values (susceptible to call stack limits).
|
|
return arrayMap(value, baseToString) + '';
|
|
}
|
|
if (isSymbol(value)) {
|
|
return symbolToString ? symbolToString.call(value) : '';
|
|
}
|
|
var result = (value + '');
|
|
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.uniqBy` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to inspect.
|
|
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
* @param {Function} [comparator] The comparator invoked per element.
|
|
* @returns {Array} Returns the new duplicate free array.
|
|
*/
|
|
function baseUniq(array, iteratee, comparator) {
|
|
var index = -1,
|
|
includes = arrayIncludes,
|
|
length = array.length,
|
|
isCommon = true,
|
|
result = [],
|
|
seen = result;
|
|
|
|
if (comparator) {
|
|
isCommon = false;
|
|
includes = arrayIncludesWith;
|
|
}
|
|
else if (length >= LARGE_ARRAY_SIZE) {
|
|
var set = iteratee ? null : createSet(array);
|
|
if (set) {
|
|
return setToArray(set);
|
|
}
|
|
isCommon = false;
|
|
includes = cacheHas;
|
|
seen = new SetCache;
|
|
}
|
|
else {
|
|
seen = iteratee ? [] : result;
|
|
}
|
|
outer:
|
|
while (++index < length) {
|
|
var value = array[index],
|
|
computed = iteratee ? iteratee(value) : value;
|
|
|
|
value = (comparator || value !== 0) ? value : 0;
|
|
if (isCommon && computed === computed) {
|
|
var seenIndex = seen.length;
|
|
while (seenIndex--) {
|
|
if (seen[seenIndex] === computed) {
|
|
continue outer;
|
|
}
|
|
}
|
|
if (iteratee) {
|
|
seen.push(computed);
|
|
}
|
|
result.push(value);
|
|
}
|
|
else if (!includes(seen, computed, comparator)) {
|
|
if (seen !== result) {
|
|
seen.push(computed);
|
|
}
|
|
result.push(value);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.unset`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to modify.
|
|
* @param {Array|string} path The property path to unset.
|
|
* @returns {boolean} Returns `true` if the property is deleted, else `false`.
|
|
*/
|
|
function baseUnset(object, path) {
|
|
path = castPath(path, object);
|
|
object = parent(object, path);
|
|
return object == null || delete object[toKey(last(path))];
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `_.update`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to modify.
|
|
* @param {Array|string} path The path of the property to update.
|
|
* @param {Function} updater The function to produce the updated value.
|
|
* @param {Function} [customizer] The function to customize path creation.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
function baseUpdate(object, path, updater, customizer) {
|
|
return baseSet(object, path, updater(baseGet(object, path)), customizer);
|
|
}
|
|
|
|
/**
|
|
* The base implementation of methods like `_.dropWhile` and `_.takeWhile`
|
|
* without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to query.
|
|
* @param {Function} predicate The function invoked per iteration.
|
|
* @param {boolean} [isDrop] Specify dropping elements instead of taking them.
|
|
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
* @returns {Array} Returns the slice of `array`.
|
|
*/
|
|
function baseWhile(array, predicate, isDrop, fromRight) {
|
|
var length = array.length,
|
|
index = fromRight ? length : -1;
|
|
|
|
while ((fromRight ? index-- : ++index < length) &&
|
|
predicate(array[index], index, array)) {}
|
|
|
|
return isDrop
|
|
? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
|
|
: baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
|
|
}
|
|
|
|
/**
|
|
* The base implementation of `wrapperValue` which returns the result of
|
|
* performing a sequence of actions on the unwrapped `value`, where each
|
|
* successive action is supplied the return value of the previous.
|
|
*
|
|
* @private
|
|
* @param {*} value The unwrapped value.
|
|
* @param {Array} actions Actions to perform to resolve the unwrapped value.
|
|
* @returns {*} Returns the resolved value.
|
|
*/
|
|
function baseWrapperValue(value, actions) {
|
|
var result = value;
|
|
if (result instanceof LazyWrapper) {
|
|
result = result.value();
|
|
}
|
|
return arrayReduce(actions, function(result, action) {
|
|
return action.func.apply(action.thisArg, arrayPush([result], action.args));
|
|
}, result);
|
|
}
|
|
|
|
/**
|
|
* The base implementation of methods like `_.xor`, without support for
|
|
* iteratee shorthands, that accepts an array of arrays to inspect.
|
|
*
|
|
* @private
|
|
* @param {Array} arrays The arrays to inspect.
|
|
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
* @param {Function} [comparator] The comparator invoked per element.
|
|
* @returns {Array} Returns the new array of values.
|
|
*/
|
|
function baseXor(arrays, iteratee, comparator) {
|
|
var length = arrays.length;
|
|
if (length < 2) {
|
|
return length ? baseUniq(arrays[0]) : [];
|
|
}
|
|
var index = -1,
|
|
result = Array(length);
|
|
|
|
while (++index < length) {
|
|
var array = arrays[index],
|
|
othIndex = -1;
|
|
|
|
while (++othIndex < length) {
|
|
if (othIndex != index) {
|
|
result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
|
|
}
|
|
}
|
|
}
|
|
return baseUniq(baseFlatten(result, 1), iteratee, comparator);
|
|
}
|
|
|
|
/**
|
|
* This base implementation of `_.zipObject` which assigns values using `assignFunc`.
|
|
*
|
|
* @private
|
|
* @param {Array} props The property identifiers.
|
|
* @param {Array} values The property values.
|
|
* @param {Function} assignFunc The function to assign values.
|
|
* @returns {Object} Returns the new object.
|
|
*/
|
|
function baseZipObject(props, values, assignFunc) {
|
|
var index = -1,
|
|
length = props.length,
|
|
valsLength = values.length,
|
|
result = {};
|
|
|
|
while (++index < length) {
|
|
var value = index < valsLength ? values[index] : undefined;
|
|
assignFunc(result, props[index], value);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Casts `value` to an empty array if it's not an array like object.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to inspect.
|
|
* @returns {Array|Object} Returns the cast array-like object.
|
|
*/
|
|
function castArrayLikeObject(value) {
|
|
return isArrayLikeObject(value) ? value : [];
|
|
}
|
|
|
|
/**
|
|
* Casts `value` to `identity` if it's not a function.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to inspect.
|
|
* @returns {Function} Returns cast function.
|
|
*/
|
|
function castFunction(value) {
|
|
return typeof value == 'function' ? value : identity;
|
|
}
|
|
|
|
/**
|
|
* Casts `value` to a path array if it's not one.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to inspect.
|
|
* @param {Object} [object] The object to query keys on.
|
|
* @returns {Array} Returns the cast property path array.
|
|
*/
|
|
function castPath(value, object) {
|
|
if (isArray(value)) {
|
|
return value;
|
|
}
|
|
return isKey(value, object) ? [value] : stringToPath(toString(value));
|
|
}
|
|
|
|
/**
|
|
* A `baseRest` alias which can be replaced with `identity` by module
|
|
* replacement plugins.
|
|
*
|
|
* @private
|
|
* @type {Function}
|
|
* @param {Function} func The function to apply a rest parameter to.
|
|
* @returns {Function} Returns the new function.
|
|
*/
|
|
var castRest = baseRest;
|
|
|
|
/**
|
|
* Casts `array` to a slice if it's needed.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to inspect.
|
|
* @param {number} start The start position.
|
|
* @param {number} [end=array.length] The end position.
|
|
* @returns {Array} Returns the cast slice.
|
|
*/
|
|
function castSlice(array, start, end) {
|
|
var length = array.length;
|
|
end = end === undefined ? length : end;
|
|
return (!start && end >= length) ? array : baseSlice(array, start, end);
|
|
}
|
|
|
|
/**
|
|
* A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
|
|
*
|
|
* @private
|
|
* @param {number|Object} id The timer id or timeout object of the timer to clear.
|
|
*/
|
|
var clearTimeout = ctxClearTimeout || function(id) {
|
|
return root.clearTimeout(id);
|
|
};
|
|
|
|
/**
|
|
* Creates a clone of `buffer`.
|
|
*
|
|
* @private
|
|
* @param {Buffer} buffer The buffer to clone.
|
|
* @param {boolean} [isDeep] Specify a deep clone.
|
|
* @returns {Buffer} Returns the cloned buffer.
|
|
*/
|
|
function cloneBuffer(buffer, isDeep) {
|
|
if (isDeep) {
|
|
return buffer.slice();
|
|
}
|
|
var length = buffer.length,
|
|
result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
|
|
buffer.copy(result);
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Creates a clone of `arrayBuffer`.
|
|
*
|
|
* @private
|
|
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
|
|
* @returns {ArrayBuffer} Returns the cloned array buffer.
|
|
*/
|
|
function cloneArrayBuffer(arrayBuffer) {
|
|
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
new Uint8Array(result).set(new Uint8Array(arrayBuffer));
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Creates a clone of `dataView`.
|
|
*
|
|
* @private
|
|
* @param {Object} dataView The data view to clone.
|
|
* @param {boolean} [isDeep] Specify a deep clone.
|
|
* @returns {Object} Returns the cloned data view.
|
|
*/
|
|
function cloneDataView(dataView, isDeep) {
|
|
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
|
|
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
}
|
|
|
|
/**
|
|
* Creates a clone of `regexp`.
|
|
*
|
|
* @private
|
|
* @param {Object} regexp The regexp to clone.
|
|
* @returns {Object} Returns the cloned regexp.
|
|
*/
|
|
function cloneRegExp(regexp) {
|
|
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
|
result.lastIndex = regexp.lastIndex;
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Creates a clone of the `symbol` object.
|
|
*
|
|
* @private
|
|
* @param {Object} symbol The symbol object to clone.
|
|
* @returns {Object} Returns the cloned symbol object.
|
|
*/
|
|
function cloneSymbol(symbol) {
|
|
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
|
|
}
|
|
|
|
/**
|
|
* Creates a clone of `typedArray`.
|
|
*
|
|
* @private
|
|
* @param {Object} typedArray The typed array to clone.
|
|
* @param {boolean} [isDeep] Specify a deep clone.
|
|
* @returns {Object} Returns the cloned typed array.
|
|
*/
|
|
function cloneTypedArray(typedArray, isDeep) {
|
|
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
|
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
}
|
|
|
|
/**
|
|
* Compares values to sort them in ascending order.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to compare.
|
|
* @param {*} other The other value to compare.
|
|
* @returns {number} Returns the sort order indicator for `value`.
|
|
*/
|
|
function compareAscending(value, other) {
|
|
if (value !== other) {
|
|
var valIsDefined = value !== undefined,
|
|
valIsNull = value === null,
|
|
valIsReflexive = value === value,
|
|
valIsSymbol = isSymbol(value);
|
|
|
|
var othIsDefined = other !== undefined,
|
|
othIsNull = other === null,
|
|
othIsReflexive = other === other,
|
|
othIsSymbol = isSymbol(other);
|
|
|
|
if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
|
|
(valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
|
|
(valIsNull && othIsDefined && othIsReflexive) ||
|
|
(!valIsDefined && othIsReflexive) ||
|
|
!valIsReflexive) {
|
|
return 1;
|
|
}
|
|
if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
|
|
(othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
|
|
(othIsNull && valIsDefined && valIsReflexive) ||
|
|
(!othIsDefined && valIsReflexive) ||
|
|
!othIsReflexive) {
|
|
return -1;
|
|
}
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
/**
|
|
* Used by `_.orderBy` to compare multiple properties of a value to another
|
|
* and stable sort them.
|
|
*
|
|
* If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
|
|
* specify an order of "desc" for descending or "asc" for ascending sort order
|
|
* of corresponding values.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to compare.
|
|
* @param {Object} other The other object to compare.
|
|
* @param {boolean[]|string[]} orders The order to sort by for each property.
|
|
* @returns {number} Returns the sort order indicator for `object`.
|
|
*/
|
|
function compareMultiple(object, other, orders) {
|
|
var index = -1,
|
|
objCriteria = object.criteria,
|
|
othCriteria = other.criteria,
|
|
length = objCriteria.length,
|
|
ordersLength = orders.length;
|
|
|
|
while (++index < length) {
|
|
var result = compareAscending(objCriteria[index], othCriteria[index]);
|
|
if (result) {
|
|
if (index >= ordersLength) {
|
|
return result;
|
|
}
|
|
var order = orders[index];
|
|
return result * (order == 'desc' ? -1 : 1);
|
|
}
|
|
}
|
|
// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
|
|
// that causes it, under certain circumstances, to provide the same value for
|
|
// `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
|
|
// for more details.
|
|
//
|
|
// This also ensures a stable sort in V8 and other engines.
|
|
// See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
|
|
return object.index - other.index;
|
|
}
|
|
|
|
/**
|
|
* Creates an array that is the composition of partially applied arguments,
|
|
* placeholders, and provided arguments into a single array of arguments.
|
|
*
|
|
* @private
|
|
* @param {Array} args The provided arguments.
|
|
* @param {Array} partials The arguments to prepend to those provided.
|
|
* @param {Array} holders The `partials` placeholder indexes.
|
|
* @params {boolean} [isCurried] Specify composing for a curried function.
|
|
* @returns {Array} Returns the new array of composed arguments.
|
|
*/
|
|
function composeArgs(args, partials, holders, isCurried) {
|
|
var argsIndex = -1,
|
|
argsLength = args.length,
|
|
holdersLength = holders.length,
|
|
leftIndex = -1,
|
|
leftLength = partials.length,
|
|
rangeLength = nativeMax(argsLength - holdersLength, 0),
|
|
result = Array(leftLength + rangeLength),
|
|
isUncurried = !isCurried;
|
|
|
|
while (++leftIndex < leftLength) {
|
|
result[leftIndex] = partials[leftIndex];
|
|
}
|
|
while (++argsIndex < holdersLength) {
|
|
if (isUncurried || argsIndex < argsLength) {
|
|
result[holders[argsIndex]] = args[argsIndex];
|
|
}
|
|
}
|
|
while (rangeLength--) {
|
|
result[leftIndex++] = args[argsIndex++];
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* This function is like `composeArgs` except that the arguments composition
|
|
* is tailored for `_.partialRight`.
|
|
*
|
|
* @private
|
|
* @param {Array} args The provided arguments.
|
|
* @param {Array} partials The arguments to append to those provided.
|
|
* @param {Array} holders The `partials` placeholder indexes.
|
|
* @params {boolean} [isCurried] Specify composing for a curried function.
|
|
* @returns {Array} Returns the new array of composed arguments.
|
|
*/
|
|
function composeArgsRight(args, partials, holders, isCurried) {
|
|
var argsIndex = -1,
|
|
argsLength = args.length,
|
|
holdersIndex = -1,
|
|
holdersLength = holders.length,
|
|
rightIndex = -1,
|
|
rightLength = partials.length,
|
|
rangeLength = nativeMax(argsLength - holdersLength, 0),
|
|
result = Array(rangeLength + rightLength),
|
|
isUncurried = !isCurried;
|
|
|
|
while (++argsIndex < rangeLength) {
|
|
result[argsIndex] = args[argsIndex];
|
|
}
|
|
var offset = argsIndex;
|
|
while (++rightIndex < rightLength) {
|
|
result[offset + rightIndex] = partials[rightIndex];
|
|
}
|
|
while (++holdersIndex < holdersLength) {
|
|
if (isUncurried || argsIndex < argsLength) {
|
|
result[offset + holders[holdersIndex]] = args[argsIndex++];
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Copies the values of `source` to `array`.
|
|
*
|
|
* @private
|
|
* @param {Array} source The array to copy values from.
|
|
* @param {Array} [array=[]] The array to copy values to.
|
|
* @returns {Array} Returns `array`.
|
|
*/
|
|
function copyArray(source, array) {
|
|
var index = -1,
|
|
length = source.length;
|
|
|
|
array || (array = Array(length));
|
|
while (++index < length) {
|
|
array[index] = source[index];
|
|
}
|
|
return array;
|
|
}
|
|
|
|
/**
|
|
* Copies properties of `source` to `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} source The object to copy properties from.
|
|
* @param {Array} props The property identifiers to copy.
|
|
* @param {Object} [object={}] The object to copy properties to.
|
|
* @param {Function} [customizer] The function to customize copied values.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
function copyObject(source, props, object, customizer) {
|
|
var isNew = !object;
|
|
object || (object = {});
|
|
|
|
var index = -1,
|
|
length = props.length;
|
|
|
|
while (++index < length) {
|
|
var key = props[index];
|
|
|
|
var newValue = customizer
|
|
? customizer(object[key], source[key], key, object, source)
|
|
: undefined;
|
|
|
|
if (newValue === undefined) {
|
|
newValue = source[key];
|
|
}
|
|
if (isNew) {
|
|
baseAssignValue(object, key, newValue);
|
|
} else {
|
|
assignValue(object, key, newValue);
|
|
}
|
|
}
|
|
return object;
|
|
}
|
|
|
|
/**
|
|
* Copies own symbols of `source` to `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} source The object to copy symbols from.
|
|
* @param {Object} [object={}] The object to copy symbols to.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
function copySymbols(source, object) {
|
|
return copyObject(source, getSymbols(source), object);
|
|
}
|
|
|
|
/**
|
|
* Copies own and inherited symbols of `source` to `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} source The object to copy symbols from.
|
|
* @param {Object} [object={}] The object to copy symbols to.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
function copySymbolsIn(source, object) {
|
|
return copyObject(source, getSymbolsIn(source), object);
|
|
}
|
|
|
|
/**
|
|
* Creates a function like `_.groupBy`.
|
|
*
|
|
* @private
|
|
* @param {Function} setter The function to set accumulator values.
|
|
* @param {Function} [initializer] The accumulator object initializer.
|
|
* @returns {Function} Returns the new aggregator function.
|
|
*/
|
|
function createAggregator(setter, initializer) {
|
|
return function(collection, iteratee) {
|
|
var func = isArray(collection) ? arrayAggregator : baseAggregator,
|
|
accumulator = initializer ? initializer() : {};
|
|
|
|
return func(collection, setter, getIteratee(iteratee, 2), accumulator);
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Creates a function like `_.assign`.
|
|
*
|
|
* @private
|
|
* @param {Function} assigner The function to assign values.
|
|
* @returns {Function} Returns the new assigner function.
|
|
*/
|
|
function createAssigner(assigner) {
|
|
return baseRest(function(object, sources) {
|
|
var index = -1,
|
|
length = sources.length,
|
|
customizer = length > 1 ? sources[length - 1] : undefined,
|
|
guard = length > 2 ? sources[2] : undefined;
|
|
|
|
customizer = (assigner.length > 3 && typeof customizer == 'function')
|
|
? (length--, customizer)
|
|
: undefined;
|
|
|
|
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
|
customizer = length < 3 ? undefined : customizer;
|
|
length = 1;
|
|
}
|
|
object = Object(object);
|
|
while (++index < length) {
|
|
var source = sources[index];
|
|
if (source) {
|
|
assigner(object, source, index, customizer);
|
|
}
|
|
}
|
|
return object;
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Creates a `baseEach` or `baseEachRight` function.
|
|
*
|
|
* @private
|
|
* @param {Function} eachFunc The function to iterate over a collection.
|
|
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
* @returns {Function} Returns the new base function.
|
|
*/
|
|
function createBaseEach(eachFunc, fromRight) {
|
|
return function(collection, iteratee) {
|
|
if (collection == null) {
|
|
return collection;
|
|
}
|
|
if (!isArrayLike(collection)) {
|
|
return eachFunc(collection, iteratee);
|
|
}
|
|
var length = collection.length,
|
|
index = fromRight ? length : -1,
|
|
iterable = Object(collection);
|
|
|
|
while ((fromRight ? index-- : ++index < length)) {
|
|
if (iteratee(iterable[index], index, iterable) === false) {
|
|
break;
|
|
}
|
|
}
|
|
return collection;
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Creates a base function for methods like `_.forIn` and `_.forOwn`.
|
|
*
|
|
* @private
|
|
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
* @returns {Function} Returns the new base function.
|
|
*/
|
|
function createBaseFor(fromRight) {
|
|
return function(object, iteratee, keysFunc) {
|
|
var index = -1,
|
|
iterable = Object(object),
|
|
props = keysFunc(object),
|
|
length = props.length;
|
|
|
|
while (length--) {
|
|
var key = props[fromRight ? length : ++index];
|
|
if (iteratee(iterable[key], key, iterable) === false) {
|
|
break;
|
|
}
|
|
}
|
|
return object;
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Creates a function that wraps `func` to invoke it with the optional `this`
|
|
* binding of `thisArg`.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to wrap.
|
|
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
|
|
* @param {*} [thisArg] The `this` binding of `func`.
|
|
* @returns {Function} Returns the new wrapped function.
|
|
*/
|
|
function createBind(func, bitmask, thisArg) {
|
|
var isBind = bitmask & WRAP_BIND_FLAG,
|
|
Ctor = createCtor(func);
|
|
|
|
function wrapper() {
|
|
var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
|
|
return fn.apply(isBind ? thisArg : this, arguments);
|
|
}
|
|
return wrapper;
|
|
}
|
|
|
|
/**
|
|
* Creates a function like `_.lowerFirst`.
|
|
*
|
|
* @private
|
|
* @param {string} methodName The name of the `String` case method to use.
|
|
* @returns {Function} Returns the new case function.
|
|
*/
|
|
function createCaseFirst(methodName) {
|
|
return function(string) {
|
|
string = toString(string);
|
|
|
|
var strSymbols = hasUnicode(string)
|
|
? stringToArray(string)
|
|
: undefined;
|
|
|
|
var chr = strSymbols
|
|
? strSymbols[0]
|
|
: string.charAt(0);
|
|
|
|
var trailing = strSymbols
|
|
? castSlice(strSymbols, 1).join('')
|
|
: string.slice(1);
|
|
|
|
return chr[methodName]() + trailing;
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Creates a function like `_.camelCase`.
|
|
*
|
|
* @private
|
|
* @param {Function} callback The function to combine each word.
|
|
* @returns {Function} Returns the new compounder function.
|
|
*/
|
|
function createCompounder(callback) {
|
|
return function(string) {
|
|
return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Creates a function that produces an instance of `Ctor` regardless of
|
|
* whether it was invoked as part of a `new` expression or by `call` or `apply`.
|
|
*
|
|
* @private
|
|
* @param {Function} Ctor The constructor to wrap.
|
|
* @returns {Function} Returns the new wrapped function.
|
|
*/
|
|
function createCtor(Ctor) {
|
|
return function() {
|
|
// Use a `switch` statement to work with class constructors. See
|
|
// http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
|
|
// for more details.
|
|
var args = arguments;
|
|
switch (args.length) {
|
|
case 0: return new Ctor;
|
|
case 1: return new Ctor(args[0]);
|
|
case 2: return new Ctor(args[0], args[1]);
|
|
case 3: return new Ctor(args[0], args[1], args[2]);
|
|
case 4: return new Ctor(args[0], args[1], args[2], args[3]);
|
|
case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
|
|
case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
|
|
case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
|
|
}
|
|
var thisBinding = baseCreate(Ctor.prototype),
|
|
result = Ctor.apply(thisBinding, args);
|
|
|
|
// Mimic the constructor's `return` behavior.
|
|
// See https://es5.github.io/#x13.2.2 for more details.
|
|
return isObject(result) ? result : thisBinding;
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Creates a function that wraps `func` to enable currying.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to wrap.
|
|
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
|
|
* @param {number} arity The arity of `func`.
|
|
* @returns {Function} Returns the new wrapped function.
|
|
*/
|
|
function createCurry(func, bitmask, arity) {
|
|
var Ctor = createCtor(func);
|
|
|
|
function wrapper() {
|
|
var length = arguments.length,
|
|
args = Array(length),
|
|
index = length,
|
|
placeholder = getHolder(wrapper);
|
|
|
|
while (index--) {
|
|
args[index] = arguments[index];
|
|
}
|
|
var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
|
|
? []
|
|
: replaceHolders(args, placeholder);
|
|
|
|
length -= holders.length;
|
|
if (length < arity) {
|
|
return createRecurry(
|
|
func, bitmask, createHybrid, wrapper.placeholder, undefined,
|
|
args, holders, undefined, undefined, arity - length);
|
|
}
|
|
var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
|
|
return apply(fn, this, args);
|
|
}
|
|
return wrapper;
|
|
}
|
|
|
|
/**
|
|
* Creates a `_.find` or `_.findLast` function.
|
|
*
|
|
* @private
|
|
* @param {Function} findIndexFunc The function to find the collection index.
|
|
* @returns {Function} Returns the new find function.
|
|
*/
|
|
function createFind(findIndexFunc) {
|
|
return function(collection, predicate, fromIndex) {
|
|
var iterable = Object(collection);
|
|
if (!isArrayLike(collection)) {
|
|
var iteratee = getIteratee(predicate, 3);
|
|
collection = keys(collection);
|
|
predicate = function(key) { return iteratee(iterable[key], key, iterable); };
|
|
}
|
|
var index = findIndexFunc(collection, predicate, fromIndex);
|
|
return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Creates a `_.flow` or `_.flowRight` function.
|
|
*
|
|
* @private
|
|
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
* @returns {Function} Returns the new flow function.
|
|
*/
|
|
function createFlow(fromRight) {
|
|
return flatRest(function(funcs) {
|
|
var length = funcs.length,
|
|
index = length,
|
|
prereq = LodashWrapper.prototype.thru;
|
|
|
|
if (fromRight) {
|
|
funcs.reverse();
|
|
}
|
|
while (index--) {
|
|
var func = funcs[index];
|
|
if (typeof func != 'function') {
|
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
}
|
|
if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
|
|
var wrapper = new LodashWrapper([], true);
|
|
}
|
|
}
|
|
index = wrapper ? index : length;
|
|
while (++index < length) {
|
|
func = funcs[index];
|
|
|
|
var funcName = getFuncName(func),
|
|
data = funcName == 'wrapper' ? getData(func) : undefined;
|
|
|
|
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
|
|
) {
|
|
wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
|
|
} else {
|
|
wrapper = (func.length == 1 && isLaziable(func))
|
|
? wrapper[funcName]()
|
|
: wrapper.thru(func);
|
|
}
|
|
}
|
|
return function() {
|
|
var args = arguments,
|
|
value = args[0];
|
|
|
|
if (wrapper && args.length == 1 && isArray(value)) {
|
|
return wrapper.plant(value).value();
|
|
}
|
|
var index = 0,
|
|
result = length ? funcs[index].apply(this, args) : value;
|
|
|
|
while (++index < length) {
|
|
result = funcs[index].call(this, result);
|
|
}
|
|
return result;
|
|
};
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Creates a function that wraps `func` to invoke it with optional `this`
|
|
* binding of `thisArg`, partial application, and currying.
|
|
*
|
|
* @private
|
|
* @param {Function|string} func The function or method name to wrap.
|
|
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
|
|
* @param {*} [thisArg] The `this` binding of `func`.
|
|
* @param {Array} [partials] The arguments to prepend to those provided to
|
|
* the new function.
|
|
* @param {Array} [holders] The `partials` placeholder indexes.
|
|
* @param {Array} [partialsRight] The arguments to append to those provided
|
|
* to the new function.
|
|
* @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
|
|
* @param {Array} [argPos] The argument positions of the new function.
|
|
* @param {number} [ary] The arity cap of `func`.
|
|
* @param {number} [arity] The arity of `func`.
|
|
* @returns {Function} Returns the new wrapped function.
|
|
*/
|
|
function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
|
|
var isAry = bitmask & WRAP_ARY_FLAG,
|
|
isBind = bitmask & WRAP_BIND_FLAG,
|
|
isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
|
|
isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
|
|
isFlip = bitmask & WRAP_FLIP_FLAG,
|
|
Ctor = isBindKey ? undefined : createCtor(func);
|
|
|
|
function wrapper() {
|
|
var length = arguments.length,
|
|
args = Array(length),
|
|
index = length;
|
|
|
|
while (index--) {
|
|
args[index] = arguments[index];
|
|
}
|
|
if (isCurried) {
|
|
var placeholder = getHolder(wrapper),
|
|
holdersCount = countHolders(args, placeholder);
|
|
}
|
|
if (partials) {
|
|
args = composeArgs(args, partials, holders, isCurried);
|
|
}
|
|
if (partialsRight) {
|
|
args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
|
|
}
|
|
length -= holdersCount;
|
|
if (isCurried && length < arity) {
|
|
var newHolders = replaceHolders(args, placeholder);
|
|
return createRecurry(
|
|
func, bitmask, createHybrid, wrapper.placeholder, thisArg,
|
|
args, newHolders, argPos, ary, arity - length
|
|
);
|
|
}
|
|
var thisBinding = isBind ? thisArg : this,
|
|
fn = isBindKey ? thisBinding[func] : func;
|
|
|
|
length = args.length;
|
|
if (argPos) {
|
|
args = reorder(args, argPos);
|
|
} else if (isFlip && length > 1) {
|
|
args.reverse();
|
|
}
|
|
if (isAry && ary < length) {
|
|
args.length = ary;
|
|
}
|
|
if (this && this !== root && this instanceof wrapper) {
|
|
fn = Ctor || createCtor(fn);
|
|
}
|
|
return fn.apply(thisBinding, args);
|
|
}
|
|
return wrapper;
|
|
}
|
|
|
|
/**
|
|
* Creates a function like `_.invertBy`.
|
|
*
|
|
* @private
|
|
* @param {Function} setter The function to set accumulator values.
|
|
* @param {Function} toIteratee The function to resolve iteratees.
|
|
* @returns {Function} Returns the new inverter function.
|
|
*/
|
|
function createInverter(setter, toIteratee) {
|
|
return function(object, iteratee) {
|
|
return baseInverter(object, setter, toIteratee(iteratee), {});
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Creates a function that performs a mathematical operation on two values.
|
|
*
|
|
* @private
|
|
* @param {Function} operator The function to perform the operation.
|
|
* @param {number} [defaultValue] The value used for `undefined` arguments.
|
|
* @returns {Function} Returns the new mathematical operation function.
|
|
*/
|
|
function createMathOperation(operator, defaultValue) {
|
|
return function(value, other) {
|
|
var result;
|
|
if (value === undefined && other === undefined) {
|
|
return defaultValue;
|
|
}
|
|
if (value !== undefined) {
|
|
result = value;
|
|
}
|
|
if (other !== undefined) {
|
|
if (result === undefined) {
|
|
return other;
|
|
}
|
|
if (typeof value == 'string' || typeof other == 'string') {
|
|
value = baseToString(value);
|
|
other = baseToString(other);
|
|
} else {
|
|
value = baseToNumber(value);
|
|
other = baseToNumber(other);
|
|
}
|
|
result = operator(value, other);
|
|
}
|
|
return result;
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Creates a function like `_.over`.
|
|
*
|
|
* @private
|
|
* @param {Function} arrayFunc The function to iterate over iteratees.
|
|
* @returns {Function} Returns the new over function.
|
|
*/
|
|
function createOver(arrayFunc) {
|
|
return flatRest(function(iteratees) {
|
|
iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
|
|
return baseRest(function(args) {
|
|
var thisArg = this;
|
|
return arrayFunc(iteratees, function(iteratee) {
|
|
return apply(iteratee, thisArg, args);
|
|
});
|
|
});
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Creates the padding for `string` based on `length`. The `chars` string
|
|
* is truncated if the number of characters exceeds `length`.
|
|
*
|
|
* @private
|
|
* @param {number} length The padding length.
|
|
* @param {string} [chars=' '] The string used as padding.
|
|
* @returns {string} Returns the padding for `string`.
|
|
*/
|
|
function createPadding(length, chars) {
|
|
chars = chars === undefined ? ' ' : baseToString(chars);
|
|
|
|
var charsLength = chars.length;
|
|
if (charsLength < 2) {
|
|
return charsLength ? baseRepeat(chars, length) : chars;
|
|
}
|
|
var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
|
|
return hasUnicode(chars)
|
|
? castSlice(stringToArray(result), 0, length).join('')
|
|
: result.slice(0, length);
|
|
}
|
|
|
|
/**
|
|
* Creates a function that wraps `func` to invoke it with the `this` binding
|
|
* of `thisArg` and `partials` prepended to the arguments it receives.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to wrap.
|
|
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
|
|
* @param {*} thisArg The `this` binding of `func`.
|
|
* @param {Array} partials The arguments to prepend to those provided to
|
|
* the new function.
|
|
* @returns {Function} Returns the new wrapped function.
|
|
*/
|
|
function createPartial(func, bitmask, thisArg, partials) {
|
|
var isBind = bitmask & WRAP_BIND_FLAG,
|
|
Ctor = createCtor(func);
|
|
|
|
function wrapper() {
|
|
var argsIndex = -1,
|
|
argsLength = arguments.length,
|
|
leftIndex = -1,
|
|
leftLength = partials.length,
|
|
args = Array(leftLength + argsLength),
|
|
fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
|
|
|
|
while (++leftIndex < leftLength) {
|
|
args[leftIndex] = partials[leftIndex];
|
|
}
|
|
while (argsLength--) {
|
|
args[leftIndex++] = arguments[++argsIndex];
|
|
}
|
|
return apply(fn, isBind ? thisArg : this, args);
|
|
}
|
|
return wrapper;
|
|
}
|
|
|
|
/**
|
|
* Creates a `_.range` or `_.rangeRight` function.
|
|
*
|
|
* @private
|
|
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
* @returns {Function} Returns the new range function.
|
|
*/
|
|
function createRange(fromRight) {
|
|
return function(start, end, step) {
|
|
if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
|
|
end = step = undefined;
|
|
}
|
|
// Ensure the sign of `-0` is preserved.
|
|
start = toFinite(start);
|
|
if (end === undefined) {
|
|
end = start;
|
|
start = 0;
|
|
} else {
|
|
end = toFinite(end);
|
|
}
|
|
step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
|
|
return baseRange(start, end, step, fromRight);
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Creates a function that performs a relational operation on two values.
|
|
*
|
|
* @private
|
|
* @param {Function} operator The function to perform the operation.
|
|
* @returns {Function} Returns the new relational operation function.
|
|
*/
|
|
function createRelationalOperation(operator) {
|
|
return function(value, other) {
|
|
if (!(typeof value == 'string' && typeof other == 'string')) {
|
|
value = toNumber(value);
|
|
other = toNumber(other);
|
|
}
|
|
return operator(value, other);
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Creates a function that wraps `func` to continue currying.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to wrap.
|
|
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
|
|
* @param {Function} wrapFunc The function to create the `func` wrapper.
|
|
* @param {*} placeholder The placeholder value.
|
|
* @param {*} [thisArg] The `this` binding of `func`.
|
|
* @param {Array} [partials] The arguments to prepend to those provided to
|
|
* the new function.
|
|
* @param {Array} [holders] The `partials` placeholder indexes.
|
|
* @param {Array} [argPos] The argument positions of the new function.
|
|
* @param {number} [ary] The arity cap of `func`.
|
|
* @param {number} [arity] The arity of `func`.
|
|
* @returns {Function} Returns the new wrapped function.
|
|
*/
|
|
function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
|
|
var isCurry = bitmask & WRAP_CURRY_FLAG,
|
|
newHolders = isCurry ? holders : undefined,
|
|
newHoldersRight = isCurry ? undefined : holders,
|
|
newPartials = isCurry ? partials : undefined,
|
|
newPartialsRight = isCurry ? undefined : partials;
|
|
|
|
bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
|
|
bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
|
|
|
|
if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
|
|
bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
|
|
}
|
|
var newData = [
|
|
func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
|
|
newHoldersRight, argPos, ary, arity
|
|
];
|
|
|
|
var result = wrapFunc.apply(undefined, newData);
|
|
if (isLaziable(func)) {
|
|
setData(result, newData);
|
|
}
|
|
result.placeholder = placeholder;
|
|
return setWrapToString(result, func, bitmask);
|
|
}
|
|
|
|
/**
|
|
* Creates a function like `_.round`.
|
|
*
|
|
* @private
|
|
* @param {string} methodName The name of the `Math` method to use when rounding.
|
|
* @returns {Function} Returns the new round function.
|
|
*/
|
|
function createRound(methodName) {
|
|
var func = Math[methodName];
|
|
return function(number, precision) {
|
|
number = toNumber(number);
|
|
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
|
|
if (precision && nativeIsFinite(number)) {
|
|
// Shift with exponential notation to avoid floating-point issues.
|
|
// See [MDN](https://mdn.io/round#Examples) for more details.
|
|
var pair = (toString(number) + 'e').split('e'),
|
|
value = func(pair[0] + 'e' + (+pair[1] + precision));
|
|
|
|
pair = (toString(value) + 'e').split('e');
|
|
return +(pair[0] + 'e' + (+pair[1] - precision));
|
|
}
|
|
return func(number);
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Creates a set object of `values`.
|
|
*
|
|
* @private
|
|
* @param {Array} values The values to add to the set.
|
|
* @returns {Object} Returns the new set.
|
|
*/
|
|
var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
|
|
return new Set(values);
|
|
};
|
|
|
|
/**
|
|
* Creates a `_.toPairs` or `_.toPairsIn` function.
|
|
*
|
|
* @private
|
|
* @param {Function} keysFunc The function to get the keys of a given object.
|
|
* @returns {Function} Returns the new pairs function.
|
|
*/
|
|
function createToPairs(keysFunc) {
|
|
return function(object) {
|
|
var tag = getTag(object);
|
|
if (tag == mapTag) {
|
|
return mapToArray(object);
|
|
}
|
|
if (tag == setTag) {
|
|
return setToPairs(object);
|
|
}
|
|
return baseToPairs(object, keysFunc(object));
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Creates a function that either curries or invokes `func` with optional
|
|
* `this` binding and partially applied arguments.
|
|
*
|
|
* @private
|
|
* @param {Function|string} func The function or method name to wrap.
|
|
* @param {number} bitmask The bitmask flags.
|
|
* 1 - `_.bind`
|
|
* 2 - `_.bindKey`
|
|
* 4 - `_.curry` or `_.curryRight` of a bound function
|
|
* 8 - `_.curry`
|
|
* 16 - `_.curryRight`
|
|
* 32 - `_.partial`
|
|
* 64 - `_.partialRight`
|
|
* 128 - `_.rearg`
|
|
* 256 - `_.ary`
|
|
* 512 - `_.flip`
|
|
* @param {*} [thisArg] The `this` binding of `func`.
|
|
* @param {Array} [partials] The arguments to be partially applied.
|
|
* @param {Array} [holders] The `partials` placeholder indexes.
|
|
* @param {Array} [argPos] The argument positions of the new function.
|
|
* @param {number} [ary] The arity cap of `func`.
|
|
* @param {number} [arity] The arity of `func`.
|
|
* @returns {Function} Returns the new wrapped function.
|
|
*/
|
|
function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
|
|
var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
|
|
if (!isBindKey && typeof func != 'function') {
|
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
}
|
|
var length = partials ? partials.length : 0;
|
|
if (!length) {
|
|
bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
|
|
partials = holders = undefined;
|
|
}
|
|
ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
|
|
arity = arity === undefined ? arity : toInteger(arity);
|
|
length -= holders ? holders.length : 0;
|
|
|
|
if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
|
|
var partialsRight = partials,
|
|
holdersRight = holders;
|
|
|
|
partials = holders = undefined;
|
|
}
|
|
var data = isBindKey ? undefined : getData(func);
|
|
|
|
var newData = [
|
|
func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
|
|
argPos, ary, arity
|
|
];
|
|
|
|
if (data) {
|
|
mergeData(newData, data);
|
|
}
|
|
func = newData[0];
|
|
bitmask = newData[1];
|
|
thisArg = newData[2];
|
|
partials = newData[3];
|
|
holders = newData[4];
|
|
arity = newData[9] = newData[9] === undefined
|
|
? (isBindKey ? 0 : func.length)
|
|
: nativeMax(newData[9] - length, 0);
|
|
|
|
if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
|
|
bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
|
|
}
|
|
if (!bitmask || bitmask == WRAP_BIND_FLAG) {
|
|
var result = createBind(func, bitmask, thisArg);
|
|
} else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
|
|
result = createCurry(func, bitmask, arity);
|
|
} else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
|
|
result = createPartial(func, bitmask, thisArg, partials);
|
|
} else {
|
|
result = createHybrid.apply(undefined, newData);
|
|
}
|
|
var setter = data ? baseSetData : setData;
|
|
return setWrapToString(setter(result, newData), func, bitmask);
|
|
}
|
|
|
|
/**
|
|
* Used by `_.defaults` to customize its `_.assignIn` use to assign properties
|
|
* of source objects to the destination object for all destination properties
|
|
* that resolve to `undefined`.
|
|
*
|
|
* @private
|
|
* @param {*} objValue The destination value.
|
|
* @param {*} srcValue The source value.
|
|
* @param {string} key The key of the property to assign.
|
|
* @param {Object} object The parent object of `objValue`.
|
|
* @returns {*} Returns the value to assign.
|
|
*/
|
|
function customDefaultsAssignIn(objValue, srcValue, key, object) {
|
|
if (objValue === undefined ||
|
|
(eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
|
|
return srcValue;
|
|
}
|
|
return objValue;
|
|
}
|
|
|
|
/**
|
|
* Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
|
|
* objects into destination objects that are passed thru.
|
|
*
|
|
* @private
|
|
* @param {*} objValue The destination value.
|
|
* @param {*} srcValue The source value.
|
|
* @param {string} key The key of the property to merge.
|
|
* @param {Object} object The parent object of `objValue`.
|
|
* @param {Object} source The parent object of `srcValue`.
|
|
* @param {Object} [stack] Tracks traversed source values and their merged
|
|
* counterparts.
|
|
* @returns {*} Returns the value to assign.
|
|
*/
|
|
function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
|
|
if (isObject(objValue) && isObject(srcValue)) {
|
|
// Recursively merge objects and arrays (susceptible to call stack limits).
|
|
stack.set(srcValue, objValue);
|
|
baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
|
|
stack['delete'](srcValue);
|
|
}
|
|
return objValue;
|
|
}
|
|
|
|
/**
|
|
* Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
|
|
* objects.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to inspect.
|
|
* @param {string} key The key of the property to inspect.
|
|
* @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
|
|
*/
|
|
function customOmitClone(value) {
|
|
return isPlainObject(value) ? undefined : value;
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `baseIsEqualDeep` for arrays with support for
|
|
* partial deep comparisons.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to compare.
|
|
* @param {Array} other The other array to compare.
|
|
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
* @param {Function} customizer The function to customize comparisons.
|
|
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
* @param {Object} stack Tracks traversed `array` and `other` objects.
|
|
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
|
|
*/
|
|
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
|
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
|
|
arrLength = array.length,
|
|
othLength = other.length;
|
|
|
|
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
|
return false;
|
|
}
|
|
// Check that cyclic values are equal.
|
|
var arrStacked = stack.get(array);
|
|
var othStacked = stack.get(other);
|
|
if (arrStacked && othStacked) {
|
|
return arrStacked == other && othStacked == array;
|
|
}
|
|
var index = -1,
|
|
result = true,
|
|
seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
|
|
|
|
stack.set(array, other);
|
|
stack.set(other, array);
|
|
|
|
// Ignore non-index properties.
|
|
while (++index < arrLength) {
|
|
var arrValue = array[index],
|
|
othValue = other[index];
|
|
|
|
if (customizer) {
|
|
var compared = isPartial
|
|
? customizer(othValue, arrValue, index, other, array, stack)
|
|
: customizer(arrValue, othValue, index, array, other, stack);
|
|
}
|
|
if (compared !== undefined) {
|
|
if (compared) {
|
|
continue;
|
|
}
|
|
result = false;
|
|
break;
|
|
}
|
|
// Recursively compare arrays (susceptible to call stack limits).
|
|
if (seen) {
|
|
if (!arraySome(other, function(othValue, othIndex) {
|
|
if (!cacheHas(seen, othIndex) &&
|
|
(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
|
return seen.push(othIndex);
|
|
}
|
|
})) {
|
|
result = false;
|
|
break;
|
|
}
|
|
} else if (!(
|
|
arrValue === othValue ||
|
|
equalFunc(arrValue, othValue, bitmask, customizer, stack)
|
|
)) {
|
|
result = false;
|
|
break;
|
|
}
|
|
}
|
|
stack['delete'](array);
|
|
stack['delete'](other);
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `baseIsEqualDeep` for comparing objects of
|
|
* the same `toStringTag`.
|
|
*
|
|
* **Note:** This function only supports comparing values with tags of
|
|
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to compare.
|
|
* @param {Object} other The other object to compare.
|
|
* @param {string} tag The `toStringTag` of the objects to compare.
|
|
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
* @param {Function} customizer The function to customize comparisons.
|
|
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
* @param {Object} stack Tracks traversed `object` and `other` objects.
|
|
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
*/
|
|
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
switch (tag) {
|
|
case dataViewTag:
|
|
if ((object.byteLength != other.byteLength) ||
|
|
(object.byteOffset != other.byteOffset)) {
|
|
return false;
|
|
}
|
|
object = object.buffer;
|
|
other = other.buffer;
|
|
|
|
case arrayBufferTag:
|
|
if ((object.byteLength != other.byteLength) ||
|
|
!equalFunc(new Uint8Array(object), new Uint8Array(other))) {
|
|
return false;
|
|
}
|
|
return true;
|
|
|
|
case boolTag:
|
|
case dateTag:
|
|
case numberTag:
|
|
// Coerce booleans to `1` or `0` and dates to milliseconds.
|
|
// Invalid dates are coerced to `NaN`.
|
|
return eq(+object, +other);
|
|
|
|
case errorTag:
|
|
return object.name == other.name && object.message == other.message;
|
|
|
|
case regexpTag:
|
|
case stringTag:
|
|
// Coerce regexes to strings and treat strings, primitives and objects,
|
|
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
|
// for more details.
|
|
return object == (other + '');
|
|
|
|
case mapTag:
|
|
var convert = mapToArray;
|
|
|
|
case setTag:
|
|
var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
|
|
convert || (convert = setToArray);
|
|
|
|
if (object.size != other.size && !isPartial) {
|
|
return false;
|
|
}
|
|
// Assume cyclic values are equal.
|
|
var stacked = stack.get(object);
|
|
if (stacked) {
|
|
return stacked == other;
|
|
}
|
|
bitmask |= COMPARE_UNORDERED_FLAG;
|
|
|
|
// Recursively compare objects (susceptible to call stack limits).
|
|
stack.set(object, other);
|
|
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
|
stack['delete'](object);
|
|
return result;
|
|
|
|
case symbolTag:
|
|
if (symbolValueOf) {
|
|
return symbolValueOf.call(object) == symbolValueOf.call(other);
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `baseIsEqualDeep` for objects with support for
|
|
* partial deep comparisons.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to compare.
|
|
* @param {Object} other The other object to compare.
|
|
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
* @param {Function} customizer The function to customize comparisons.
|
|
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
* @param {Object} stack Tracks traversed `object` and `other` objects.
|
|
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
*/
|
|
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
|
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
|
|
objProps = getAllKeys(object),
|
|
objLength = objProps.length,
|
|
othProps = getAllKeys(other),
|
|
othLength = othProps.length;
|
|
|
|
if (objLength != othLength && !isPartial) {
|
|
return false;
|
|
}
|
|
var index = objLength;
|
|
while (index--) {
|
|
var key = objProps[index];
|
|
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
|
return false;
|
|
}
|
|
}
|
|
// Check that cyclic values are equal.
|
|
var objStacked = stack.get(object);
|
|
var othStacked = stack.get(other);
|
|
if (objStacked && othStacked) {
|
|
return objStacked == other && othStacked == object;
|
|
}
|
|
var result = true;
|
|
stack.set(object, other);
|
|
stack.set(other, object);
|
|
|
|
var skipCtor = isPartial;
|
|
while (++index < objLength) {
|
|
key = objProps[index];
|
|
var objValue = object[key],
|
|
othValue = other[key];
|
|
|
|
if (customizer) {
|
|
var compared = isPartial
|
|
? customizer(othValue, objValue, key, other, object, stack)
|
|
: customizer(objValue, othValue, key, object, other, stack);
|
|
}
|
|
// Recursively compare objects (susceptible to call stack limits).
|
|
if (!(compared === undefined
|
|
? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
|
|
: compared
|
|
)) {
|
|
result = false;
|
|
break;
|
|
}
|
|
skipCtor || (skipCtor = key == 'constructor');
|
|
}
|
|
if (result && !skipCtor) {
|
|
var objCtor = object.constructor,
|
|
othCtor = other.constructor;
|
|
|
|
// Non `Object` object instances with different constructors are not equal.
|
|
if (objCtor != othCtor &&
|
|
('constructor' in object && 'constructor' in other) &&
|
|
!(typeof objCtor == 'function' && objCtor instanceof objCtor &&
|
|
typeof othCtor == 'function' && othCtor instanceof othCtor)) {
|
|
result = false;
|
|
}
|
|
}
|
|
stack['delete'](object);
|
|
stack['delete'](other);
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `baseRest` which flattens the rest array.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to apply a rest parameter to.
|
|
* @returns {Function} Returns the new function.
|
|
*/
|
|
function flatRest(func) {
|
|
return setToString(overRest(func, undefined, flatten), func + '');
|
|
}
|
|
|
|
/**
|
|
* Creates an array of own enumerable property names and symbols of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of property names and symbols.
|
|
*/
|
|
function getAllKeys(object) {
|
|
return baseGetAllKeys(object, keys, getSymbols);
|
|
}
|
|
|
|
/**
|
|
* Creates an array of own and inherited enumerable property names and
|
|
* symbols of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of property names and symbols.
|
|
*/
|
|
function getAllKeysIn(object) {
|
|
return baseGetAllKeys(object, keysIn, getSymbolsIn);
|
|
}
|
|
|
|
/**
|
|
* Gets metadata for `func`.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to query.
|
|
* @returns {*} Returns the metadata for `func`.
|
|
*/
|
|
var getData = !metaMap ? noop : function(func) {
|
|
return metaMap.get(func);
|
|
};
|
|
|
|
/**
|
|
* Gets the name of `func`.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to query.
|
|
* @returns {string} Returns the function name.
|
|
*/
|
|
function getFuncName(func) {
|
|
var result = (func.name + ''),
|
|
array = realNames[result],
|
|
length = hasOwnProperty.call(realNames, result) ? array.length : 0;
|
|
|
|
while (length--) {
|
|
var data = array[length],
|
|
otherFunc = data.func;
|
|
if (otherFunc == null || otherFunc == func) {
|
|
return data.name;
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Gets the argument placeholder value for `func`.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to inspect.
|
|
* @returns {*} Returns the placeholder value.
|
|
*/
|
|
function getHolder(func) {
|
|
var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
|
|
return object.placeholder;
|
|
}
|
|
|
|
/**
|
|
* Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
|
|
* this function returns the custom method, otherwise it returns `baseIteratee`.
|
|
* If arguments are provided, the chosen function is invoked with them and
|
|
* its result is returned.
|
|
*
|
|
* @private
|
|
* @param {*} [value] The value to convert to an iteratee.
|
|
* @param {number} [arity] The arity of the created iteratee.
|
|
* @returns {Function} Returns the chosen function or its result.
|
|
*/
|
|
function getIteratee() {
|
|
var result = lodash.iteratee || iteratee;
|
|
result = result === iteratee ? baseIteratee : result;
|
|
return arguments.length ? result(arguments[0], arguments[1]) : result;
|
|
}
|
|
|
|
/**
|
|
* Gets the data for `map`.
|
|
*
|
|
* @private
|
|
* @param {Object} map The map to query.
|
|
* @param {string} key The reference key.
|
|
* @returns {*} Returns the map data.
|
|
*/
|
|
function getMapData(map, key) {
|
|
var data = map.__data__;
|
|
return isKeyable(key)
|
|
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
: data.map;
|
|
}
|
|
|
|
/**
|
|
* Gets the property names, values, and compare flags of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the match data of `object`.
|
|
*/
|
|
function getMatchData(object) {
|
|
var result = keys(object),
|
|
length = result.length;
|
|
|
|
while (length--) {
|
|
var key = result[length],
|
|
value = object[key];
|
|
|
|
result[length] = [key, value, isStrictComparable(value)];
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Gets the native function at `key` of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @param {string} key The key of the method to get.
|
|
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
*/
|
|
function getNative(object, key) {
|
|
var value = getValue(object, key);
|
|
return baseIsNative(value) ? value : undefined;
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to query.
|
|
* @returns {string} Returns the raw `toStringTag`.
|
|
*/
|
|
function getRawTag(value) {
|
|
var isOwn = hasOwnProperty.call(value, symToStringTag),
|
|
tag = value[symToStringTag];
|
|
|
|
try {
|
|
value[symToStringTag] = undefined;
|
|
var unmasked = true;
|
|
} catch (e) {}
|
|
|
|
var result = nativeObjectToString.call(value);
|
|
if (unmasked) {
|
|
if (isOwn) {
|
|
value[symToStringTag] = tag;
|
|
} else {
|
|
delete value[symToStringTag];
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Creates an array of the own enumerable symbols of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of symbols.
|
|
*/
|
|
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
|
if (object == null) {
|
|
return [];
|
|
}
|
|
object = Object(object);
|
|
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|
return propertyIsEnumerable.call(object, symbol);
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Creates an array of the own and inherited enumerable symbols of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of symbols.
|
|
*/
|
|
var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
|
|
var result = [];
|
|
while (object) {
|
|
arrayPush(result, getSymbols(object));
|
|
object = getPrototype(object);
|
|
}
|
|
return result;
|
|
};
|
|
|
|
/**
|
|
* Gets the `toStringTag` of `value`.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to query.
|
|
* @returns {string} Returns the `toStringTag`.
|
|
*/
|
|
var getTag = baseGetTag;
|
|
|
|
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
|
|
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
|
(Map && getTag(new Map) != mapTag) ||
|
|
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
|
(Set && getTag(new Set) != setTag) ||
|
|
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
|
getTag = function(value) {
|
|
var result = baseGetTag(value),
|
|
Ctor = result == objectTag ? value.constructor : undefined,
|
|
ctorString = Ctor ? toSource(Ctor) : '';
|
|
|
|
if (ctorString) {
|
|
switch (ctorString) {
|
|
case dataViewCtorString: return dataViewTag;
|
|
case mapCtorString: return mapTag;
|
|
case promiseCtorString: return promiseTag;
|
|
case setCtorString: return setTag;
|
|
case weakMapCtorString: return weakMapTag;
|
|
}
|
|
}
|
|
return result;
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Gets the view, applying any `transforms` to the `start` and `end` positions.
|
|
*
|
|
* @private
|
|
* @param {number} start The start of the view.
|
|
* @param {number} end The end of the view.
|
|
* @param {Array} transforms The transformations to apply to the view.
|
|
* @returns {Object} Returns an object containing the `start` and `end`
|
|
* positions of the view.
|
|
*/
|
|
function getView(start, end, transforms) {
|
|
var index = -1,
|
|
length = transforms.length;
|
|
|
|
while (++index < length) {
|
|
var data = transforms[index],
|
|
size = data.size;
|
|
|
|
switch (data.type) {
|
|
case 'drop': start += size; break;
|
|
case 'dropRight': end -= size; break;
|
|
case 'take': end = nativeMin(end, start + size); break;
|
|
case 'takeRight': start = nativeMax(start, end - size); break;
|
|
}
|
|
}
|
|
return { 'start': start, 'end': end };
|
|
}
|
|
|
|
/**
|
|
* Extracts wrapper details from the `source` body comment.
|
|
*
|
|
* @private
|
|
* @param {string} source The source to inspect.
|
|
* @returns {Array} Returns the wrapper details.
|
|
*/
|
|
function getWrapDetails(source) {
|
|
var match = source.match(reWrapDetails);
|
|
return match ? match[1].split(reSplitDetails) : [];
|
|
}
|
|
|
|
/**
|
|
* Checks if `path` exists on `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @param {Array|string} path The path to check.
|
|
* @param {Function} hasFunc The function to check properties.
|
|
* @returns {boolean} Returns `true` if `path` exists, else `false`.
|
|
*/
|
|
function hasPath(object, path, hasFunc) {
|
|
path = castPath(path, object);
|
|
|
|
var index = -1,
|
|
length = path.length,
|
|
result = false;
|
|
|
|
while (++index < length) {
|
|
var key = toKey(path[index]);
|
|
if (!(result = object != null && hasFunc(object, key))) {
|
|
break;
|
|
}
|
|
object = object[key];
|
|
}
|
|
if (result || ++index != length) {
|
|
return result;
|
|
}
|
|
length = object == null ? 0 : object.length;
|
|
return !!length && isLength(length) && isIndex(key, length) &&
|
|
(isArray(object) || isArguments(object));
|
|
}
|
|
|
|
/**
|
|
* Initializes an array clone.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to clone.
|
|
* @returns {Array} Returns the initialized clone.
|
|
*/
|
|
function initCloneArray(array) {
|
|
var length = array.length,
|
|
result = new array.constructor(length);
|
|
|
|
// Add properties assigned by `RegExp#exec`.
|
|
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
|
result.index = array.index;
|
|
result.input = array.input;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Initializes an object clone.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to clone.
|
|
* @returns {Object} Returns the initialized clone.
|
|
*/
|
|
function initCloneObject(object) {
|
|
return (typeof object.constructor == 'function' && !isPrototype(object))
|
|
? baseCreate(getPrototype(object))
|
|
: {};
|
|
}
|
|
|
|
/**
|
|
* Initializes an object clone based on its `toStringTag`.
|
|
*
|
|
* **Note:** This function only supports cloning values with tags of
|
|
* `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to clone.
|
|
* @param {string} tag The `toStringTag` of the object to clone.
|
|
* @param {boolean} [isDeep] Specify a deep clone.
|
|
* @returns {Object} Returns the initialized clone.
|
|
*/
|
|
function initCloneByTag(object, tag, isDeep) {
|
|
var Ctor = object.constructor;
|
|
switch (tag) {
|
|
case arrayBufferTag:
|
|
return cloneArrayBuffer(object);
|
|
|
|
case boolTag:
|
|
case dateTag:
|
|
return new Ctor(+object);
|
|
|
|
case dataViewTag:
|
|
return cloneDataView(object, isDeep);
|
|
|
|
case float32Tag: case float64Tag:
|
|
case int8Tag: case int16Tag: case int32Tag:
|
|
case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
|
|
return cloneTypedArray(object, isDeep);
|
|
|
|
case mapTag:
|
|
return new Ctor;
|
|
|
|
case numberTag:
|
|
case stringTag:
|
|
return new Ctor(object);
|
|
|
|
case regexpTag:
|
|
return cloneRegExp(object);
|
|
|
|
case setTag:
|
|
return new Ctor;
|
|
|
|
case symbolTag:
|
|
return cloneSymbol(object);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Inserts wrapper `details` in a comment at the top of the `source` body.
|
|
*
|
|
* @private
|
|
* @param {string} source The source to modify.
|
|
* @returns {Array} details The details to insert.
|
|
* @returns {string} Returns the modified source.
|
|
*/
|
|
function insertWrapDetails(source, details) {
|
|
var length = details.length;
|
|
if (!length) {
|
|
return source;
|
|
}
|
|
var lastIndex = length - 1;
|
|
details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
|
|
details = details.join(length > 2 ? ', ' : ' ');
|
|
return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is a flattenable `arguments` object or array.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
|
|
*/
|
|
function isFlattenable(value) {
|
|
return isArray(value) || isArguments(value) ||
|
|
!!(spreadableSymbol && value && value[spreadableSymbol]);
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is a valid array-like index.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
*/
|
|
function isIndex(value, length) {
|
|
var type = typeof value;
|
|
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
|
|
return !!length &&
|
|
(type == 'number' ||
|
|
(type != 'symbol' && reIsUint.test(value))) &&
|
|
(value > -1 && value % 1 == 0 && value < length);
|
|
}
|
|
|
|
/**
|
|
* Checks if the given arguments are from an iteratee call.
|
|
*
|
|
* @private
|
|
* @param {*} value The potential iteratee value argument.
|
|
* @param {*} index The potential iteratee index or key argument.
|
|
* @param {*} object The potential iteratee object argument.
|
|
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
|
|
* else `false`.
|
|
*/
|
|
function isIterateeCall(value, index, object) {
|
|
if (!isObject(object)) {
|
|
return false;
|
|
}
|
|
var type = typeof index;
|
|
if (type == 'number'
|
|
? (isArrayLike(object) && isIndex(index, object.length))
|
|
: (type == 'string' && index in object)
|
|
) {
|
|
return eq(object[index], value);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is a property name and not a property path.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @param {Object} [object] The object to query keys on.
|
|
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
*/
|
|
function isKey(value, object) {
|
|
if (isArray(value)) {
|
|
return false;
|
|
}
|
|
var type = typeof value;
|
|
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
|
value == null || isSymbol(value)) {
|
|
return true;
|
|
}
|
|
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
|
(object != null && value in Object(object));
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is suitable for use as unique object key.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
*/
|
|
function isKeyable(value) {
|
|
var type = typeof value;
|
|
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
? (value !== '__proto__')
|
|
: (value === null);
|
|
}
|
|
|
|
/**
|
|
* Checks if `func` has a lazy counterpart.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to check.
|
|
* @returns {boolean} Returns `true` if `func` has a lazy counterpart,
|
|
* else `false`.
|
|
*/
|
|
function isLaziable(func) {
|
|
var funcName = getFuncName(func),
|
|
other = lodash[funcName];
|
|
|
|
if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
|
|
return false;
|
|
}
|
|
if (func === other) {
|
|
return true;
|
|
}
|
|
var data = getData(other);
|
|
return !!data && func === data[0];
|
|
}
|
|
|
|
/**
|
|
* Checks if `func` has its source masked.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to check.
|
|
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
*/
|
|
function isMasked(func) {
|
|
return !!maskSrcKey && (maskSrcKey in func);
|
|
}
|
|
|
|
/**
|
|
* Checks if `func` is capable of being masked.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `func` is maskable, else `false`.
|
|
*/
|
|
var isMaskable = coreJsData ? isFunction : stubFalse;
|
|
|
|
/**
|
|
* Checks if `value` is likely a prototype object.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
*/
|
|
function isPrototype(value) {
|
|
var Ctor = value && value.constructor,
|
|
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
|
|
|
|
return value === proto;
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` if suitable for strict
|
|
* equality comparisons, else `false`.
|
|
*/
|
|
function isStrictComparable(value) {
|
|
return value === value && !isObject(value);
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `matchesProperty` for source values suitable
|
|
* for strict equality comparisons, i.e. `===`.
|
|
*
|
|
* @private
|
|
* @param {string} key The key of the property to get.
|
|
* @param {*} srcValue The value to match.
|
|
* @returns {Function} Returns the new spec function.
|
|
*/
|
|
function matchesStrictComparable(key, srcValue) {
|
|
return function(object) {
|
|
if (object == null) {
|
|
return false;
|
|
}
|
|
return object[key] === srcValue &&
|
|
(srcValue !== undefined || (key in Object(object)));
|
|
};
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `_.memoize` which clears the memoized function's
|
|
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to have its output memoized.
|
|
* @returns {Function} Returns the new memoized function.
|
|
*/
|
|
function memoizeCapped(func) {
|
|
var result = memoize(func, function(key) {
|
|
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
cache.clear();
|
|
}
|
|
return key;
|
|
});
|
|
|
|
var cache = result.cache;
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Merges the function metadata of `source` into `data`.
|
|
*
|
|
* Merging metadata reduces the number of wrappers used to invoke a function.
|
|
* This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
|
|
* may be applied regardless of execution order. Methods like `_.ary` and
|
|
* `_.rearg` modify function arguments, making the order in which they are
|
|
* executed important, preventing the merging of metadata. However, we make
|
|
* an exception for a safe combined case where curried functions have `_.ary`
|
|
* and or `_.rearg` applied.
|
|
*
|
|
* @private
|
|
* @param {Array} data The destination metadata.
|
|
* @param {Array} source The source metadata.
|
|
* @returns {Array} Returns `data`.
|
|
*/
|
|
function mergeData(data, source) {
|
|
var bitmask = data[1],
|
|
srcBitmask = source[1],
|
|
newBitmask = bitmask | srcBitmask,
|
|
isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
|
|
|
|
var isCombo =
|
|
((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
|
|
((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
|
|
((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
|
|
|
|
// Exit early if metadata can't be merged.
|
|
if (!(isCommon || isCombo)) {
|
|
return data;
|
|
}
|
|
// Use source `thisArg` if available.
|
|
if (srcBitmask & WRAP_BIND_FLAG) {
|
|
data[2] = source[2];
|
|
// Set when currying a bound function.
|
|
newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
|
|
}
|
|
// Compose partial arguments.
|
|
var value = source[3];
|
|
if (value) {
|
|
var partials = data[3];
|
|
data[3] = partials ? composeArgs(partials, value, source[4]) : value;
|
|
data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
|
|
}
|
|
// Compose partial right arguments.
|
|
value = source[5];
|
|
if (value) {
|
|
partials = data[5];
|
|
data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
|
|
data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
|
|
}
|
|
// Use source `argPos` if available.
|
|
value = source[7];
|
|
if (value) {
|
|
data[7] = value;
|
|
}
|
|
// Use source `ary` if it's smaller.
|
|
if (srcBitmask & WRAP_ARY_FLAG) {
|
|
data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
|
|
}
|
|
// Use source `arity` if one is not provided.
|
|
if (data[9] == null) {
|
|
data[9] = source[9];
|
|
}
|
|
// Use source `func` and merge bitmasks.
|
|
data[0] = source[0];
|
|
data[1] = newBitmask;
|
|
|
|
return data;
|
|
}
|
|
|
|
/**
|
|
* This function is like
|
|
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
* except that it includes inherited enumerable properties.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of property names.
|
|
*/
|
|
function nativeKeysIn(object) {
|
|
var result = [];
|
|
if (object != null) {
|
|
for (var key in Object(object)) {
|
|
result.push(key);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Converts `value` to a string using `Object.prototype.toString`.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to convert.
|
|
* @returns {string} Returns the converted string.
|
|
*/
|
|
function objectToString(value) {
|
|
return nativeObjectToString.call(value);
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `baseRest` which transforms the rest array.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to apply a rest parameter to.
|
|
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
|
* @param {Function} transform The rest array transform.
|
|
* @returns {Function} Returns the new function.
|
|
*/
|
|
function overRest(func, start, transform) {
|
|
start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
|
|
return function() {
|
|
var args = arguments,
|
|
index = -1,
|
|
length = nativeMax(args.length - start, 0),
|
|
array = Array(length);
|
|
|
|
while (++index < length) {
|
|
array[index] = args[start + index];
|
|
}
|
|
index = -1;
|
|
var otherArgs = Array(start + 1);
|
|
while (++index < start) {
|
|
otherArgs[index] = args[index];
|
|
}
|
|
otherArgs[start] = transform(array);
|
|
return apply(func, this, otherArgs);
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Gets the parent value at `path` of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @param {Array} path The path to get the parent value of.
|
|
* @returns {*} Returns the parent value.
|
|
*/
|
|
function parent(object, path) {
|
|
return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
|
|
}
|
|
|
|
/**
|
|
* Reorder `array` according to the specified indexes where the element at
|
|
* the first index is assigned as the first element, the element at
|
|
* the second index is assigned as the second element, and so on.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to reorder.
|
|
* @param {Array} indexes The arranged array indexes.
|
|
* @returns {Array} Returns `array`.
|
|
*/
|
|
function reorder(array, indexes) {
|
|
var arrLength = array.length,
|
|
length = nativeMin(indexes.length, arrLength),
|
|
oldArray = copyArray(array);
|
|
|
|
while (length--) {
|
|
var index = indexes[length];
|
|
array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
|
|
}
|
|
return array;
|
|
}
|
|
|
|
/**
|
|
* Gets the value at `key`, unless `key` is "__proto__" or "constructor".
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @param {string} key The key of the property to get.
|
|
* @returns {*} Returns the property value.
|
|
*/
|
|
function safeGet(object, key) {
|
|
if (key === 'constructor' && typeof object[key] === 'function') {
|
|
return;
|
|
}
|
|
|
|
if (key == '__proto__') {
|
|
return;
|
|
}
|
|
|
|
return object[key];
|
|
}
|
|
|
|
/**
|
|
* Sets metadata for `func`.
|
|
*
|
|
* **Note:** If this function becomes hot, i.e. is invoked a lot in a short
|
|
* period of time, it will trip its breaker and transition to an identity
|
|
* function to avoid garbage collection pauses in V8. See
|
|
* [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
|
|
* for more details.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to associate metadata with.
|
|
* @param {*} data The metadata.
|
|
* @returns {Function} Returns `func`.
|
|
*/
|
|
var setData = shortOut(baseSetData);
|
|
|
|
/**
|
|
* A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to delay.
|
|
* @param {number} wait The number of milliseconds to delay invocation.
|
|
* @returns {number|Object} Returns the timer id or timeout object.
|
|
*/
|
|
var setTimeout = ctxSetTimeout || function(func, wait) {
|
|
return root.setTimeout(func, wait);
|
|
};
|
|
|
|
/**
|
|
* Sets the `toString` method of `func` to return `string`.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to modify.
|
|
* @param {Function} string The `toString` result.
|
|
* @returns {Function} Returns `func`.
|
|
*/
|
|
var setToString = shortOut(baseSetToString);
|
|
|
|
/**
|
|
* Sets the `toString` method of `wrapper` to mimic the source of `reference`
|
|
* with wrapper details in a comment at the top of the source body.
|
|
*
|
|
* @private
|
|
* @param {Function} wrapper The function to modify.
|
|
* @param {Function} reference The reference function.
|
|
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
|
|
* @returns {Function} Returns `wrapper`.
|
|
*/
|
|
function setWrapToString(wrapper, reference, bitmask) {
|
|
var source = (reference + '');
|
|
return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
|
|
}
|
|
|
|
/**
|
|
* Creates a function that'll short out and invoke `identity` instead
|
|
* of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
|
|
* milliseconds.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to restrict.
|
|
* @returns {Function} Returns the new shortable function.
|
|
*/
|
|
function shortOut(func) {
|
|
var count = 0,
|
|
lastCalled = 0;
|
|
|
|
return function() {
|
|
var stamp = nativeNow(),
|
|
remaining = HOT_SPAN - (stamp - lastCalled);
|
|
|
|
lastCalled = stamp;
|
|
if (remaining > 0) {
|
|
if (++count >= HOT_COUNT) {
|
|
return arguments[0];
|
|
}
|
|
} else {
|
|
count = 0;
|
|
}
|
|
return func.apply(undefined, arguments);
|
|
};
|
|
}
|
|
|
|
/**
|
|
* A specialized version of `_.shuffle` which mutates and sets the size of `array`.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to shuffle.
|
|
* @param {number} [size=array.length] The size of `array`.
|
|
* @returns {Array} Returns `array`.
|
|
*/
|
|
function shuffleSelf(array, size) {
|
|
var index = -1,
|
|
length = array.length,
|
|
lastIndex = length - 1;
|
|
|
|
size = size === undefined ? length : size;
|
|
while (++index < size) {
|
|
var rand = baseRandom(index, lastIndex),
|
|
value = array[rand];
|
|
|
|
array[rand] = array[index];
|
|
array[index] = value;
|
|
}
|
|
array.length = size;
|
|
return array;
|
|
}
|
|
|
|
/**
|
|
* Converts `string` to a property path array.
|
|
*
|
|
* @private
|
|
* @param {string} string The string to convert.
|
|
* @returns {Array} Returns the property path array.
|
|
*/
|
|
var stringToPath = memoizeCapped(function(string) {
|
|
var result = [];
|
|
if (string.charCodeAt(0) === 46 /* . */) {
|
|
result.push('');
|
|
}
|
|
string.replace(rePropName, function(match, number, quote, subString) {
|
|
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
|
});
|
|
return result;
|
|
});
|
|
|
|
/**
|
|
* Converts `value` to a string key if it's not a string or symbol.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to inspect.
|
|
* @returns {string|symbol} Returns the key.
|
|
*/
|
|
function toKey(value) {
|
|
if (typeof value == 'string' || isSymbol(value)) {
|
|
return value;
|
|
}
|
|
var result = (value + '');
|
|
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
}
|
|
|
|
/**
|
|
* Converts `func` to its source code.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to convert.
|
|
* @returns {string} Returns the source code.
|
|
*/
|
|
function toSource(func) {
|
|
if (func != null) {
|
|
try {
|
|
return funcToString.call(func);
|
|
} catch (e) {}
|
|
try {
|
|
return (func + '');
|
|
} catch (e) {}
|
|
}
|
|
return '';
|
|
}
|
|
|
|
/**
|
|
* Updates wrapper `details` based on `bitmask` flags.
|
|
*
|
|
* @private
|
|
* @returns {Array} details The details to modify.
|
|
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
|
|
* @returns {Array} Returns `details`.
|
|
*/
|
|
function updateWrapDetails(details, bitmask) {
|
|
arrayEach(wrapFlags, function(pair) {
|
|
var value = '_.' + pair[0];
|
|
if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
|
|
details.push(value);
|
|
}
|
|
});
|
|
return details.sort();
|
|
}
|
|
|
|
/**
|
|
* Creates a clone of `wrapper`.
|
|
*
|
|
* @private
|
|
* @param {Object} wrapper The wrapper to clone.
|
|
* @returns {Object} Returns the cloned wrapper.
|
|
*/
|
|
function wrapperClone(wrapper) {
|
|
if (wrapper instanceof LazyWrapper) {
|
|
return wrapper.clone();
|
|
}
|
|
var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
|
|
result.__actions__ = copyArray(wrapper.__actions__);
|
|
result.__index__ = wrapper.__index__;
|
|
result.__values__ = wrapper.__values__;
|
|
return result;
|
|
}
|
|
|
|
/*------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
* Creates an array of elements split into groups the length of `size`.
|
|
* If `array` can't be split evenly, the final chunk will be the remaining
|
|
* elements.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to process.
|
|
* @param {number} [size=1] The length of each chunk
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
* @returns {Array} Returns the new array of chunks.
|
|
* @example
|
|
*
|
|
* _.chunk(['a', 'b', 'c', 'd'], 2);
|
|
* // => [['a', 'b'], ['c', 'd']]
|
|
*
|
|
* _.chunk(['a', 'b', 'c', 'd'], 3);
|
|
* // => [['a', 'b', 'c'], ['d']]
|
|
*/
|
|
function chunk(array, size, guard) {
|
|
if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
|
|
size = 1;
|
|
} else {
|
|
size = nativeMax(toInteger(size), 0);
|
|
}
|
|
var length = array == null ? 0 : array.length;
|
|
if (!length || size < 1) {
|
|
return [];
|
|
}
|
|
var index = 0,
|
|
resIndex = 0,
|
|
result = Array(nativeCeil(length / size));
|
|
|
|
while (index < length) {
|
|
result[resIndex++] = baseSlice(array, index, (index += size));
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Creates an array with all falsey values removed. The values `false`, `null`,
|
|
* `0`, `""`, `undefined`, and `NaN` are falsey.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {Array} array The array to compact.
|
|
* @returns {Array} Returns the new array of filtered values.
|
|
* @example
|
|
*
|
|
* _.compact([0, 1, false, 2, '', 3]);
|
|
* // => [1, 2, 3]
|
|
*/
|
|
function compact(array) {
|
|
var index = -1,
|
|
length = array == null ? 0 : array.length,
|
|
resIndex = 0,
|
|
result = [];
|
|
|
|
while (++index < length) {
|
|
var value = array[index];
|
|
if (value) {
|
|
result[resIndex++] = value;
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Creates a new array concatenating `array` with any additional arrays
|
|
* and/or values.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to concatenate.
|
|
* @param {...*} [values] The values to concatenate.
|
|
* @returns {Array} Returns the new concatenated array.
|
|
* @example
|
|
*
|
|
* var array = [1];
|
|
* var other = _.concat(array, 2, [3], [[4]]);
|
|
*
|
|
* console.log(other);
|
|
* // => [1, 2, 3, [4]]
|
|
*
|
|
* console.log(array);
|
|
* // => [1]
|
|
*/
|
|
function concat() {
|
|
var length = arguments.length;
|
|
if (!length) {
|
|
return [];
|
|
}
|
|
var args = Array(length - 1),
|
|
array = arguments[0],
|
|
index = length;
|
|
|
|
while (index--) {
|
|
args[index - 1] = arguments[index];
|
|
}
|
|
return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
|
|
}
|
|
|
|
/**
|
|
* Creates an array of `array` values not included in the other given arrays
|
|
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
* for equality comparisons. The order and references of result values are
|
|
* determined by the first array.
|
|
*
|
|
* **Note:** Unlike `_.pullAll`, this method returns a new array.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {Array} array The array to inspect.
|
|
* @param {...Array} [values] The values to exclude.
|
|
* @returns {Array} Returns the new array of filtered values.
|
|
* @see _.without, _.xor
|
|
* @example
|
|
*
|
|
* _.difference([2, 1], [2, 3]);
|
|
* // => [1]
|
|
*/
|
|
var difference = baseRest(function(array, values) {
|
|
return isArrayLikeObject(array)
|
|
? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
|
|
: [];
|
|
});
|
|
|
|
/**
|
|
* This method is like `_.difference` except that it accepts `iteratee` which
|
|
* is invoked for each element of `array` and `values` to generate the criterion
|
|
* by which they're compared. The order and references of result values are
|
|
* determined by the first array. The iteratee is invoked with one argument:
|
|
* (value).
|
|
*
|
|
* **Note:** Unlike `_.pullAllBy`, this method returns a new array.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to inspect.
|
|
* @param {...Array} [values] The values to exclude.
|
|
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
|
* @returns {Array} Returns the new array of filtered values.
|
|
* @example
|
|
*
|
|
* _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
|
|
* // => [1.2]
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
|
|
* // => [{ 'x': 2 }]
|
|
*/
|
|
var differenceBy = baseRest(function(array, values) {
|
|
var iteratee = last(values);
|
|
if (isArrayLikeObject(iteratee)) {
|
|
iteratee = undefined;
|
|
}
|
|
return isArrayLikeObject(array)
|
|
? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
|
|
: [];
|
|
});
|
|
|
|
/**
|
|
* This method is like `_.difference` except that it accepts `comparator`
|
|
* which is invoked to compare elements of `array` to `values`. The order and
|
|
* references of result values are determined by the first array. The comparator
|
|
* is invoked with two arguments: (arrVal, othVal).
|
|
*
|
|
* **Note:** Unlike `_.pullAllWith`, this method returns a new array.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to inspect.
|
|
* @param {...Array} [values] The values to exclude.
|
|
* @param {Function} [comparator] The comparator invoked per element.
|
|
* @returns {Array} Returns the new array of filtered values.
|
|
* @example
|
|
*
|
|
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
|
|
*
|
|
* _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
|
|
* // => [{ 'x': 2, 'y': 1 }]
|
|
*/
|
|
var differenceWith = baseRest(function(array, values) {
|
|
var comparator = last(values);
|
|
if (isArrayLikeObject(comparator)) {
|
|
comparator = undefined;
|
|
}
|
|
return isArrayLikeObject(array)
|
|
? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
|
|
: [];
|
|
});
|
|
|
|
/**
|
|
* Creates a slice of `array` with `n` elements dropped from the beginning.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.5.0
|
|
* @category Array
|
|
* @param {Array} array The array to query.
|
|
* @param {number} [n=1] The number of elements to drop.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
* @returns {Array} Returns the slice of `array`.
|
|
* @example
|
|
*
|
|
* _.drop([1, 2, 3]);
|
|
* // => [2, 3]
|
|
*
|
|
* _.drop([1, 2, 3], 2);
|
|
* // => [3]
|
|
*
|
|
* _.drop([1, 2, 3], 5);
|
|
* // => []
|
|
*
|
|
* _.drop([1, 2, 3], 0);
|
|
* // => [1, 2, 3]
|
|
*/
|
|
function drop(array, n, guard) {
|
|
var length = array == null ? 0 : array.length;
|
|
if (!length) {
|
|
return [];
|
|
}
|
|
n = (guard || n === undefined) ? 1 : toInteger(n);
|
|
return baseSlice(array, n < 0 ? 0 : n, length);
|
|
}
|
|
|
|
/**
|
|
* Creates a slice of `array` with `n` elements dropped from the end.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to query.
|
|
* @param {number} [n=1] The number of elements to drop.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
* @returns {Array} Returns the slice of `array`.
|
|
* @example
|
|
*
|
|
* _.dropRight([1, 2, 3]);
|
|
* // => [1, 2]
|
|
*
|
|
* _.dropRight([1, 2, 3], 2);
|
|
* // => [1]
|
|
*
|
|
* _.dropRight([1, 2, 3], 5);
|
|
* // => []
|
|
*
|
|
* _.dropRight([1, 2, 3], 0);
|
|
* // => [1, 2, 3]
|
|
*/
|
|
function dropRight(array, n, guard) {
|
|
var length = array == null ? 0 : array.length;
|
|
if (!length) {
|
|
return [];
|
|
}
|
|
n = (guard || n === undefined) ? 1 : toInteger(n);
|
|
n = length - n;
|
|
return baseSlice(array, 0, n < 0 ? 0 : n);
|
|
}
|
|
|
|
/**
|
|
* Creates a slice of `array` excluding elements dropped from the end.
|
|
* Elements are dropped until `predicate` returns falsey. The predicate is
|
|
* invoked with three arguments: (value, index, array).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to query.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @returns {Array} Returns the slice of `array`.
|
|
* @example
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney', 'active': true },
|
|
* { 'user': 'fred', 'active': false },
|
|
* { 'user': 'pebbles', 'active': false }
|
|
* ];
|
|
*
|
|
* _.dropRightWhile(users, function(o) { return !o.active; });
|
|
* // => objects for ['barney']
|
|
*
|
|
* // The `_.matches` iteratee shorthand.
|
|
* _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
|
|
* // => objects for ['barney', 'fred']
|
|
*
|
|
* // The `_.matchesProperty` iteratee shorthand.
|
|
* _.dropRightWhile(users, ['active', false]);
|
|
* // => objects for ['barney']
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.dropRightWhile(users, 'active');
|
|
* // => objects for ['barney', 'fred', 'pebbles']
|
|
*/
|
|
function dropRightWhile(array, predicate) {
|
|
return (array && array.length)
|
|
? baseWhile(array, getIteratee(predicate, 3), true, true)
|
|
: [];
|
|
}
|
|
|
|
/**
|
|
* Creates a slice of `array` excluding elements dropped from the beginning.
|
|
* Elements are dropped until `predicate` returns falsey. The predicate is
|
|
* invoked with three arguments: (value, index, array).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to query.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @returns {Array} Returns the slice of `array`.
|
|
* @example
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney', 'active': false },
|
|
* { 'user': 'fred', 'active': false },
|
|
* { 'user': 'pebbles', 'active': true }
|
|
* ];
|
|
*
|
|
* _.dropWhile(users, function(o) { return !o.active; });
|
|
* // => objects for ['pebbles']
|
|
*
|
|
* // The `_.matches` iteratee shorthand.
|
|
* _.dropWhile(users, { 'user': 'barney', 'active': false });
|
|
* // => objects for ['fred', 'pebbles']
|
|
*
|
|
* // The `_.matchesProperty` iteratee shorthand.
|
|
* _.dropWhile(users, ['active', false]);
|
|
* // => objects for ['pebbles']
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.dropWhile(users, 'active');
|
|
* // => objects for ['barney', 'fred', 'pebbles']
|
|
*/
|
|
function dropWhile(array, predicate) {
|
|
return (array && array.length)
|
|
? baseWhile(array, getIteratee(predicate, 3), true)
|
|
: [];
|
|
}
|
|
|
|
/**
|
|
* Fills elements of `array` with `value` from `start` up to, but not
|
|
* including, `end`.
|
|
*
|
|
* **Note:** This method mutates `array`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.2.0
|
|
* @category Array
|
|
* @param {Array} array The array to fill.
|
|
* @param {*} value The value to fill `array` with.
|
|
* @param {number} [start=0] The start position.
|
|
* @param {number} [end=array.length] The end position.
|
|
* @returns {Array} Returns `array`.
|
|
* @example
|
|
*
|
|
* var array = [1, 2, 3];
|
|
*
|
|
* _.fill(array, 'a');
|
|
* console.log(array);
|
|
* // => ['a', 'a', 'a']
|
|
*
|
|
* _.fill(Array(3), 2);
|
|
* // => [2, 2, 2]
|
|
*
|
|
* _.fill([4, 6, 8, 10], '*', 1, 3);
|
|
* // => [4, '*', '*', 10]
|
|
*/
|
|
function fill(array, value, start, end) {
|
|
var length = array == null ? 0 : array.length;
|
|
if (!length) {
|
|
return [];
|
|
}
|
|
if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
|
|
start = 0;
|
|
end = length;
|
|
}
|
|
return baseFill(array, value, start, end);
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.find` except that it returns the index of the first
|
|
* element `predicate` returns truthy for instead of the element itself.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 1.1.0
|
|
* @category Array
|
|
* @param {Array} array The array to inspect.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @param {number} [fromIndex=0] The index to search from.
|
|
* @returns {number} Returns the index of the found element, else `-1`.
|
|
* @example
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney', 'active': false },
|
|
* { 'user': 'fred', 'active': false },
|
|
* { 'user': 'pebbles', 'active': true }
|
|
* ];
|
|
*
|
|
* _.findIndex(users, function(o) { return o.user == 'barney'; });
|
|
* // => 0
|
|
*
|
|
* // The `_.matches` iteratee shorthand.
|
|
* _.findIndex(users, { 'user': 'fred', 'active': false });
|
|
* // => 1
|
|
*
|
|
* // The `_.matchesProperty` iteratee shorthand.
|
|
* _.findIndex(users, ['active', false]);
|
|
* // => 0
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.findIndex(users, 'active');
|
|
* // => 2
|
|
*/
|
|
function findIndex(array, predicate, fromIndex) {
|
|
var length = array == null ? 0 : array.length;
|
|
if (!length) {
|
|
return -1;
|
|
}
|
|
var index = fromIndex == null ? 0 : toInteger(fromIndex);
|
|
if (index < 0) {
|
|
index = nativeMax(length + index, 0);
|
|
}
|
|
return baseFindIndex(array, getIteratee(predicate, 3), index);
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.findIndex` except that it iterates over elements
|
|
* of `collection` from right to left.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to inspect.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @param {number} [fromIndex=array.length-1] The index to search from.
|
|
* @returns {number} Returns the index of the found element, else `-1`.
|
|
* @example
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney', 'active': true },
|
|
* { 'user': 'fred', 'active': false },
|
|
* { 'user': 'pebbles', 'active': false }
|
|
* ];
|
|
*
|
|
* _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
|
|
* // => 2
|
|
*
|
|
* // The `_.matches` iteratee shorthand.
|
|
* _.findLastIndex(users, { 'user': 'barney', 'active': true });
|
|
* // => 0
|
|
*
|
|
* // The `_.matchesProperty` iteratee shorthand.
|
|
* _.findLastIndex(users, ['active', false]);
|
|
* // => 2
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.findLastIndex(users, 'active');
|
|
* // => 0
|
|
*/
|
|
function findLastIndex(array, predicate, fromIndex) {
|
|
var length = array == null ? 0 : array.length;
|
|
if (!length) {
|
|
return -1;
|
|
}
|
|
var index = length - 1;
|
|
if (fromIndex !== undefined) {
|
|
index = toInteger(fromIndex);
|
|
index = fromIndex < 0
|
|
? nativeMax(length + index, 0)
|
|
: nativeMin(index, length - 1);
|
|
}
|
|
return baseFindIndex(array, getIteratee(predicate, 3), index, true);
|
|
}
|
|
|
|
/**
|
|
* Flattens `array` a single level deep.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {Array} array The array to flatten.
|
|
* @returns {Array} Returns the new flattened array.
|
|
* @example
|
|
*
|
|
* _.flatten([1, [2, [3, [4]], 5]]);
|
|
* // => [1, 2, [3, [4]], 5]
|
|
*/
|
|
function flatten(array) {
|
|
var length = array == null ? 0 : array.length;
|
|
return length ? baseFlatten(array, 1) : [];
|
|
}
|
|
|
|
/**
|
|
* Recursively flattens `array`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to flatten.
|
|
* @returns {Array} Returns the new flattened array.
|
|
* @example
|
|
*
|
|
* _.flattenDeep([1, [2, [3, [4]], 5]]);
|
|
* // => [1, 2, 3, 4, 5]
|
|
*/
|
|
function flattenDeep(array) {
|
|
var length = array == null ? 0 : array.length;
|
|
return length ? baseFlatten(array, INFINITY) : [];
|
|
}
|
|
|
|
/**
|
|
* Recursively flatten `array` up to `depth` times.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.4.0
|
|
* @category Array
|
|
* @param {Array} array The array to flatten.
|
|
* @param {number} [depth=1] The maximum recursion depth.
|
|
* @returns {Array} Returns the new flattened array.
|
|
* @example
|
|
*
|
|
* var array = [1, [2, [3, [4]], 5]];
|
|
*
|
|
* _.flattenDepth(array, 1);
|
|
* // => [1, 2, [3, [4]], 5]
|
|
*
|
|
* _.flattenDepth(array, 2);
|
|
* // => [1, 2, 3, [4], 5]
|
|
*/
|
|
function flattenDepth(array, depth) {
|
|
var length = array == null ? 0 : array.length;
|
|
if (!length) {
|
|
return [];
|
|
}
|
|
depth = depth === undefined ? 1 : toInteger(depth);
|
|
return baseFlatten(array, depth);
|
|
}
|
|
|
|
/**
|
|
* The inverse of `_.toPairs`; this method returns an object composed
|
|
* from key-value `pairs`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Array
|
|
* @param {Array} pairs The key-value pairs.
|
|
* @returns {Object} Returns the new object.
|
|
* @example
|
|
*
|
|
* _.fromPairs([['a', 1], ['b', 2]]);
|
|
* // => { 'a': 1, 'b': 2 }
|
|
*/
|
|
function fromPairs(pairs) {
|
|
var index = -1,
|
|
length = pairs == null ? 0 : pairs.length,
|
|
result = {};
|
|
|
|
while (++index < length) {
|
|
var pair = pairs[index];
|
|
result[pair[0]] = pair[1];
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Gets the first element of `array`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @alias first
|
|
* @category Array
|
|
* @param {Array} array The array to query.
|
|
* @returns {*} Returns the first element of `array`.
|
|
* @example
|
|
*
|
|
* _.head([1, 2, 3]);
|
|
* // => 1
|
|
*
|
|
* _.head([]);
|
|
* // => undefined
|
|
*/
|
|
function head(array) {
|
|
return (array && array.length) ? array[0] : undefined;
|
|
}
|
|
|
|
/**
|
|
* Gets the index at which the first occurrence of `value` is found in `array`
|
|
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
* for equality comparisons. If `fromIndex` is negative, it's used as the
|
|
* offset from the end of `array`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {Array} array The array to inspect.
|
|
* @param {*} value The value to search for.
|
|
* @param {number} [fromIndex=0] The index to search from.
|
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
* @example
|
|
*
|
|
* _.indexOf([1, 2, 1, 2], 2);
|
|
* // => 1
|
|
*
|
|
* // Search from the `fromIndex`.
|
|
* _.indexOf([1, 2, 1, 2], 2, 2);
|
|
* // => 3
|
|
*/
|
|
function indexOf(array, value, fromIndex) {
|
|
var length = array == null ? 0 : array.length;
|
|
if (!length) {
|
|
return -1;
|
|
}
|
|
var index = fromIndex == null ? 0 : toInteger(fromIndex);
|
|
if (index < 0) {
|
|
index = nativeMax(length + index, 0);
|
|
}
|
|
return baseIndexOf(array, value, index);
|
|
}
|
|
|
|
/**
|
|
* Gets all but the last element of `array`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {Array} array The array to query.
|
|
* @returns {Array} Returns the slice of `array`.
|
|
* @example
|
|
*
|
|
* _.initial([1, 2, 3]);
|
|
* // => [1, 2]
|
|
*/
|
|
function initial(array) {
|
|
var length = array == null ? 0 : array.length;
|
|
return length ? baseSlice(array, 0, -1) : [];
|
|
}
|
|
|
|
/**
|
|
* Creates an array of unique values that are included in all given arrays
|
|
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
* for equality comparisons. The order and references of result values are
|
|
* determined by the first array.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {...Array} [arrays] The arrays to inspect.
|
|
* @returns {Array} Returns the new array of intersecting values.
|
|
* @example
|
|
*
|
|
* _.intersection([2, 1], [2, 3]);
|
|
* // => [2]
|
|
*/
|
|
var intersection = baseRest(function(arrays) {
|
|
var mapped = arrayMap(arrays, castArrayLikeObject);
|
|
return (mapped.length && mapped[0] === arrays[0])
|
|
? baseIntersection(mapped)
|
|
: [];
|
|
});
|
|
|
|
/**
|
|
* This method is like `_.intersection` except that it accepts `iteratee`
|
|
* which is invoked for each element of each `arrays` to generate the criterion
|
|
* by which they're compared. The order and references of result values are
|
|
* determined by the first array. The iteratee is invoked with one argument:
|
|
* (value).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Array
|
|
* @param {...Array} [arrays] The arrays to inspect.
|
|
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
|
* @returns {Array} Returns the new array of intersecting values.
|
|
* @example
|
|
*
|
|
* _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
|
|
* // => [2.1]
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
|
|
* // => [{ 'x': 1 }]
|
|
*/
|
|
var intersectionBy = baseRest(function(arrays) {
|
|
var iteratee = last(arrays),
|
|
mapped = arrayMap(arrays, castArrayLikeObject);
|
|
|
|
if (iteratee === last(mapped)) {
|
|
iteratee = undefined;
|
|
} else {
|
|
mapped.pop();
|
|
}
|
|
return (mapped.length && mapped[0] === arrays[0])
|
|
? baseIntersection(mapped, getIteratee(iteratee, 2))
|
|
: [];
|
|
});
|
|
|
|
/**
|
|
* This method is like `_.intersection` except that it accepts `comparator`
|
|
* which is invoked to compare elements of `arrays`. The order and references
|
|
* of result values are determined by the first array. The comparator is
|
|
* invoked with two arguments: (arrVal, othVal).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Array
|
|
* @param {...Array} [arrays] The arrays to inspect.
|
|
* @param {Function} [comparator] The comparator invoked per element.
|
|
* @returns {Array} Returns the new array of intersecting values.
|
|
* @example
|
|
*
|
|
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
|
|
* var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
|
|
*
|
|
* _.intersectionWith(objects, others, _.isEqual);
|
|
* // => [{ 'x': 1, 'y': 2 }]
|
|
*/
|
|
var intersectionWith = baseRest(function(arrays) {
|
|
var comparator = last(arrays),
|
|
mapped = arrayMap(arrays, castArrayLikeObject);
|
|
|
|
comparator = typeof comparator == 'function' ? comparator : undefined;
|
|
if (comparator) {
|
|
mapped.pop();
|
|
}
|
|
return (mapped.length && mapped[0] === arrays[0])
|
|
? baseIntersection(mapped, undefined, comparator)
|
|
: [];
|
|
});
|
|
|
|
/**
|
|
* Converts all elements in `array` into a string separated by `separator`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to convert.
|
|
* @param {string} [separator=','] The element separator.
|
|
* @returns {string} Returns the joined string.
|
|
* @example
|
|
*
|
|
* _.join(['a', 'b', 'c'], '~');
|
|
* // => 'a~b~c'
|
|
*/
|
|
function join(array, separator) {
|
|
return array == null ? '' : nativeJoin.call(array, separator);
|
|
}
|
|
|
|
/**
|
|
* Gets the last element of `array`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {Array} array The array to query.
|
|
* @returns {*} Returns the last element of `array`.
|
|
* @example
|
|
*
|
|
* _.last([1, 2, 3]);
|
|
* // => 3
|
|
*/
|
|
function last(array) {
|
|
var length = array == null ? 0 : array.length;
|
|
return length ? array[length - 1] : undefined;
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.indexOf` except that it iterates over elements of
|
|
* `array` from right to left.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {Array} array The array to inspect.
|
|
* @param {*} value The value to search for.
|
|
* @param {number} [fromIndex=array.length-1] The index to search from.
|
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
* @example
|
|
*
|
|
* _.lastIndexOf([1, 2, 1, 2], 2);
|
|
* // => 3
|
|
*
|
|
* // Search from the `fromIndex`.
|
|
* _.lastIndexOf([1, 2, 1, 2], 2, 2);
|
|
* // => 1
|
|
*/
|
|
function lastIndexOf(array, value, fromIndex) {
|
|
var length = array == null ? 0 : array.length;
|
|
if (!length) {
|
|
return -1;
|
|
}
|
|
var index = length;
|
|
if (fromIndex !== undefined) {
|
|
index = toInteger(fromIndex);
|
|
index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
|
|
}
|
|
return value === value
|
|
? strictLastIndexOf(array, value, index)
|
|
: baseFindIndex(array, baseIsNaN, index, true);
|
|
}
|
|
|
|
/**
|
|
* Gets the element at index `n` of `array`. If `n` is negative, the nth
|
|
* element from the end is returned.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.11.0
|
|
* @category Array
|
|
* @param {Array} array The array to query.
|
|
* @param {number} [n=0] The index of the element to return.
|
|
* @returns {*} Returns the nth element of `array`.
|
|
* @example
|
|
*
|
|
* var array = ['a', 'b', 'c', 'd'];
|
|
*
|
|
* _.nth(array, 1);
|
|
* // => 'b'
|
|
*
|
|
* _.nth(array, -2);
|
|
* // => 'c';
|
|
*/
|
|
function nth(array, n) {
|
|
return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
|
|
}
|
|
|
|
/**
|
|
* Removes all given values from `array` using
|
|
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
* for equality comparisons.
|
|
*
|
|
* **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
|
|
* to remove elements from an array by predicate.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to modify.
|
|
* @param {...*} [values] The values to remove.
|
|
* @returns {Array} Returns `array`.
|
|
* @example
|
|
*
|
|
* var array = ['a', 'b', 'c', 'a', 'b', 'c'];
|
|
*
|
|
* _.pull(array, 'a', 'c');
|
|
* console.log(array);
|
|
* // => ['b', 'b']
|
|
*/
|
|
var pull = baseRest(pullAll);
|
|
|
|
/**
|
|
* This method is like `_.pull` except that it accepts an array of values to remove.
|
|
*
|
|
* **Note:** Unlike `_.difference`, this method mutates `array`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to modify.
|
|
* @param {Array} values The values to remove.
|
|
* @returns {Array} Returns `array`.
|
|
* @example
|
|
*
|
|
* var array = ['a', 'b', 'c', 'a', 'b', 'c'];
|
|
*
|
|
* _.pullAll(array, ['a', 'c']);
|
|
* console.log(array);
|
|
* // => ['b', 'b']
|
|
*/
|
|
function pullAll(array, values) {
|
|
return (array && array.length && values && values.length)
|
|
? basePullAll(array, values)
|
|
: array;
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.pullAll` except that it accepts `iteratee` which is
|
|
* invoked for each element of `array` and `values` to generate the criterion
|
|
* by which they're compared. The iteratee is invoked with one argument: (value).
|
|
*
|
|
* **Note:** Unlike `_.differenceBy`, this method mutates `array`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to modify.
|
|
* @param {Array} values The values to remove.
|
|
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
|
* @returns {Array} Returns `array`.
|
|
* @example
|
|
*
|
|
* var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
|
|
*
|
|
* _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
|
|
* console.log(array);
|
|
* // => [{ 'x': 2 }]
|
|
*/
|
|
function pullAllBy(array, values, iteratee) {
|
|
return (array && array.length && values && values.length)
|
|
? basePullAll(array, values, getIteratee(iteratee, 2))
|
|
: array;
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.pullAll` except that it accepts `comparator` which
|
|
* is invoked to compare elements of `array` to `values`. The comparator is
|
|
* invoked with two arguments: (arrVal, othVal).
|
|
*
|
|
* **Note:** Unlike `_.differenceWith`, this method mutates `array`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.6.0
|
|
* @category Array
|
|
* @param {Array} array The array to modify.
|
|
* @param {Array} values The values to remove.
|
|
* @param {Function} [comparator] The comparator invoked per element.
|
|
* @returns {Array} Returns `array`.
|
|
* @example
|
|
*
|
|
* var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
|
|
*
|
|
* _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
|
|
* console.log(array);
|
|
* // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
|
|
*/
|
|
function pullAllWith(array, values, comparator) {
|
|
return (array && array.length && values && values.length)
|
|
? basePullAll(array, values, undefined, comparator)
|
|
: array;
|
|
}
|
|
|
|
/**
|
|
* Removes elements from `array` corresponding to `indexes` and returns an
|
|
* array of removed elements.
|
|
*
|
|
* **Note:** Unlike `_.at`, this method mutates `array`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to modify.
|
|
* @param {...(number|number[])} [indexes] The indexes of elements to remove.
|
|
* @returns {Array} Returns the new array of removed elements.
|
|
* @example
|
|
*
|
|
* var array = ['a', 'b', 'c', 'd'];
|
|
* var pulled = _.pullAt(array, [1, 3]);
|
|
*
|
|
* console.log(array);
|
|
* // => ['a', 'c']
|
|
*
|
|
* console.log(pulled);
|
|
* // => ['b', 'd']
|
|
*/
|
|
var pullAt = flatRest(function(array, indexes) {
|
|
var length = array == null ? 0 : array.length,
|
|
result = baseAt(array, indexes);
|
|
|
|
basePullAt(array, arrayMap(indexes, function(index) {
|
|
return isIndex(index, length) ? +index : index;
|
|
}).sort(compareAscending));
|
|
|
|
return result;
|
|
});
|
|
|
|
/**
|
|
* Removes all elements from `array` that `predicate` returns truthy for
|
|
* and returns an array of the removed elements. The predicate is invoked
|
|
* with three arguments: (value, index, array).
|
|
*
|
|
* **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
|
|
* to pull elements from an array by value.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to modify.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @returns {Array} Returns the new array of removed elements.
|
|
* @example
|
|
*
|
|
* var array = [1, 2, 3, 4];
|
|
* var evens = _.remove(array, function(n) {
|
|
* return n % 2 == 0;
|
|
* });
|
|
*
|
|
* console.log(array);
|
|
* // => [1, 3]
|
|
*
|
|
* console.log(evens);
|
|
* // => [2, 4]
|
|
*/
|
|
function remove(array, predicate) {
|
|
var result = [];
|
|
if (!(array && array.length)) {
|
|
return result;
|
|
}
|
|
var index = -1,
|
|
indexes = [],
|
|
length = array.length;
|
|
|
|
predicate = getIteratee(predicate, 3);
|
|
while (++index < length) {
|
|
var value = array[index];
|
|
if (predicate(value, index, array)) {
|
|
result.push(value);
|
|
indexes.push(index);
|
|
}
|
|
}
|
|
basePullAt(array, indexes);
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Reverses `array` so that the first element becomes the last, the second
|
|
* element becomes the second to last, and so on.
|
|
*
|
|
* **Note:** This method mutates `array` and is based on
|
|
* [`Array#reverse`](https://mdn.io/Array/reverse).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to modify.
|
|
* @returns {Array} Returns `array`.
|
|
* @example
|
|
*
|
|
* var array = [1, 2, 3];
|
|
*
|
|
* _.reverse(array);
|
|
* // => [3, 2, 1]
|
|
*
|
|
* console.log(array);
|
|
* // => [3, 2, 1]
|
|
*/
|
|
function reverse(array) {
|
|
return array == null ? array : nativeReverse.call(array);
|
|
}
|
|
|
|
/**
|
|
* Creates a slice of `array` from `start` up to, but not including, `end`.
|
|
*
|
|
* **Note:** This method is used instead of
|
|
* [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
|
|
* returned.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to slice.
|
|
* @param {number} [start=0] The start position.
|
|
* @param {number} [end=array.length] The end position.
|
|
* @returns {Array} Returns the slice of `array`.
|
|
*/
|
|
function slice(array, start, end) {
|
|
var length = array == null ? 0 : array.length;
|
|
if (!length) {
|
|
return [];
|
|
}
|
|
if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
|
|
start = 0;
|
|
end = length;
|
|
}
|
|
else {
|
|
start = start == null ? 0 : toInteger(start);
|
|
end = end === undefined ? length : toInteger(end);
|
|
}
|
|
return baseSlice(array, start, end);
|
|
}
|
|
|
|
/**
|
|
* Uses a binary search to determine the lowest index at which `value`
|
|
* should be inserted into `array` in order to maintain its sort order.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {Array} array The sorted array to inspect.
|
|
* @param {*} value The value to evaluate.
|
|
* @returns {number} Returns the index at which `value` should be inserted
|
|
* into `array`.
|
|
* @example
|
|
*
|
|
* _.sortedIndex([30, 50], 40);
|
|
* // => 1
|
|
*/
|
|
function sortedIndex(array, value) {
|
|
return baseSortedIndex(array, value);
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.sortedIndex` except that it accepts `iteratee`
|
|
* which is invoked for `value` and each element of `array` to compute their
|
|
* sort ranking. The iteratee is invoked with one argument: (value).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Array
|
|
* @param {Array} array The sorted array to inspect.
|
|
* @param {*} value The value to evaluate.
|
|
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
|
* @returns {number} Returns the index at which `value` should be inserted
|
|
* into `array`.
|
|
* @example
|
|
*
|
|
* var objects = [{ 'x': 4 }, { 'x': 5 }];
|
|
*
|
|
* _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
|
|
* // => 0
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.sortedIndexBy(objects, { 'x': 4 }, 'x');
|
|
* // => 0
|
|
*/
|
|
function sortedIndexBy(array, value, iteratee) {
|
|
return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.indexOf` except that it performs a binary
|
|
* search on a sorted `array`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to inspect.
|
|
* @param {*} value The value to search for.
|
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
* @example
|
|
*
|
|
* _.sortedIndexOf([4, 5, 5, 5, 6], 5);
|
|
* // => 1
|
|
*/
|
|
function sortedIndexOf(array, value) {
|
|
var length = array == null ? 0 : array.length;
|
|
if (length) {
|
|
var index = baseSortedIndex(array, value);
|
|
if (index < length && eq(array[index], value)) {
|
|
return index;
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.sortedIndex` except that it returns the highest
|
|
* index at which `value` should be inserted into `array` in order to
|
|
* maintain its sort order.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Array
|
|
* @param {Array} array The sorted array to inspect.
|
|
* @param {*} value The value to evaluate.
|
|
* @returns {number} Returns the index at which `value` should be inserted
|
|
* into `array`.
|
|
* @example
|
|
*
|
|
* _.sortedLastIndex([4, 5, 5, 5, 6], 5);
|
|
* // => 4
|
|
*/
|
|
function sortedLastIndex(array, value) {
|
|
return baseSortedIndex(array, value, true);
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.sortedLastIndex` except that it accepts `iteratee`
|
|
* which is invoked for `value` and each element of `array` to compute their
|
|
* sort ranking. The iteratee is invoked with one argument: (value).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Array
|
|
* @param {Array} array The sorted array to inspect.
|
|
* @param {*} value The value to evaluate.
|
|
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
|
* @returns {number} Returns the index at which `value` should be inserted
|
|
* into `array`.
|
|
* @example
|
|
*
|
|
* var objects = [{ 'x': 4 }, { 'x': 5 }];
|
|
*
|
|
* _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
|
|
* // => 1
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
|
|
* // => 1
|
|
*/
|
|
function sortedLastIndexBy(array, value, iteratee) {
|
|
return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.lastIndexOf` except that it performs a binary
|
|
* search on a sorted `array`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to inspect.
|
|
* @param {*} value The value to search for.
|
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
* @example
|
|
*
|
|
* _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
|
|
* // => 3
|
|
*/
|
|
function sortedLastIndexOf(array, value) {
|
|
var length = array == null ? 0 : array.length;
|
|
if (length) {
|
|
var index = baseSortedIndex(array, value, true) - 1;
|
|
if (eq(array[index], value)) {
|
|
return index;
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.uniq` except that it's designed and optimized
|
|
* for sorted arrays.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to inspect.
|
|
* @returns {Array} Returns the new duplicate free array.
|
|
* @example
|
|
*
|
|
* _.sortedUniq([1, 1, 2]);
|
|
* // => [1, 2]
|
|
*/
|
|
function sortedUniq(array) {
|
|
return (array && array.length)
|
|
? baseSortedUniq(array)
|
|
: [];
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.uniqBy` except that it's designed and optimized
|
|
* for sorted arrays.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to inspect.
|
|
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
* @returns {Array} Returns the new duplicate free array.
|
|
* @example
|
|
*
|
|
* _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
|
|
* // => [1.1, 2.3]
|
|
*/
|
|
function sortedUniqBy(array, iteratee) {
|
|
return (array && array.length)
|
|
? baseSortedUniq(array, getIteratee(iteratee, 2))
|
|
: [];
|
|
}
|
|
|
|
/**
|
|
* Gets all but the first element of `array`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to query.
|
|
* @returns {Array} Returns the slice of `array`.
|
|
* @example
|
|
*
|
|
* _.tail([1, 2, 3]);
|
|
* // => [2, 3]
|
|
*/
|
|
function tail(array) {
|
|
var length = array == null ? 0 : array.length;
|
|
return length ? baseSlice(array, 1, length) : [];
|
|
}
|
|
|
|
/**
|
|
* Creates a slice of `array` with `n` elements taken from the beginning.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {Array} array The array to query.
|
|
* @param {number} [n=1] The number of elements to take.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
* @returns {Array} Returns the slice of `array`.
|
|
* @example
|
|
*
|
|
* _.take([1, 2, 3]);
|
|
* // => [1]
|
|
*
|
|
* _.take([1, 2, 3], 2);
|
|
* // => [1, 2]
|
|
*
|
|
* _.take([1, 2, 3], 5);
|
|
* // => [1, 2, 3]
|
|
*
|
|
* _.take([1, 2, 3], 0);
|
|
* // => []
|
|
*/
|
|
function take(array, n, guard) {
|
|
if (!(array && array.length)) {
|
|
return [];
|
|
}
|
|
n = (guard || n === undefined) ? 1 : toInteger(n);
|
|
return baseSlice(array, 0, n < 0 ? 0 : n);
|
|
}
|
|
|
|
/**
|
|
* Creates a slice of `array` with `n` elements taken from the end.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to query.
|
|
* @param {number} [n=1] The number of elements to take.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
* @returns {Array} Returns the slice of `array`.
|
|
* @example
|
|
*
|
|
* _.takeRight([1, 2, 3]);
|
|
* // => [3]
|
|
*
|
|
* _.takeRight([1, 2, 3], 2);
|
|
* // => [2, 3]
|
|
*
|
|
* _.takeRight([1, 2, 3], 5);
|
|
* // => [1, 2, 3]
|
|
*
|
|
* _.takeRight([1, 2, 3], 0);
|
|
* // => []
|
|
*/
|
|
function takeRight(array, n, guard) {
|
|
var length = array == null ? 0 : array.length;
|
|
if (!length) {
|
|
return [];
|
|
}
|
|
n = (guard || n === undefined) ? 1 : toInteger(n);
|
|
n = length - n;
|
|
return baseSlice(array, n < 0 ? 0 : n, length);
|
|
}
|
|
|
|
/**
|
|
* Creates a slice of `array` with elements taken from the end. Elements are
|
|
* taken until `predicate` returns falsey. The predicate is invoked with
|
|
* three arguments: (value, index, array).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to query.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @returns {Array} Returns the slice of `array`.
|
|
* @example
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney', 'active': true },
|
|
* { 'user': 'fred', 'active': false },
|
|
* { 'user': 'pebbles', 'active': false }
|
|
* ];
|
|
*
|
|
* _.takeRightWhile(users, function(o) { return !o.active; });
|
|
* // => objects for ['fred', 'pebbles']
|
|
*
|
|
* // The `_.matches` iteratee shorthand.
|
|
* _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
|
|
* // => objects for ['pebbles']
|
|
*
|
|
* // The `_.matchesProperty` iteratee shorthand.
|
|
* _.takeRightWhile(users, ['active', false]);
|
|
* // => objects for ['fred', 'pebbles']
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.takeRightWhile(users, 'active');
|
|
* // => []
|
|
*/
|
|
function takeRightWhile(array, predicate) {
|
|
return (array && array.length)
|
|
? baseWhile(array, getIteratee(predicate, 3), false, true)
|
|
: [];
|
|
}
|
|
|
|
/**
|
|
* Creates a slice of `array` with elements taken from the beginning. Elements
|
|
* are taken until `predicate` returns falsey. The predicate is invoked with
|
|
* three arguments: (value, index, array).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to query.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @returns {Array} Returns the slice of `array`.
|
|
* @example
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney', 'active': false },
|
|
* { 'user': 'fred', 'active': false },
|
|
* { 'user': 'pebbles', 'active': true }
|
|
* ];
|
|
*
|
|
* _.takeWhile(users, function(o) { return !o.active; });
|
|
* // => objects for ['barney', 'fred']
|
|
*
|
|
* // The `_.matches` iteratee shorthand.
|
|
* _.takeWhile(users, { 'user': 'barney', 'active': false });
|
|
* // => objects for ['barney']
|
|
*
|
|
* // The `_.matchesProperty` iteratee shorthand.
|
|
* _.takeWhile(users, ['active', false]);
|
|
* // => objects for ['barney', 'fred']
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.takeWhile(users, 'active');
|
|
* // => []
|
|
*/
|
|
function takeWhile(array, predicate) {
|
|
return (array && array.length)
|
|
? baseWhile(array, getIteratee(predicate, 3))
|
|
: [];
|
|
}
|
|
|
|
/**
|
|
* Creates an array of unique values, in order, from all given arrays using
|
|
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
* for equality comparisons.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {...Array} [arrays] The arrays to inspect.
|
|
* @returns {Array} Returns the new array of combined values.
|
|
* @example
|
|
*
|
|
* _.union([2], [1, 2]);
|
|
* // => [2, 1]
|
|
*/
|
|
var union = baseRest(function(arrays) {
|
|
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
|
|
});
|
|
|
|
/**
|
|
* This method is like `_.union` except that it accepts `iteratee` which is
|
|
* invoked for each element of each `arrays` to generate the criterion by
|
|
* which uniqueness is computed. Result values are chosen from the first
|
|
* array in which the value occurs. The iteratee is invoked with one argument:
|
|
* (value).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Array
|
|
* @param {...Array} [arrays] The arrays to inspect.
|
|
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
|
* @returns {Array} Returns the new array of combined values.
|
|
* @example
|
|
*
|
|
* _.unionBy([2.1], [1.2, 2.3], Math.floor);
|
|
* // => [2.1, 1.2]
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
|
|
* // => [{ 'x': 1 }, { 'x': 2 }]
|
|
*/
|
|
var unionBy = baseRest(function(arrays) {
|
|
var iteratee = last(arrays);
|
|
if (isArrayLikeObject(iteratee)) {
|
|
iteratee = undefined;
|
|
}
|
|
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
|
|
});
|
|
|
|
/**
|
|
* This method is like `_.union` except that it accepts `comparator` which
|
|
* is invoked to compare elements of `arrays`. Result values are chosen from
|
|
* the first array in which the value occurs. The comparator is invoked
|
|
* with two arguments: (arrVal, othVal).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Array
|
|
* @param {...Array} [arrays] The arrays to inspect.
|
|
* @param {Function} [comparator] The comparator invoked per element.
|
|
* @returns {Array} Returns the new array of combined values.
|
|
* @example
|
|
*
|
|
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
|
|
* var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
|
|
*
|
|
* _.unionWith(objects, others, _.isEqual);
|
|
* // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
|
|
*/
|
|
var unionWith = baseRest(function(arrays) {
|
|
var comparator = last(arrays);
|
|
comparator = typeof comparator == 'function' ? comparator : undefined;
|
|
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
|
|
});
|
|
|
|
/**
|
|
* Creates a duplicate-free version of an array, using
|
|
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
* for equality comparisons, in which only the first occurrence of each element
|
|
* is kept. The order of result values is determined by the order they occur
|
|
* in the array.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {Array} array The array to inspect.
|
|
* @returns {Array} Returns the new duplicate free array.
|
|
* @example
|
|
*
|
|
* _.uniq([2, 1, 2]);
|
|
* // => [2, 1]
|
|
*/
|
|
function uniq(array) {
|
|
return (array && array.length) ? baseUniq(array) : [];
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.uniq` except that it accepts `iteratee` which is
|
|
* invoked for each element in `array` to generate the criterion by which
|
|
* uniqueness is computed. The order of result values is determined by the
|
|
* order they occur in the array. The iteratee is invoked with one argument:
|
|
* (value).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to inspect.
|
|
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
|
* @returns {Array} Returns the new duplicate free array.
|
|
* @example
|
|
*
|
|
* _.uniqBy([2.1, 1.2, 2.3], Math.floor);
|
|
* // => [2.1, 1.2]
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
|
|
* // => [{ 'x': 1 }, { 'x': 2 }]
|
|
*/
|
|
function uniqBy(array, iteratee) {
|
|
return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.uniq` except that it accepts `comparator` which
|
|
* is invoked to compare elements of `array`. The order of result values is
|
|
* determined by the order they occur in the array.The comparator is invoked
|
|
* with two arguments: (arrVal, othVal).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to inspect.
|
|
* @param {Function} [comparator] The comparator invoked per element.
|
|
* @returns {Array} Returns the new duplicate free array.
|
|
* @example
|
|
*
|
|
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
|
|
*
|
|
* _.uniqWith(objects, _.isEqual);
|
|
* // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
|
|
*/
|
|
function uniqWith(array, comparator) {
|
|
comparator = typeof comparator == 'function' ? comparator : undefined;
|
|
return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.zip` except that it accepts an array of grouped
|
|
* elements and creates an array regrouping the elements to their pre-zip
|
|
* configuration.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 1.2.0
|
|
* @category Array
|
|
* @param {Array} array The array of grouped elements to process.
|
|
* @returns {Array} Returns the new array of regrouped elements.
|
|
* @example
|
|
*
|
|
* var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
|
|
* // => [['a', 1, true], ['b', 2, false]]
|
|
*
|
|
* _.unzip(zipped);
|
|
* // => [['a', 'b'], [1, 2], [true, false]]
|
|
*/
|
|
function unzip(array) {
|
|
if (!(array && array.length)) {
|
|
return [];
|
|
}
|
|
var length = 0;
|
|
array = arrayFilter(array, function(group) {
|
|
if (isArrayLikeObject(group)) {
|
|
length = nativeMax(group.length, length);
|
|
return true;
|
|
}
|
|
});
|
|
return baseTimes(length, function(index) {
|
|
return arrayMap(array, baseProperty(index));
|
|
});
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.unzip` except that it accepts `iteratee` to specify
|
|
* how regrouped values should be combined. The iteratee is invoked with the
|
|
* elements of each group: (...group).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.8.0
|
|
* @category Array
|
|
* @param {Array} array The array of grouped elements to process.
|
|
* @param {Function} [iteratee=_.identity] The function to combine
|
|
* regrouped values.
|
|
* @returns {Array} Returns the new array of regrouped elements.
|
|
* @example
|
|
*
|
|
* var zipped = _.zip([1, 2], [10, 20], [100, 200]);
|
|
* // => [[1, 10, 100], [2, 20, 200]]
|
|
*
|
|
* _.unzipWith(zipped, _.add);
|
|
* // => [3, 30, 300]
|
|
*/
|
|
function unzipWith(array, iteratee) {
|
|
if (!(array && array.length)) {
|
|
return [];
|
|
}
|
|
var result = unzip(array);
|
|
if (iteratee == null) {
|
|
return result;
|
|
}
|
|
return arrayMap(result, function(group) {
|
|
return apply(iteratee, undefined, group);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Creates an array excluding all given values using
|
|
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
* for equality comparisons.
|
|
*
|
|
* **Note:** Unlike `_.pull`, this method returns a new array.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {Array} array The array to inspect.
|
|
* @param {...*} [values] The values to exclude.
|
|
* @returns {Array} Returns the new array of filtered values.
|
|
* @see _.difference, _.xor
|
|
* @example
|
|
*
|
|
* _.without([2, 1, 2, 3], 1, 2);
|
|
* // => [3]
|
|
*/
|
|
var without = baseRest(function(array, values) {
|
|
return isArrayLikeObject(array)
|
|
? baseDifference(array, values)
|
|
: [];
|
|
});
|
|
|
|
/**
|
|
* Creates an array of unique values that is the
|
|
* [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
|
|
* of the given arrays. The order of result values is determined by the order
|
|
* they occur in the arrays.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.4.0
|
|
* @category Array
|
|
* @param {...Array} [arrays] The arrays to inspect.
|
|
* @returns {Array} Returns the new array of filtered values.
|
|
* @see _.difference, _.without
|
|
* @example
|
|
*
|
|
* _.xor([2, 1], [2, 3]);
|
|
* // => [1, 3]
|
|
*/
|
|
var xor = baseRest(function(arrays) {
|
|
return baseXor(arrayFilter(arrays, isArrayLikeObject));
|
|
});
|
|
|
|
/**
|
|
* This method is like `_.xor` except that it accepts `iteratee` which is
|
|
* invoked for each element of each `arrays` to generate the criterion by
|
|
* which by which they're compared. The order of result values is determined
|
|
* by the order they occur in the arrays. The iteratee is invoked with one
|
|
* argument: (value).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Array
|
|
* @param {...Array} [arrays] The arrays to inspect.
|
|
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
|
* @returns {Array} Returns the new array of filtered values.
|
|
* @example
|
|
*
|
|
* _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
|
|
* // => [1.2, 3.4]
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
|
|
* // => [{ 'x': 2 }]
|
|
*/
|
|
var xorBy = baseRest(function(arrays) {
|
|
var iteratee = last(arrays);
|
|
if (isArrayLikeObject(iteratee)) {
|
|
iteratee = undefined;
|
|
}
|
|
return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
|
|
});
|
|
|
|
/**
|
|
* This method is like `_.xor` except that it accepts `comparator` which is
|
|
* invoked to compare elements of `arrays`. The order of result values is
|
|
* determined by the order they occur in the arrays. The comparator is invoked
|
|
* with two arguments: (arrVal, othVal).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Array
|
|
* @param {...Array} [arrays] The arrays to inspect.
|
|
* @param {Function} [comparator] The comparator invoked per element.
|
|
* @returns {Array} Returns the new array of filtered values.
|
|
* @example
|
|
*
|
|
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
|
|
* var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
|
|
*
|
|
* _.xorWith(objects, others, _.isEqual);
|
|
* // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
|
|
*/
|
|
var xorWith = baseRest(function(arrays) {
|
|
var comparator = last(arrays);
|
|
comparator = typeof comparator == 'function' ? comparator : undefined;
|
|
return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
|
|
});
|
|
|
|
/**
|
|
* Creates an array of grouped elements, the first of which contains the
|
|
* first elements of the given arrays, the second of which contains the
|
|
* second elements of the given arrays, and so on.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {...Array} [arrays] The arrays to process.
|
|
* @returns {Array} Returns the new array of grouped elements.
|
|
* @example
|
|
*
|
|
* _.zip(['a', 'b'], [1, 2], [true, false]);
|
|
* // => [['a', 1, true], ['b', 2, false]]
|
|
*/
|
|
var zip = baseRest(unzip);
|
|
|
|
/**
|
|
* This method is like `_.fromPairs` except that it accepts two arrays,
|
|
* one of property identifiers and one of corresponding values.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.4.0
|
|
* @category Array
|
|
* @param {Array} [props=[]] The property identifiers.
|
|
* @param {Array} [values=[]] The property values.
|
|
* @returns {Object} Returns the new object.
|
|
* @example
|
|
*
|
|
* _.zipObject(['a', 'b'], [1, 2]);
|
|
* // => { 'a': 1, 'b': 2 }
|
|
*/
|
|
function zipObject(props, values) {
|
|
return baseZipObject(props || [], values || [], assignValue);
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.zipObject` except that it supports property paths.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.1.0
|
|
* @category Array
|
|
* @param {Array} [props=[]] The property identifiers.
|
|
* @param {Array} [values=[]] The property values.
|
|
* @returns {Object} Returns the new object.
|
|
* @example
|
|
*
|
|
* _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
|
|
* // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
|
|
*/
|
|
function zipObjectDeep(props, values) {
|
|
return baseZipObject(props || [], values || [], baseSet);
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.zip` except that it accepts `iteratee` to specify
|
|
* how grouped values should be combined. The iteratee is invoked with the
|
|
* elements of each group: (...group).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.8.0
|
|
* @category Array
|
|
* @param {...Array} [arrays] The arrays to process.
|
|
* @param {Function} [iteratee=_.identity] The function to combine
|
|
* grouped values.
|
|
* @returns {Array} Returns the new array of grouped elements.
|
|
* @example
|
|
*
|
|
* _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
|
|
* return a + b + c;
|
|
* });
|
|
* // => [111, 222]
|
|
*/
|
|
var zipWith = baseRest(function(arrays) {
|
|
var length = arrays.length,
|
|
iteratee = length > 1 ? arrays[length - 1] : undefined;
|
|
|
|
iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
|
|
return unzipWith(arrays, iteratee);
|
|
});
|
|
|
|
/*------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
* Creates a `lodash` wrapper instance that wraps `value` with explicit method
|
|
* chain sequences enabled. The result of such sequences must be unwrapped
|
|
* with `_#value`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 1.3.0
|
|
* @category Seq
|
|
* @param {*} value The value to wrap.
|
|
* @returns {Object} Returns the new `lodash` wrapper instance.
|
|
* @example
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney', 'age': 36 },
|
|
* { 'user': 'fred', 'age': 40 },
|
|
* { 'user': 'pebbles', 'age': 1 }
|
|
* ];
|
|
*
|
|
* var youngest = _
|
|
* .chain(users)
|
|
* .sortBy('age')
|
|
* .map(function(o) {
|
|
* return o.user + ' is ' + o.age;
|
|
* })
|
|
* .head()
|
|
* .value();
|
|
* // => 'pebbles is 1'
|
|
*/
|
|
function chain(value) {
|
|
var result = lodash(value);
|
|
result.__chain__ = true;
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* This method invokes `interceptor` and returns `value`. The interceptor
|
|
* is invoked with one argument; (value). The purpose of this method is to
|
|
* "tap into" a method chain sequence in order to modify intermediate results.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Seq
|
|
* @param {*} value The value to provide to `interceptor`.
|
|
* @param {Function} interceptor The function to invoke.
|
|
* @returns {*} Returns `value`.
|
|
* @example
|
|
*
|
|
* _([1, 2, 3])
|
|
* .tap(function(array) {
|
|
* // Mutate input array.
|
|
* array.pop();
|
|
* })
|
|
* .reverse()
|
|
* .value();
|
|
* // => [2, 1]
|
|
*/
|
|
function tap(value, interceptor) {
|
|
interceptor(value);
|
|
return value;
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.tap` except that it returns the result of `interceptor`.
|
|
* The purpose of this method is to "pass thru" values replacing intermediate
|
|
* results in a method chain sequence.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Seq
|
|
* @param {*} value The value to provide to `interceptor`.
|
|
* @param {Function} interceptor The function to invoke.
|
|
* @returns {*} Returns the result of `interceptor`.
|
|
* @example
|
|
*
|
|
* _(' abc ')
|
|
* .chain()
|
|
* .trim()
|
|
* .thru(function(value) {
|
|
* return [value];
|
|
* })
|
|
* .value();
|
|
* // => ['abc']
|
|
*/
|
|
function thru(value, interceptor) {
|
|
return interceptor(value);
|
|
}
|
|
|
|
/**
|
|
* This method is the wrapper version of `_.at`.
|
|
*
|
|
* @name at
|
|
* @memberOf _
|
|
* @since 1.0.0
|
|
* @category Seq
|
|
* @param {...(string|string[])} [paths] The property paths to pick.
|
|
* @returns {Object} Returns the new `lodash` wrapper instance.
|
|
* @example
|
|
*
|
|
* var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
|
|
*
|
|
* _(object).at(['a[0].b.c', 'a[1]']).value();
|
|
* // => [3, 4]
|
|
*/
|
|
var wrapperAt = flatRest(function(paths) {
|
|
var length = paths.length,
|
|
start = length ? paths[0] : 0,
|
|
value = this.__wrapped__,
|
|
interceptor = function(object) { return baseAt(object, paths); };
|
|
|
|
if (length > 1 || this.__actions__.length ||
|
|
!(value instanceof LazyWrapper) || !isIndex(start)) {
|
|
return this.thru(interceptor);
|
|
}
|
|
value = value.slice(start, +start + (length ? 1 : 0));
|
|
value.__actions__.push({
|
|
'func': thru,
|
|
'args': [interceptor],
|
|
'thisArg': undefined
|
|
});
|
|
return new LodashWrapper(value, this.__chain__).thru(function(array) {
|
|
if (length && !array.length) {
|
|
array.push(undefined);
|
|
}
|
|
return array;
|
|
});
|
|
});
|
|
|
|
/**
|
|
* Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
|
|
*
|
|
* @name chain
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Seq
|
|
* @returns {Object} Returns the new `lodash` wrapper instance.
|
|
* @example
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney', 'age': 36 },
|
|
* { 'user': 'fred', 'age': 40 }
|
|
* ];
|
|
*
|
|
* // A sequence without explicit chaining.
|
|
* _(users).head();
|
|
* // => { 'user': 'barney', 'age': 36 }
|
|
*
|
|
* // A sequence with explicit chaining.
|
|
* _(users)
|
|
* .chain()
|
|
* .head()
|
|
* .pick('user')
|
|
* .value();
|
|
* // => { 'user': 'barney' }
|
|
*/
|
|
function wrapperChain() {
|
|
return chain(this);
|
|
}
|
|
|
|
/**
|
|
* Executes the chain sequence and returns the wrapped result.
|
|
*
|
|
* @name commit
|
|
* @memberOf _
|
|
* @since 3.2.0
|
|
* @category Seq
|
|
* @returns {Object} Returns the new `lodash` wrapper instance.
|
|
* @example
|
|
*
|
|
* var array = [1, 2];
|
|
* var wrapped = _(array).push(3);
|
|
*
|
|
* console.log(array);
|
|
* // => [1, 2]
|
|
*
|
|
* wrapped = wrapped.commit();
|
|
* console.log(array);
|
|
* // => [1, 2, 3]
|
|
*
|
|
* wrapped.last();
|
|
* // => 3
|
|
*
|
|
* console.log(array);
|
|
* // => [1, 2, 3]
|
|
*/
|
|
function wrapperCommit() {
|
|
return new LodashWrapper(this.value(), this.__chain__);
|
|
}
|
|
|
|
/**
|
|
* Gets the next value on a wrapped object following the
|
|
* [iterator protocol](https://mdn.io/iteration_protocols#iterator).
|
|
*
|
|
* @name next
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Seq
|
|
* @returns {Object} Returns the next iterator value.
|
|
* @example
|
|
*
|
|
* var wrapped = _([1, 2]);
|
|
*
|
|
* wrapped.next();
|
|
* // => { 'done': false, 'value': 1 }
|
|
*
|
|
* wrapped.next();
|
|
* // => { 'done': false, 'value': 2 }
|
|
*
|
|
* wrapped.next();
|
|
* // => { 'done': true, 'value': undefined }
|
|
*/
|
|
function wrapperNext() {
|
|
if (this.__values__ === undefined) {
|
|
this.__values__ = toArray(this.value());
|
|
}
|
|
var done = this.__index__ >= this.__values__.length,
|
|
value = done ? undefined : this.__values__[this.__index__++];
|
|
|
|
return { 'done': done, 'value': value };
|
|
}
|
|
|
|
/**
|
|
* Enables the wrapper to be iterable.
|
|
*
|
|
* @name Symbol.iterator
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Seq
|
|
* @returns {Object} Returns the wrapper object.
|
|
* @example
|
|
*
|
|
* var wrapped = _([1, 2]);
|
|
*
|
|
* wrapped[Symbol.iterator]() === wrapped;
|
|
* // => true
|
|
*
|
|
* Array.from(wrapped);
|
|
* // => [1, 2]
|
|
*/
|
|
function wrapperToIterator() {
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Creates a clone of the chain sequence planting `value` as the wrapped value.
|
|
*
|
|
* @name plant
|
|
* @memberOf _
|
|
* @since 3.2.0
|
|
* @category Seq
|
|
* @param {*} value The value to plant.
|
|
* @returns {Object} Returns the new `lodash` wrapper instance.
|
|
* @example
|
|
*
|
|
* function square(n) {
|
|
* return n * n;
|
|
* }
|
|
*
|
|
* var wrapped = _([1, 2]).map(square);
|
|
* var other = wrapped.plant([3, 4]);
|
|
*
|
|
* other.value();
|
|
* // => [9, 16]
|
|
*
|
|
* wrapped.value();
|
|
* // => [1, 4]
|
|
*/
|
|
function wrapperPlant(value) {
|
|
var result,
|
|
parent = this;
|
|
|
|
while (parent instanceof baseLodash) {
|
|
var clone = wrapperClone(parent);
|
|
clone.__index__ = 0;
|
|
clone.__values__ = undefined;
|
|
if (result) {
|
|
previous.__wrapped__ = clone;
|
|
} else {
|
|
result = clone;
|
|
}
|
|
var previous = clone;
|
|
parent = parent.__wrapped__;
|
|
}
|
|
previous.__wrapped__ = value;
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* This method is the wrapper version of `_.reverse`.
|
|
*
|
|
* **Note:** This method mutates the wrapped array.
|
|
*
|
|
* @name reverse
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Seq
|
|
* @returns {Object} Returns the new `lodash` wrapper instance.
|
|
* @example
|
|
*
|
|
* var array = [1, 2, 3];
|
|
*
|
|
* _(array).reverse().value()
|
|
* // => [3, 2, 1]
|
|
*
|
|
* console.log(array);
|
|
* // => [3, 2, 1]
|
|
*/
|
|
function wrapperReverse() {
|
|
var value = this.__wrapped__;
|
|
if (value instanceof LazyWrapper) {
|
|
var wrapped = value;
|
|
if (this.__actions__.length) {
|
|
wrapped = new LazyWrapper(this);
|
|
}
|
|
wrapped = wrapped.reverse();
|
|
wrapped.__actions__.push({
|
|
'func': thru,
|
|
'args': [reverse],
|
|
'thisArg': undefined
|
|
});
|
|
return new LodashWrapper(wrapped, this.__chain__);
|
|
}
|
|
return this.thru(reverse);
|
|
}
|
|
|
|
/**
|
|
* Executes the chain sequence to resolve the unwrapped value.
|
|
*
|
|
* @name value
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @alias toJSON, valueOf
|
|
* @category Seq
|
|
* @returns {*} Returns the resolved unwrapped value.
|
|
* @example
|
|
*
|
|
* _([1, 2, 3]).value();
|
|
* // => [1, 2, 3]
|
|
*/
|
|
function wrapperValue() {
|
|
return baseWrapperValue(this.__wrapped__, this.__actions__);
|
|
}
|
|
|
|
/*------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
* Creates an object composed of keys generated from the results of running
|
|
* each element of `collection` thru `iteratee`. The corresponding value of
|
|
* each key is the number of times the key was returned by `iteratee`. The
|
|
* iteratee is invoked with one argument: (value).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.5.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The iteratee to transform keys.
|
|
* @returns {Object} Returns the composed aggregate object.
|
|
* @example
|
|
*
|
|
* _.countBy([6.1, 4.2, 6.3], Math.floor);
|
|
* // => { '4': 1, '6': 2 }
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.countBy(['one', 'two', 'three'], 'length');
|
|
* // => { '3': 2, '5': 1 }
|
|
*/
|
|
var countBy = createAggregator(function(result, value, key) {
|
|
if (hasOwnProperty.call(result, key)) {
|
|
++result[key];
|
|
} else {
|
|
baseAssignValue(result, key, 1);
|
|
}
|
|
});
|
|
|
|
/**
|
|
* Checks if `predicate` returns truthy for **all** elements of `collection`.
|
|
* Iteration is stopped once `predicate` returns falsey. The predicate is
|
|
* invoked with three arguments: (value, index|key, collection).
|
|
*
|
|
* **Note:** This method returns `true` for
|
|
* [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
|
|
* [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
|
|
* elements of empty collections.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
* @returns {boolean} Returns `true` if all elements pass the predicate check,
|
|
* else `false`.
|
|
* @example
|
|
*
|
|
* _.every([true, 1, null, 'yes'], Boolean);
|
|
* // => false
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney', 'age': 36, 'active': false },
|
|
* { 'user': 'fred', 'age': 40, 'active': false }
|
|
* ];
|
|
*
|
|
* // The `_.matches` iteratee shorthand.
|
|
* _.every(users, { 'user': 'barney', 'active': false });
|
|
* // => false
|
|
*
|
|
* // The `_.matchesProperty` iteratee shorthand.
|
|
* _.every(users, ['active', false]);
|
|
* // => true
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.every(users, 'active');
|
|
* // => false
|
|
*/
|
|
function every(collection, predicate, guard) {
|
|
var func = isArray(collection) ? arrayEvery : baseEvery;
|
|
if (guard && isIterateeCall(collection, predicate, guard)) {
|
|
predicate = undefined;
|
|
}
|
|
return func(collection, getIteratee(predicate, 3));
|
|
}
|
|
|
|
/**
|
|
* Iterates over elements of `collection`, returning an array of all elements
|
|
* `predicate` returns truthy for. The predicate is invoked with three
|
|
* arguments: (value, index|key, collection).
|
|
*
|
|
* **Note:** Unlike `_.remove`, this method returns a new array.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @returns {Array} Returns the new filtered array.
|
|
* @see _.reject
|
|
* @example
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney', 'age': 36, 'active': true },
|
|
* { 'user': 'fred', 'age': 40, 'active': false }
|
|
* ];
|
|
*
|
|
* _.filter(users, function(o) { return !o.active; });
|
|
* // => objects for ['fred']
|
|
*
|
|
* // The `_.matches` iteratee shorthand.
|
|
* _.filter(users, { 'age': 36, 'active': true });
|
|
* // => objects for ['barney']
|
|
*
|
|
* // The `_.matchesProperty` iteratee shorthand.
|
|
* _.filter(users, ['active', false]);
|
|
* // => objects for ['fred']
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.filter(users, 'active');
|
|
* // => objects for ['barney']
|
|
*
|
|
* // Combining several predicates using `_.overEvery` or `_.overSome`.
|
|
* _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
|
|
* // => objects for ['fred', 'barney']
|
|
*/
|
|
function filter(collection, predicate) {
|
|
var func = isArray(collection) ? arrayFilter : baseFilter;
|
|
return func(collection, getIteratee(predicate, 3));
|
|
}
|
|
|
|
/**
|
|
* Iterates over elements of `collection`, returning the first element
|
|
* `predicate` returns truthy for. The predicate is invoked with three
|
|
* arguments: (value, index|key, collection).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to inspect.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @param {number} [fromIndex=0] The index to search from.
|
|
* @returns {*} Returns the matched element, else `undefined`.
|
|
* @example
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney', 'age': 36, 'active': true },
|
|
* { 'user': 'fred', 'age': 40, 'active': false },
|
|
* { 'user': 'pebbles', 'age': 1, 'active': true }
|
|
* ];
|
|
*
|
|
* _.find(users, function(o) { return o.age < 40; });
|
|
* // => object for 'barney'
|
|
*
|
|
* // The `_.matches` iteratee shorthand.
|
|
* _.find(users, { 'age': 1, 'active': true });
|
|
* // => object for 'pebbles'
|
|
*
|
|
* // The `_.matchesProperty` iteratee shorthand.
|
|
* _.find(users, ['active', false]);
|
|
* // => object for 'fred'
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.find(users, 'active');
|
|
* // => object for 'barney'
|
|
*/
|
|
var find = createFind(findIndex);
|
|
|
|
/**
|
|
* This method is like `_.find` except that it iterates over elements of
|
|
* `collection` from right to left.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.0.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to inspect.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @param {number} [fromIndex=collection.length-1] The index to search from.
|
|
* @returns {*} Returns the matched element, else `undefined`.
|
|
* @example
|
|
*
|
|
* _.findLast([1, 2, 3, 4], function(n) {
|
|
* return n % 2 == 1;
|
|
* });
|
|
* // => 3
|
|
*/
|
|
var findLast = createFind(findLastIndex);
|
|
|
|
/**
|
|
* Creates a flattened array of values by running each element in `collection`
|
|
* thru `iteratee` and flattening the mapped results. The iteratee is invoked
|
|
* with three arguments: (value, index|key, collection).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @returns {Array} Returns the new flattened array.
|
|
* @example
|
|
*
|
|
* function duplicate(n) {
|
|
* return [n, n];
|
|
* }
|
|
*
|
|
* _.flatMap([1, 2], duplicate);
|
|
* // => [1, 1, 2, 2]
|
|
*/
|
|
function flatMap(collection, iteratee) {
|
|
return baseFlatten(map(collection, iteratee), 1);
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.flatMap` except that it recursively flattens the
|
|
* mapped results.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.7.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @returns {Array} Returns the new flattened array.
|
|
* @example
|
|
*
|
|
* function duplicate(n) {
|
|
* return [[[n, n]]];
|
|
* }
|
|
*
|
|
* _.flatMapDeep([1, 2], duplicate);
|
|
* // => [1, 1, 2, 2]
|
|
*/
|
|
function flatMapDeep(collection, iteratee) {
|
|
return baseFlatten(map(collection, iteratee), INFINITY);
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.flatMap` except that it recursively flattens the
|
|
* mapped results up to `depth` times.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.7.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @param {number} [depth=1] The maximum recursion depth.
|
|
* @returns {Array} Returns the new flattened array.
|
|
* @example
|
|
*
|
|
* function duplicate(n) {
|
|
* return [[[n, n]]];
|
|
* }
|
|
*
|
|
* _.flatMapDepth([1, 2], duplicate, 2);
|
|
* // => [[1, 1], [2, 2]]
|
|
*/
|
|
function flatMapDepth(collection, iteratee, depth) {
|
|
depth = depth === undefined ? 1 : toInteger(depth);
|
|
return baseFlatten(map(collection, iteratee), depth);
|
|
}
|
|
|
|
/**
|
|
* Iterates over elements of `collection` and invokes `iteratee` for each element.
|
|
* The iteratee is invoked with three arguments: (value, index|key, collection).
|
|
* Iteratee functions may exit iteration early by explicitly returning `false`.
|
|
*
|
|
* **Note:** As with other "Collections" methods, objects with a "length"
|
|
* property are iterated like arrays. To avoid this behavior use `_.forIn`
|
|
* or `_.forOwn` for object iteration.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @alias each
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @returns {Array|Object} Returns `collection`.
|
|
* @see _.forEachRight
|
|
* @example
|
|
*
|
|
* _.forEach([1, 2], function(value) {
|
|
* console.log(value);
|
|
* });
|
|
* // => Logs `1` then `2`.
|
|
*
|
|
* _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
|
|
* console.log(key);
|
|
* });
|
|
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
|
|
*/
|
|
function forEach(collection, iteratee) {
|
|
var func = isArray(collection) ? arrayEach : baseEach;
|
|
return func(collection, getIteratee(iteratee, 3));
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.forEach` except that it iterates over elements of
|
|
* `collection` from right to left.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.0.0
|
|
* @alias eachRight
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @returns {Array|Object} Returns `collection`.
|
|
* @see _.forEach
|
|
* @example
|
|
*
|
|
* _.forEachRight([1, 2], function(value) {
|
|
* console.log(value);
|
|
* });
|
|
* // => Logs `2` then `1`.
|
|
*/
|
|
function forEachRight(collection, iteratee) {
|
|
var func = isArray(collection) ? arrayEachRight : baseEachRight;
|
|
return func(collection, getIteratee(iteratee, 3));
|
|
}
|
|
|
|
/**
|
|
* Creates an object composed of keys generated from the results of running
|
|
* each element of `collection` thru `iteratee`. The order of grouped values
|
|
* is determined by the order they occur in `collection`. The corresponding
|
|
* value of each key is an array of elements responsible for generating the
|
|
* key. The iteratee is invoked with one argument: (value).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The iteratee to transform keys.
|
|
* @returns {Object} Returns the composed aggregate object.
|
|
* @example
|
|
*
|
|
* _.groupBy([6.1, 4.2, 6.3], Math.floor);
|
|
* // => { '4': [4.2], '6': [6.1, 6.3] }
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.groupBy(['one', 'two', 'three'], 'length');
|
|
* // => { '3': ['one', 'two'], '5': ['three'] }
|
|
*/
|
|
var groupBy = createAggregator(function(result, value, key) {
|
|
if (hasOwnProperty.call(result, key)) {
|
|
result[key].push(value);
|
|
} else {
|
|
baseAssignValue(result, key, [value]);
|
|
}
|
|
});
|
|
|
|
/**
|
|
* Checks if `value` is in `collection`. If `collection` is a string, it's
|
|
* checked for a substring of `value`, otherwise
|
|
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
* is used for equality comparisons. If `fromIndex` is negative, it's used as
|
|
* the offset from the end of `collection`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object|string} collection The collection to inspect.
|
|
* @param {*} value The value to search for.
|
|
* @param {number} [fromIndex=0] The index to search from.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
|
|
* @returns {boolean} Returns `true` if `value` is found, else `false`.
|
|
* @example
|
|
*
|
|
* _.includes([1, 2, 3], 1);
|
|
* // => true
|
|
*
|
|
* _.includes([1, 2, 3], 1, 2);
|
|
* // => false
|
|
*
|
|
* _.includes({ 'a': 1, 'b': 2 }, 1);
|
|
* // => true
|
|
*
|
|
* _.includes('abcd', 'bc');
|
|
* // => true
|
|
*/
|
|
function includes(collection, value, fromIndex, guard) {
|
|
collection = isArrayLike(collection) ? collection : values(collection);
|
|
fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
|
|
|
|
var length = collection.length;
|
|
if (fromIndex < 0) {
|
|
fromIndex = nativeMax(length + fromIndex, 0);
|
|
}
|
|
return isString(collection)
|
|
? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
|
|
: (!!length && baseIndexOf(collection, value, fromIndex) > -1);
|
|
}
|
|
|
|
/**
|
|
* Invokes the method at `path` of each element in `collection`, returning
|
|
* an array of the results of each invoked method. Any additional arguments
|
|
* are provided to each invoked method. If `path` is a function, it's invoked
|
|
* for, and `this` bound to, each element in `collection`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Array|Function|string} path The path of the method to invoke or
|
|
* the function invoked per iteration.
|
|
* @param {...*} [args] The arguments to invoke each method with.
|
|
* @returns {Array} Returns the array of results.
|
|
* @example
|
|
*
|
|
* _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
|
|
* // => [[1, 5, 7], [1, 2, 3]]
|
|
*
|
|
* _.invokeMap([123, 456], String.prototype.split, '');
|
|
* // => [['1', '2', '3'], ['4', '5', '6']]
|
|
*/
|
|
var invokeMap = baseRest(function(collection, path, args) {
|
|
var index = -1,
|
|
isFunc = typeof path == 'function',
|
|
result = isArrayLike(collection) ? Array(collection.length) : [];
|
|
|
|
baseEach(collection, function(value) {
|
|
result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
|
|
});
|
|
return result;
|
|
});
|
|
|
|
/**
|
|
* Creates an object composed of keys generated from the results of running
|
|
* each element of `collection` thru `iteratee`. The corresponding value of
|
|
* each key is the last element responsible for generating the key. The
|
|
* iteratee is invoked with one argument: (value).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The iteratee to transform keys.
|
|
* @returns {Object} Returns the composed aggregate object.
|
|
* @example
|
|
*
|
|
* var array = [
|
|
* { 'dir': 'left', 'code': 97 },
|
|
* { 'dir': 'right', 'code': 100 }
|
|
* ];
|
|
*
|
|
* _.keyBy(array, function(o) {
|
|
* return String.fromCharCode(o.code);
|
|
* });
|
|
* // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
|
|
*
|
|
* _.keyBy(array, 'dir');
|
|
* // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
|
|
*/
|
|
var keyBy = createAggregator(function(result, value, key) {
|
|
baseAssignValue(result, key, value);
|
|
});
|
|
|
|
/**
|
|
* Creates an array of values by running each element in `collection` thru
|
|
* `iteratee`. The iteratee is invoked with three arguments:
|
|
* (value, index|key, collection).
|
|
*
|
|
* Many lodash methods are guarded to work as iteratees for methods like
|
|
* `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
|
|
*
|
|
* The guarded methods are:
|
|
* `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
|
|
* `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
|
|
* `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
|
|
* `template`, `trim`, `trimEnd`, `trimStart`, and `words`
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @returns {Array} Returns the new mapped array.
|
|
* @example
|
|
*
|
|
* function square(n) {
|
|
* return n * n;
|
|
* }
|
|
*
|
|
* _.map([4, 8], square);
|
|
* // => [16, 64]
|
|
*
|
|
* _.map({ 'a': 4, 'b': 8 }, square);
|
|
* // => [16, 64] (iteration order is not guaranteed)
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney' },
|
|
* { 'user': 'fred' }
|
|
* ];
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.map(users, 'user');
|
|
* // => ['barney', 'fred']
|
|
*/
|
|
function map(collection, iteratee) {
|
|
var func = isArray(collection) ? arrayMap : baseMap;
|
|
return func(collection, getIteratee(iteratee, 3));
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.sortBy` except that it allows specifying the sort
|
|
* orders of the iteratees to sort by. If `orders` is unspecified, all values
|
|
* are sorted in ascending order. Otherwise, specify an order of "desc" for
|
|
* descending or "asc" for ascending sort order of corresponding values.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
|
|
* The iteratees to sort by.
|
|
* @param {string[]} [orders] The sort orders of `iteratees`.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
|
|
* @returns {Array} Returns the new sorted array.
|
|
* @example
|
|
*
|
|
* var users = [
|
|
* { 'user': 'fred', 'age': 48 },
|
|
* { 'user': 'barney', 'age': 34 },
|
|
* { 'user': 'fred', 'age': 40 },
|
|
* { 'user': 'barney', 'age': 36 }
|
|
* ];
|
|
*
|
|
* // Sort by `user` in ascending order and by `age` in descending order.
|
|
* _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
|
|
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
|
|
*/
|
|
function orderBy(collection, iteratees, orders, guard) {
|
|
if (collection == null) {
|
|
return [];
|
|
}
|
|
if (!isArray(iteratees)) {
|
|
iteratees = iteratees == null ? [] : [iteratees];
|
|
}
|
|
orders = guard ? undefined : orders;
|
|
if (!isArray(orders)) {
|
|
orders = orders == null ? [] : [orders];
|
|
}
|
|
return baseOrderBy(collection, iteratees, orders);
|
|
}
|
|
|
|
/**
|
|
* Creates an array of elements split into two groups, the first of which
|
|
* contains elements `predicate` returns truthy for, the second of which
|
|
* contains elements `predicate` returns falsey for. The predicate is
|
|
* invoked with one argument: (value).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @returns {Array} Returns the array of grouped elements.
|
|
* @example
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney', 'age': 36, 'active': false },
|
|
* { 'user': 'fred', 'age': 40, 'active': true },
|
|
* { 'user': 'pebbles', 'age': 1, 'active': false }
|
|
* ];
|
|
*
|
|
* _.partition(users, function(o) { return o.active; });
|
|
* // => objects for [['fred'], ['barney', 'pebbles']]
|
|
*
|
|
* // The `_.matches` iteratee shorthand.
|
|
* _.partition(users, { 'age': 1, 'active': false });
|
|
* // => objects for [['pebbles'], ['barney', 'fred']]
|
|
*
|
|
* // The `_.matchesProperty` iteratee shorthand.
|
|
* _.partition(users, ['active', false]);
|
|
* // => objects for [['barney', 'pebbles'], ['fred']]
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.partition(users, 'active');
|
|
* // => objects for [['fred'], ['barney', 'pebbles']]
|
|
*/
|
|
var partition = createAggregator(function(result, value, key) {
|
|
result[key ? 0 : 1].push(value);
|
|
}, function() { return [[], []]; });
|
|
|
|
/**
|
|
* Reduces `collection` to a value which is the accumulated result of running
|
|
* each element in `collection` thru `iteratee`, where each successive
|
|
* invocation is supplied the return value of the previous. If `accumulator`
|
|
* is not given, the first element of `collection` is used as the initial
|
|
* value. The iteratee is invoked with four arguments:
|
|
* (accumulator, value, index|key, collection).
|
|
*
|
|
* Many lodash methods are guarded to work as iteratees for methods like
|
|
* `_.reduce`, `_.reduceRight`, and `_.transform`.
|
|
*
|
|
* The guarded methods are:
|
|
* `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
|
|
* and `sortBy`
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @param {*} [accumulator] The initial value.
|
|
* @returns {*} Returns the accumulated value.
|
|
* @see _.reduceRight
|
|
* @example
|
|
*
|
|
* _.reduce([1, 2], function(sum, n) {
|
|
* return sum + n;
|
|
* }, 0);
|
|
* // => 3
|
|
*
|
|
* _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
|
|
* (result[value] || (result[value] = [])).push(key);
|
|
* return result;
|
|
* }, {});
|
|
* // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
|
|
*/
|
|
function reduce(collection, iteratee, accumulator) {
|
|
var func = isArray(collection) ? arrayReduce : baseReduce,
|
|
initAccum = arguments.length < 3;
|
|
|
|
return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.reduce` except that it iterates over elements of
|
|
* `collection` from right to left.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @param {*} [accumulator] The initial value.
|
|
* @returns {*} Returns the accumulated value.
|
|
* @see _.reduce
|
|
* @example
|
|
*
|
|
* var array = [[0, 1], [2, 3], [4, 5]];
|
|
*
|
|
* _.reduceRight(array, function(flattened, other) {
|
|
* return flattened.concat(other);
|
|
* }, []);
|
|
* // => [4, 5, 2, 3, 0, 1]
|
|
*/
|
|
function reduceRight(collection, iteratee, accumulator) {
|
|
var func = isArray(collection) ? arrayReduceRight : baseReduce,
|
|
initAccum = arguments.length < 3;
|
|
|
|
return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
|
|
}
|
|
|
|
/**
|
|
* The opposite of `_.filter`; this method returns the elements of `collection`
|
|
* that `predicate` does **not** return truthy for.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @returns {Array} Returns the new filtered array.
|
|
* @see _.filter
|
|
* @example
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney', 'age': 36, 'active': false },
|
|
* { 'user': 'fred', 'age': 40, 'active': true }
|
|
* ];
|
|
*
|
|
* _.reject(users, function(o) { return !o.active; });
|
|
* // => objects for ['fred']
|
|
*
|
|
* // The `_.matches` iteratee shorthand.
|
|
* _.reject(users, { 'age': 40, 'active': true });
|
|
* // => objects for ['barney']
|
|
*
|
|
* // The `_.matchesProperty` iteratee shorthand.
|
|
* _.reject(users, ['active', false]);
|
|
* // => objects for ['fred']
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.reject(users, 'active');
|
|
* // => objects for ['barney']
|
|
*/
|
|
function reject(collection, predicate) {
|
|
var func = isArray(collection) ? arrayFilter : baseFilter;
|
|
return func(collection, negate(getIteratee(predicate, 3)));
|
|
}
|
|
|
|
/**
|
|
* Gets a random element from `collection`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.0.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to sample.
|
|
* @returns {*} Returns the random element.
|
|
* @example
|
|
*
|
|
* _.sample([1, 2, 3, 4]);
|
|
* // => 2
|
|
*/
|
|
function sample(collection) {
|
|
var func = isArray(collection) ? arraySample : baseSample;
|
|
return func(collection);
|
|
}
|
|
|
|
/**
|
|
* Gets `n` random elements at unique keys from `collection` up to the
|
|
* size of `collection`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to sample.
|
|
* @param {number} [n=1] The number of elements to sample.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
* @returns {Array} Returns the random elements.
|
|
* @example
|
|
*
|
|
* _.sampleSize([1, 2, 3], 2);
|
|
* // => [3, 1]
|
|
*
|
|
* _.sampleSize([1, 2, 3], 4);
|
|
* // => [2, 3, 1]
|
|
*/
|
|
function sampleSize(collection, n, guard) {
|
|
if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
|
|
n = 1;
|
|
} else {
|
|
n = toInteger(n);
|
|
}
|
|
var func = isArray(collection) ? arraySampleSize : baseSampleSize;
|
|
return func(collection, n);
|
|
}
|
|
|
|
/**
|
|
* Creates an array of shuffled values, using a version of the
|
|
* [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to shuffle.
|
|
* @returns {Array} Returns the new shuffled array.
|
|
* @example
|
|
*
|
|
* _.shuffle([1, 2, 3, 4]);
|
|
* // => [4, 1, 3, 2]
|
|
*/
|
|
function shuffle(collection) {
|
|
var func = isArray(collection) ? arrayShuffle : baseShuffle;
|
|
return func(collection);
|
|
}
|
|
|
|
/**
|
|
* Gets the size of `collection` by returning its length for array-like
|
|
* values or the number of own enumerable string keyed properties for objects.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object|string} collection The collection to inspect.
|
|
* @returns {number} Returns the collection size.
|
|
* @example
|
|
*
|
|
* _.size([1, 2, 3]);
|
|
* // => 3
|
|
*
|
|
* _.size({ 'a': 1, 'b': 2 });
|
|
* // => 2
|
|
*
|
|
* _.size('pebbles');
|
|
* // => 7
|
|
*/
|
|
function size(collection) {
|
|
if (collection == null) {
|
|
return 0;
|
|
}
|
|
if (isArrayLike(collection)) {
|
|
return isString(collection) ? stringSize(collection) : collection.length;
|
|
}
|
|
var tag = getTag(collection);
|
|
if (tag == mapTag || tag == setTag) {
|
|
return collection.size;
|
|
}
|
|
return baseKeys(collection).length;
|
|
}
|
|
|
|
/**
|
|
* Checks if `predicate` returns truthy for **any** element of `collection`.
|
|
* Iteration is stopped once `predicate` returns truthy. The predicate is
|
|
* invoked with three arguments: (value, index|key, collection).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
* @returns {boolean} Returns `true` if any element passes the predicate check,
|
|
* else `false`.
|
|
* @example
|
|
*
|
|
* _.some([null, 0, 'yes', false], Boolean);
|
|
* // => true
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney', 'active': true },
|
|
* { 'user': 'fred', 'active': false }
|
|
* ];
|
|
*
|
|
* // The `_.matches` iteratee shorthand.
|
|
* _.some(users, { 'user': 'barney', 'active': false });
|
|
* // => false
|
|
*
|
|
* // The `_.matchesProperty` iteratee shorthand.
|
|
* _.some(users, ['active', false]);
|
|
* // => true
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.some(users, 'active');
|
|
* // => true
|
|
*/
|
|
function some(collection, predicate, guard) {
|
|
var func = isArray(collection) ? arraySome : baseSome;
|
|
if (guard && isIterateeCall(collection, predicate, guard)) {
|
|
predicate = undefined;
|
|
}
|
|
return func(collection, getIteratee(predicate, 3));
|
|
}
|
|
|
|
/**
|
|
* Creates an array of elements, sorted in ascending order by the results of
|
|
* running each element in a collection thru each iteratee. This method
|
|
* performs a stable sort, that is, it preserves the original sort order of
|
|
* equal elements. The iteratees are invoked with one argument: (value).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {...(Function|Function[])} [iteratees=[_.identity]]
|
|
* The iteratees to sort by.
|
|
* @returns {Array} Returns the new sorted array.
|
|
* @example
|
|
*
|
|
* var users = [
|
|
* { 'user': 'fred', 'age': 48 },
|
|
* { 'user': 'barney', 'age': 36 },
|
|
* { 'user': 'fred', 'age': 30 },
|
|
* { 'user': 'barney', 'age': 34 }
|
|
* ];
|
|
*
|
|
* _.sortBy(users, [function(o) { return o.user; }]);
|
|
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
|
|
*
|
|
* _.sortBy(users, ['user', 'age']);
|
|
* // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
|
|
*/
|
|
var sortBy = baseRest(function(collection, iteratees) {
|
|
if (collection == null) {
|
|
return [];
|
|
}
|
|
var length = iteratees.length;
|
|
if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
|
|
iteratees = [];
|
|
} else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
|
|
iteratees = [iteratees[0]];
|
|
}
|
|
return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
|
|
});
|
|
|
|
/*------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
* Gets the timestamp of the number of milliseconds that have elapsed since
|
|
* the Unix epoch (1 January 1970 00:00:00 UTC).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.4.0
|
|
* @category Date
|
|
* @returns {number} Returns the timestamp.
|
|
* @example
|
|
*
|
|
* _.defer(function(stamp) {
|
|
* console.log(_.now() - stamp);
|
|
* }, _.now());
|
|
* // => Logs the number of milliseconds it took for the deferred invocation.
|
|
*/
|
|
var now = ctxNow || function() {
|
|
return root.Date.now();
|
|
};
|
|
|
|
/*------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
* The opposite of `_.before`; this method creates a function that invokes
|
|
* `func` once it's called `n` or more times.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Function
|
|
* @param {number} n The number of calls before `func` is invoked.
|
|
* @param {Function} func The function to restrict.
|
|
* @returns {Function} Returns the new restricted function.
|
|
* @example
|
|
*
|
|
* var saves = ['profile', 'settings'];
|
|
*
|
|
* var done = _.after(saves.length, function() {
|
|
* console.log('done saving!');
|
|
* });
|
|
*
|
|
* _.forEach(saves, function(type) {
|
|
* asyncSave({ 'type': type, 'complete': done });
|
|
* });
|
|
* // => Logs 'done saving!' after the two async saves have completed.
|
|
*/
|
|
function after(n, func) {
|
|
if (typeof func != 'function') {
|
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
}
|
|
n = toInteger(n);
|
|
return function() {
|
|
if (--n < 1) {
|
|
return func.apply(this, arguments);
|
|
}
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Creates a function that invokes `func`, with up to `n` arguments,
|
|
* ignoring any additional arguments.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Function
|
|
* @param {Function} func The function to cap arguments for.
|
|
* @param {number} [n=func.length] The arity cap.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
* @returns {Function} Returns the new capped function.
|
|
* @example
|
|
*
|
|
* _.map(['6', '8', '10'], _.ary(parseInt, 1));
|
|
* // => [6, 8, 10]
|
|
*/
|
|
function ary(func, n, guard) {
|
|
n = guard ? undefined : n;
|
|
n = (func && n == null) ? func.length : n;
|
|
return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
|
|
}
|
|
|
|
/**
|
|
* Creates a function that invokes `func`, with the `this` binding and arguments
|
|
* of the created function, while it's called less than `n` times. Subsequent
|
|
* calls to the created function return the result of the last `func` invocation.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Function
|
|
* @param {number} n The number of calls at which `func` is no longer invoked.
|
|
* @param {Function} func The function to restrict.
|
|
* @returns {Function} Returns the new restricted function.
|
|
* @example
|
|
*
|
|
* jQuery(element).on('click', _.before(5, addContactToList));
|
|
* // => Allows adding up to 4 contacts to the list.
|
|
*/
|
|
function before(n, func) {
|
|
var result;
|
|
if (typeof func != 'function') {
|
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
}
|
|
n = toInteger(n);
|
|
return function() {
|
|
if (--n > 0) {
|
|
result = func.apply(this, arguments);
|
|
}
|
|
if (n <= 1) {
|
|
func = undefined;
|
|
}
|
|
return result;
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Creates a function that invokes `func` with the `this` binding of `thisArg`
|
|
* and `partials` prepended to the arguments it receives.
|
|
*
|
|
* The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
|
|
* may be used as a placeholder for partially applied arguments.
|
|
*
|
|
* **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
|
|
* property of bound functions.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Function
|
|
* @param {Function} func The function to bind.
|
|
* @param {*} thisArg The `this` binding of `func`.
|
|
* @param {...*} [partials] The arguments to be partially applied.
|
|
* @returns {Function} Returns the new bound function.
|
|
* @example
|
|
*
|
|
* function greet(greeting, punctuation) {
|
|
* return greeting + ' ' + this.user + punctuation;
|
|
* }
|
|
*
|
|
* var object = { 'user': 'fred' };
|
|
*
|
|
* var bound = _.bind(greet, object, 'hi');
|
|
* bound('!');
|
|
* // => 'hi fred!'
|
|
*
|
|
* // Bound with placeholders.
|
|
* var bound = _.bind(greet, object, _, '!');
|
|
* bound('hi');
|
|
* // => 'hi fred!'
|
|
*/
|
|
var bind = baseRest(function(func, thisArg, partials) {
|
|
var bitmask = WRAP_BIND_FLAG;
|
|
if (partials.length) {
|
|
var holders = replaceHolders(partials, getHolder(bind));
|
|
bitmask |= WRAP_PARTIAL_FLAG;
|
|
}
|
|
return createWrap(func, bitmask, thisArg, partials, holders);
|
|
});
|
|
|
|
/**
|
|
* Creates a function that invokes the method at `object[key]` with `partials`
|
|
* prepended to the arguments it receives.
|
|
*
|
|
* This method differs from `_.bind` by allowing bound functions to reference
|
|
* methods that may be redefined or don't yet exist. See
|
|
* [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
|
|
* for more details.
|
|
*
|
|
* The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
|
|
* builds, may be used as a placeholder for partially applied arguments.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.10.0
|
|
* @category Function
|
|
* @param {Object} object The object to invoke the method on.
|
|
* @param {string} key The key of the method.
|
|
* @param {...*} [partials] The arguments to be partially applied.
|
|
* @returns {Function} Returns the new bound function.
|
|
* @example
|
|
*
|
|
* var object = {
|
|
* 'user': 'fred',
|
|
* 'greet': function(greeting, punctuation) {
|
|
* return greeting + ' ' + this.user + punctuation;
|
|
* }
|
|
* };
|
|
*
|
|
* var bound = _.bindKey(object, 'greet', 'hi');
|
|
* bound('!');
|
|
* // => 'hi fred!'
|
|
*
|
|
* object.greet = function(greeting, punctuation) {
|
|
* return greeting + 'ya ' + this.user + punctuation;
|
|
* };
|
|
*
|
|
* bound('!');
|
|
* // => 'hiya fred!'
|
|
*
|
|
* // Bound with placeholders.
|
|
* var bound = _.bindKey(object, 'greet', _, '!');
|
|
* bound('hi');
|
|
* // => 'hiya fred!'
|
|
*/
|
|
var bindKey = baseRest(function(object, key, partials) {
|
|
var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
|
|
if (partials.length) {
|
|
var holders = replaceHolders(partials, getHolder(bindKey));
|
|
bitmask |= WRAP_PARTIAL_FLAG;
|
|
}
|
|
return createWrap(key, bitmask, object, partials, holders);
|
|
});
|
|
|
|
/**
|
|
* Creates a function that accepts arguments of `func` and either invokes
|
|
* `func` returning its result, if at least `arity` number of arguments have
|
|
* been provided, or returns a function that accepts the remaining `func`
|
|
* arguments, and so on. The arity of `func` may be specified if `func.length`
|
|
* is not sufficient.
|
|
*
|
|
* The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
|
|
* may be used as a placeholder for provided arguments.
|
|
*
|
|
* **Note:** This method doesn't set the "length" property of curried functions.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.0.0
|
|
* @category Function
|
|
* @param {Function} func The function to curry.
|
|
* @param {number} [arity=func.length] The arity of `func`.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
* @returns {Function} Returns the new curried function.
|
|
* @example
|
|
*
|
|
* var abc = function(a, b, c) {
|
|
* return [a, b, c];
|
|
* };
|
|
*
|
|
* var curried = _.curry(abc);
|
|
*
|
|
* curried(1)(2)(3);
|
|
* // => [1, 2, 3]
|
|
*
|
|
* curried(1, 2)(3);
|
|
* // => [1, 2, 3]
|
|
*
|
|
* curried(1, 2, 3);
|
|
* // => [1, 2, 3]
|
|
*
|
|
* // Curried with placeholders.
|
|
* curried(1)(_, 3)(2);
|
|
* // => [1, 2, 3]
|
|
*/
|
|
function curry(func, arity, guard) {
|
|
arity = guard ? undefined : arity;
|
|
var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
|
|
result.placeholder = curry.placeholder;
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.curry` except that arguments are applied to `func`
|
|
* in the manner of `_.partialRight` instead of `_.partial`.
|
|
*
|
|
* The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
|
|
* builds, may be used as a placeholder for provided arguments.
|
|
*
|
|
* **Note:** This method doesn't set the "length" property of curried functions.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Function
|
|
* @param {Function} func The function to curry.
|
|
* @param {number} [arity=func.length] The arity of `func`.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
* @returns {Function} Returns the new curried function.
|
|
* @example
|
|
*
|
|
* var abc = function(a, b, c) {
|
|
* return [a, b, c];
|
|
* };
|
|
*
|
|
* var curried = _.curryRight(abc);
|
|
*
|
|
* curried(3)(2)(1);
|
|
* // => [1, 2, 3]
|
|
*
|
|
* curried(2, 3)(1);
|
|
* // => [1, 2, 3]
|
|
*
|
|
* curried(1, 2, 3);
|
|
* // => [1, 2, 3]
|
|
*
|
|
* // Curried with placeholders.
|
|
* curried(3)(1, _)(2);
|
|
* // => [1, 2, 3]
|
|
*/
|
|
function curryRight(func, arity, guard) {
|
|
arity = guard ? undefined : arity;
|
|
var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
|
|
result.placeholder = curryRight.placeholder;
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Creates a debounced function that delays invoking `func` until after `wait`
|
|
* milliseconds have elapsed since the last time the debounced function was
|
|
* invoked. The debounced function comes with a `cancel` method to cancel
|
|
* delayed `func` invocations and a `flush` method to immediately invoke them.
|
|
* Provide `options` to indicate whether `func` should be invoked on the
|
|
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
|
|
* with the last arguments provided to the debounced function. Subsequent
|
|
* calls to the debounced function return the result of the last `func`
|
|
* invocation.
|
|
*
|
|
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
|
* invoked on the trailing edge of the timeout only if the debounced function
|
|
* is invoked more than once during the `wait` timeout.
|
|
*
|
|
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
|
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
|
*
|
|
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
|
* for details over the differences between `_.debounce` and `_.throttle`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Function
|
|
* @param {Function} func The function to debounce.
|
|
* @param {number} [wait=0] The number of milliseconds to delay.
|
|
* @param {Object} [options={}] The options object.
|
|
* @param {boolean} [options.leading=false]
|
|
* Specify invoking on the leading edge of the timeout.
|
|
* @param {number} [options.maxWait]
|
|
* The maximum time `func` is allowed to be delayed before it's invoked.
|
|
* @param {boolean} [options.trailing=true]
|
|
* Specify invoking on the trailing edge of the timeout.
|
|
* @returns {Function} Returns the new debounced function.
|
|
* @example
|
|
*
|
|
* // Avoid costly calculations while the window size is in flux.
|
|
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
|
|
*
|
|
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
|
|
* jQuery(element).on('click', _.debounce(sendMail, 300, {
|
|
* 'leading': true,
|
|
* 'trailing': false
|
|
* }));
|
|
*
|
|
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
|
|
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
|
|
* var source = new EventSource('/stream');
|
|
* jQuery(source).on('message', debounced);
|
|
*
|
|
* // Cancel the trailing debounced invocation.
|
|
* jQuery(window).on('popstate', debounced.cancel);
|
|
*/
|
|
function debounce(func, wait, options) {
|
|
var lastArgs,
|
|
lastThis,
|
|
maxWait,
|
|
result,
|
|
timerId,
|
|
lastCallTime,
|
|
lastInvokeTime = 0,
|
|
leading = false,
|
|
maxing = false,
|
|
trailing = true;
|
|
|
|
if (typeof func != 'function') {
|
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
}
|
|
wait = toNumber(wait) || 0;
|
|
if (isObject(options)) {
|
|
leading = !!options.leading;
|
|
maxing = 'maxWait' in options;
|
|
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
|
}
|
|
|
|
function invokeFunc(time) {
|
|
var args = lastArgs,
|
|
thisArg = lastThis;
|
|
|
|
lastArgs = lastThis = undefined;
|
|
lastInvokeTime = time;
|
|
result = func.apply(thisArg, args);
|
|
return result;
|
|
}
|
|
|
|
function leadingEdge(time) {
|
|
// Reset any `maxWait` timer.
|
|
lastInvokeTime = time;
|
|
// Start the timer for the trailing edge.
|
|
timerId = setTimeout(timerExpired, wait);
|
|
// Invoke the leading edge.
|
|
return leading ? invokeFunc(time) : result;
|
|
}
|
|
|
|
function remainingWait(time) {
|
|
var timeSinceLastCall = time - lastCallTime,
|
|
timeSinceLastInvoke = time - lastInvokeTime,
|
|
timeWaiting = wait - timeSinceLastCall;
|
|
|
|
return maxing
|
|
? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
|
|
: timeWaiting;
|
|
}
|
|
|
|
function shouldInvoke(time) {
|
|
var timeSinceLastCall = time - lastCallTime,
|
|
timeSinceLastInvoke = time - lastInvokeTime;
|
|
|
|
// Either this is the first call, activity has stopped and we're at the
|
|
// trailing edge, the system time has gone backwards and we're treating
|
|
// it as the trailing edge, or we've hit the `maxWait` limit.
|
|
return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
|
|
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
|
|
}
|
|
|
|
function timerExpired() {
|
|
var time = now();
|
|
if (shouldInvoke(time)) {
|
|
return trailingEdge(time);
|
|
}
|
|
// Restart the timer.
|
|
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
}
|
|
|
|
function trailingEdge(time) {
|
|
timerId = undefined;
|
|
|
|
// Only invoke if we have `lastArgs` which means `func` has been
|
|
// debounced at least once.
|
|
if (trailing && lastArgs) {
|
|
return invokeFunc(time);
|
|
}
|
|
lastArgs = lastThis = undefined;
|
|
return result;
|
|
}
|
|
|
|
function cancel() {
|
|
if (timerId !== undefined) {
|
|
clearTimeout(timerId);
|
|
}
|
|
lastInvokeTime = 0;
|
|
lastArgs = lastCallTime = lastThis = timerId = undefined;
|
|
}
|
|
|
|
function flush() {
|
|
return timerId === undefined ? result : trailingEdge(now());
|
|
}
|
|
|
|
function debounced() {
|
|
var time = now(),
|
|
isInvoking = shouldInvoke(time);
|
|
|
|
lastArgs = arguments;
|
|
lastThis = this;
|
|
lastCallTime = time;
|
|
|
|
if (isInvoking) {
|
|
if (timerId === undefined) {
|
|
return leadingEdge(lastCallTime);
|
|
}
|
|
if (maxing) {
|
|
// Handle invocations in a tight loop.
|
|
clearTimeout(timerId);
|
|
timerId = setTimeout(timerExpired, wait);
|
|
return invokeFunc(lastCallTime);
|
|
}
|
|
}
|
|
if (timerId === undefined) {
|
|
timerId = setTimeout(timerExpired, wait);
|
|
}
|
|
return result;
|
|
}
|
|
debounced.cancel = cancel;
|
|
debounced.flush = flush;
|
|
return debounced;
|
|
}
|
|
|
|
/**
|
|
* Defers invoking the `func` until the current call stack has cleared. Any
|
|
* additional arguments are provided to `func` when it's invoked.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Function
|
|
* @param {Function} func The function to defer.
|
|
* @param {...*} [args] The arguments to invoke `func` with.
|
|
* @returns {number} Returns the timer id.
|
|
* @example
|
|
*
|
|
* _.defer(function(text) {
|
|
* console.log(text);
|
|
* }, 'deferred');
|
|
* // => Logs 'deferred' after one millisecond.
|
|
*/
|
|
var defer = baseRest(function(func, args) {
|
|
return baseDelay(func, 1, args);
|
|
});
|
|
|
|
/**
|
|
* Invokes `func` after `wait` milliseconds. Any additional arguments are
|
|
* provided to `func` when it's invoked.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Function
|
|
* @param {Function} func The function to delay.
|
|
* @param {number} wait The number of milliseconds to delay invocation.
|
|
* @param {...*} [args] The arguments to invoke `func` with.
|
|
* @returns {number} Returns the timer id.
|
|
* @example
|
|
*
|
|
* _.delay(function(text) {
|
|
* console.log(text);
|
|
* }, 1000, 'later');
|
|
* // => Logs 'later' after one second.
|
|
*/
|
|
var delay = baseRest(function(func, wait, args) {
|
|
return baseDelay(func, toNumber(wait) || 0, args);
|
|
});
|
|
|
|
/**
|
|
* Creates a function that invokes `func` with arguments reversed.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Function
|
|
* @param {Function} func The function to flip arguments for.
|
|
* @returns {Function} Returns the new flipped function.
|
|
* @example
|
|
*
|
|
* var flipped = _.flip(function() {
|
|
* return _.toArray(arguments);
|
|
* });
|
|
*
|
|
* flipped('a', 'b', 'c', 'd');
|
|
* // => ['d', 'c', 'b', 'a']
|
|
*/
|
|
function flip(func) {
|
|
return createWrap(func, WRAP_FLIP_FLAG);
|
|
}
|
|
|
|
/**
|
|
* Creates a function that memoizes the result of `func`. If `resolver` is
|
|
* provided, it determines the cache key for storing the result based on the
|
|
* arguments provided to the memoized function. By default, the first argument
|
|
* provided to the memoized function is used as the map cache key. The `func`
|
|
* is invoked with the `this` binding of the memoized function.
|
|
*
|
|
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
* constructor with one whose instances implement the
|
|
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Function
|
|
* @param {Function} func The function to have its output memoized.
|
|
* @param {Function} [resolver] The function to resolve the cache key.
|
|
* @returns {Function} Returns the new memoized function.
|
|
* @example
|
|
*
|
|
* var object = { 'a': 1, 'b': 2 };
|
|
* var other = { 'c': 3, 'd': 4 };
|
|
*
|
|
* var values = _.memoize(_.values);
|
|
* values(object);
|
|
* // => [1, 2]
|
|
*
|
|
* values(other);
|
|
* // => [3, 4]
|
|
*
|
|
* object.a = 2;
|
|
* values(object);
|
|
* // => [1, 2]
|
|
*
|
|
* // Modify the result cache.
|
|
* values.cache.set(object, ['a', 'b']);
|
|
* values(object);
|
|
* // => ['a', 'b']
|
|
*
|
|
* // Replace `_.memoize.Cache`.
|
|
* _.memoize.Cache = WeakMap;
|
|
*/
|
|
function memoize(func, resolver) {
|
|
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
}
|
|
var memoized = function() {
|
|
var args = arguments,
|
|
key = resolver ? resolver.apply(this, args) : args[0],
|
|
cache = memoized.cache;
|
|
|
|
if (cache.has(key)) {
|
|
return cache.get(key);
|
|
}
|
|
var result = func.apply(this, args);
|
|
memoized.cache = cache.set(key, result) || cache;
|
|
return result;
|
|
};
|
|
memoized.cache = new (memoize.Cache || MapCache);
|
|
return memoized;
|
|
}
|
|
|
|
// Expose `MapCache`.
|
|
memoize.Cache = MapCache;
|
|
|
|
/**
|
|
* Creates a function that negates the result of the predicate `func`. The
|
|
* `func` predicate is invoked with the `this` binding and arguments of the
|
|
* created function.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Function
|
|
* @param {Function} predicate The predicate to negate.
|
|
* @returns {Function} Returns the new negated function.
|
|
* @example
|
|
*
|
|
* function isEven(n) {
|
|
* return n % 2 == 0;
|
|
* }
|
|
*
|
|
* _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
|
|
* // => [1, 3, 5]
|
|
*/
|
|
function negate(predicate) {
|
|
if (typeof predicate != 'function') {
|
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
}
|
|
return function() {
|
|
var args = arguments;
|
|
switch (args.length) {
|
|
case 0: return !predicate.call(this);
|
|
case 1: return !predicate.call(this, args[0]);
|
|
case 2: return !predicate.call(this, args[0], args[1]);
|
|
case 3: return !predicate.call(this, args[0], args[1], args[2]);
|
|
}
|
|
return !predicate.apply(this, args);
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Creates a function that is restricted to invoking `func` once. Repeat calls
|
|
* to the function return the value of the first invocation. The `func` is
|
|
* invoked with the `this` binding and arguments of the created function.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Function
|
|
* @param {Function} func The function to restrict.
|
|
* @returns {Function} Returns the new restricted function.
|
|
* @example
|
|
*
|
|
* var initialize = _.once(createApplication);
|
|
* initialize();
|
|
* initialize();
|
|
* // => `createApplication` is invoked once
|
|
*/
|
|
function once(func) {
|
|
return before(2, func);
|
|
}
|
|
|
|
/**
|
|
* Creates a function that invokes `func` with its arguments transformed.
|
|
*
|
|
* @static
|
|
* @since 4.0.0
|
|
* @memberOf _
|
|
* @category Function
|
|
* @param {Function} func The function to wrap.
|
|
* @param {...(Function|Function[])} [transforms=[_.identity]]
|
|
* The argument transforms.
|
|
* @returns {Function} Returns the new function.
|
|
* @example
|
|
*
|
|
* function doubled(n) {
|
|
* return n * 2;
|
|
* }
|
|
*
|
|
* function square(n) {
|
|
* return n * n;
|
|
* }
|
|
*
|
|
* var func = _.overArgs(function(x, y) {
|
|
* return [x, y];
|
|
* }, [square, doubled]);
|
|
*
|
|
* func(9, 3);
|
|
* // => [81, 6]
|
|
*
|
|
* func(10, 5);
|
|
* // => [100, 10]
|
|
*/
|
|
var overArgs = castRest(function(func, transforms) {
|
|
transforms = (transforms.length == 1 && isArray(transforms[0]))
|
|
? arrayMap(transforms[0], baseUnary(getIteratee()))
|
|
: arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
|
|
|
|
var funcsLength = transforms.length;
|
|
return baseRest(function(args) {
|
|
var index = -1,
|
|
length = nativeMin(args.length, funcsLength);
|
|
|
|
while (++index < length) {
|
|
args[index] = transforms[index].call(this, args[index]);
|
|
}
|
|
return apply(func, this, args);
|
|
});
|
|
});
|
|
|
|
/**
|
|
* Creates a function that invokes `func` with `partials` prepended to the
|
|
* arguments it receives. This method is like `_.bind` except it does **not**
|
|
* alter the `this` binding.
|
|
*
|
|
* The `_.partial.placeholder` value, which defaults to `_` in monolithic
|
|
* builds, may be used as a placeholder for partially applied arguments.
|
|
*
|
|
* **Note:** This method doesn't set the "length" property of partially
|
|
* applied functions.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.2.0
|
|
* @category Function
|
|
* @param {Function} func The function to partially apply arguments to.
|
|
* @param {...*} [partials] The arguments to be partially applied.
|
|
* @returns {Function} Returns the new partially applied function.
|
|
* @example
|
|
*
|
|
* function greet(greeting, name) {
|
|
* return greeting + ' ' + name;
|
|
* }
|
|
*
|
|
* var sayHelloTo = _.partial(greet, 'hello');
|
|
* sayHelloTo('fred');
|
|
* // => 'hello fred'
|
|
*
|
|
* // Partially applied with placeholders.
|
|
* var greetFred = _.partial(greet, _, 'fred');
|
|
* greetFred('hi');
|
|
* // => 'hi fred'
|
|
*/
|
|
var partial = baseRest(function(func, partials) {
|
|
var holders = replaceHolders(partials, getHolder(partial));
|
|
return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
|
|
});
|
|
|
|
/**
|
|
* This method is like `_.partial` except that partially applied arguments
|
|
* are appended to the arguments it receives.
|
|
*
|
|
* The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
|
|
* builds, may be used as a placeholder for partially applied arguments.
|
|
*
|
|
* **Note:** This method doesn't set the "length" property of partially
|
|
* applied functions.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 1.0.0
|
|
* @category Function
|
|
* @param {Function} func The function to partially apply arguments to.
|
|
* @param {...*} [partials] The arguments to be partially applied.
|
|
* @returns {Function} Returns the new partially applied function.
|
|
* @example
|
|
*
|
|
* function greet(greeting, name) {
|
|
* return greeting + ' ' + name;
|
|
* }
|
|
*
|
|
* var greetFred = _.partialRight(greet, 'fred');
|
|
* greetFred('hi');
|
|
* // => 'hi fred'
|
|
*
|
|
* // Partially applied with placeholders.
|
|
* var sayHelloTo = _.partialRight(greet, 'hello', _);
|
|
* sayHelloTo('fred');
|
|
* // => 'hello fred'
|
|
*/
|
|
var partialRight = baseRest(function(func, partials) {
|
|
var holders = replaceHolders(partials, getHolder(partialRight));
|
|
return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
|
|
});
|
|
|
|
/**
|
|
* Creates a function that invokes `func` with arguments arranged according
|
|
* to the specified `indexes` where the argument value at the first index is
|
|
* provided as the first argument, the argument value at the second index is
|
|
* provided as the second argument, and so on.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Function
|
|
* @param {Function} func The function to rearrange arguments for.
|
|
* @param {...(number|number[])} indexes The arranged argument indexes.
|
|
* @returns {Function} Returns the new function.
|
|
* @example
|
|
*
|
|
* var rearged = _.rearg(function(a, b, c) {
|
|
* return [a, b, c];
|
|
* }, [2, 0, 1]);
|
|
*
|
|
* rearged('b', 'c', 'a')
|
|
* // => ['a', 'b', 'c']
|
|
*/
|
|
var rearg = flatRest(function(func, indexes) {
|
|
return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
|
|
});
|
|
|
|
/**
|
|
* Creates a function that invokes `func` with the `this` binding of the
|
|
* created function and arguments from `start` and beyond provided as
|
|
* an array.
|
|
*
|
|
* **Note:** This method is based on the
|
|
* [rest parameter](https://mdn.io/rest_parameters).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Function
|
|
* @param {Function} func The function to apply a rest parameter to.
|
|
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
|
* @returns {Function} Returns the new function.
|
|
* @example
|
|
*
|
|
* var say = _.rest(function(what, names) {
|
|
* return what + ' ' + _.initial(names).join(', ') +
|
|
* (_.size(names) > 1 ? ', & ' : '') + _.last(names);
|
|
* });
|
|
*
|
|
* say('hello', 'fred', 'barney', 'pebbles');
|
|
* // => 'hello fred, barney, & pebbles'
|
|
*/
|
|
function rest(func, start) {
|
|
if (typeof func != 'function') {
|
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
}
|
|
start = start === undefined ? start : toInteger(start);
|
|
return baseRest(func, start);
|
|
}
|
|
|
|
/**
|
|
* Creates a function that invokes `func` with the `this` binding of the
|
|
* create function and an array of arguments much like
|
|
* [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
|
|
*
|
|
* **Note:** This method is based on the
|
|
* [spread operator](https://mdn.io/spread_operator).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.2.0
|
|
* @category Function
|
|
* @param {Function} func The function to spread arguments over.
|
|
* @param {number} [start=0] The start position of the spread.
|
|
* @returns {Function} Returns the new function.
|
|
* @example
|
|
*
|
|
* var say = _.spread(function(who, what) {
|
|
* return who + ' says ' + what;
|
|
* });
|
|
*
|
|
* say(['fred', 'hello']);
|
|
* // => 'fred says hello'
|
|
*
|
|
* var numbers = Promise.all([
|
|
* Promise.resolve(40),
|
|
* Promise.resolve(36)
|
|
* ]);
|
|
*
|
|
* numbers.then(_.spread(function(x, y) {
|
|
* return x + y;
|
|
* }));
|
|
* // => a Promise of 76
|
|
*/
|
|
function spread(func, start) {
|
|
if (typeof func != 'function') {
|
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
}
|
|
start = start == null ? 0 : nativeMax(toInteger(start), 0);
|
|
return baseRest(function(args) {
|
|
var array = args[start],
|
|
otherArgs = castSlice(args, 0, start);
|
|
|
|
if (array) {
|
|
arrayPush(otherArgs, array);
|
|
}
|
|
return apply(func, this, otherArgs);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Creates a throttled function that only invokes `func` at most once per
|
|
* every `wait` milliseconds. The throttled function comes with a `cancel`
|
|
* method to cancel delayed `func` invocations and a `flush` method to
|
|
* immediately invoke them. Provide `options` to indicate whether `func`
|
|
* should be invoked on the leading and/or trailing edge of the `wait`
|
|
* timeout. The `func` is invoked with the last arguments provided to the
|
|
* throttled function. Subsequent calls to the throttled function return the
|
|
* result of the last `func` invocation.
|
|
*
|
|
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
|
* invoked on the trailing edge of the timeout only if the throttled function
|
|
* is invoked more than once during the `wait` timeout.
|
|
*
|
|
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
|
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
|
*
|
|
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
|
* for details over the differences between `_.throttle` and `_.debounce`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Function
|
|
* @param {Function} func The function to throttle.
|
|
* @param {number} [wait=0] The number of milliseconds to throttle invocations to.
|
|
* @param {Object} [options={}] The options object.
|
|
* @param {boolean} [options.leading=true]
|
|
* Specify invoking on the leading edge of the timeout.
|
|
* @param {boolean} [options.trailing=true]
|
|
* Specify invoking on the trailing edge of the timeout.
|
|
* @returns {Function} Returns the new throttled function.
|
|
* @example
|
|
*
|
|
* // Avoid excessively updating the position while scrolling.
|
|
* jQuery(window).on('scroll', _.throttle(updatePosition, 100));
|
|
*
|
|
* // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
|
|
* var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
|
|
* jQuery(element).on('click', throttled);
|
|
*
|
|
* // Cancel the trailing throttled invocation.
|
|
* jQuery(window).on('popstate', throttled.cancel);
|
|
*/
|
|
function throttle(func, wait, options) {
|
|
var leading = true,
|
|
trailing = true;
|
|
|
|
if (typeof func != 'function') {
|
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
}
|
|
if (isObject(options)) {
|
|
leading = 'leading' in options ? !!options.leading : leading;
|
|
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
|
}
|
|
return debounce(func, wait, {
|
|
'leading': leading,
|
|
'maxWait': wait,
|
|
'trailing': trailing
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Creates a function that accepts up to one argument, ignoring any
|
|
* additional arguments.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Function
|
|
* @param {Function} func The function to cap arguments for.
|
|
* @returns {Function} Returns the new capped function.
|
|
* @example
|
|
*
|
|
* _.map(['6', '8', '10'], _.unary(parseInt));
|
|
* // => [6, 8, 10]
|
|
*/
|
|
function unary(func) {
|
|
return ary(func, 1);
|
|
}
|
|
|
|
/**
|
|
* Creates a function that provides `value` to `wrapper` as its first
|
|
* argument. Any additional arguments provided to the function are appended
|
|
* to those provided to the `wrapper`. The wrapper is invoked with the `this`
|
|
* binding of the created function.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Function
|
|
* @param {*} value The value to wrap.
|
|
* @param {Function} [wrapper=identity] The wrapper function.
|
|
* @returns {Function} Returns the new function.
|
|
* @example
|
|
*
|
|
* var p = _.wrap(_.escape, function(func, text) {
|
|
* return '<p>' + func(text) + '</p>';
|
|
* });
|
|
*
|
|
* p('fred, barney, & pebbles');
|
|
* // => '<p>fred, barney, & pebbles</p>'
|
|
*/
|
|
function wrap(value, wrapper) {
|
|
return partial(castFunction(wrapper), value);
|
|
}
|
|
|
|
/*------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
* Casts `value` as an array if it's not one.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.4.0
|
|
* @category Lang
|
|
* @param {*} value The value to inspect.
|
|
* @returns {Array} Returns the cast array.
|
|
* @example
|
|
*
|
|
* _.castArray(1);
|
|
* // => [1]
|
|
*
|
|
* _.castArray({ 'a': 1 });
|
|
* // => [{ 'a': 1 }]
|
|
*
|
|
* _.castArray('abc');
|
|
* // => ['abc']
|
|
*
|
|
* _.castArray(null);
|
|
* // => [null]
|
|
*
|
|
* _.castArray(undefined);
|
|
* // => [undefined]
|
|
*
|
|
* _.castArray();
|
|
* // => []
|
|
*
|
|
* var array = [1, 2, 3];
|
|
* console.log(_.castArray(array) === array);
|
|
* // => true
|
|
*/
|
|
function castArray() {
|
|
if (!arguments.length) {
|
|
return [];
|
|
}
|
|
var value = arguments[0];
|
|
return isArray(value) ? value : [value];
|
|
}
|
|
|
|
/**
|
|
* Creates a shallow clone of `value`.
|
|
*
|
|
* **Note:** This method is loosely based on the
|
|
* [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
|
|
* and supports cloning arrays, array buffers, booleans, date objects, maps,
|
|
* numbers, `Object` objects, regexes, sets, strings, symbols, and typed
|
|
* arrays. The own enumerable properties of `arguments` objects are cloned
|
|
* as plain objects. An empty object is returned for uncloneable values such
|
|
* as error objects, functions, DOM nodes, and WeakMaps.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to clone.
|
|
* @returns {*} Returns the cloned value.
|
|
* @see _.cloneDeep
|
|
* @example
|
|
*
|
|
* var objects = [{ 'a': 1 }, { 'b': 2 }];
|
|
*
|
|
* var shallow = _.clone(objects);
|
|
* console.log(shallow[0] === objects[0]);
|
|
* // => true
|
|
*/
|
|
function clone(value) {
|
|
return baseClone(value, CLONE_SYMBOLS_FLAG);
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.clone` except that it accepts `customizer` which
|
|
* is invoked to produce the cloned value. If `customizer` returns `undefined`,
|
|
* cloning is handled by the method instead. The `customizer` is invoked with
|
|
* up to four arguments; (value [, index|key, object, stack]).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to clone.
|
|
* @param {Function} [customizer] The function to customize cloning.
|
|
* @returns {*} Returns the cloned value.
|
|
* @see _.cloneDeepWith
|
|
* @example
|
|
*
|
|
* function customizer(value) {
|
|
* if (_.isElement(value)) {
|
|
* return value.cloneNode(false);
|
|
* }
|
|
* }
|
|
*
|
|
* var el = _.cloneWith(document.body, customizer);
|
|
*
|
|
* console.log(el === document.body);
|
|
* // => false
|
|
* console.log(el.nodeName);
|
|
* // => 'BODY'
|
|
* console.log(el.childNodes.length);
|
|
* // => 0
|
|
*/
|
|
function cloneWith(value, customizer) {
|
|
customizer = typeof customizer == 'function' ? customizer : undefined;
|
|
return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.clone` except that it recursively clones `value`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 1.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to recursively clone.
|
|
* @returns {*} Returns the deep cloned value.
|
|
* @see _.clone
|
|
* @example
|
|
*
|
|
* var objects = [{ 'a': 1 }, { 'b': 2 }];
|
|
*
|
|
* var deep = _.cloneDeep(objects);
|
|
* console.log(deep[0] === objects[0]);
|
|
* // => false
|
|
*/
|
|
function cloneDeep(value) {
|
|
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.cloneWith` except that it recursively clones `value`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to recursively clone.
|
|
* @param {Function} [customizer] The function to customize cloning.
|
|
* @returns {*} Returns the deep cloned value.
|
|
* @see _.cloneWith
|
|
* @example
|
|
*
|
|
* function customizer(value) {
|
|
* if (_.isElement(value)) {
|
|
* return value.cloneNode(true);
|
|
* }
|
|
* }
|
|
*
|
|
* var el = _.cloneDeepWith(document.body, customizer);
|
|
*
|
|
* console.log(el === document.body);
|
|
* // => false
|
|
* console.log(el.nodeName);
|
|
* // => 'BODY'
|
|
* console.log(el.childNodes.length);
|
|
* // => 20
|
|
*/
|
|
function cloneDeepWith(value, customizer) {
|
|
customizer = typeof customizer == 'function' ? customizer : undefined;
|
|
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
|
|
}
|
|
|
|
/**
|
|
* Checks if `object` conforms to `source` by invoking the predicate
|
|
* properties of `source` with the corresponding property values of `object`.
|
|
*
|
|
* **Note:** This method is equivalent to `_.conforms` when `source` is
|
|
* partially applied.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.14.0
|
|
* @category Lang
|
|
* @param {Object} object The object to inspect.
|
|
* @param {Object} source The object of property predicates to conform to.
|
|
* @returns {boolean} Returns `true` if `object` conforms, else `false`.
|
|
* @example
|
|
*
|
|
* var object = { 'a': 1, 'b': 2 };
|
|
*
|
|
* _.conformsTo(object, { 'b': function(n) { return n > 1; } });
|
|
* // => true
|
|
*
|
|
* _.conformsTo(object, { 'b': function(n) { return n > 2; } });
|
|
* // => false
|
|
*/
|
|
function conformsTo(object, source) {
|
|
return source == null || baseConformsTo(object, source, keys(source));
|
|
}
|
|
|
|
/**
|
|
* Performs a
|
|
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
* comparison between two values to determine if they are equivalent.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to compare.
|
|
* @param {*} other The other value to compare.
|
|
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
* @example
|
|
*
|
|
* var object = { 'a': 1 };
|
|
* var other = { 'a': 1 };
|
|
*
|
|
* _.eq(object, object);
|
|
* // => true
|
|
*
|
|
* _.eq(object, other);
|
|
* // => false
|
|
*
|
|
* _.eq('a', 'a');
|
|
* // => true
|
|
*
|
|
* _.eq('a', Object('a'));
|
|
* // => false
|
|
*
|
|
* _.eq(NaN, NaN);
|
|
* // => true
|
|
*/
|
|
function eq(value, other) {
|
|
return value === other || (value !== value && other !== other);
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is greater than `other`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.9.0
|
|
* @category Lang
|
|
* @param {*} value The value to compare.
|
|
* @param {*} other The other value to compare.
|
|
* @returns {boolean} Returns `true` if `value` is greater than `other`,
|
|
* else `false`.
|
|
* @see _.lt
|
|
* @example
|
|
*
|
|
* _.gt(3, 1);
|
|
* // => true
|
|
*
|
|
* _.gt(3, 3);
|
|
* // => false
|
|
*
|
|
* _.gt(1, 3);
|
|
* // => false
|
|
*/
|
|
var gt = createRelationalOperation(baseGt);
|
|
|
|
/**
|
|
* Checks if `value` is greater than or equal to `other`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.9.0
|
|
* @category Lang
|
|
* @param {*} value The value to compare.
|
|
* @param {*} other The other value to compare.
|
|
* @returns {boolean} Returns `true` if `value` is greater than or equal to
|
|
* `other`, else `false`.
|
|
* @see _.lte
|
|
* @example
|
|
*
|
|
* _.gte(3, 1);
|
|
* // => true
|
|
*
|
|
* _.gte(3, 3);
|
|
* // => true
|
|
*
|
|
* _.gte(1, 3);
|
|
* // => false
|
|
*/
|
|
var gte = createRelationalOperation(function(value, other) {
|
|
return value >= other;
|
|
});
|
|
|
|
/**
|
|
* Checks if `value` is likely an `arguments` object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
* else `false`.
|
|
* @example
|
|
*
|
|
* _.isArguments(function() { return arguments; }());
|
|
* // => true
|
|
*
|
|
* _.isArguments([1, 2, 3]);
|
|
* // => false
|
|
*/
|
|
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
|
|
return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
|
|
!propertyIsEnumerable.call(value, 'callee');
|
|
};
|
|
|
|
/**
|
|
* Checks if `value` is classified as an `Array` object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
* @example
|
|
*
|
|
* _.isArray([1, 2, 3]);
|
|
* // => true
|
|
*
|
|
* _.isArray(document.body.children);
|
|
* // => false
|
|
*
|
|
* _.isArray('abc');
|
|
* // => false
|
|
*
|
|
* _.isArray(_.noop);
|
|
* // => false
|
|
*/
|
|
var isArray = Array.isArray;
|
|
|
|
/**
|
|
* Checks if `value` is classified as an `ArrayBuffer` object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.3.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
|
|
* @example
|
|
*
|
|
* _.isArrayBuffer(new ArrayBuffer(2));
|
|
* // => true
|
|
*
|
|
* _.isArrayBuffer(new Array(2));
|
|
* // => false
|
|
*/
|
|
var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
|
|
|
|
/**
|
|
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
* not a function and has a `value.length` that's an integer greater than or
|
|
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
* @example
|
|
*
|
|
* _.isArrayLike([1, 2, 3]);
|
|
* // => true
|
|
*
|
|
* _.isArrayLike(document.body.children);
|
|
* // => true
|
|
*
|
|
* _.isArrayLike('abc');
|
|
* // => true
|
|
*
|
|
* _.isArrayLike(_.noop);
|
|
* // => false
|
|
*/
|
|
function isArrayLike(value) {
|
|
return value != null && isLength(value.length) && !isFunction(value);
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.isArrayLike` except that it also checks if `value`
|
|
* is an object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
|
* else `false`.
|
|
* @example
|
|
*
|
|
* _.isArrayLikeObject([1, 2, 3]);
|
|
* // => true
|
|
*
|
|
* _.isArrayLikeObject(document.body.children);
|
|
* // => true
|
|
*
|
|
* _.isArrayLikeObject('abc');
|
|
* // => false
|
|
*
|
|
* _.isArrayLikeObject(_.noop);
|
|
* // => false
|
|
*/
|
|
function isArrayLikeObject(value) {
|
|
return isObjectLike(value) && isArrayLike(value);
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is classified as a boolean primitive or object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
|
|
* @example
|
|
*
|
|
* _.isBoolean(false);
|
|
* // => true
|
|
*
|
|
* _.isBoolean(null);
|
|
* // => false
|
|
*/
|
|
function isBoolean(value) {
|
|
return value === true || value === false ||
|
|
(isObjectLike(value) && baseGetTag(value) == boolTag);
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is a buffer.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.3.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
|
* @example
|
|
*
|
|
* _.isBuffer(new Buffer(2));
|
|
* // => true
|
|
*
|
|
* _.isBuffer(new Uint8Array(2));
|
|
* // => false
|
|
*/
|
|
var isBuffer = nativeIsBuffer || stubFalse;
|
|
|
|
/**
|
|
* Checks if `value` is classified as a `Date` object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a date object, else `false`.
|
|
* @example
|
|
*
|
|
* _.isDate(new Date);
|
|
* // => true
|
|
*
|
|
* _.isDate('Mon April 23 2012');
|
|
* // => false
|
|
*/
|
|
var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
|
|
|
|
/**
|
|
* Checks if `value` is likely a DOM element.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
|
|
* @example
|
|
*
|
|
* _.isElement(document.body);
|
|
* // => true
|
|
*
|
|
* _.isElement('<body>');
|
|
* // => false
|
|
*/
|
|
function isElement(value) {
|
|
return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is an empty object, collection, map, or set.
|
|
*
|
|
* Objects are considered empty if they have no own enumerable string keyed
|
|
* properties.
|
|
*
|
|
* Array-like values such as `arguments` objects, arrays, buffers, strings, or
|
|
* jQuery-like collections are considered empty if they have a `length` of `0`.
|
|
* Similarly, maps and sets are considered empty if they have a `size` of `0`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is empty, else `false`.
|
|
* @example
|
|
*
|
|
* _.isEmpty(null);
|
|
* // => true
|
|
*
|
|
* _.isEmpty(true);
|
|
* // => true
|
|
*
|
|
* _.isEmpty(1);
|
|
* // => true
|
|
*
|
|
* _.isEmpty([1, 2, 3]);
|
|
* // => false
|
|
*
|
|
* _.isEmpty({ 'a': 1 });
|
|
* // => false
|
|
*/
|
|
function isEmpty(value) {
|
|
if (value == null) {
|
|
return true;
|
|
}
|
|
if (isArrayLike(value) &&
|
|
(isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
|
|
isBuffer(value) || isTypedArray(value) || isArguments(value))) {
|
|
return !value.length;
|
|
}
|
|
var tag = getTag(value);
|
|
if (tag == mapTag || tag == setTag) {
|
|
return !value.size;
|
|
}
|
|
if (isPrototype(value)) {
|
|
return !baseKeys(value).length;
|
|
}
|
|
for (var key in value) {
|
|
if (hasOwnProperty.call(value, key)) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Performs a deep comparison between two values to determine if they are
|
|
* equivalent.
|
|
*
|
|
* **Note:** This method supports comparing arrays, array buffers, booleans,
|
|
* date objects, error objects, maps, numbers, `Object` objects, regexes,
|
|
* sets, strings, symbols, and typed arrays. `Object` objects are compared
|
|
* by their own, not inherited, enumerable properties. Functions and DOM
|
|
* nodes are compared by strict equality, i.e. `===`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to compare.
|
|
* @param {*} other The other value to compare.
|
|
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
* @example
|
|
*
|
|
* var object = { 'a': 1 };
|
|
* var other = { 'a': 1 };
|
|
*
|
|
* _.isEqual(object, other);
|
|
* // => true
|
|
*
|
|
* object === other;
|
|
* // => false
|
|
*/
|
|
function isEqual(value, other) {
|
|
return baseIsEqual(value, other);
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.isEqual` except that it accepts `customizer` which
|
|
* is invoked to compare values. If `customizer` returns `undefined`, comparisons
|
|
* are handled by the method instead. The `customizer` is invoked with up to
|
|
* six arguments: (objValue, othValue [, index|key, object, other, stack]).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to compare.
|
|
* @param {*} other The other value to compare.
|
|
* @param {Function} [customizer] The function to customize comparisons.
|
|
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
* @example
|
|
*
|
|
* function isGreeting(value) {
|
|
* return /^h(?:i|ello)$/.test(value);
|
|
* }
|
|
*
|
|
* function customizer(objValue, othValue) {
|
|
* if (isGreeting(objValue) && isGreeting(othValue)) {
|
|
* return true;
|
|
* }
|
|
* }
|
|
*
|
|
* var array = ['hello', 'goodbye'];
|
|
* var other = ['hi', 'goodbye'];
|
|
*
|
|
* _.isEqualWith(array, other, customizer);
|
|
* // => true
|
|
*/
|
|
function isEqualWith(value, other, customizer) {
|
|
customizer = typeof customizer == 'function' ? customizer : undefined;
|
|
var result = customizer ? customizer(value, other) : undefined;
|
|
return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
|
|
* `SyntaxError`, `TypeError`, or `URIError` object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is an error object, else `false`.
|
|
* @example
|
|
*
|
|
* _.isError(new Error);
|
|
* // => true
|
|
*
|
|
* _.isError(Error);
|
|
* // => false
|
|
*/
|
|
function isError(value) {
|
|
if (!isObjectLike(value)) {
|
|
return false;
|
|
}
|
|
var tag = baseGetTag(value);
|
|
return tag == errorTag || tag == domExcTag ||
|
|
(typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is a finite primitive number.
|
|
*
|
|
* **Note:** This method is based on
|
|
* [`Number.isFinite`](https://mdn.io/Number/isFinite).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
|
|
* @example
|
|
*
|
|
* _.isFinite(3);
|
|
* // => true
|
|
*
|
|
* _.isFinite(Number.MIN_VALUE);
|
|
* // => true
|
|
*
|
|
* _.isFinite(Infinity);
|
|
* // => false
|
|
*
|
|
* _.isFinite('3');
|
|
* // => false
|
|
*/
|
|
function isFinite(value) {
|
|
return typeof value == 'number' && nativeIsFinite(value);
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is classified as a `Function` object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
* @example
|
|
*
|
|
* _.isFunction(_);
|
|
* // => true
|
|
*
|
|
* _.isFunction(/abc/);
|
|
* // => false
|
|
*/
|
|
function isFunction(value) {
|
|
if (!isObject(value)) {
|
|
return false;
|
|
}
|
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
var tag = baseGetTag(value);
|
|
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is an integer.
|
|
*
|
|
* **Note:** This method is based on
|
|
* [`Number.isInteger`](https://mdn.io/Number/isInteger).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is an integer, else `false`.
|
|
* @example
|
|
*
|
|
* _.isInteger(3);
|
|
* // => true
|
|
*
|
|
* _.isInteger(Number.MIN_VALUE);
|
|
* // => false
|
|
*
|
|
* _.isInteger(Infinity);
|
|
* // => false
|
|
*
|
|
* _.isInteger('3');
|
|
* // => false
|
|
*/
|
|
function isInteger(value) {
|
|
return typeof value == 'number' && value == toInteger(value);
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is a valid array-like length.
|
|
*
|
|
* **Note:** This method is loosely based on
|
|
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
* @example
|
|
*
|
|
* _.isLength(3);
|
|
* // => true
|
|
*
|
|
* _.isLength(Number.MIN_VALUE);
|
|
* // => false
|
|
*
|
|
* _.isLength(Infinity);
|
|
* // => false
|
|
*
|
|
* _.isLength('3');
|
|
* // => false
|
|
*/
|
|
function isLength(value) {
|
|
return typeof value == 'number' &&
|
|
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is the
|
|
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
* @example
|
|
*
|
|
* _.isObject({});
|
|
* // => true
|
|
*
|
|
* _.isObject([1, 2, 3]);
|
|
* // => true
|
|
*
|
|
* _.isObject(_.noop);
|
|
* // => true
|
|
*
|
|
* _.isObject(null);
|
|
* // => false
|
|
*/
|
|
function isObject(value) {
|
|
var type = typeof value;
|
|
return value != null && (type == 'object' || type == 'function');
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
* and has a `typeof` result of "object".
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
* @example
|
|
*
|
|
* _.isObjectLike({});
|
|
* // => true
|
|
*
|
|
* _.isObjectLike([1, 2, 3]);
|
|
* // => true
|
|
*
|
|
* _.isObjectLike(_.noop);
|
|
* // => false
|
|
*
|
|
* _.isObjectLike(null);
|
|
* // => false
|
|
*/
|
|
function isObjectLike(value) {
|
|
return value != null && typeof value == 'object';
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is classified as a `Map` object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.3.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a map, else `false`.
|
|
* @example
|
|
*
|
|
* _.isMap(new Map);
|
|
* // => true
|
|
*
|
|
* _.isMap(new WeakMap);
|
|
* // => false
|
|
*/
|
|
var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
|
|
|
|
/**
|
|
* Performs a partial deep comparison between `object` and `source` to
|
|
* determine if `object` contains equivalent property values.
|
|
*
|
|
* **Note:** This method is equivalent to `_.matches` when `source` is
|
|
* partially applied.
|
|
*
|
|
* Partial comparisons will match empty array and empty object `source`
|
|
* values against any array or object value, respectively. See `_.isEqual`
|
|
* for a list of supported value comparisons.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Lang
|
|
* @param {Object} object The object to inspect.
|
|
* @param {Object} source The object of property values to match.
|
|
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
|
|
* @example
|
|
*
|
|
* var object = { 'a': 1, 'b': 2 };
|
|
*
|
|
* _.isMatch(object, { 'b': 2 });
|
|
* // => true
|
|
*
|
|
* _.isMatch(object, { 'b': 1 });
|
|
* // => false
|
|
*/
|
|
function isMatch(object, source) {
|
|
return object === source || baseIsMatch(object, source, getMatchData(source));
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.isMatch` except that it accepts `customizer` which
|
|
* is invoked to compare values. If `customizer` returns `undefined`, comparisons
|
|
* are handled by the method instead. The `customizer` is invoked with five
|
|
* arguments: (objValue, srcValue, index|key, object, source).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {Object} object The object to inspect.
|
|
* @param {Object} source The object of property values to match.
|
|
* @param {Function} [customizer] The function to customize comparisons.
|
|
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
|
|
* @example
|
|
*
|
|
* function isGreeting(value) {
|
|
* return /^h(?:i|ello)$/.test(value);
|
|
* }
|
|
*
|
|
* function customizer(objValue, srcValue) {
|
|
* if (isGreeting(objValue) && isGreeting(srcValue)) {
|
|
* return true;
|
|
* }
|
|
* }
|
|
*
|
|
* var object = { 'greeting': 'hello' };
|
|
* var source = { 'greeting': 'hi' };
|
|
*
|
|
* _.isMatchWith(object, source, customizer);
|
|
* // => true
|
|
*/
|
|
function isMatchWith(object, source, customizer) {
|
|
customizer = typeof customizer == 'function' ? customizer : undefined;
|
|
return baseIsMatch(object, source, getMatchData(source), customizer);
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is `NaN`.
|
|
*
|
|
* **Note:** This method is based on
|
|
* [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
|
|
* global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
|
|
* `undefined` and other non-number values.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
|
|
* @example
|
|
*
|
|
* _.isNaN(NaN);
|
|
* // => true
|
|
*
|
|
* _.isNaN(new Number(NaN));
|
|
* // => true
|
|
*
|
|
* isNaN(undefined);
|
|
* // => true
|
|
*
|
|
* _.isNaN(undefined);
|
|
* // => false
|
|
*/
|
|
function isNaN(value) {
|
|
// An `NaN` primitive is the only value that is not equal to itself.
|
|
// Perform the `toStringTag` check first to avoid errors with some
|
|
// ActiveX objects in IE.
|
|
return isNumber(value) && value != +value;
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is a pristine native function.
|
|
*
|
|
* **Note:** This method can't reliably detect native functions in the presence
|
|
* of the core-js package because core-js circumvents this kind of detection.
|
|
* Despite multiple requests, the core-js maintainer has made it clear: any
|
|
* attempt to fix the detection will be obstructed. As a result, we're left
|
|
* with little choice but to throw an error. Unfortunately, this also affects
|
|
* packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
|
|
* which rely on core-js.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
* else `false`.
|
|
* @example
|
|
*
|
|
* _.isNative(Array.prototype.push);
|
|
* // => true
|
|
*
|
|
* _.isNative(_);
|
|
* // => false
|
|
*/
|
|
function isNative(value) {
|
|
if (isMaskable(value)) {
|
|
throw new Error(CORE_ERROR_TEXT);
|
|
}
|
|
return baseIsNative(value);
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is `null`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is `null`, else `false`.
|
|
* @example
|
|
*
|
|
* _.isNull(null);
|
|
* // => true
|
|
*
|
|
* _.isNull(void 0);
|
|
* // => false
|
|
*/
|
|
function isNull(value) {
|
|
return value === null;
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is `null` or `undefined`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is nullish, else `false`.
|
|
* @example
|
|
*
|
|
* _.isNil(null);
|
|
* // => true
|
|
*
|
|
* _.isNil(void 0);
|
|
* // => true
|
|
*
|
|
* _.isNil(NaN);
|
|
* // => false
|
|
*/
|
|
function isNil(value) {
|
|
return value == null;
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is classified as a `Number` primitive or object.
|
|
*
|
|
* **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
|
|
* classified as numbers, use the `_.isFinite` method.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a number, else `false`.
|
|
* @example
|
|
*
|
|
* _.isNumber(3);
|
|
* // => true
|
|
*
|
|
* _.isNumber(Number.MIN_VALUE);
|
|
* // => true
|
|
*
|
|
* _.isNumber(Infinity);
|
|
* // => true
|
|
*
|
|
* _.isNumber('3');
|
|
* // => false
|
|
*/
|
|
function isNumber(value) {
|
|
return typeof value == 'number' ||
|
|
(isObjectLike(value) && baseGetTag(value) == numberTag);
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is a plain object, that is, an object created by the
|
|
* `Object` constructor or one with a `[[Prototype]]` of `null`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.8.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.a = 1;
|
|
* }
|
|
*
|
|
* _.isPlainObject(new Foo);
|
|
* // => false
|
|
*
|
|
* _.isPlainObject([1, 2, 3]);
|
|
* // => false
|
|
*
|
|
* _.isPlainObject({ 'x': 0, 'y': 0 });
|
|
* // => true
|
|
*
|
|
* _.isPlainObject(Object.create(null));
|
|
* // => true
|
|
*/
|
|
function isPlainObject(value) {
|
|
if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
|
|
return false;
|
|
}
|
|
var proto = getPrototype(value);
|
|
if (proto === null) {
|
|
return true;
|
|
}
|
|
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
|
|
return typeof Ctor == 'function' && Ctor instanceof Ctor &&
|
|
funcToString.call(Ctor) == objectCtorString;
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is classified as a `RegExp` object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
|
|
* @example
|
|
*
|
|
* _.isRegExp(/abc/);
|
|
* // => true
|
|
*
|
|
* _.isRegExp('/abc/');
|
|
* // => false
|
|
*/
|
|
var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
|
|
|
|
/**
|
|
* Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
|
|
* double precision number which isn't the result of a rounded unsafe integer.
|
|
*
|
|
* **Note:** This method is based on
|
|
* [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
|
|
* @example
|
|
*
|
|
* _.isSafeInteger(3);
|
|
* // => true
|
|
*
|
|
* _.isSafeInteger(Number.MIN_VALUE);
|
|
* // => false
|
|
*
|
|
* _.isSafeInteger(Infinity);
|
|
* // => false
|
|
*
|
|
* _.isSafeInteger('3');
|
|
* // => false
|
|
*/
|
|
function isSafeInteger(value) {
|
|
return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is classified as a `Set` object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.3.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a set, else `false`.
|
|
* @example
|
|
*
|
|
* _.isSet(new Set);
|
|
* // => true
|
|
*
|
|
* _.isSet(new WeakSet);
|
|
* // => false
|
|
*/
|
|
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
|
|
|
/**
|
|
* Checks if `value` is classified as a `String` primitive or object.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
|
* @example
|
|
*
|
|
* _.isString('abc');
|
|
* // => true
|
|
*
|
|
* _.isString(1);
|
|
* // => false
|
|
*/
|
|
function isString(value) {
|
|
return typeof value == 'string' ||
|
|
(!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
* @example
|
|
*
|
|
* _.isSymbol(Symbol.iterator);
|
|
* // => true
|
|
*
|
|
* _.isSymbol('abc');
|
|
* // => false
|
|
*/
|
|
function isSymbol(value) {
|
|
return typeof value == 'symbol' ||
|
|
(isObjectLike(value) && baseGetTag(value) == symbolTag);
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is classified as a typed array.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
* @example
|
|
*
|
|
* _.isTypedArray(new Uint8Array);
|
|
* // => true
|
|
*
|
|
* _.isTypedArray([]);
|
|
* // => false
|
|
*/
|
|
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
|
|
/**
|
|
* Checks if `value` is `undefined`.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
|
|
* @example
|
|
*
|
|
* _.isUndefined(void 0);
|
|
* // => true
|
|
*
|
|
* _.isUndefined(null);
|
|
* // => false
|
|
*/
|
|
function isUndefined(value) {
|
|
return value === undefined;
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is classified as a `WeakMap` object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.3.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
|
|
* @example
|
|
*
|
|
* _.isWeakMap(new WeakMap);
|
|
* // => true
|
|
*
|
|
* _.isWeakMap(new Map);
|
|
* // => false
|
|
*/
|
|
function isWeakMap(value) {
|
|
return isObjectLike(value) && getTag(value) == weakMapTag;
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is classified as a `WeakSet` object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.3.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
|
|
* @example
|
|
*
|
|
* _.isWeakSet(new WeakSet);
|
|
* // => true
|
|
*
|
|
* _.isWeakSet(new Set);
|
|
* // => false
|
|
*/
|
|
function isWeakSet(value) {
|
|
return isObjectLike(value) && baseGetTag(value) == weakSetTag;
|
|
}
|
|
|
|
/**
|
|
* Checks if `value` is less than `other`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.9.0
|
|
* @category Lang
|
|
* @param {*} value The value to compare.
|
|
* @param {*} other The other value to compare.
|
|
* @returns {boolean} Returns `true` if `value` is less than `other`,
|
|
* else `false`.
|
|
* @see _.gt
|
|
* @example
|
|
*
|
|
* _.lt(1, 3);
|
|
* // => true
|
|
*
|
|
* _.lt(3, 3);
|
|
* // => false
|
|
*
|
|
* _.lt(3, 1);
|
|
* // => false
|
|
*/
|
|
var lt = createRelationalOperation(baseLt);
|
|
|
|
/**
|
|
* Checks if `value` is less than or equal to `other`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.9.0
|
|
* @category Lang
|
|
* @param {*} value The value to compare.
|
|
* @param {*} other The other value to compare.
|
|
* @returns {boolean} Returns `true` if `value` is less than or equal to
|
|
* `other`, else `false`.
|
|
* @see _.gte
|
|
* @example
|
|
*
|
|
* _.lte(1, 3);
|
|
* // => true
|
|
*
|
|
* _.lte(3, 3);
|
|
* // => true
|
|
*
|
|
* _.lte(3, 1);
|
|
* // => false
|
|
*/
|
|
var lte = createRelationalOperation(function(value, other) {
|
|
return value <= other;
|
|
});
|
|
|
|
/**
|
|
* Converts `value` to an array.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Lang
|
|
* @param {*} value The value to convert.
|
|
* @returns {Array} Returns the converted array.
|
|
* @example
|
|
*
|
|
* _.toArray({ 'a': 1, 'b': 2 });
|
|
* // => [1, 2]
|
|
*
|
|
* _.toArray('abc');
|
|
* // => ['a', 'b', 'c']
|
|
*
|
|
* _.toArray(1);
|
|
* // => []
|
|
*
|
|
* _.toArray(null);
|
|
* // => []
|
|
*/
|
|
function toArray(value) {
|
|
if (!value) {
|
|
return [];
|
|
}
|
|
if (isArrayLike(value)) {
|
|
return isString(value) ? stringToArray(value) : copyArray(value);
|
|
}
|
|
if (symIterator && value[symIterator]) {
|
|
return iteratorToArray(value[symIterator]());
|
|
}
|
|
var tag = getTag(value),
|
|
func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
|
|
|
|
return func(value);
|
|
}
|
|
|
|
/**
|
|
* Converts `value` to a finite number.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.12.0
|
|
* @category Lang
|
|
* @param {*} value The value to convert.
|
|
* @returns {number} Returns the converted number.
|
|
* @example
|
|
*
|
|
* _.toFinite(3.2);
|
|
* // => 3.2
|
|
*
|
|
* _.toFinite(Number.MIN_VALUE);
|
|
* // => 5e-324
|
|
*
|
|
* _.toFinite(Infinity);
|
|
* // => 1.7976931348623157e+308
|
|
*
|
|
* _.toFinite('3.2');
|
|
* // => 3.2
|
|
*/
|
|
function toFinite(value) {
|
|
if (!value) {
|
|
return value === 0 ? value : 0;
|
|
}
|
|
value = toNumber(value);
|
|
if (value === INFINITY || value === -INFINITY) {
|
|
var sign = (value < 0 ? -1 : 1);
|
|
return sign * MAX_INTEGER;
|
|
}
|
|
return value === value ? value : 0;
|
|
}
|
|
|
|
/**
|
|
* Converts `value` to an integer.
|
|
*
|
|
* **Note:** This method is loosely based on
|
|
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to convert.
|
|
* @returns {number} Returns the converted integer.
|
|
* @example
|
|
*
|
|
* _.toInteger(3.2);
|
|
* // => 3
|
|
*
|
|
* _.toInteger(Number.MIN_VALUE);
|
|
* // => 0
|
|
*
|
|
* _.toInteger(Infinity);
|
|
* // => 1.7976931348623157e+308
|
|
*
|
|
* _.toInteger('3.2');
|
|
* // => 3
|
|
*/
|
|
function toInteger(value) {
|
|
var result = toFinite(value),
|
|
remainder = result % 1;
|
|
|
|
return result === result ? (remainder ? result - remainder : result) : 0;
|
|
}
|
|
|
|
/**
|
|
* Converts `value` to an integer suitable for use as the length of an
|
|
* array-like object.
|
|
*
|
|
* **Note:** This method is based on
|
|
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to convert.
|
|
* @returns {number} Returns the converted integer.
|
|
* @example
|
|
*
|
|
* _.toLength(3.2);
|
|
* // => 3
|
|
*
|
|
* _.toLength(Number.MIN_VALUE);
|
|
* // => 0
|
|
*
|
|
* _.toLength(Infinity);
|
|
* // => 4294967295
|
|
*
|
|
* _.toLength('3.2');
|
|
* // => 3
|
|
*/
|
|
function toLength(value) {
|
|
return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
|
|
}
|
|
|
|
/**
|
|
* Converts `value` to a number.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to process.
|
|
* @returns {number} Returns the number.
|
|
* @example
|
|
*
|
|
* _.toNumber(3.2);
|
|
* // => 3.2
|
|
*
|
|
* _.toNumber(Number.MIN_VALUE);
|
|
* // => 5e-324
|
|
*
|
|
* _.toNumber(Infinity);
|
|
* // => Infinity
|
|
*
|
|
* _.toNumber('3.2');
|
|
* // => 3.2
|
|
*/
|
|
function toNumber(value) {
|
|
if (typeof value == 'number') {
|
|
return value;
|
|
}
|
|
if (isSymbol(value)) {
|
|
return NAN;
|
|
}
|
|
if (isObject(value)) {
|
|
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
|
value = isObject(other) ? (other + '') : other;
|
|
}
|
|
if (typeof value != 'string') {
|
|
return value === 0 ? value : +value;
|
|
}
|
|
value = baseTrim(value);
|
|
var isBinary = reIsBinary.test(value);
|
|
return (isBinary || reIsOctal.test(value))
|
|
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
|
: (reIsBadHex.test(value) ? NAN : +value);
|
|
}
|
|
|
|
/**
|
|
* Converts `value` to a plain object flattening inherited enumerable string
|
|
* keyed properties of `value` to own properties of the plain object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to convert.
|
|
* @returns {Object} Returns the converted plain object.
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.b = 2;
|
|
* }
|
|
*
|
|
* Foo.prototype.c = 3;
|
|
*
|
|
* _.assign({ 'a': 1 }, new Foo);
|
|
* // => { 'a': 1, 'b': 2 }
|
|
*
|
|
* _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
|
|
* // => { 'a': 1, 'b': 2, 'c': 3 }
|
|
*/
|
|
function toPlainObject(value) {
|
|
return copyObject(value, keysIn(value));
|
|
}
|
|
|
|
/**
|
|
* Converts `value` to a safe integer. A safe integer can be compared and
|
|
* represented correctly.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to convert.
|
|
* @returns {number} Returns the converted integer.
|
|
* @example
|
|
*
|
|
* _.toSafeInteger(3.2);
|
|
* // => 3
|
|
*
|
|
* _.toSafeInteger(Number.MIN_VALUE);
|
|
* // => 0
|
|
*
|
|
* _.toSafeInteger(Infinity);
|
|
* // => 9007199254740991
|
|
*
|
|
* _.toSafeInteger('3.2');
|
|
* // => 3
|
|
*/
|
|
function toSafeInteger(value) {
|
|
return value
|
|
? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
|
|
: (value === 0 ? value : 0);
|
|
}
|
|
|
|
/**
|
|
* Converts `value` to a string. An empty string is returned for `null`
|
|
* and `undefined` values. The sign of `-0` is preserved.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to convert.
|
|
* @returns {string} Returns the converted string.
|
|
* @example
|
|
*
|
|
* _.toString(null);
|
|
* // => ''
|
|
*
|
|
* _.toString(-0);
|
|
* // => '-0'
|
|
*
|
|
* _.toString([1, 2, 3]);
|
|
* // => '1,2,3'
|
|
*/
|
|
function toString(value) {
|
|
return value == null ? '' : baseToString(value);
|
|
}
|
|
|
|
/*------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
* Assigns own enumerable string keyed properties of source objects to the
|
|
* destination object. Source objects are applied from left to right.
|
|
* Subsequent sources overwrite property assignments of previous sources.
|
|
*
|
|
* **Note:** This method mutates `object` and is loosely based on
|
|
* [`Object.assign`](https://mdn.io/Object/assign).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.10.0
|
|
* @category Object
|
|
* @param {Object} object The destination object.
|
|
* @param {...Object} [sources] The source objects.
|
|
* @returns {Object} Returns `object`.
|
|
* @see _.assignIn
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.a = 1;
|
|
* }
|
|
*
|
|
* function Bar() {
|
|
* this.c = 3;
|
|
* }
|
|
*
|
|
* Foo.prototype.b = 2;
|
|
* Bar.prototype.d = 4;
|
|
*
|
|
* _.assign({ 'a': 0 }, new Foo, new Bar);
|
|
* // => { 'a': 1, 'c': 3 }
|
|
*/
|
|
var assign = createAssigner(function(object, source) {
|
|
if (isPrototype(source) || isArrayLike(source)) {
|
|
copyObject(source, keys(source), object);
|
|
return;
|
|
}
|
|
for (var key in source) {
|
|
if (hasOwnProperty.call(source, key)) {
|
|
assignValue(object, key, source[key]);
|
|
}
|
|
}
|
|
});
|
|
|
|
/**
|
|
* This method is like `_.assign` except that it iterates over own and
|
|
* inherited source properties.
|
|
*
|
|
* **Note:** This method mutates `object`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @alias extend
|
|
* @category Object
|
|
* @param {Object} object The destination object.
|
|
* @param {...Object} [sources] The source objects.
|
|
* @returns {Object} Returns `object`.
|
|
* @see _.assign
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.a = 1;
|
|
* }
|
|
*
|
|
* function Bar() {
|
|
* this.c = 3;
|
|
* }
|
|
*
|
|
* Foo.prototype.b = 2;
|
|
* Bar.prototype.d = 4;
|
|
*
|
|
* _.assignIn({ 'a': 0 }, new Foo, new Bar);
|
|
* // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
|
|
*/
|
|
var assignIn = createAssigner(function(object, source) {
|
|
copyObject(source, keysIn(source), object);
|
|
});
|
|
|
|
/**
|
|
* This method is like `_.assignIn` except that it accepts `customizer`
|
|
* which is invoked to produce the assigned values. If `customizer` returns
|
|
* `undefined`, assignment is handled by the method instead. The `customizer`
|
|
* is invoked with five arguments: (objValue, srcValue, key, object, source).
|
|
*
|
|
* **Note:** This method mutates `object`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @alias extendWith
|
|
* @category Object
|
|
* @param {Object} object The destination object.
|
|
* @param {...Object} sources The source objects.
|
|
* @param {Function} [customizer] The function to customize assigned values.
|
|
* @returns {Object} Returns `object`.
|
|
* @see _.assignWith
|
|
* @example
|
|
*
|
|
* function customizer(objValue, srcValue) {
|
|
* return _.isUndefined(objValue) ? srcValue : objValue;
|
|
* }
|
|
*
|
|
* var defaults = _.partialRight(_.assignInWith, customizer);
|
|
*
|
|
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
|
* // => { 'a': 1, 'b': 2 }
|
|
*/
|
|
var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
|
|
copyObject(source, keysIn(source), object, customizer);
|
|
});
|
|
|
|
/**
|
|
* This method is like `_.assign` except that it accepts `customizer`
|
|
* which is invoked to produce the assigned values. If `customizer` returns
|
|
* `undefined`, assignment is handled by the method instead. The `customizer`
|
|
* is invoked with five arguments: (objValue, srcValue, key, object, source).
|
|
*
|
|
* **Note:** This method mutates `object`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Object
|
|
* @param {Object} object The destination object.
|
|
* @param {...Object} sources The source objects.
|
|
* @param {Function} [customizer] The function to customize assigned values.
|
|
* @returns {Object} Returns `object`.
|
|
* @see _.assignInWith
|
|
* @example
|
|
*
|
|
* function customizer(objValue, srcValue) {
|
|
* return _.isUndefined(objValue) ? srcValue : objValue;
|
|
* }
|
|
*
|
|
* var defaults = _.partialRight(_.assignWith, customizer);
|
|
*
|
|
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
|
* // => { 'a': 1, 'b': 2 }
|
|
*/
|
|
var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
|
|
copyObject(source, keys(source), object, customizer);
|
|
});
|
|
|
|
/**
|
|
* Creates an array of values corresponding to `paths` of `object`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 1.0.0
|
|
* @category Object
|
|
* @param {Object} object The object to iterate over.
|
|
* @param {...(string|string[])} [paths] The property paths to pick.
|
|
* @returns {Array} Returns the picked values.
|
|
* @example
|
|
*
|
|
* var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
|
|
*
|
|
* _.at(object, ['a[0].b.c', 'a[1]']);
|
|
* // => [3, 4]
|
|
*/
|
|
var at = flatRest(baseAt);
|
|
|
|
/**
|
|
* Creates an object that inherits from the `prototype` object. If a
|
|
* `properties` object is given, its own enumerable string keyed properties
|
|
* are assigned to the created object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.3.0
|
|
* @category Object
|
|
* @param {Object} prototype The object to inherit from.
|
|
* @param {Object} [properties] The properties to assign to the object.
|
|
* @returns {Object} Returns the new object.
|
|
* @example
|
|
*
|
|
* function Shape() {
|
|
* this.x = 0;
|
|
* this.y = 0;
|
|
* }
|
|
*
|
|
* function Circle() {
|
|
* Shape.call(this);
|
|
* }
|
|
*
|
|
* Circle.prototype = _.create(Shape.prototype, {
|
|
* 'constructor': Circle
|
|
* });
|
|
*
|
|
* var circle = new Circle;
|
|
* circle instanceof Circle;
|
|
* // => true
|
|
*
|
|
* circle instanceof Shape;
|
|
* // => true
|
|
*/
|
|
function create(prototype, properties) {
|
|
var result = baseCreate(prototype);
|
|
return properties == null ? result : baseAssign(result, properties);
|
|
}
|
|
|
|
/**
|
|
* Assigns own and inherited enumerable string keyed properties of source
|
|
* objects to the destination object for all destination properties that
|
|
* resolve to `undefined`. Source objects are applied from left to right.
|
|
* Once a property is set, additional values of the same property are ignored.
|
|
*
|
|
* **Note:** This method mutates `object`.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Object
|
|
* @param {Object} object The destination object.
|
|
* @param {...Object} [sources] The source objects.
|
|
* @returns {Object} Returns `object`.
|
|
* @see _.defaultsDeep
|
|
* @example
|
|
*
|
|
* _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
|
* // => { 'a': 1, 'b': 2 }
|
|
*/
|
|
var defaults = baseRest(function(object, sources) {
|
|
object = Object(object);
|
|
|
|
var index = -1;
|
|
var length = sources.length;
|
|
var guard = length > 2 ? sources[2] : undefined;
|
|
|
|
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
|
length = 1;
|
|
}
|
|
|
|
while (++index < length) {
|
|
var source = sources[index];
|
|
var props = keysIn(source);
|
|
var propsIndex = -1;
|
|
var propsLength = props.length;
|
|
|
|
while (++propsIndex < propsLength) {
|
|
var key = props[propsIndex];
|
|
var value = object[key];
|
|
|
|
if (value === undefined ||
|
|
(eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
|
|
object[key] = source[key];
|
|
}
|
|
}
|
|
}
|
|
|
|
return object;
|
|
});
|
|
|
|
/**
|
|
* This method is like `_.defaults` except that it recursively assigns
|
|
* default properties.
|
|
*
|
|
* **Note:** This method mutates `object`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.10.0
|
|
* @category Object
|
|
* @param {Object} object The destination object.
|
|
* @param {...Object} [sources] The source objects.
|
|
* @returns {Object} Returns `object`.
|
|
* @see _.defaults
|
|
* @example
|
|
*
|
|
* _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
|
|
* // => { 'a': { 'b': 2, 'c': 3 } }
|
|
*/
|
|
var defaultsDeep = baseRest(function(args) {
|
|
args.push(undefined, customDefaultsMerge);
|
|
return apply(mergeWith, undefined, args);
|
|
});
|
|
|
|
/**
|
|
* This method is like `_.find` except that it returns the key of the first
|
|
* element `predicate` returns truthy for instead of the element itself.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 1.1.0
|
|
* @category Object
|
|
* @param {Object} object The object to inspect.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @returns {string|undefined} Returns the key of the matched element,
|
|
* else `undefined`.
|
|
* @example
|
|
*
|
|
* var users = {
|
|
* 'barney': { 'age': 36, 'active': true },
|
|
* 'fred': { 'age': 40, 'active': false },
|
|
* 'pebbles': { 'age': 1, 'active': true }
|
|
* };
|
|
*
|
|
* _.findKey(users, function(o) { return o.age < 40; });
|
|
* // => 'barney' (iteration order is not guaranteed)
|
|
*
|
|
* // The `_.matches` iteratee shorthand.
|
|
* _.findKey(users, { 'age': 1, 'active': true });
|
|
* // => 'pebbles'
|
|
*
|
|
* // The `_.matchesProperty` iteratee shorthand.
|
|
* _.findKey(users, ['active', false]);
|
|
* // => 'fred'
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.findKey(users, 'active');
|
|
* // => 'barney'
|
|
*/
|
|
function findKey(object, predicate) {
|
|
return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.findKey` except that it iterates over elements of
|
|
* a collection in the opposite order.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.0.0
|
|
* @category Object
|
|
* @param {Object} object The object to inspect.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @returns {string|undefined} Returns the key of the matched element,
|
|
* else `undefined`.
|
|
* @example
|
|
*
|
|
* var users = {
|
|
* 'barney': { 'age': 36, 'active': true },
|
|
* 'fred': { 'age': 40, 'active': false },
|
|
* 'pebbles': { 'age': 1, 'active': true }
|
|
* };
|
|
*
|
|
* _.findLastKey(users, function(o) { return o.age < 40; });
|
|
* // => returns 'pebbles' assuming `_.findKey` returns 'barney'
|
|
*
|
|
* // The `_.matches` iteratee shorthand.
|
|
* _.findLastKey(users, { 'age': 36, 'active': true });
|
|
* // => 'barney'
|
|
*
|
|
* // The `_.matchesProperty` iteratee shorthand.
|
|
* _.findLastKey(users, ['active', false]);
|
|
* // => 'fred'
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.findLastKey(users, 'active');
|
|
* // => 'pebbles'
|
|
*/
|
|
function findLastKey(object, predicate) {
|
|
return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
|
|
}
|
|
|
|
/**
|
|
* Iterates over own and inherited enumerable string keyed properties of an
|
|
* object and invokes `iteratee` for each property. The iteratee is invoked
|
|
* with three arguments: (value, key, object). Iteratee functions may exit
|
|
* iteration early by explicitly returning `false`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.3.0
|
|
* @category Object
|
|
* @param {Object} object The object to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @returns {Object} Returns `object`.
|
|
* @see _.forInRight
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.a = 1;
|
|
* this.b = 2;
|
|
* }
|
|
*
|
|
* Foo.prototype.c = 3;
|
|
*
|
|
* _.forIn(new Foo, function(value, key) {
|
|
* console.log(key);
|
|
* });
|
|
* // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
|
|
*/
|
|
function forIn(object, iteratee) {
|
|
return object == null
|
|
? object
|
|
: baseFor(object, getIteratee(iteratee, 3), keysIn);
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.forIn` except that it iterates over properties of
|
|
* `object` in the opposite order.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.0.0
|
|
* @category Object
|
|
* @param {Object} object The object to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @returns {Object} Returns `object`.
|
|
* @see _.forIn
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.a = 1;
|
|
* this.b = 2;
|
|
* }
|
|
*
|
|
* Foo.prototype.c = 3;
|
|
*
|
|
* _.forInRight(new Foo, function(value, key) {
|
|
* console.log(key);
|
|
* });
|
|
* // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
|
|
*/
|
|
function forInRight(object, iteratee) {
|
|
return object == null
|
|
? object
|
|
: baseForRight(object, getIteratee(iteratee, 3), keysIn);
|
|
}
|
|
|
|
/**
|
|
* Iterates over own enumerable string keyed properties of an object and
|
|
* invokes `iteratee` for each property. The iteratee is invoked with three
|
|
* arguments: (value, key, object). Iteratee functions may exit iteration
|
|
* early by explicitly returning `false`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.3.0
|
|
* @category Object
|
|
* @param {Object} object The object to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @returns {Object} Returns `object`.
|
|
* @see _.forOwnRight
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.a = 1;
|
|
* this.b = 2;
|
|
* }
|
|
*
|
|
* Foo.prototype.c = 3;
|
|
*
|
|
* _.forOwn(new Foo, function(value, key) {
|
|
* console.log(key);
|
|
* });
|
|
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
|
|
*/
|
|
function forOwn(object, iteratee) {
|
|
return object && baseForOwn(object, getIteratee(iteratee, 3));
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.forOwn` except that it iterates over properties of
|
|
* `object` in the opposite order.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.0.0
|
|
* @category Object
|
|
* @param {Object} object The object to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @returns {Object} Returns `object`.
|
|
* @see _.forOwn
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.a = 1;
|
|
* this.b = 2;
|
|
* }
|
|
*
|
|
* Foo.prototype.c = 3;
|
|
*
|
|
* _.forOwnRight(new Foo, function(value, key) {
|
|
* console.log(key);
|
|
* });
|
|
* // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
|
|
*/
|
|
function forOwnRight(object, iteratee) {
|
|
return object && baseForOwnRight(object, getIteratee(iteratee, 3));
|
|
}
|
|
|
|
/**
|
|
* Creates an array of function property names from own enumerable properties
|
|
* of `object`.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Object
|
|
* @param {Object} object The object to inspect.
|
|
* @returns {Array} Returns the function names.
|
|
* @see _.functionsIn
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.a = _.constant('a');
|
|
* this.b = _.constant('b');
|
|
* }
|
|
*
|
|
* Foo.prototype.c = _.constant('c');
|
|
*
|
|
* _.functions(new Foo);
|
|
* // => ['a', 'b']
|
|
*/
|
|
function functions(object) {
|
|
return object == null ? [] : baseFunctions(object, keys(object));
|
|
}
|
|
|
|
/**
|
|
* Creates an array of function property names from own and inherited
|
|
* enumerable properties of `object`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Object
|
|
* @param {Object} object The object to inspect.
|
|
* @returns {Array} Returns the function names.
|
|
* @see _.functions
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.a = _.constant('a');
|
|
* this.b = _.constant('b');
|
|
* }
|
|
*
|
|
* Foo.prototype.c = _.constant('c');
|
|
*
|
|
* _.functionsIn(new Foo);
|
|
* // => ['a', 'b', 'c']
|
|
*/
|
|
function functionsIn(object) {
|
|
return object == null ? [] : baseFunctions(object, keysIn(object));
|
|
}
|
|
|
|
/**
|
|
* Gets the value at `path` of `object`. If the resolved value is
|
|
* `undefined`, the `defaultValue` is returned in its place.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.7.0
|
|
* @category Object
|
|
* @param {Object} object The object to query.
|
|
* @param {Array|string} path The path of the property to get.
|
|
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
|
|
* @returns {*} Returns the resolved value.
|
|
* @example
|
|
*
|
|
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
*
|
|
* _.get(object, 'a[0].b.c');
|
|
* // => 3
|
|
*
|
|
* _.get(object, ['a', '0', 'b', 'c']);
|
|
* // => 3
|
|
*
|
|
* _.get(object, 'a.b.c', 'default');
|
|
* // => 'default'
|
|
*/
|
|
function get(object, path, defaultValue) {
|
|
var result = object == null ? undefined : baseGet(object, path);
|
|
return result === undefined ? defaultValue : result;
|
|
}
|
|
|
|
/**
|
|
* Checks if `path` is a direct property of `object`.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Object
|
|
* @param {Object} object The object to query.
|
|
* @param {Array|string} path The path to check.
|
|
* @returns {boolean} Returns `true` if `path` exists, else `false`.
|
|
* @example
|
|
*
|
|
* var object = { 'a': { 'b': 2 } };
|
|
* var other = _.create({ 'a': _.create({ 'b': 2 }) });
|
|
*
|
|
* _.has(object, 'a');
|
|
* // => true
|
|
*
|
|
* _.has(object, 'a.b');
|
|
* // => true
|
|
*
|
|
* _.has(object, ['a', 'b']);
|
|
* // => true
|
|
*
|
|
* _.has(other, 'a');
|
|
* // => false
|
|
*/
|
|
function has(object, path) {
|
|
return object != null && hasPath(object, path, baseHas);
|
|
}
|
|
|
|
/**
|
|
* Checks if `path` is a direct or inherited property of `object`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Object
|
|
* @param {Object} object The object to query.
|
|
* @param {Array|string} path The path to check.
|
|
* @returns {boolean} Returns `true` if `path` exists, else `false`.
|
|
* @example
|
|
*
|
|
* var object = _.create({ 'a': _.create({ 'b': 2 }) });
|
|
*
|
|
* _.hasIn(object, 'a');
|
|
* // => true
|
|
*
|
|
* _.hasIn(object, 'a.b');
|
|
* // => true
|
|
*
|
|
* _.hasIn(object, ['a', 'b']);
|
|
* // => true
|
|
*
|
|
* _.hasIn(object, 'b');
|
|
* // => false
|
|
*/
|
|
function hasIn(object, path) {
|
|
return object != null && hasPath(object, path, baseHasIn);
|
|
}
|
|
|
|
/**
|
|
* Creates an object composed of the inverted keys and values of `object`.
|
|
* If `object` contains duplicate values, subsequent values overwrite
|
|
* property assignments of previous values.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.7.0
|
|
* @category Object
|
|
* @param {Object} object The object to invert.
|
|
* @returns {Object} Returns the new inverted object.
|
|
* @example
|
|
*
|
|
* var object = { 'a': 1, 'b': 2, 'c': 1 };
|
|
*
|
|
* _.invert(object);
|
|
* // => { '1': 'c', '2': 'b' }
|
|
*/
|
|
var invert = createInverter(function(result, value, key) {
|
|
if (value != null &&
|
|
typeof value.toString != 'function') {
|
|
value = nativeObjectToString.call(value);
|
|
}
|
|
|
|
result[value] = key;
|
|
}, constant(identity));
|
|
|
|
/**
|
|
* This method is like `_.invert` except that the inverted object is generated
|
|
* from the results of running each element of `object` thru `iteratee`. The
|
|
* corresponding inverted value of each inverted key is an array of keys
|
|
* responsible for generating the inverted value. The iteratee is invoked
|
|
* with one argument: (value).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.1.0
|
|
* @category Object
|
|
* @param {Object} object The object to invert.
|
|
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
|
* @returns {Object} Returns the new inverted object.
|
|
* @example
|
|
*
|
|
* var object = { 'a': 1, 'b': 2, 'c': 1 };
|
|
*
|
|
* _.invertBy(object);
|
|
* // => { '1': ['a', 'c'], '2': ['b'] }
|
|
*
|
|
* _.invertBy(object, function(value) {
|
|
* return 'group' + value;
|
|
* });
|
|
* // => { 'group1': ['a', 'c'], 'group2': ['b'] }
|
|
*/
|
|
var invertBy = createInverter(function(result, value, key) {
|
|
if (value != null &&
|
|
typeof value.toString != 'function') {
|
|
value = nativeObjectToString.call(value);
|
|
}
|
|
|
|
if (hasOwnProperty.call(result, value)) {
|
|
result[value].push(key);
|
|
} else {
|
|
result[value] = [key];
|
|
}
|
|
}, getIteratee);
|
|
|
|
/**
|
|
* Invokes the method at `path` of `object`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Object
|
|
* @param {Object} object The object to query.
|
|
* @param {Array|string} path The path of the method to invoke.
|
|
* @param {...*} [args] The arguments to invoke the method with.
|
|
* @returns {*} Returns the result of the invoked method.
|
|
* @example
|
|
*
|
|
* var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
|
|
*
|
|
* _.invoke(object, 'a[0].b.c.slice', 1, 3);
|
|
* // => [2, 3]
|
|
*/
|
|
var invoke = baseRest(baseInvoke);
|
|
|
|
/**
|
|
* Creates an array of the own enumerable property names of `object`.
|
|
*
|
|
* **Note:** Non-object values are coerced to objects. See the
|
|
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
* for more details.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Object
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of property names.
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.a = 1;
|
|
* this.b = 2;
|
|
* }
|
|
*
|
|
* Foo.prototype.c = 3;
|
|
*
|
|
* _.keys(new Foo);
|
|
* // => ['a', 'b'] (iteration order is not guaranteed)
|
|
*
|
|
* _.keys('hi');
|
|
* // => ['0', '1']
|
|
*/
|
|
function keys(object) {
|
|
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
}
|
|
|
|
/**
|
|
* Creates an array of the own and inherited enumerable property names of `object`.
|
|
*
|
|
* **Note:** Non-object values are coerced to objects.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Object
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of property names.
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.a = 1;
|
|
* this.b = 2;
|
|
* }
|
|
*
|
|
* Foo.prototype.c = 3;
|
|
*
|
|
* _.keysIn(new Foo);
|
|
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
|
|
*/
|
|
function keysIn(object) {
|
|
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
|
}
|
|
|
|
/**
|
|
* The opposite of `_.mapValues`; this method creates an object with the
|
|
* same values as `object` and keys generated by running each own enumerable
|
|
* string keyed property of `object` thru `iteratee`. The iteratee is invoked
|
|
* with three arguments: (value, key, object).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.8.0
|
|
* @category Object
|
|
* @param {Object} object The object to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @returns {Object} Returns the new mapped object.
|
|
* @see _.mapValues
|
|
* @example
|
|
*
|
|
* _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
|
|
* return key + value;
|
|
* });
|
|
* // => { 'a1': 1, 'b2': 2 }
|
|
*/
|
|
function mapKeys(object, iteratee) {
|
|
var result = {};
|
|
iteratee = getIteratee(iteratee, 3);
|
|
|
|
baseForOwn(object, function(value, key, object) {
|
|
baseAssignValue(result, iteratee(value, key, object), value);
|
|
});
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Creates an object with the same keys as `object` and values generated
|
|
* by running each own enumerable string keyed property of `object` thru
|
|
* `iteratee`. The iteratee is invoked with three arguments:
|
|
* (value, key, object).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.4.0
|
|
* @category Object
|
|
* @param {Object} object The object to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @returns {Object} Returns the new mapped object.
|
|
* @see _.mapKeys
|
|
* @example
|
|
*
|
|
* var users = {
|
|
* 'fred': { 'user': 'fred', 'age': 40 },
|
|
* 'pebbles': { 'user': 'pebbles', 'age': 1 }
|
|
* };
|
|
*
|
|
* _.mapValues(users, function(o) { return o.age; });
|
|
* // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.mapValues(users, 'age');
|
|
* // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
|
|
*/
|
|
function mapValues(object, iteratee) {
|
|
var result = {};
|
|
iteratee = getIteratee(iteratee, 3);
|
|
|
|
baseForOwn(object, function(value, key, object) {
|
|
baseAssignValue(result, key, iteratee(value, key, object));
|
|
});
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.assign` except that it recursively merges own and
|
|
* inherited enumerable string keyed properties of source objects into the
|
|
* destination object. Source properties that resolve to `undefined` are
|
|
* skipped if a destination value exists. Array and plain object properties
|
|
* are merged recursively. Other objects and value types are overridden by
|
|
* assignment. Source objects are applied from left to right. Subsequent
|
|
* sources overwrite property assignments of previous sources.
|
|
*
|
|
* **Note:** This method mutates `object`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.5.0
|
|
* @category Object
|
|
* @param {Object} object The destination object.
|
|
* @param {...Object} [sources] The source objects.
|
|
* @returns {Object} Returns `object`.
|
|
* @example
|
|
*
|
|
* var object = {
|
|
* 'a': [{ 'b': 2 }, { 'd': 4 }]
|
|
* };
|
|
*
|
|
* var other = {
|
|
* 'a': [{ 'c': 3 }, { 'e': 5 }]
|
|
* };
|
|
*
|
|
* _.merge(object, other);
|
|
* // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
|
|
*/
|
|
var merge = createAssigner(function(object, source, srcIndex) {
|
|
baseMerge(object, source, srcIndex);
|
|
});
|
|
|
|
/**
|
|
* This method is like `_.merge` except that it accepts `customizer` which
|
|
* is invoked to produce the merged values of the destination and source
|
|
* properties. If `customizer` returns `undefined`, merging is handled by the
|
|
* method instead. The `customizer` is invoked with six arguments:
|
|
* (objValue, srcValue, key, object, source, stack).
|
|
*
|
|
* **Note:** This method mutates `object`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Object
|
|
* @param {Object} object The destination object.
|
|
* @param {...Object} sources The source objects.
|
|
* @param {Function} customizer The function to customize assigned values.
|
|
* @returns {Object} Returns `object`.
|
|
* @example
|
|
*
|
|
* function customizer(objValue, srcValue) {
|
|
* if (_.isArray(objValue)) {
|
|
* return objValue.concat(srcValue);
|
|
* }
|
|
* }
|
|
*
|
|
* var object = { 'a': [1], 'b': [2] };
|
|
* var other = { 'a': [3], 'b': [4] };
|
|
*
|
|
* _.mergeWith(object, other, customizer);
|
|
* // => { 'a': [1, 3], 'b': [2, 4] }
|
|
*/
|
|
var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
|
|
baseMerge(object, source, srcIndex, customizer);
|
|
});
|
|
|
|
/**
|
|
* The opposite of `_.pick`; this method creates an object composed of the
|
|
* own and inherited enumerable property paths of `object` that are not omitted.
|
|
*
|
|
* **Note:** This method is considerably slower than `_.pick`.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Object
|
|
* @param {Object} object The source object.
|
|
* @param {...(string|string[])} [paths] The property paths to omit.
|
|
* @returns {Object} Returns the new object.
|
|
* @example
|
|
*
|
|
* var object = { 'a': 1, 'b': '2', 'c': 3 };
|
|
*
|
|
* _.omit(object, ['a', 'c']);
|
|
* // => { 'b': '2' }
|
|
*/
|
|
var omit = flatRest(function(object, paths) {
|
|
var result = {};
|
|
if (object == null) {
|
|
return result;
|
|
}
|
|
var isDeep = false;
|
|
paths = arrayMap(paths, function(path) {
|
|
path = castPath(path, object);
|
|
isDeep || (isDeep = path.length > 1);
|
|
return path;
|
|
});
|
|
copyObject(object, getAllKeysIn(object), result);
|
|
if (isDeep) {
|
|
result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
|
|
}
|
|
var length = paths.length;
|
|
while (length--) {
|
|
baseUnset(result, paths[length]);
|
|
}
|
|
return result;
|
|
});
|
|
|
|
/**
|
|
* The opposite of `_.pickBy`; this method creates an object composed of
|
|
* the own and inherited enumerable string keyed properties of `object` that
|
|
* `predicate` doesn't return truthy for. The predicate is invoked with two
|
|
* arguments: (value, key).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Object
|
|
* @param {Object} object The source object.
|
|
* @param {Function} [predicate=_.identity] The function invoked per property.
|
|
* @returns {Object} Returns the new object.
|
|
* @example
|
|
*
|
|
* var object = { 'a': 1, 'b': '2', 'c': 3 };
|
|
*
|
|
* _.omitBy(object, _.isNumber);
|
|
* // => { 'b': '2' }
|
|
*/
|
|
function omitBy(object, predicate) {
|
|
return pickBy(object, negate(getIteratee(predicate)));
|
|
}
|
|
|
|
/**
|
|
* Creates an object composed of the picked `object` properties.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Object
|
|
* @param {Object} object The source object.
|
|
* @param {...(string|string[])} [paths] The property paths to pick.
|
|
* @returns {Object} Returns the new object.
|
|
* @example
|
|
*
|
|
* var object = { 'a': 1, 'b': '2', 'c': 3 };
|
|
*
|
|
* _.pick(object, ['a', 'c']);
|
|
* // => { 'a': 1, 'c': 3 }
|
|
*/
|
|
var pick = flatRest(function(object, paths) {
|
|
return object == null ? {} : basePick(object, paths);
|
|
});
|
|
|
|
/**
|
|
* Creates an object composed of the `object` properties `predicate` returns
|
|
* truthy for. The predicate is invoked with two arguments: (value, key).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Object
|
|
* @param {Object} object The source object.
|
|
* @param {Function} [predicate=_.identity] The function invoked per property.
|
|
* @returns {Object} Returns the new object.
|
|
* @example
|
|
*
|
|
* var object = { 'a': 1, 'b': '2', 'c': 3 };
|
|
*
|
|
* _.pickBy(object, _.isNumber);
|
|
* // => { 'a': 1, 'c': 3 }
|
|
*/
|
|
function pickBy(object, predicate) {
|
|
if (object == null) {
|
|
return {};
|
|
}
|
|
var props = arrayMap(getAllKeysIn(object), function(prop) {
|
|
return [prop];
|
|
});
|
|
predicate = getIteratee(predicate);
|
|
return basePickBy(object, props, function(value, path) {
|
|
return predicate(value, path[0]);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.get` except that if the resolved value is a
|
|
* function it's invoked with the `this` binding of its parent object and
|
|
* its result is returned.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Object
|
|
* @param {Object} object The object to query.
|
|
* @param {Array|string} path The path of the property to resolve.
|
|
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
|
|
* @returns {*} Returns the resolved value.
|
|
* @example
|
|
*
|
|
* var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
|
|
*
|
|
* _.result(object, 'a[0].b.c1');
|
|
* // => 3
|
|
*
|
|
* _.result(object, 'a[0].b.c2');
|
|
* // => 4
|
|
*
|
|
* _.result(object, 'a[0].b.c3', 'default');
|
|
* // => 'default'
|
|
*
|
|
* _.result(object, 'a[0].b.c3', _.constant('default'));
|
|
* // => 'default'
|
|
*/
|
|
function result(object, path, defaultValue) {
|
|
path = castPath(path, object);
|
|
|
|
var index = -1,
|
|
length = path.length;
|
|
|
|
// Ensure the loop is entered when path is empty.
|
|
if (!length) {
|
|
length = 1;
|
|
object = undefined;
|
|
}
|
|
while (++index < length) {
|
|
var value = object == null ? undefined : object[toKey(path[index])];
|
|
if (value === undefined) {
|
|
index = length;
|
|
value = defaultValue;
|
|
}
|
|
object = isFunction(value) ? value.call(object) : value;
|
|
}
|
|
return object;
|
|
}
|
|
|
|
/**
|
|
* Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
|
|
* it's created. Arrays are created for missing index properties while objects
|
|
* are created for all other missing properties. Use `_.setWith` to customize
|
|
* `path` creation.
|
|
*
|
|
* **Note:** This method mutates `object`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.7.0
|
|
* @category Object
|
|
* @param {Object} object The object to modify.
|
|
* @param {Array|string} path The path of the property to set.
|
|
* @param {*} value The value to set.
|
|
* @returns {Object} Returns `object`.
|
|
* @example
|
|
*
|
|
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
*
|
|
* _.set(object, 'a[0].b.c', 4);
|
|
* console.log(object.a[0].b.c);
|
|
* // => 4
|
|
*
|
|
* _.set(object, ['x', '0', 'y', 'z'], 5);
|
|
* console.log(object.x[0].y.z);
|
|
* // => 5
|
|
*/
|
|
function set(object, path, value) {
|
|
return object == null ? object : baseSet(object, path, value);
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.set` except that it accepts `customizer` which is
|
|
* invoked to produce the objects of `path`. If `customizer` returns `undefined`
|
|
* path creation is handled by the method instead. The `customizer` is invoked
|
|
* with three arguments: (nsValue, key, nsObject).
|
|
*
|
|
* **Note:** This method mutates `object`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Object
|
|
* @param {Object} object The object to modify.
|
|
* @param {Array|string} path The path of the property to set.
|
|
* @param {*} value The value to set.
|
|
* @param {Function} [customizer] The function to customize assigned values.
|
|
* @returns {Object} Returns `object`.
|
|
* @example
|
|
*
|
|
* var object = {};
|
|
*
|
|
* _.setWith(object, '[0][1]', 'a', Object);
|
|
* // => { '0': { '1': 'a' } }
|
|
*/
|
|
function setWith(object, path, value, customizer) {
|
|
customizer = typeof customizer == 'function' ? customizer : undefined;
|
|
return object == null ? object : baseSet(object, path, value, customizer);
|
|
}
|
|
|
|
/**
|
|
* Creates an array of own enumerable string keyed-value pairs for `object`
|
|
* which can be consumed by `_.fromPairs`. If `object` is a map or set, its
|
|
* entries are returned.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @alias entries
|
|
* @category Object
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the key-value pairs.
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.a = 1;
|
|
* this.b = 2;
|
|
* }
|
|
*
|
|
* Foo.prototype.c = 3;
|
|
*
|
|
* _.toPairs(new Foo);
|
|
* // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
|
|
*/
|
|
var toPairs = createToPairs(keys);
|
|
|
|
/**
|
|
* Creates an array of own and inherited enumerable string keyed-value pairs
|
|
* for `object` which can be consumed by `_.fromPairs`. If `object` is a map
|
|
* or set, its entries are returned.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @alias entriesIn
|
|
* @category Object
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the key-value pairs.
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.a = 1;
|
|
* this.b = 2;
|
|
* }
|
|
*
|
|
* Foo.prototype.c = 3;
|
|
*
|
|
* _.toPairsIn(new Foo);
|
|
* // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
|
|
*/
|
|
var toPairsIn = createToPairs(keysIn);
|
|
|
|
/**
|
|
* An alternative to `_.reduce`; this method transforms `object` to a new
|
|
* `accumulator` object which is the result of running each of its own
|
|
* enumerable string keyed properties thru `iteratee`, with each invocation
|
|
* potentially mutating the `accumulator` object. If `accumulator` is not
|
|
* provided, a new object with the same `[[Prototype]]` will be used. The
|
|
* iteratee is invoked with four arguments: (accumulator, value, key, object).
|
|
* Iteratee functions may exit iteration early by explicitly returning `false`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 1.3.0
|
|
* @category Object
|
|
* @param {Object} object The object to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @param {*} [accumulator] The custom accumulator value.
|
|
* @returns {*} Returns the accumulated value.
|
|
* @example
|
|
*
|
|
* _.transform([2, 3, 4], function(result, n) {
|
|
* result.push(n *= n);
|
|
* return n % 2 == 0;
|
|
* }, []);
|
|
* // => [4, 9]
|
|
*
|
|
* _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
|
|
* (result[value] || (result[value] = [])).push(key);
|
|
* }, {});
|
|
* // => { '1': ['a', 'c'], '2': ['b'] }
|
|
*/
|
|
function transform(object, iteratee, accumulator) {
|
|
var isArr = isArray(object),
|
|
isArrLike = isArr || isBuffer(object) || isTypedArray(object);
|
|
|
|
iteratee = getIteratee(iteratee, 4);
|
|
if (accumulator == null) {
|
|
var Ctor = object && object.constructor;
|
|
if (isArrLike) {
|
|
accumulator = isArr ? new Ctor : [];
|
|
}
|
|
else if (isObject(object)) {
|
|
accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
|
|
}
|
|
else {
|
|
accumulator = {};
|
|
}
|
|
}
|
|
(isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
|
|
return iteratee(accumulator, value, index, object);
|
|
});
|
|
return accumulator;
|
|
}
|
|
|
|
/**
|
|
* Removes the property at `path` of `object`.
|
|
*
|
|
* **Note:** This method mutates `object`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Object
|
|
* @param {Object} object The object to modify.
|
|
* @param {Array|string} path The path of the property to unset.
|
|
* @returns {boolean} Returns `true` if the property is deleted, else `false`.
|
|
* @example
|
|
*
|
|
* var object = { 'a': [{ 'b': { 'c': 7 } }] };
|
|
* _.unset(object, 'a[0].b.c');
|
|
* // => true
|
|
*
|
|
* console.log(object);
|
|
* // => { 'a': [{ 'b': {} }] };
|
|
*
|
|
* _.unset(object, ['a', '0', 'b', 'c']);
|
|
* // => true
|
|
*
|
|
* console.log(object);
|
|
* // => { 'a': [{ 'b': {} }] };
|
|
*/
|
|
function unset(object, path) {
|
|
return object == null ? true : baseUnset(object, path);
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.set` except that accepts `updater` to produce the
|
|
* value to set. Use `_.updateWith` to customize `path` creation. The `updater`
|
|
* is invoked with one argument: (value).
|
|
*
|
|
* **Note:** This method mutates `object`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.6.0
|
|
* @category Object
|
|
* @param {Object} object The object to modify.
|
|
* @param {Array|string} path The path of the property to set.
|
|
* @param {Function} updater The function to produce the updated value.
|
|
* @returns {Object} Returns `object`.
|
|
* @example
|
|
*
|
|
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
*
|
|
* _.update(object, 'a[0].b.c', function(n) { return n * n; });
|
|
* console.log(object.a[0].b.c);
|
|
* // => 9
|
|
*
|
|
* _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
|
|
* console.log(object.x[0].y.z);
|
|
* // => 0
|
|
*/
|
|
function update(object, path, updater) {
|
|
return object == null ? object : baseUpdate(object, path, castFunction(updater));
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.update` except that it accepts `customizer` which is
|
|
* invoked to produce the objects of `path`. If `customizer` returns `undefined`
|
|
* path creation is handled by the method instead. The `customizer` is invoked
|
|
* with three arguments: (nsValue, key, nsObject).
|
|
*
|
|
* **Note:** This method mutates `object`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.6.0
|
|
* @category Object
|
|
* @param {Object} object The object to modify.
|
|
* @param {Array|string} path The path of the property to set.
|
|
* @param {Function} updater The function to produce the updated value.
|
|
* @param {Function} [customizer] The function to customize assigned values.
|
|
* @returns {Object} Returns `object`.
|
|
* @example
|
|
*
|
|
* var object = {};
|
|
*
|
|
* _.updateWith(object, '[0][1]', _.constant('a'), Object);
|
|
* // => { '0': { '1': 'a' } }
|
|
*/
|
|
function updateWith(object, path, updater, customizer) {
|
|
customizer = typeof customizer == 'function' ? customizer : undefined;
|
|
return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
|
|
}
|
|
|
|
/**
|
|
* Creates an array of the own enumerable string keyed property values of `object`.
|
|
*
|
|
* **Note:** Non-object values are coerced to objects.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Object
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of property values.
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.a = 1;
|
|
* this.b = 2;
|
|
* }
|
|
*
|
|
* Foo.prototype.c = 3;
|
|
*
|
|
* _.values(new Foo);
|
|
* // => [1, 2] (iteration order is not guaranteed)
|
|
*
|
|
* _.values('hi');
|
|
* // => ['h', 'i']
|
|
*/
|
|
function values(object) {
|
|
return object == null ? [] : baseValues(object, keys(object));
|
|
}
|
|
|
|
/**
|
|
* Creates an array of the own and inherited enumerable string keyed property
|
|
* values of `object`.
|
|
*
|
|
* **Note:** Non-object values are coerced to objects.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Object
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of property values.
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.a = 1;
|
|
* this.b = 2;
|
|
* }
|
|
*
|
|
* Foo.prototype.c = 3;
|
|
*
|
|
* _.valuesIn(new Foo);
|
|
* // => [1, 2, 3] (iteration order is not guaranteed)
|
|
*/
|
|
function valuesIn(object) {
|
|
return object == null ? [] : baseValues(object, keysIn(object));
|
|
}
|
|
|
|
/*------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
* Clamps `number` within the inclusive `lower` and `upper` bounds.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Number
|
|
* @param {number} number The number to clamp.
|
|
* @param {number} [lower] The lower bound.
|
|
* @param {number} upper The upper bound.
|
|
* @returns {number} Returns the clamped number.
|
|
* @example
|
|
*
|
|
* _.clamp(-10, -5, 5);
|
|
* // => -5
|
|
*
|
|
* _.clamp(10, -5, 5);
|
|
* // => 5
|
|
*/
|
|
function clamp(number, lower, upper) {
|
|
if (upper === undefined) {
|
|
upper = lower;
|
|
lower = undefined;
|
|
}
|
|
if (upper !== undefined) {
|
|
upper = toNumber(upper);
|
|
upper = upper === upper ? upper : 0;
|
|
}
|
|
if (lower !== undefined) {
|
|
lower = toNumber(lower);
|
|
lower = lower === lower ? lower : 0;
|
|
}
|
|
return baseClamp(toNumber(number), lower, upper);
|
|
}
|
|
|
|
/**
|
|
* Checks if `n` is between `start` and up to, but not including, `end`. If
|
|
* `end` is not specified, it's set to `start` with `start` then set to `0`.
|
|
* If `start` is greater than `end` the params are swapped to support
|
|
* negative ranges.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.3.0
|
|
* @category Number
|
|
* @param {number} number The number to check.
|
|
* @param {number} [start=0] The start of the range.
|
|
* @param {number} end The end of the range.
|
|
* @returns {boolean} Returns `true` if `number` is in the range, else `false`.
|
|
* @see _.range, _.rangeRight
|
|
* @example
|
|
*
|
|
* _.inRange(3, 2, 4);
|
|
* // => true
|
|
*
|
|
* _.inRange(4, 8);
|
|
* // => true
|
|
*
|
|
* _.inRange(4, 2);
|
|
* // => false
|
|
*
|
|
* _.inRange(2, 2);
|
|
* // => false
|
|
*
|
|
* _.inRange(1.2, 2);
|
|
* // => true
|
|
*
|
|
* _.inRange(5.2, 4);
|
|
* // => false
|
|
*
|
|
* _.inRange(-3, -2, -6);
|
|
* // => true
|
|
*/
|
|
function inRange(number, start, end) {
|
|
start = toFinite(start);
|
|
if (end === undefined) {
|
|
end = start;
|
|
start = 0;
|
|
} else {
|
|
end = toFinite(end);
|
|
}
|
|
number = toNumber(number);
|
|
return baseInRange(number, start, end);
|
|
}
|
|
|
|
/**
|
|
* Produces a random number between the inclusive `lower` and `upper` bounds.
|
|
* If only one argument is provided a number between `0` and the given number
|
|
* is returned. If `floating` is `true`, or either `lower` or `upper` are
|
|
* floats, a floating-point number is returned instead of an integer.
|
|
*
|
|
* **Note:** JavaScript follows the IEEE-754 standard for resolving
|
|
* floating-point values which can produce unexpected results.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.7.0
|
|
* @category Number
|
|
* @param {number} [lower=0] The lower bound.
|
|
* @param {number} [upper=1] The upper bound.
|
|
* @param {boolean} [floating] Specify returning a floating-point number.
|
|
* @returns {number} Returns the random number.
|
|
* @example
|
|
*
|
|
* _.random(0, 5);
|
|
* // => an integer between 0 and 5
|
|
*
|
|
* _.random(5);
|
|
* // => also an integer between 0 and 5
|
|
*
|
|
* _.random(5, true);
|
|
* // => a floating-point number between 0 and 5
|
|
*
|
|
* _.random(1.2, 5.2);
|
|
* // => a floating-point number between 1.2 and 5.2
|
|
*/
|
|
function random(lower, upper, floating) {
|
|
if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
|
|
upper = floating = undefined;
|
|
}
|
|
if (floating === undefined) {
|
|
if (typeof upper == 'boolean') {
|
|
floating = upper;
|
|
upper = undefined;
|
|
}
|
|
else if (typeof lower == 'boolean') {
|
|
floating = lower;
|
|
lower = undefined;
|
|
}
|
|
}
|
|
if (lower === undefined && upper === undefined) {
|
|
lower = 0;
|
|
upper = 1;
|
|
}
|
|
else {
|
|
lower = toFinite(lower);
|
|
if (upper === undefined) {
|
|
upper = lower;
|
|
lower = 0;
|
|
} else {
|
|
upper = toFinite(upper);
|
|
}
|
|
}
|
|
if (lower > upper) {
|
|
var temp = lower;
|
|
lower = upper;
|
|
upper = temp;
|
|
}
|
|
if (floating || lower % 1 || upper % 1) {
|
|
var rand = nativeRandom();
|
|
return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
|
|
}
|
|
return baseRandom(lower, upper);
|
|
}
|
|
|
|
/*------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
* Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to convert.
|
|
* @returns {string} Returns the camel cased string.
|
|
* @example
|
|
*
|
|
* _.camelCase('Foo Bar');
|
|
* // => 'fooBar'
|
|
*
|
|
* _.camelCase('--foo-bar--');
|
|
* // => 'fooBar'
|
|
*
|
|
* _.camelCase('__FOO_BAR__');
|
|
* // => 'fooBar'
|
|
*/
|
|
var camelCase = createCompounder(function(result, word, index) {
|
|
word = word.toLowerCase();
|
|
return result + (index ? capitalize(word) : word);
|
|
});
|
|
|
|
/**
|
|
* Converts the first character of `string` to upper case and the remaining
|
|
* to lower case.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to capitalize.
|
|
* @returns {string} Returns the capitalized string.
|
|
* @example
|
|
*
|
|
* _.capitalize('FRED');
|
|
* // => 'Fred'
|
|
*/
|
|
function capitalize(string) {
|
|
return upperFirst(toString(string).toLowerCase());
|
|
}
|
|
|
|
/**
|
|
* Deburrs `string` by converting
|
|
* [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
|
|
* and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
|
|
* letters to basic Latin letters and removing
|
|
* [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to deburr.
|
|
* @returns {string} Returns the deburred string.
|
|
* @example
|
|
*
|
|
* _.deburr('déjà vu');
|
|
* // => 'deja vu'
|
|
*/
|
|
function deburr(string) {
|
|
string = toString(string);
|
|
return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
|
|
}
|
|
|
|
/**
|
|
* Checks if `string` ends with the given target string.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to inspect.
|
|
* @param {string} [target] The string to search for.
|
|
* @param {number} [position=string.length] The position to search up to.
|
|
* @returns {boolean} Returns `true` if `string` ends with `target`,
|
|
* else `false`.
|
|
* @example
|
|
*
|
|
* _.endsWith('abc', 'c');
|
|
* // => true
|
|
*
|
|
* _.endsWith('abc', 'b');
|
|
* // => false
|
|
*
|
|
* _.endsWith('abc', 'b', 2);
|
|
* // => true
|
|
*/
|
|
function endsWith(string, target, position) {
|
|
string = toString(string);
|
|
target = baseToString(target);
|
|
|
|
var length = string.length;
|
|
position = position === undefined
|
|
? length
|
|
: baseClamp(toInteger(position), 0, length);
|
|
|
|
var end = position;
|
|
position -= target.length;
|
|
return position >= 0 && string.slice(position, end) == target;
|
|
}
|
|
|
|
/**
|
|
* Converts the characters "&", "<", ">", '"', and "'" in `string` to their
|
|
* corresponding HTML entities.
|
|
*
|
|
* **Note:** No other characters are escaped. To escape additional
|
|
* characters use a third-party library like [_he_](https://mths.be/he).
|
|
*
|
|
* Though the ">" character is escaped for symmetry, characters like
|
|
* ">" and "/" don't need escaping in HTML and have no special meaning
|
|
* unless they're part of a tag or unquoted attribute value. See
|
|
* [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
|
|
* (under "semi-related fun fact") for more details.
|
|
*
|
|
* When working with HTML you should always
|
|
* [quote attribute values](http://wonko.com/post/html-escaping) to reduce
|
|
* XSS vectors.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category String
|
|
* @param {string} [string=''] The string to escape.
|
|
* @returns {string} Returns the escaped string.
|
|
* @example
|
|
*
|
|
* _.escape('fred, barney, & pebbles');
|
|
* // => 'fred, barney, & pebbles'
|
|
*/
|
|
function escape(string) {
|
|
string = toString(string);
|
|
return (string && reHasUnescapedHtml.test(string))
|
|
? string.replace(reUnescapedHtml, escapeHtmlChar)
|
|
: string;
|
|
}
|
|
|
|
/**
|
|
* Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
|
|
* "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to escape.
|
|
* @returns {string} Returns the escaped string.
|
|
* @example
|
|
*
|
|
* _.escapeRegExp('[lodash](https://lodash.com/)');
|
|
* // => '\[lodash\]\(https://lodash\.com/\)'
|
|
*/
|
|
function escapeRegExp(string) {
|
|
string = toString(string);
|
|
return (string && reHasRegExpChar.test(string))
|
|
? string.replace(reRegExpChar, '\\$&')
|
|
: string;
|
|
}
|
|
|
|
/**
|
|
* Converts `string` to
|
|
* [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to convert.
|
|
* @returns {string} Returns the kebab cased string.
|
|
* @example
|
|
*
|
|
* _.kebabCase('Foo Bar');
|
|
* // => 'foo-bar'
|
|
*
|
|
* _.kebabCase('fooBar');
|
|
* // => 'foo-bar'
|
|
*
|
|
* _.kebabCase('__FOO_BAR__');
|
|
* // => 'foo-bar'
|
|
*/
|
|
var kebabCase = createCompounder(function(result, word, index) {
|
|
return result + (index ? '-' : '') + word.toLowerCase();
|
|
});
|
|
|
|
/**
|
|
* Converts `string`, as space separated words, to lower case.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to convert.
|
|
* @returns {string} Returns the lower cased string.
|
|
* @example
|
|
*
|
|
* _.lowerCase('--Foo-Bar--');
|
|
* // => 'foo bar'
|
|
*
|
|
* _.lowerCase('fooBar');
|
|
* // => 'foo bar'
|
|
*
|
|
* _.lowerCase('__FOO_BAR__');
|
|
* // => 'foo bar'
|
|
*/
|
|
var lowerCase = createCompounder(function(result, word, index) {
|
|
return result + (index ? ' ' : '') + word.toLowerCase();
|
|
});
|
|
|
|
/**
|
|
* Converts the first character of `string` to lower case.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to convert.
|
|
* @returns {string} Returns the converted string.
|
|
* @example
|
|
*
|
|
* _.lowerFirst('Fred');
|
|
* // => 'fred'
|
|
*
|
|
* _.lowerFirst('FRED');
|
|
* // => 'fRED'
|
|
*/
|
|
var lowerFirst = createCaseFirst('toLowerCase');
|
|
|
|
/**
|
|
* Pads `string` on the left and right sides if it's shorter than `length`.
|
|
* Padding characters are truncated if they can't be evenly divided by `length`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to pad.
|
|
* @param {number} [length=0] The padding length.
|
|
* @param {string} [chars=' '] The string used as padding.
|
|
* @returns {string} Returns the padded string.
|
|
* @example
|
|
*
|
|
* _.pad('abc', 8);
|
|
* // => ' abc '
|
|
*
|
|
* _.pad('abc', 8, '_-');
|
|
* // => '_-abc_-_'
|
|
*
|
|
* _.pad('abc', 3);
|
|
* // => 'abc'
|
|
*/
|
|
function pad(string, length, chars) {
|
|
string = toString(string);
|
|
length = toInteger(length);
|
|
|
|
var strLength = length ? stringSize(string) : 0;
|
|
if (!length || strLength >= length) {
|
|
return string;
|
|
}
|
|
var mid = (length - strLength) / 2;
|
|
return (
|
|
createPadding(nativeFloor(mid), chars) +
|
|
string +
|
|
createPadding(nativeCeil(mid), chars)
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Pads `string` on the right side if it's shorter than `length`. Padding
|
|
* characters are truncated if they exceed `length`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to pad.
|
|
* @param {number} [length=0] The padding length.
|
|
* @param {string} [chars=' '] The string used as padding.
|
|
* @returns {string} Returns the padded string.
|
|
* @example
|
|
*
|
|
* _.padEnd('abc', 6);
|
|
* // => 'abc '
|
|
*
|
|
* _.padEnd('abc', 6, '_-');
|
|
* // => 'abc_-_'
|
|
*
|
|
* _.padEnd('abc', 3);
|
|
* // => 'abc'
|
|
*/
|
|
function padEnd(string, length, chars) {
|
|
string = toString(string);
|
|
length = toInteger(length);
|
|
|
|
var strLength = length ? stringSize(string) : 0;
|
|
return (length && strLength < length)
|
|
? (string + createPadding(length - strLength, chars))
|
|
: string;
|
|
}
|
|
|
|
/**
|
|
* Pads `string` on the left side if it's shorter than `length`. Padding
|
|
* characters are truncated if they exceed `length`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to pad.
|
|
* @param {number} [length=0] The padding length.
|
|
* @param {string} [chars=' '] The string used as padding.
|
|
* @returns {string} Returns the padded string.
|
|
* @example
|
|
*
|
|
* _.padStart('abc', 6);
|
|
* // => ' abc'
|
|
*
|
|
* _.padStart('abc', 6, '_-');
|
|
* // => '_-_abc'
|
|
*
|
|
* _.padStart('abc', 3);
|
|
* // => 'abc'
|
|
*/
|
|
function padStart(string, length, chars) {
|
|
string = toString(string);
|
|
length = toInteger(length);
|
|
|
|
var strLength = length ? stringSize(string) : 0;
|
|
return (length && strLength < length)
|
|
? (createPadding(length - strLength, chars) + string)
|
|
: string;
|
|
}
|
|
|
|
/**
|
|
* Converts `string` to an integer of the specified radix. If `radix` is
|
|
* `undefined` or `0`, a `radix` of `10` is used unless `value` is a
|
|
* hexadecimal, in which case a `radix` of `16` is used.
|
|
*
|
|
* **Note:** This method aligns with the
|
|
* [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 1.1.0
|
|
* @category String
|
|
* @param {string} string The string to convert.
|
|
* @param {number} [radix=10] The radix to interpret `value` by.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
* @returns {number} Returns the converted integer.
|
|
* @example
|
|
*
|
|
* _.parseInt('08');
|
|
* // => 8
|
|
*
|
|
* _.map(['6', '08', '10'], _.parseInt);
|
|
* // => [6, 8, 10]
|
|
*/
|
|
function parseInt(string, radix, guard) {
|
|
if (guard || radix == null) {
|
|
radix = 0;
|
|
} else if (radix) {
|
|
radix = +radix;
|
|
}
|
|
return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
|
|
}
|
|
|
|
/**
|
|
* Repeats the given string `n` times.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to repeat.
|
|
* @param {number} [n=1] The number of times to repeat the string.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
* @returns {string} Returns the repeated string.
|
|
* @example
|
|
*
|
|
* _.repeat('*', 3);
|
|
* // => '***'
|
|
*
|
|
* _.repeat('abc', 2);
|
|
* // => 'abcabc'
|
|
*
|
|
* _.repeat('abc', 0);
|
|
* // => ''
|
|
*/
|
|
function repeat(string, n, guard) {
|
|
if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
|
|
n = 1;
|
|
} else {
|
|
n = toInteger(n);
|
|
}
|
|
return baseRepeat(toString(string), n);
|
|
}
|
|
|
|
/**
|
|
* Replaces matches for `pattern` in `string` with `replacement`.
|
|
*
|
|
* **Note:** This method is based on
|
|
* [`String#replace`](https://mdn.io/String/replace).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to modify.
|
|
* @param {RegExp|string} pattern The pattern to replace.
|
|
* @param {Function|string} replacement The match replacement.
|
|
* @returns {string} Returns the modified string.
|
|
* @example
|
|
*
|
|
* _.replace('Hi Fred', 'Fred', 'Barney');
|
|
* // => 'Hi Barney'
|
|
*/
|
|
function replace() {
|
|
var args = arguments,
|
|
string = toString(args[0]);
|
|
|
|
return args.length < 3 ? string : string.replace(args[1], args[2]);
|
|
}
|
|
|
|
/**
|
|
* Converts `string` to
|
|
* [snake case](https://en.wikipedia.org/wiki/Snake_case).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to convert.
|
|
* @returns {string} Returns the snake cased string.
|
|
* @example
|
|
*
|
|
* _.snakeCase('Foo Bar');
|
|
* // => 'foo_bar'
|
|
*
|
|
* _.snakeCase('fooBar');
|
|
* // => 'foo_bar'
|
|
*
|
|
* _.snakeCase('--FOO-BAR--');
|
|
* // => 'foo_bar'
|
|
*/
|
|
var snakeCase = createCompounder(function(result, word, index) {
|
|
return result + (index ? '_' : '') + word.toLowerCase();
|
|
});
|
|
|
|
/**
|
|
* Splits `string` by `separator`.
|
|
*
|
|
* **Note:** This method is based on
|
|
* [`String#split`](https://mdn.io/String/split).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to split.
|
|
* @param {RegExp|string} separator The separator pattern to split by.
|
|
* @param {number} [limit] The length to truncate results to.
|
|
* @returns {Array} Returns the string segments.
|
|
* @example
|
|
*
|
|
* _.split('a-b-c', '-', 2);
|
|
* // => ['a', 'b']
|
|
*/
|
|
function split(string, separator, limit) {
|
|
if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
|
|
separator = limit = undefined;
|
|
}
|
|
limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
|
|
if (!limit) {
|
|
return [];
|
|
}
|
|
string = toString(string);
|
|
if (string && (
|
|
typeof separator == 'string' ||
|
|
(separator != null && !isRegExp(separator))
|
|
)) {
|
|
separator = baseToString(separator);
|
|
if (!separator && hasUnicode(string)) {
|
|
return castSlice(stringToArray(string), 0, limit);
|
|
}
|
|
}
|
|
return string.split(separator, limit);
|
|
}
|
|
|
|
/**
|
|
* Converts `string` to
|
|
* [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.1.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to convert.
|
|
* @returns {string} Returns the start cased string.
|
|
* @example
|
|
*
|
|
* _.startCase('--foo-bar--');
|
|
* // => 'Foo Bar'
|
|
*
|
|
* _.startCase('fooBar');
|
|
* // => 'Foo Bar'
|
|
*
|
|
* _.startCase('__FOO_BAR__');
|
|
* // => 'FOO BAR'
|
|
*/
|
|
var startCase = createCompounder(function(result, word, index) {
|
|
return result + (index ? ' ' : '') + upperFirst(word);
|
|
});
|
|
|
|
/**
|
|
* Checks if `string` starts with the given target string.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to inspect.
|
|
* @param {string} [target] The string to search for.
|
|
* @param {number} [position=0] The position to search from.
|
|
* @returns {boolean} Returns `true` if `string` starts with `target`,
|
|
* else `false`.
|
|
* @example
|
|
*
|
|
* _.startsWith('abc', 'a');
|
|
* // => true
|
|
*
|
|
* _.startsWith('abc', 'b');
|
|
* // => false
|
|
*
|
|
* _.startsWith('abc', 'b', 1);
|
|
* // => true
|
|
*/
|
|
function startsWith(string, target, position) {
|
|
string = toString(string);
|
|
position = position == null
|
|
? 0
|
|
: baseClamp(toInteger(position), 0, string.length);
|
|
|
|
target = baseToString(target);
|
|
return string.slice(position, position + target.length) == target;
|
|
}
|
|
|
|
/**
|
|
* Creates a compiled template function that can interpolate data properties
|
|
* in "interpolate" delimiters, HTML-escape interpolated data properties in
|
|
* "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
|
|
* properties may be accessed as free variables in the template. If a setting
|
|
* object is given, it takes precedence over `_.templateSettings` values.
|
|
*
|
|
* **Note:** In the development build `_.template` utilizes
|
|
* [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
|
|
* for easier debugging.
|
|
*
|
|
* For more information on precompiling templates see
|
|
* [lodash's custom builds documentation](https://lodash.com/custom-builds).
|
|
*
|
|
* For more information on Chrome extension sandboxes see
|
|
* [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category String
|
|
* @param {string} [string=''] The template string.
|
|
* @param {Object} [options={}] The options object.
|
|
* @param {RegExp} [options.escape=_.templateSettings.escape]
|
|
* The HTML "escape" delimiter.
|
|
* @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
|
|
* The "evaluate" delimiter.
|
|
* @param {Object} [options.imports=_.templateSettings.imports]
|
|
* An object to import into the template as free variables.
|
|
* @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
|
|
* The "interpolate" delimiter.
|
|
* @param {string} [options.sourceURL='lodash.templateSources[n]']
|
|
* The sourceURL of the compiled template.
|
|
* @param {string} [options.variable='obj']
|
|
* The data object variable name.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
* @returns {Function} Returns the compiled template function.
|
|
* @example
|
|
*
|
|
* // Use the "interpolate" delimiter to create a compiled template.
|
|
* var compiled = _.template('hello <%= user %>!');
|
|
* compiled({ 'user': 'fred' });
|
|
* // => 'hello fred!'
|
|
*
|
|
* // Use the HTML "escape" delimiter to escape data property values.
|
|
* var compiled = _.template('<b><%- value %></b>');
|
|
* compiled({ 'value': '<script>' });
|
|
* // => '<b><script></b>'
|
|
*
|
|
* // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
|
|
* var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
|
|
* compiled({ 'users': ['fred', 'barney'] });
|
|
* // => '<li>fred</li><li>barney</li>'
|
|
*
|
|
* // Use the internal `print` function in "evaluate" delimiters.
|
|
* var compiled = _.template('<% print("hello " + user); %>!');
|
|
* compiled({ 'user': 'barney' });
|
|
* // => 'hello barney!'
|
|
*
|
|
* // Use the ES template literal delimiter as an "interpolate" delimiter.
|
|
* // Disable support by replacing the "interpolate" delimiter.
|
|
* var compiled = _.template('hello ${ user }!');
|
|
* compiled({ 'user': 'pebbles' });
|
|
* // => 'hello pebbles!'
|
|
*
|
|
* // Use backslashes to treat delimiters as plain text.
|
|
* var compiled = _.template('<%= "\\<%- value %\\>" %>');
|
|
* compiled({ 'value': 'ignored' });
|
|
* // => '<%- value %>'
|
|
*
|
|
* // Use the `imports` option to import `jQuery` as `jq`.
|
|
* var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
|
|
* var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
|
|
* compiled({ 'users': ['fred', 'barney'] });
|
|
* // => '<li>fred</li><li>barney</li>'
|
|
*
|
|
* // Use the `sourceURL` option to specify a custom sourceURL for the template.
|
|
* var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
|
|
* compiled(data);
|
|
* // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
|
|
*
|
|
* // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
|
|
* var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
|
|
* compiled.source;
|
|
* // => function(data) {
|
|
* // var __t, __p = '';
|
|
* // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
|
|
* // return __p;
|
|
* // }
|
|
*
|
|
* // Use custom template delimiters.
|
|
* _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
|
|
* var compiled = _.template('hello {{ user }}!');
|
|
* compiled({ 'user': 'mustache' });
|
|
* // => 'hello mustache!'
|
|
*
|
|
* // Use the `source` property to inline compiled templates for meaningful
|
|
* // line numbers in error messages and stack traces.
|
|
* fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
|
|
* var JST = {\
|
|
* "main": ' + _.template(mainText).source + '\
|
|
* };\
|
|
* ');
|
|
*/
|
|
function template(string, options, guard) {
|
|
// Based on John Resig's `tmpl` implementation
|
|
// (http://ejohn.org/blog/javascript-micro-templating/)
|
|
// and Laura Doktorova's doT.js (https://github.com/olado/doT).
|
|
var settings = lodash.templateSettings;
|
|
|
|
if (guard && isIterateeCall(string, options, guard)) {
|
|
options = undefined;
|
|
}
|
|
string = toString(string);
|
|
options = assignInWith({}, options, settings, customDefaultsAssignIn);
|
|
|
|
var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
|
|
importsKeys = keys(imports),
|
|
importsValues = baseValues(imports, importsKeys);
|
|
|
|
var isEscaping,
|
|
isEvaluating,
|
|
index = 0,
|
|
interpolate = options.interpolate || reNoMatch,
|
|
source = "__p += '";
|
|
|
|
// Compile the regexp to match each delimiter.
|
|
var reDelimiters = RegExp(
|
|
(options.escape || reNoMatch).source + '|' +
|
|
interpolate.source + '|' +
|
|
(interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
|
|
(options.evaluate || reNoMatch).source + '|$'
|
|
, 'g');
|
|
|
|
// Use a sourceURL for easier debugging.
|
|
// The sourceURL gets injected into the source that's eval-ed, so be careful
|
|
// to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
|
|
// and escape the comment, thus injecting code that gets evaled.
|
|
var sourceURL = '//# sourceURL=' +
|
|
(hasOwnProperty.call(options, 'sourceURL')
|
|
? (options.sourceURL + '').replace(/\s/g, ' ')
|
|
: ('lodash.templateSources[' + (++templateCounter) + ']')
|
|
) + '\n';
|
|
|
|
string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
|
|
interpolateValue || (interpolateValue = esTemplateValue);
|
|
|
|
// Escape characters that can't be included in string literals.
|
|
source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
|
|
|
|
// Replace delimiters with snippets.
|
|
if (escapeValue) {
|
|
isEscaping = true;
|
|
source += "' +\n__e(" + escapeValue + ") +\n'";
|
|
}
|
|
if (evaluateValue) {
|
|
isEvaluating = true;
|
|
source += "';\n" + evaluateValue + ";\n__p += '";
|
|
}
|
|
if (interpolateValue) {
|
|
source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
|
|
}
|
|
index = offset + match.length;
|
|
|
|
// The JS engine embedded in Adobe products needs `match` returned in
|
|
// order to produce the correct `offset` value.
|
|
return match;
|
|
});
|
|
|
|
source += "';\n";
|
|
|
|
// If `variable` is not specified wrap a with-statement around the generated
|
|
// code to add the data object to the top of the scope chain.
|
|
var variable = hasOwnProperty.call(options, 'variable') && options.variable;
|
|
if (!variable) {
|
|
source = 'with (obj) {\n' + source + '\n}\n';
|
|
}
|
|
// Throw an error if a forbidden character was found in `variable`, to prevent
|
|
// potential command injection attacks.
|
|
else if (reForbiddenIdentifierChars.test(variable)) {
|
|
throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
|
|
}
|
|
|
|
// Cleanup code by stripping empty strings.
|
|
source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
|
|
.replace(reEmptyStringMiddle, '$1')
|
|
.replace(reEmptyStringTrailing, '$1;');
|
|
|
|
// Frame code as the function body.
|
|
source = 'function(' + (variable || 'obj') + ') {\n' +
|
|
(variable
|
|
? ''
|
|
: 'obj || (obj = {});\n'
|
|
) +
|
|
"var __t, __p = ''" +
|
|
(isEscaping
|
|
? ', __e = _.escape'
|
|
: ''
|
|
) +
|
|
(isEvaluating
|
|
? ', __j = Array.prototype.join;\n' +
|
|
"function print() { __p += __j.call(arguments, '') }\n"
|
|
: ';\n'
|
|
) +
|
|
source +
|
|
'return __p\n}';
|
|
|
|
var result = attempt(function() {
|
|
return Function(importsKeys, sourceURL + 'return ' + source)
|
|
.apply(undefined, importsValues);
|
|
});
|
|
|
|
// Provide the compiled function's source by its `toString` method or
|
|
// the `source` property as a convenience for inlining compiled templates.
|
|
result.source = source;
|
|
if (isError(result)) {
|
|
throw result;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Converts `string`, as a whole, to lower case just like
|
|
* [String#toLowerCase](https://mdn.io/toLowerCase).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to convert.
|
|
* @returns {string} Returns the lower cased string.
|
|
* @example
|
|
*
|
|
* _.toLower('--Foo-Bar--');
|
|
* // => '--foo-bar--'
|
|
*
|
|
* _.toLower('fooBar');
|
|
* // => 'foobar'
|
|
*
|
|
* _.toLower('__FOO_BAR__');
|
|
* // => '__foo_bar__'
|
|
*/
|
|
function toLower(value) {
|
|
return toString(value).toLowerCase();
|
|
}
|
|
|
|
/**
|
|
* Converts `string`, as a whole, to upper case just like
|
|
* [String#toUpperCase](https://mdn.io/toUpperCase).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to convert.
|
|
* @returns {string} Returns the upper cased string.
|
|
* @example
|
|
*
|
|
* _.toUpper('--foo-bar--');
|
|
* // => '--FOO-BAR--'
|
|
*
|
|
* _.toUpper('fooBar');
|
|
* // => 'FOOBAR'
|
|
*
|
|
* _.toUpper('__foo_bar__');
|
|
* // => '__FOO_BAR__'
|
|
*/
|
|
function toUpper(value) {
|
|
return toString(value).toUpperCase();
|
|
}
|
|
|
|
/**
|
|
* Removes leading and trailing whitespace or specified characters from `string`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to trim.
|
|
* @param {string} [chars=whitespace] The characters to trim.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
* @returns {string} Returns the trimmed string.
|
|
* @example
|
|
*
|
|
* _.trim(' abc ');
|
|
* // => 'abc'
|
|
*
|
|
* _.trim('-_-abc-_-', '_-');
|
|
* // => 'abc'
|
|
*
|
|
* _.map([' foo ', ' bar '], _.trim);
|
|
* // => ['foo', 'bar']
|
|
*/
|
|
function trim(string, chars, guard) {
|
|
string = toString(string);
|
|
if (string && (guard || chars === undefined)) {
|
|
return baseTrim(string);
|
|
}
|
|
if (!string || !(chars = baseToString(chars))) {
|
|
return string;
|
|
}
|
|
var strSymbols = stringToArray(string),
|
|
chrSymbols = stringToArray(chars),
|
|
start = charsStartIndex(strSymbols, chrSymbols),
|
|
end = charsEndIndex(strSymbols, chrSymbols) + 1;
|
|
|
|
return castSlice(strSymbols, start, end).join('');
|
|
}
|
|
|
|
/**
|
|
* Removes trailing whitespace or specified characters from `string`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to trim.
|
|
* @param {string} [chars=whitespace] The characters to trim.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
* @returns {string} Returns the trimmed string.
|
|
* @example
|
|
*
|
|
* _.trimEnd(' abc ');
|
|
* // => ' abc'
|
|
*
|
|
* _.trimEnd('-_-abc-_-', '_-');
|
|
* // => '-_-abc'
|
|
*/
|
|
function trimEnd(string, chars, guard) {
|
|
string = toString(string);
|
|
if (string && (guard || chars === undefined)) {
|
|
return string.slice(0, trimmedEndIndex(string) + 1);
|
|
}
|
|
if (!string || !(chars = baseToString(chars))) {
|
|
return string;
|
|
}
|
|
var strSymbols = stringToArray(string),
|
|
end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
|
|
|
|
return castSlice(strSymbols, 0, end).join('');
|
|
}
|
|
|
|
/**
|
|
* Removes leading whitespace or specified characters from `string`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to trim.
|
|
* @param {string} [chars=whitespace] The characters to trim.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
* @returns {string} Returns the trimmed string.
|
|
* @example
|
|
*
|
|
* _.trimStart(' abc ');
|
|
* // => 'abc '
|
|
*
|
|
* _.trimStart('-_-abc-_-', '_-');
|
|
* // => 'abc-_-'
|
|
*/
|
|
function trimStart(string, chars, guard) {
|
|
string = toString(string);
|
|
if (string && (guard || chars === undefined)) {
|
|
return string.replace(reTrimStart, '');
|
|
}
|
|
if (!string || !(chars = baseToString(chars))) {
|
|
return string;
|
|
}
|
|
var strSymbols = stringToArray(string),
|
|
start = charsStartIndex(strSymbols, stringToArray(chars));
|
|
|
|
return castSlice(strSymbols, start).join('');
|
|
}
|
|
|
|
/**
|
|
* Truncates `string` if it's longer than the given maximum string length.
|
|
* The last characters of the truncated string are replaced with the omission
|
|
* string which defaults to "...".
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to truncate.
|
|
* @param {Object} [options={}] The options object.
|
|
* @param {number} [options.length=30] The maximum string length.
|
|
* @param {string} [options.omission='...'] The string to indicate text is omitted.
|
|
* @param {RegExp|string} [options.separator] The separator pattern to truncate to.
|
|
* @returns {string} Returns the truncated string.
|
|
* @example
|
|
*
|
|
* _.truncate('hi-diddly-ho there, neighborino');
|
|
* // => 'hi-diddly-ho there, neighbo...'
|
|
*
|
|
* _.truncate('hi-diddly-ho there, neighborino', {
|
|
* 'length': 24,
|
|
* 'separator': ' '
|
|
* });
|
|
* // => 'hi-diddly-ho there,...'
|
|
*
|
|
* _.truncate('hi-diddly-ho there, neighborino', {
|
|
* 'length': 24,
|
|
* 'separator': /,? +/
|
|
* });
|
|
* // => 'hi-diddly-ho there...'
|
|
*
|
|
* _.truncate('hi-diddly-ho there, neighborino', {
|
|
* 'omission': ' [...]'
|
|
* });
|
|
* // => 'hi-diddly-ho there, neig [...]'
|
|
*/
|
|
function truncate(string, options) {
|
|
var length = DEFAULT_TRUNC_LENGTH,
|
|
omission = DEFAULT_TRUNC_OMISSION;
|
|
|
|
if (isObject(options)) {
|
|
var separator = 'separator' in options ? options.separator : separator;
|
|
length = 'length' in options ? toInteger(options.length) : length;
|
|
omission = 'omission' in options ? baseToString(options.omission) : omission;
|
|
}
|
|
string = toString(string);
|
|
|
|
var strLength = string.length;
|
|
if (hasUnicode(string)) {
|
|
var strSymbols = stringToArray(string);
|
|
strLength = strSymbols.length;
|
|
}
|
|
if (length >= strLength) {
|
|
return string;
|
|
}
|
|
var end = length - stringSize(omission);
|
|
if (end < 1) {
|
|
return omission;
|
|
}
|
|
var result = strSymbols
|
|
? castSlice(strSymbols, 0, end).join('')
|
|
: string.slice(0, end);
|
|
|
|
if (separator === undefined) {
|
|
return result + omission;
|
|
}
|
|
if (strSymbols) {
|
|
end += (result.length - end);
|
|
}
|
|
if (isRegExp(separator)) {
|
|
if (string.slice(end).search(separator)) {
|
|
var match,
|
|
substring = result;
|
|
|
|
if (!separator.global) {
|
|
separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
|
|
}
|
|
separator.lastIndex = 0;
|
|
while ((match = separator.exec(substring))) {
|
|
var newEnd = match.index;
|
|
}
|
|
result = result.slice(0, newEnd === undefined ? end : newEnd);
|
|
}
|
|
} else if (string.indexOf(baseToString(separator), end) != end) {
|
|
var index = result.lastIndexOf(separator);
|
|
if (index > -1) {
|
|
result = result.slice(0, index);
|
|
}
|
|
}
|
|
return result + omission;
|
|
}
|
|
|
|
/**
|
|
* The inverse of `_.escape`; this method converts the HTML entities
|
|
* `&`, `<`, `>`, `"`, and `'` in `string` to
|
|
* their corresponding characters.
|
|
*
|
|
* **Note:** No other HTML entities are unescaped. To unescape additional
|
|
* HTML entities use a third-party library like [_he_](https://mths.be/he).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.6.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to unescape.
|
|
* @returns {string} Returns the unescaped string.
|
|
* @example
|
|
*
|
|
* _.unescape('fred, barney, & pebbles');
|
|
* // => 'fred, barney, & pebbles'
|
|
*/
|
|
function unescape(string) {
|
|
string = toString(string);
|
|
return (string && reHasEscapedHtml.test(string))
|
|
? string.replace(reEscapedHtml, unescapeHtmlChar)
|
|
: string;
|
|
}
|
|
|
|
/**
|
|
* Converts `string`, as space separated words, to upper case.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to convert.
|
|
* @returns {string} Returns the upper cased string.
|
|
* @example
|
|
*
|
|
* _.upperCase('--foo-bar');
|
|
* // => 'FOO BAR'
|
|
*
|
|
* _.upperCase('fooBar');
|
|
* // => 'FOO BAR'
|
|
*
|
|
* _.upperCase('__foo_bar__');
|
|
* // => 'FOO BAR'
|
|
*/
|
|
var upperCase = createCompounder(function(result, word, index) {
|
|
return result + (index ? ' ' : '') + word.toUpperCase();
|
|
});
|
|
|
|
/**
|
|
* Converts the first character of `string` to upper case.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to convert.
|
|
* @returns {string} Returns the converted string.
|
|
* @example
|
|
*
|
|
* _.upperFirst('fred');
|
|
* // => 'Fred'
|
|
*
|
|
* _.upperFirst('FRED');
|
|
* // => 'FRED'
|
|
*/
|
|
var upperFirst = createCaseFirst('toUpperCase');
|
|
|
|
/**
|
|
* Splits `string` into an array of its words.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to inspect.
|
|
* @param {RegExp|string} [pattern] The pattern to match words.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
* @returns {Array} Returns the words of `string`.
|
|
* @example
|
|
*
|
|
* _.words('fred, barney, & pebbles');
|
|
* // => ['fred', 'barney', 'pebbles']
|
|
*
|
|
* _.words('fred, barney, & pebbles', /[^, ]+/g);
|
|
* // => ['fred', 'barney', '&', 'pebbles']
|
|
*/
|
|
function words(string, pattern, guard) {
|
|
string = toString(string);
|
|
pattern = guard ? undefined : pattern;
|
|
|
|
if (pattern === undefined) {
|
|
return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
|
|
}
|
|
return string.match(pattern) || [];
|
|
}
|
|
|
|
/*------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
* Attempts to invoke `func`, returning either the result or the caught error
|
|
* object. Any additional arguments are provided to `func` when it's invoked.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Util
|
|
* @param {Function} func The function to attempt.
|
|
* @param {...*} [args] The arguments to invoke `func` with.
|
|
* @returns {*} Returns the `func` result or error object.
|
|
* @example
|
|
*
|
|
* // Avoid throwing errors for invalid selectors.
|
|
* var elements = _.attempt(function(selector) {
|
|
* return document.querySelectorAll(selector);
|
|
* }, '>_>');
|
|
*
|
|
* if (_.isError(elements)) {
|
|
* elements = [];
|
|
* }
|
|
*/
|
|
var attempt = baseRest(function(func, args) {
|
|
try {
|
|
return apply(func, undefined, args);
|
|
} catch (e) {
|
|
return isError(e) ? e : new Error(e);
|
|
}
|
|
});
|
|
|
|
/**
|
|
* Binds methods of an object to the object itself, overwriting the existing
|
|
* method.
|
|
*
|
|
* **Note:** This method doesn't set the "length" property of bound functions.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Util
|
|
* @param {Object} object The object to bind and assign the bound methods to.
|
|
* @param {...(string|string[])} methodNames The object method names to bind.
|
|
* @returns {Object} Returns `object`.
|
|
* @example
|
|
*
|
|
* var view = {
|
|
* 'label': 'docs',
|
|
* 'click': function() {
|
|
* console.log('clicked ' + this.label);
|
|
* }
|
|
* };
|
|
*
|
|
* _.bindAll(view, ['click']);
|
|
* jQuery(element).on('click', view.click);
|
|
* // => Logs 'clicked docs' when clicked.
|
|
*/
|
|
var bindAll = flatRest(function(object, methodNames) {
|
|
arrayEach(methodNames, function(key) {
|
|
key = toKey(key);
|
|
baseAssignValue(object, key, bind(object[key], object));
|
|
});
|
|
return object;
|
|
});
|
|
|
|
/**
|
|
* Creates a function that iterates over `pairs` and invokes the corresponding
|
|
* function of the first predicate to return truthy. The predicate-function
|
|
* pairs are invoked with the `this` binding and arguments of the created
|
|
* function.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Util
|
|
* @param {Array} pairs The predicate-function pairs.
|
|
* @returns {Function} Returns the new composite function.
|
|
* @example
|
|
*
|
|
* var func = _.cond([
|
|
* [_.matches({ 'a': 1 }), _.constant('matches A')],
|
|
* [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
|
|
* [_.stubTrue, _.constant('no match')]
|
|
* ]);
|
|
*
|
|
* func({ 'a': 1, 'b': 2 });
|
|
* // => 'matches A'
|
|
*
|
|
* func({ 'a': 0, 'b': 1 });
|
|
* // => 'matches B'
|
|
*
|
|
* func({ 'a': '1', 'b': '2' });
|
|
* // => 'no match'
|
|
*/
|
|
function cond(pairs) {
|
|
var length = pairs == null ? 0 : pairs.length,
|
|
toIteratee = getIteratee();
|
|
|
|
pairs = !length ? [] : arrayMap(pairs, function(pair) {
|
|
if (typeof pair[1] != 'function') {
|
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
}
|
|
return [toIteratee(pair[0]), pair[1]];
|
|
});
|
|
|
|
return baseRest(function(args) {
|
|
var index = -1;
|
|
while (++index < length) {
|
|
var pair = pairs[index];
|
|
if (apply(pair[0], this, args)) {
|
|
return apply(pair[1], this, args);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Creates a function that invokes the predicate properties of `source` with
|
|
* the corresponding property values of a given object, returning `true` if
|
|
* all predicates return truthy, else `false`.
|
|
*
|
|
* **Note:** The created function is equivalent to `_.conformsTo` with
|
|
* `source` partially applied.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Util
|
|
* @param {Object} source The object of property predicates to conform to.
|
|
* @returns {Function} Returns the new spec function.
|
|
* @example
|
|
*
|
|
* var objects = [
|
|
* { 'a': 2, 'b': 1 },
|
|
* { 'a': 1, 'b': 2 }
|
|
* ];
|
|
*
|
|
* _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
|
|
* // => [{ 'a': 1, 'b': 2 }]
|
|
*/
|
|
function conforms(source) {
|
|
return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
|
|
}
|
|
|
|
/**
|
|
* Creates a function that returns `value`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.4.0
|
|
* @category Util
|
|
* @param {*} value The value to return from the new function.
|
|
* @returns {Function} Returns the new constant function.
|
|
* @example
|
|
*
|
|
* var objects = _.times(2, _.constant({ 'a': 1 }));
|
|
*
|
|
* console.log(objects);
|
|
* // => [{ 'a': 1 }, { 'a': 1 }]
|
|
*
|
|
* console.log(objects[0] === objects[1]);
|
|
* // => true
|
|
*/
|
|
function constant(value) {
|
|
return function() {
|
|
return value;
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Checks `value` to determine whether a default value should be returned in
|
|
* its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
|
|
* or `undefined`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.14.0
|
|
* @category Util
|
|
* @param {*} value The value to check.
|
|
* @param {*} defaultValue The default value.
|
|
* @returns {*} Returns the resolved value.
|
|
* @example
|
|
*
|
|
* _.defaultTo(1, 10);
|
|
* // => 1
|
|
*
|
|
* _.defaultTo(undefined, 10);
|
|
* // => 10
|
|
*/
|
|
function defaultTo(value, defaultValue) {
|
|
return (value == null || value !== value) ? defaultValue : value;
|
|
}
|
|
|
|
/**
|
|
* Creates a function that returns the result of invoking the given functions
|
|
* with the `this` binding of the created function, where each successive
|
|
* invocation is supplied the return value of the previous.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Util
|
|
* @param {...(Function|Function[])} [funcs] The functions to invoke.
|
|
* @returns {Function} Returns the new composite function.
|
|
* @see _.flowRight
|
|
* @example
|
|
*
|
|
* function square(n) {
|
|
* return n * n;
|
|
* }
|
|
*
|
|
* var addSquare = _.flow([_.add, square]);
|
|
* addSquare(1, 2);
|
|
* // => 9
|
|
*/
|
|
var flow = createFlow();
|
|
|
|
/**
|
|
* This method is like `_.flow` except that it creates a function that
|
|
* invokes the given functions from right to left.
|
|
*
|
|
* @static
|
|
* @since 3.0.0
|
|
* @memberOf _
|
|
* @category Util
|
|
* @param {...(Function|Function[])} [funcs] The functions to invoke.
|
|
* @returns {Function} Returns the new composite function.
|
|
* @see _.flow
|
|
* @example
|
|
*
|
|
* function square(n) {
|
|
* return n * n;
|
|
* }
|
|
*
|
|
* var addSquare = _.flowRight([square, _.add]);
|
|
* addSquare(1, 2);
|
|
* // => 9
|
|
*/
|
|
var flowRight = createFlow(true);
|
|
|
|
/**
|
|
* This method returns the first argument it receives.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Util
|
|
* @param {*} value Any value.
|
|
* @returns {*} Returns `value`.
|
|
* @example
|
|
*
|
|
* var object = { 'a': 1 };
|
|
*
|
|
* console.log(_.identity(object) === object);
|
|
* // => true
|
|
*/
|
|
function identity(value) {
|
|
return value;
|
|
}
|
|
|
|
/**
|
|
* Creates a function that invokes `func` with the arguments of the created
|
|
* function. If `func` is a property name, the created function returns the
|
|
* property value for a given element. If `func` is an array or object, the
|
|
* created function returns `true` for elements that contain the equivalent
|
|
* source properties, otherwise it returns `false`.
|
|
*
|
|
* @static
|
|
* @since 4.0.0
|
|
* @memberOf _
|
|
* @category Util
|
|
* @param {*} [func=_.identity] The value to convert to a callback.
|
|
* @returns {Function} Returns the callback.
|
|
* @example
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney', 'age': 36, 'active': true },
|
|
* { 'user': 'fred', 'age': 40, 'active': false }
|
|
* ];
|
|
*
|
|
* // The `_.matches` iteratee shorthand.
|
|
* _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
|
|
* // => [{ 'user': 'barney', 'age': 36, 'active': true }]
|
|
*
|
|
* // The `_.matchesProperty` iteratee shorthand.
|
|
* _.filter(users, _.iteratee(['user', 'fred']));
|
|
* // => [{ 'user': 'fred', 'age': 40 }]
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.map(users, _.iteratee('user'));
|
|
* // => ['barney', 'fred']
|
|
*
|
|
* // Create custom iteratee shorthands.
|
|
* _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
|
|
* return !_.isRegExp(func) ? iteratee(func) : function(string) {
|
|
* return func.test(string);
|
|
* };
|
|
* });
|
|
*
|
|
* _.filter(['abc', 'def'], /ef/);
|
|
* // => ['def']
|
|
*/
|
|
function iteratee(func) {
|
|
return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
|
|
}
|
|
|
|
/**
|
|
* Creates a function that performs a partial deep comparison between a given
|
|
* object and `source`, returning `true` if the given object has equivalent
|
|
* property values, else `false`.
|
|
*
|
|
* **Note:** The created function is equivalent to `_.isMatch` with `source`
|
|
* partially applied.
|
|
*
|
|
* Partial comparisons will match empty array and empty object `source`
|
|
* values against any array or object value, respectively. See `_.isEqual`
|
|
* for a list of supported value comparisons.
|
|
*
|
|
* **Note:** Multiple values can be checked by combining several matchers
|
|
* using `_.overSome`
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Util
|
|
* @param {Object} source The object of property values to match.
|
|
* @returns {Function} Returns the new spec function.
|
|
* @example
|
|
*
|
|
* var objects = [
|
|
* { 'a': 1, 'b': 2, 'c': 3 },
|
|
* { 'a': 4, 'b': 5, 'c': 6 }
|
|
* ];
|
|
*
|
|
* _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
|
|
* // => [{ 'a': 4, 'b': 5, 'c': 6 }]
|
|
*
|
|
* // Checking for several possible values
|
|
* _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
|
|
* // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
|
|
*/
|
|
function matches(source) {
|
|
return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
|
|
}
|
|
|
|
/**
|
|
* Creates a function that performs a partial deep comparison between the
|
|
* value at `path` of a given object to `srcValue`, returning `true` if the
|
|
* object value is equivalent, else `false`.
|
|
*
|
|
* **Note:** Partial comparisons will match empty array and empty object
|
|
* `srcValue` values against any array or object value, respectively. See
|
|
* `_.isEqual` for a list of supported value comparisons.
|
|
*
|
|
* **Note:** Multiple values can be checked by combining several matchers
|
|
* using `_.overSome`
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.2.0
|
|
* @category Util
|
|
* @param {Array|string} path The path of the property to get.
|
|
* @param {*} srcValue The value to match.
|
|
* @returns {Function} Returns the new spec function.
|
|
* @example
|
|
*
|
|
* var objects = [
|
|
* { 'a': 1, 'b': 2, 'c': 3 },
|
|
* { 'a': 4, 'b': 5, 'c': 6 }
|
|
* ];
|
|
*
|
|
* _.find(objects, _.matchesProperty('a', 4));
|
|
* // => { 'a': 4, 'b': 5, 'c': 6 }
|
|
*
|
|
* // Checking for several possible values
|
|
* _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
|
|
* // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
|
|
*/
|
|
function matchesProperty(path, srcValue) {
|
|
return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
|
|
}
|
|
|
|
/**
|
|
* Creates a function that invokes the method at `path` of a given object.
|
|
* Any additional arguments are provided to the invoked method.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.7.0
|
|
* @category Util
|
|
* @param {Array|string} path The path of the method to invoke.
|
|
* @param {...*} [args] The arguments to invoke the method with.
|
|
* @returns {Function} Returns the new invoker function.
|
|
* @example
|
|
*
|
|
* var objects = [
|
|
* { 'a': { 'b': _.constant(2) } },
|
|
* { 'a': { 'b': _.constant(1) } }
|
|
* ];
|
|
*
|
|
* _.map(objects, _.method('a.b'));
|
|
* // => [2, 1]
|
|
*
|
|
* _.map(objects, _.method(['a', 'b']));
|
|
* // => [2, 1]
|
|
*/
|
|
var method = baseRest(function(path, args) {
|
|
return function(object) {
|
|
return baseInvoke(object, path, args);
|
|
};
|
|
});
|
|
|
|
/**
|
|
* The opposite of `_.method`; this method creates a function that invokes
|
|
* the method at a given path of `object`. Any additional arguments are
|
|
* provided to the invoked method.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.7.0
|
|
* @category Util
|
|
* @param {Object} object The object to query.
|
|
* @param {...*} [args] The arguments to invoke the method with.
|
|
* @returns {Function} Returns the new invoker function.
|
|
* @example
|
|
*
|
|
* var array = _.times(3, _.constant),
|
|
* object = { 'a': array, 'b': array, 'c': array };
|
|
*
|
|
* _.map(['a[2]', 'c[0]'], _.methodOf(object));
|
|
* // => [2, 0]
|
|
*
|
|
* _.map([['a', '2'], ['c', '0']], _.methodOf(object));
|
|
* // => [2, 0]
|
|
*/
|
|
var methodOf = baseRest(function(object, args) {
|
|
return function(path) {
|
|
return baseInvoke(object, path, args);
|
|
};
|
|
});
|
|
|
|
/**
|
|
* Adds all own enumerable string keyed function properties of a source
|
|
* object to the destination object. If `object` is a function, then methods
|
|
* are added to its prototype as well.
|
|
*
|
|
* **Note:** Use `_.runInContext` to create a pristine `lodash` function to
|
|
* avoid conflicts caused by modifying the original.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Util
|
|
* @param {Function|Object} [object=lodash] The destination object.
|
|
* @param {Object} source The object of functions to add.
|
|
* @param {Object} [options={}] The options object.
|
|
* @param {boolean} [options.chain=true] Specify whether mixins are chainable.
|
|
* @returns {Function|Object} Returns `object`.
|
|
* @example
|
|
*
|
|
* function vowels(string) {
|
|
* return _.filter(string, function(v) {
|
|
* return /[aeiou]/i.test(v);
|
|
* });
|
|
* }
|
|
*
|
|
* _.mixin({ 'vowels': vowels });
|
|
* _.vowels('fred');
|
|
* // => ['e']
|
|
*
|
|
* _('fred').vowels().value();
|
|
* // => ['e']
|
|
*
|
|
* _.mixin({ 'vowels': vowels }, { 'chain': false });
|
|
* _('fred').vowels();
|
|
* // => ['e']
|
|
*/
|
|
function mixin(object, source, options) {
|
|
var props = keys(source),
|
|
methodNames = baseFunctions(source, props);
|
|
|
|
if (options == null &&
|
|
!(isObject(source) && (methodNames.length || !props.length))) {
|
|
options = source;
|
|
source = object;
|
|
object = this;
|
|
methodNames = baseFunctions(source, keys(source));
|
|
}
|
|
var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
|
|
isFunc = isFunction(object);
|
|
|
|
arrayEach(methodNames, function(methodName) {
|
|
var func = source[methodName];
|
|
object[methodName] = func;
|
|
if (isFunc) {
|
|
object.prototype[methodName] = function() {
|
|
var chainAll = this.__chain__;
|
|
if (chain || chainAll) {
|
|
var result = object(this.__wrapped__),
|
|
actions = result.__actions__ = copyArray(this.__actions__);
|
|
|
|
actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
|
|
result.__chain__ = chainAll;
|
|
return result;
|
|
}
|
|
return func.apply(object, arrayPush([this.value()], arguments));
|
|
};
|
|
}
|
|
});
|
|
|
|
return object;
|
|
}
|
|
|
|
/**
|
|
* Reverts the `_` variable to its previous value and returns a reference to
|
|
* the `lodash` function.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Util
|
|
* @returns {Function} Returns the `lodash` function.
|
|
* @example
|
|
*
|
|
* var lodash = _.noConflict();
|
|
*/
|
|
function noConflict() {
|
|
if (root._ === this) {
|
|
root._ = oldDash;
|
|
}
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* This method returns `undefined`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.3.0
|
|
* @category Util
|
|
* @example
|
|
*
|
|
* _.times(2, _.noop);
|
|
* // => [undefined, undefined]
|
|
*/
|
|
function noop() {
|
|
// No operation performed.
|
|
}
|
|
|
|
/**
|
|
* Creates a function that gets the argument at index `n`. If `n` is negative,
|
|
* the nth argument from the end is returned.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Util
|
|
* @param {number} [n=0] The index of the argument to return.
|
|
* @returns {Function} Returns the new pass-thru function.
|
|
* @example
|
|
*
|
|
* var func = _.nthArg(1);
|
|
* func('a', 'b', 'c', 'd');
|
|
* // => 'b'
|
|
*
|
|
* var func = _.nthArg(-2);
|
|
* func('a', 'b', 'c', 'd');
|
|
* // => 'c'
|
|
*/
|
|
function nthArg(n) {
|
|
n = toInteger(n);
|
|
return baseRest(function(args) {
|
|
return baseNth(args, n);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Creates a function that invokes `iteratees` with the arguments it receives
|
|
* and returns their results.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Util
|
|
* @param {...(Function|Function[])} [iteratees=[_.identity]]
|
|
* The iteratees to invoke.
|
|
* @returns {Function} Returns the new function.
|
|
* @example
|
|
*
|
|
* var func = _.over([Math.max, Math.min]);
|
|
*
|
|
* func(1, 2, 3, 4);
|
|
* // => [4, 1]
|
|
*/
|
|
var over = createOver(arrayMap);
|
|
|
|
/**
|
|
* Creates a function that checks if **all** of the `predicates` return
|
|
* truthy when invoked with the arguments it receives.
|
|
*
|
|
* Following shorthands are possible for providing predicates.
|
|
* Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
|
|
* Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Util
|
|
* @param {...(Function|Function[])} [predicates=[_.identity]]
|
|
* The predicates to check.
|
|
* @returns {Function} Returns the new function.
|
|
* @example
|
|
*
|
|
* var func = _.overEvery([Boolean, isFinite]);
|
|
*
|
|
* func('1');
|
|
* // => true
|
|
*
|
|
* func(null);
|
|
* // => false
|
|
*
|
|
* func(NaN);
|
|
* // => false
|
|
*/
|
|
var overEvery = createOver(arrayEvery);
|
|
|
|
/**
|
|
* Creates a function that checks if **any** of the `predicates` return
|
|
* truthy when invoked with the arguments it receives.
|
|
*
|
|
* Following shorthands are possible for providing predicates.
|
|
* Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
|
|
* Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Util
|
|
* @param {...(Function|Function[])} [predicates=[_.identity]]
|
|
* The predicates to check.
|
|
* @returns {Function} Returns the new function.
|
|
* @example
|
|
*
|
|
* var func = _.overSome([Boolean, isFinite]);
|
|
*
|
|
* func('1');
|
|
* // => true
|
|
*
|
|
* func(null);
|
|
* // => true
|
|
*
|
|
* func(NaN);
|
|
* // => false
|
|
*
|
|
* var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
|
|
* var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
|
|
*/
|
|
var overSome = createOver(arraySome);
|
|
|
|
/**
|
|
* Creates a function that returns the value at `path` of a given object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.4.0
|
|
* @category Util
|
|
* @param {Array|string} path The path of the property to get.
|
|
* @returns {Function} Returns the new accessor function.
|
|
* @example
|
|
*
|
|
* var objects = [
|
|
* { 'a': { 'b': 2 } },
|
|
* { 'a': { 'b': 1 } }
|
|
* ];
|
|
*
|
|
* _.map(objects, _.property('a.b'));
|
|
* // => [2, 1]
|
|
*
|
|
* _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
|
|
* // => [1, 2]
|
|
*/
|
|
function property(path) {
|
|
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
|
}
|
|
|
|
/**
|
|
* The opposite of `_.property`; this method creates a function that returns
|
|
* the value at a given path of `object`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Util
|
|
* @param {Object} object The object to query.
|
|
* @returns {Function} Returns the new accessor function.
|
|
* @example
|
|
*
|
|
* var array = [0, 1, 2],
|
|
* object = { 'a': array, 'b': array, 'c': array };
|
|
*
|
|
* _.map(['a[2]', 'c[0]'], _.propertyOf(object));
|
|
* // => [2, 0]
|
|
*
|
|
* _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
|
|
* // => [2, 0]
|
|
*/
|
|
function propertyOf(object) {
|
|
return function(path) {
|
|
return object == null ? undefined : baseGet(object, path);
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Creates an array of numbers (positive and/or negative) progressing from
|
|
* `start` up to, but not including, `end`. A step of `-1` is used if a negative
|
|
* `start` is specified without an `end` or `step`. If `end` is not specified,
|
|
* it's set to `start` with `start` then set to `0`.
|
|
*
|
|
* **Note:** JavaScript follows the IEEE-754 standard for resolving
|
|
* floating-point values which can produce unexpected results.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Util
|
|
* @param {number} [start=0] The start of the range.
|
|
* @param {number} end The end of the range.
|
|
* @param {number} [step=1] The value to increment or decrement by.
|
|
* @returns {Array} Returns the range of numbers.
|
|
* @see _.inRange, _.rangeRight
|
|
* @example
|
|
*
|
|
* _.range(4);
|
|
* // => [0, 1, 2, 3]
|
|
*
|
|
* _.range(-4);
|
|
* // => [0, -1, -2, -3]
|
|
*
|
|
* _.range(1, 5);
|
|
* // => [1, 2, 3, 4]
|
|
*
|
|
* _.range(0, 20, 5);
|
|
* // => [0, 5, 10, 15]
|
|
*
|
|
* _.range(0, -4, -1);
|
|
* // => [0, -1, -2, -3]
|
|
*
|
|
* _.range(1, 4, 0);
|
|
* // => [1, 1, 1]
|
|
*
|
|
* _.range(0);
|
|
* // => []
|
|
*/
|
|
var range = createRange();
|
|
|
|
/**
|
|
* This method is like `_.range` except that it populates values in
|
|
* descending order.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Util
|
|
* @param {number} [start=0] The start of the range.
|
|
* @param {number} end The end of the range.
|
|
* @param {number} [step=1] The value to increment or decrement by.
|
|
* @returns {Array} Returns the range of numbers.
|
|
* @see _.inRange, _.range
|
|
* @example
|
|
*
|
|
* _.rangeRight(4);
|
|
* // => [3, 2, 1, 0]
|
|
*
|
|
* _.rangeRight(-4);
|
|
* // => [-3, -2, -1, 0]
|
|
*
|
|
* _.rangeRight(1, 5);
|
|
* // => [4, 3, 2, 1]
|
|
*
|
|
* _.rangeRight(0, 20, 5);
|
|
* // => [15, 10, 5, 0]
|
|
*
|
|
* _.rangeRight(0, -4, -1);
|
|
* // => [-3, -2, -1, 0]
|
|
*
|
|
* _.rangeRight(1, 4, 0);
|
|
* // => [1, 1, 1]
|
|
*
|
|
* _.rangeRight(0);
|
|
* // => []
|
|
*/
|
|
var rangeRight = createRange(true);
|
|
|
|
/**
|
|
* This method returns a new empty array.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.13.0
|
|
* @category Util
|
|
* @returns {Array} Returns the new empty array.
|
|
* @example
|
|
*
|
|
* var arrays = _.times(2, _.stubArray);
|
|
*
|
|
* console.log(arrays);
|
|
* // => [[], []]
|
|
*
|
|
* console.log(arrays[0] === arrays[1]);
|
|
* // => false
|
|
*/
|
|
function stubArray() {
|
|
return [];
|
|
}
|
|
|
|
/**
|
|
* This method returns `false`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.13.0
|
|
* @category Util
|
|
* @returns {boolean} Returns `false`.
|
|
* @example
|
|
*
|
|
* _.times(2, _.stubFalse);
|
|
* // => [false, false]
|
|
*/
|
|
function stubFalse() {
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* This method returns a new empty object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.13.0
|
|
* @category Util
|
|
* @returns {Object} Returns the new empty object.
|
|
* @example
|
|
*
|
|
* var objects = _.times(2, _.stubObject);
|
|
*
|
|
* console.log(objects);
|
|
* // => [{}, {}]
|
|
*
|
|
* console.log(objects[0] === objects[1]);
|
|
* // => false
|
|
*/
|
|
function stubObject() {
|
|
return {};
|
|
}
|
|
|
|
/**
|
|
* This method returns an empty string.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.13.0
|
|
* @category Util
|
|
* @returns {string} Returns the empty string.
|
|
* @example
|
|
*
|
|
* _.times(2, _.stubString);
|
|
* // => ['', '']
|
|
*/
|
|
function stubString() {
|
|
return '';
|
|
}
|
|
|
|
/**
|
|
* This method returns `true`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.13.0
|
|
* @category Util
|
|
* @returns {boolean} Returns `true`.
|
|
* @example
|
|
*
|
|
* _.times(2, _.stubTrue);
|
|
* // => [true, true]
|
|
*/
|
|
function stubTrue() {
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Invokes the iteratee `n` times, returning an array of the results of
|
|
* each invocation. The iteratee is invoked with one argument; (index).
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Util
|
|
* @param {number} n The number of times to invoke `iteratee`.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @returns {Array} Returns the array of results.
|
|
* @example
|
|
*
|
|
* _.times(3, String);
|
|
* // => ['0', '1', '2']
|
|
*
|
|
* _.times(4, _.constant(0));
|
|
* // => [0, 0, 0, 0]
|
|
*/
|
|
function times(n, iteratee) {
|
|
n = toInteger(n);
|
|
if (n < 1 || n > MAX_SAFE_INTEGER) {
|
|
return [];
|
|
}
|
|
var index = MAX_ARRAY_LENGTH,
|
|
length = nativeMin(n, MAX_ARRAY_LENGTH);
|
|
|
|
iteratee = getIteratee(iteratee);
|
|
n -= MAX_ARRAY_LENGTH;
|
|
|
|
var result = baseTimes(length, iteratee);
|
|
while (++index < n) {
|
|
iteratee(index);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Converts `value` to a property path array.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Util
|
|
* @param {*} value The value to convert.
|
|
* @returns {Array} Returns the new property path array.
|
|
* @example
|
|
*
|
|
* _.toPath('a.b.c');
|
|
* // => ['a', 'b', 'c']
|
|
*
|
|
* _.toPath('a[0].b.c');
|
|
* // => ['a', '0', 'b', 'c']
|
|
*/
|
|
function toPath(value) {
|
|
if (isArray(value)) {
|
|
return arrayMap(value, toKey);
|
|
}
|
|
return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
|
|
}
|
|
|
|
/**
|
|
* Generates a unique ID. If `prefix` is given, the ID is appended to it.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Util
|
|
* @param {string} [prefix=''] The value to prefix the ID with.
|
|
* @returns {string} Returns the unique ID.
|
|
* @example
|
|
*
|
|
* _.uniqueId('contact_');
|
|
* // => 'contact_104'
|
|
*
|
|
* _.uniqueId();
|
|
* // => '105'
|
|
*/
|
|
function uniqueId(prefix) {
|
|
var id = ++idCounter;
|
|
return toString(prefix) + id;
|
|
}
|
|
|
|
/*------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
* Adds two numbers.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.4.0
|
|
* @category Math
|
|
* @param {number} augend The first number in an addition.
|
|
* @param {number} addend The second number in an addition.
|
|
* @returns {number} Returns the total.
|
|
* @example
|
|
*
|
|
* _.add(6, 4);
|
|
* // => 10
|
|
*/
|
|
var add = createMathOperation(function(augend, addend) {
|
|
return augend + addend;
|
|
}, 0);
|
|
|
|
/**
|
|
* Computes `number` rounded up to `precision`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.10.0
|
|
* @category Math
|
|
* @param {number} number The number to round up.
|
|
* @param {number} [precision=0] The precision to round up to.
|
|
* @returns {number} Returns the rounded up number.
|
|
* @example
|
|
*
|
|
* _.ceil(4.006);
|
|
* // => 5
|
|
*
|
|
* _.ceil(6.004, 2);
|
|
* // => 6.01
|
|
*
|
|
* _.ceil(6040, -2);
|
|
* // => 6100
|
|
*/
|
|
var ceil = createRound('ceil');
|
|
|
|
/**
|
|
* Divide two numbers.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.7.0
|
|
* @category Math
|
|
* @param {number} dividend The first number in a division.
|
|
* @param {number} divisor The second number in a division.
|
|
* @returns {number} Returns the quotient.
|
|
* @example
|
|
*
|
|
* _.divide(6, 4);
|
|
* // => 1.5
|
|
*/
|
|
var divide = createMathOperation(function(dividend, divisor) {
|
|
return dividend / divisor;
|
|
}, 1);
|
|
|
|
/**
|
|
* Computes `number` rounded down to `precision`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.10.0
|
|
* @category Math
|
|
* @param {number} number The number to round down.
|
|
* @param {number} [precision=0] The precision to round down to.
|
|
* @returns {number} Returns the rounded down number.
|
|
* @example
|
|
*
|
|
* _.floor(4.006);
|
|
* // => 4
|
|
*
|
|
* _.floor(0.046, 2);
|
|
* // => 0.04
|
|
*
|
|
* _.floor(4060, -2);
|
|
* // => 4000
|
|
*/
|
|
var floor = createRound('floor');
|
|
|
|
/**
|
|
* Computes the maximum value of `array`. If `array` is empty or falsey,
|
|
* `undefined` is returned.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Math
|
|
* @param {Array} array The array to iterate over.
|
|
* @returns {*} Returns the maximum value.
|
|
* @example
|
|
*
|
|
* _.max([4, 2, 8, 6]);
|
|
* // => 8
|
|
*
|
|
* _.max([]);
|
|
* // => undefined
|
|
*/
|
|
function max(array) {
|
|
return (array && array.length)
|
|
? baseExtremum(array, identity, baseGt)
|
|
: undefined;
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.max` except that it accepts `iteratee` which is
|
|
* invoked for each element in `array` to generate the criterion by which
|
|
* the value is ranked. The iteratee is invoked with one argument: (value).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Math
|
|
* @param {Array} array The array to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
|
* @returns {*} Returns the maximum value.
|
|
* @example
|
|
*
|
|
* var objects = [{ 'n': 1 }, { 'n': 2 }];
|
|
*
|
|
* _.maxBy(objects, function(o) { return o.n; });
|
|
* // => { 'n': 2 }
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.maxBy(objects, 'n');
|
|
* // => { 'n': 2 }
|
|
*/
|
|
function maxBy(array, iteratee) {
|
|
return (array && array.length)
|
|
? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
|
|
: undefined;
|
|
}
|
|
|
|
/**
|
|
* Computes the mean of the values in `array`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Math
|
|
* @param {Array} array The array to iterate over.
|
|
* @returns {number} Returns the mean.
|
|
* @example
|
|
*
|
|
* _.mean([4, 2, 8, 6]);
|
|
* // => 5
|
|
*/
|
|
function mean(array) {
|
|
return baseMean(array, identity);
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.mean` except that it accepts `iteratee` which is
|
|
* invoked for each element in `array` to generate the value to be averaged.
|
|
* The iteratee is invoked with one argument: (value).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.7.0
|
|
* @category Math
|
|
* @param {Array} array The array to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
|
* @returns {number} Returns the mean.
|
|
* @example
|
|
*
|
|
* var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
|
|
*
|
|
* _.meanBy(objects, function(o) { return o.n; });
|
|
* // => 5
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.meanBy(objects, 'n');
|
|
* // => 5
|
|
*/
|
|
function meanBy(array, iteratee) {
|
|
return baseMean(array, getIteratee(iteratee, 2));
|
|
}
|
|
|
|
/**
|
|
* Computes the minimum value of `array`. If `array` is empty or falsey,
|
|
* `undefined` is returned.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Math
|
|
* @param {Array} array The array to iterate over.
|
|
* @returns {*} Returns the minimum value.
|
|
* @example
|
|
*
|
|
* _.min([4, 2, 8, 6]);
|
|
* // => 2
|
|
*
|
|
* _.min([]);
|
|
* // => undefined
|
|
*/
|
|
function min(array) {
|
|
return (array && array.length)
|
|
? baseExtremum(array, identity, baseLt)
|
|
: undefined;
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.min` except that it accepts `iteratee` which is
|
|
* invoked for each element in `array` to generate the criterion by which
|
|
* the value is ranked. The iteratee is invoked with one argument: (value).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Math
|
|
* @param {Array} array The array to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
|
* @returns {*} Returns the minimum value.
|
|
* @example
|
|
*
|
|
* var objects = [{ 'n': 1 }, { 'n': 2 }];
|
|
*
|
|
* _.minBy(objects, function(o) { return o.n; });
|
|
* // => { 'n': 1 }
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.minBy(objects, 'n');
|
|
* // => { 'n': 1 }
|
|
*/
|
|
function minBy(array, iteratee) {
|
|
return (array && array.length)
|
|
? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
|
|
: undefined;
|
|
}
|
|
|
|
/**
|
|
* Multiply two numbers.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.7.0
|
|
* @category Math
|
|
* @param {number} multiplier The first number in a multiplication.
|
|
* @param {number} multiplicand The second number in a multiplication.
|
|
* @returns {number} Returns the product.
|
|
* @example
|
|
*
|
|
* _.multiply(6, 4);
|
|
* // => 24
|
|
*/
|
|
var multiply = createMathOperation(function(multiplier, multiplicand) {
|
|
return multiplier * multiplicand;
|
|
}, 1);
|
|
|
|
/**
|
|
* Computes `number` rounded to `precision`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.10.0
|
|
* @category Math
|
|
* @param {number} number The number to round.
|
|
* @param {number} [precision=0] The precision to round to.
|
|
* @returns {number} Returns the rounded number.
|
|
* @example
|
|
*
|
|
* _.round(4.006);
|
|
* // => 4
|
|
*
|
|
* _.round(4.006, 2);
|
|
* // => 4.01
|
|
*
|
|
* _.round(4060, -2);
|
|
* // => 4100
|
|
*/
|
|
var round = createRound('round');
|
|
|
|
/**
|
|
* Subtract two numbers.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Math
|
|
* @param {number} minuend The first number in a subtraction.
|
|
* @param {number} subtrahend The second number in a subtraction.
|
|
* @returns {number} Returns the difference.
|
|
* @example
|
|
*
|
|
* _.subtract(6, 4);
|
|
* // => 2
|
|
*/
|
|
var subtract = createMathOperation(function(minuend, subtrahend) {
|
|
return minuend - subtrahend;
|
|
}, 0);
|
|
|
|
/**
|
|
* Computes the sum of the values in `array`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.4.0
|
|
* @category Math
|
|
* @param {Array} array The array to iterate over.
|
|
* @returns {number} Returns the sum.
|
|
* @example
|
|
*
|
|
* _.sum([4, 2, 8, 6]);
|
|
* // => 20
|
|
*/
|
|
function sum(array) {
|
|
return (array && array.length)
|
|
? baseSum(array, identity)
|
|
: 0;
|
|
}
|
|
|
|
/**
|
|
* This method is like `_.sum` except that it accepts `iteratee` which is
|
|
* invoked for each element in `array` to generate the value to be summed.
|
|
* The iteratee is invoked with one argument: (value).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Math
|
|
* @param {Array} array The array to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
|
* @returns {number} Returns the sum.
|
|
* @example
|
|
*
|
|
* var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
|
|
*
|
|
* _.sumBy(objects, function(o) { return o.n; });
|
|
* // => 20
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.sumBy(objects, 'n');
|
|
* // => 20
|
|
*/
|
|
function sumBy(array, iteratee) {
|
|
return (array && array.length)
|
|
? baseSum(array, getIteratee(iteratee, 2))
|
|
: 0;
|
|
}
|
|
|
|
/*------------------------------------------------------------------------*/
|
|
|
|
// Add methods that return wrapped values in chain sequences.
|
|
lodash.after = after;
|
|
lodash.ary = ary;
|
|
lodash.assign = assign;
|
|
lodash.assignIn = assignIn;
|
|
lodash.assignInWith = assignInWith;
|
|
lodash.assignWith = assignWith;
|
|
lodash.at = at;
|
|
lodash.before = before;
|
|
lodash.bind = bind;
|
|
lodash.bindAll = bindAll;
|
|
lodash.bindKey = bindKey;
|
|
lodash.castArray = castArray;
|
|
lodash.chain = chain;
|
|
lodash.chunk = chunk;
|
|
lodash.compact = compact;
|
|
lodash.concat = concat;
|
|
lodash.cond = cond;
|
|
lodash.conforms = conforms;
|
|
lodash.constant = constant;
|
|
lodash.countBy = countBy;
|
|
lodash.create = create;
|
|
lodash.curry = curry;
|
|
lodash.curryRight = curryRight;
|
|
lodash.debounce = debounce;
|
|
lodash.defaults = defaults;
|
|
lodash.defaultsDeep = defaultsDeep;
|
|
lodash.defer = defer;
|
|
lodash.delay = delay;
|
|
lodash.difference = difference;
|
|
lodash.differenceBy = differenceBy;
|
|
lodash.differenceWith = differenceWith;
|
|
lodash.drop = drop;
|
|
lodash.dropRight = dropRight;
|
|
lodash.dropRightWhile = dropRightWhile;
|
|
lodash.dropWhile = dropWhile;
|
|
lodash.fill = fill;
|
|
lodash.filter = filter;
|
|
lodash.flatMap = flatMap;
|
|
lodash.flatMapDeep = flatMapDeep;
|
|
lodash.flatMapDepth = flatMapDepth;
|
|
lodash.flatten = flatten;
|
|
lodash.flattenDeep = flattenDeep;
|
|
lodash.flattenDepth = flattenDepth;
|
|
lodash.flip = flip;
|
|
lodash.flow = flow;
|
|
lodash.flowRight = flowRight;
|
|
lodash.fromPairs = fromPairs;
|
|
lodash.functions = functions;
|
|
lodash.functionsIn = functionsIn;
|
|
lodash.groupBy = groupBy;
|
|
lodash.initial = initial;
|
|
lodash.intersection = intersection;
|
|
lodash.intersectionBy = intersectionBy;
|
|
lodash.intersectionWith = intersectionWith;
|
|
lodash.invert = invert;
|
|
lodash.invertBy = invertBy;
|
|
lodash.invokeMap = invokeMap;
|
|
lodash.iteratee = iteratee;
|
|
lodash.keyBy = keyBy;
|
|
lodash.keys = keys;
|
|
lodash.keysIn = keysIn;
|
|
lodash.map = map;
|
|
lodash.mapKeys = mapKeys;
|
|
lodash.mapValues = mapValues;
|
|
lodash.matches = matches;
|
|
lodash.matchesProperty = matchesProperty;
|
|
lodash.memoize = memoize;
|
|
lodash.merge = merge;
|
|
lodash.mergeWith = mergeWith;
|
|
lodash.method = method;
|
|
lodash.methodOf = methodOf;
|
|
lodash.mixin = mixin;
|
|
lodash.negate = negate;
|
|
lodash.nthArg = nthArg;
|
|
lodash.omit = omit;
|
|
lodash.omitBy = omitBy;
|
|
lodash.once = once;
|
|
lodash.orderBy = orderBy;
|
|
lodash.over = over;
|
|
lodash.overArgs = overArgs;
|
|
lodash.overEvery = overEvery;
|
|
lodash.overSome = overSome;
|
|
lodash.partial = partial;
|
|
lodash.partialRight = partialRight;
|
|
lodash.partition = partition;
|
|
lodash.pick = pick;
|
|
lodash.pickBy = pickBy;
|
|
lodash.property = property;
|
|
lodash.propertyOf = propertyOf;
|
|
lodash.pull = pull;
|
|
lodash.pullAll = pullAll;
|
|
lodash.pullAllBy = pullAllBy;
|
|
lodash.pullAllWith = pullAllWith;
|
|
lodash.pullAt = pullAt;
|
|
lodash.range = range;
|
|
lodash.rangeRight = rangeRight;
|
|
lodash.rearg = rearg;
|
|
lodash.reject = reject;
|
|
lodash.remove = remove;
|
|
lodash.rest = rest;
|
|
lodash.reverse = reverse;
|
|
lodash.sampleSize = sampleSize;
|
|
lodash.set = set;
|
|
lodash.setWith = setWith;
|
|
lodash.shuffle = shuffle;
|
|
lodash.slice = slice;
|
|
lodash.sortBy = sortBy;
|
|
lodash.sortedUniq = sortedUniq;
|
|
lodash.sortedUniqBy = sortedUniqBy;
|
|
lodash.split = split;
|
|
lodash.spread = spread;
|
|
lodash.tail = tail;
|
|
lodash.take = take;
|
|
lodash.takeRight = takeRight;
|
|
lodash.takeRightWhile = takeRightWhile;
|
|
lodash.takeWhile = takeWhile;
|
|
lodash.tap = tap;
|
|
lodash.throttle = throttle;
|
|
lodash.thru = thru;
|
|
lodash.toArray = toArray;
|
|
lodash.toPairs = toPairs;
|
|
lodash.toPairsIn = toPairsIn;
|
|
lodash.toPath = toPath;
|
|
lodash.toPlainObject = toPlainObject;
|
|
lodash.transform = transform;
|
|
lodash.unary = unary;
|
|
lodash.union = union;
|
|
lodash.unionBy = unionBy;
|
|
lodash.unionWith = unionWith;
|
|
lodash.uniq = uniq;
|
|
lodash.uniqBy = uniqBy;
|
|
lodash.uniqWith = uniqWith;
|
|
lodash.unset = unset;
|
|
lodash.unzip = unzip;
|
|
lodash.unzipWith = unzipWith;
|
|
lodash.update = update;
|
|
lodash.updateWith = updateWith;
|
|
lodash.values = values;
|
|
lodash.valuesIn = valuesIn;
|
|
lodash.without = without;
|
|
lodash.words = words;
|
|
lodash.wrap = wrap;
|
|
lodash.xor = xor;
|
|
lodash.xorBy = xorBy;
|
|
lodash.xorWith = xorWith;
|
|
lodash.zip = zip;
|
|
lodash.zipObject = zipObject;
|
|
lodash.zipObjectDeep = zipObjectDeep;
|
|
lodash.zipWith = zipWith;
|
|
|
|
// Add aliases.
|
|
lodash.entries = toPairs;
|
|
lodash.entriesIn = toPairsIn;
|
|
lodash.extend = assignIn;
|
|
lodash.extendWith = assignInWith;
|
|
|
|
// Add methods to `lodash.prototype`.
|
|
mixin(lodash, lodash);
|
|
|
|
/*------------------------------------------------------------------------*/
|
|
|
|
// Add methods that return unwrapped values in chain sequences.
|
|
lodash.add = add;
|
|
lodash.attempt = attempt;
|
|
lodash.camelCase = camelCase;
|
|
lodash.capitalize = capitalize;
|
|
lodash.ceil = ceil;
|
|
lodash.clamp = clamp;
|
|
lodash.clone = clone;
|
|
lodash.cloneDeep = cloneDeep;
|
|
lodash.cloneDeepWith = cloneDeepWith;
|
|
lodash.cloneWith = cloneWith;
|
|
lodash.conformsTo = conformsTo;
|
|
lodash.deburr = deburr;
|
|
lodash.defaultTo = defaultTo;
|
|
lodash.divide = divide;
|
|
lodash.endsWith = endsWith;
|
|
lodash.eq = eq;
|
|
lodash.escape = escape;
|
|
lodash.escapeRegExp = escapeRegExp;
|
|
lodash.every = every;
|
|
lodash.find = find;
|
|
lodash.findIndex = findIndex;
|
|
lodash.findKey = findKey;
|
|
lodash.findLast = findLast;
|
|
lodash.findLastIndex = findLastIndex;
|
|
lodash.findLastKey = findLastKey;
|
|
lodash.floor = floor;
|
|
lodash.forEach = forEach;
|
|
lodash.forEachRight = forEachRight;
|
|
lodash.forIn = forIn;
|
|
lodash.forInRight = forInRight;
|
|
lodash.forOwn = forOwn;
|
|
lodash.forOwnRight = forOwnRight;
|
|
lodash.get = get;
|
|
lodash.gt = gt;
|
|
lodash.gte = gte;
|
|
lodash.has = has;
|
|
lodash.hasIn = hasIn;
|
|
lodash.head = head;
|
|
lodash.identity = identity;
|
|
lodash.includes = includes;
|
|
lodash.indexOf = indexOf;
|
|
lodash.inRange = inRange;
|
|
lodash.invoke = invoke;
|
|
lodash.isArguments = isArguments;
|
|
lodash.isArray = isArray;
|
|
lodash.isArrayBuffer = isArrayBuffer;
|
|
lodash.isArrayLike = isArrayLike;
|
|
lodash.isArrayLikeObject = isArrayLikeObject;
|
|
lodash.isBoolean = isBoolean;
|
|
lodash.isBuffer = isBuffer;
|
|
lodash.isDate = isDate;
|
|
lodash.isElement = isElement;
|
|
lodash.isEmpty = isEmpty;
|
|
lodash.isEqual = isEqual;
|
|
lodash.isEqualWith = isEqualWith;
|
|
lodash.isError = isError;
|
|
lodash.isFinite = isFinite;
|
|
lodash.isFunction = isFunction;
|
|
lodash.isInteger = isInteger;
|
|
lodash.isLength = isLength;
|
|
lodash.isMap = isMap;
|
|
lodash.isMatch = isMatch;
|
|
lodash.isMatchWith = isMatchWith;
|
|
lodash.isNaN = isNaN;
|
|
lodash.isNative = isNative;
|
|
lodash.isNil = isNil;
|
|
lodash.isNull = isNull;
|
|
lodash.isNumber = isNumber;
|
|
lodash.isObject = isObject;
|
|
lodash.isObjectLike = isObjectLike;
|
|
lodash.isPlainObject = isPlainObject;
|
|
lodash.isRegExp = isRegExp;
|
|
lodash.isSafeInteger = isSafeInteger;
|
|
lodash.isSet = isSet;
|
|
lodash.isString = isString;
|
|
lodash.isSymbol = isSymbol;
|
|
lodash.isTypedArray = isTypedArray;
|
|
lodash.isUndefined = isUndefined;
|
|
lodash.isWeakMap = isWeakMap;
|
|
lodash.isWeakSet = isWeakSet;
|
|
lodash.join = join;
|
|
lodash.kebabCase = kebabCase;
|
|
lodash.last = last;
|
|
lodash.lastIndexOf = lastIndexOf;
|
|
lodash.lowerCase = lowerCase;
|
|
lodash.lowerFirst = lowerFirst;
|
|
lodash.lt = lt;
|
|
lodash.lte = lte;
|
|
lodash.max = max;
|
|
lodash.maxBy = maxBy;
|
|
lodash.mean = mean;
|
|
lodash.meanBy = meanBy;
|
|
lodash.min = min;
|
|
lodash.minBy = minBy;
|
|
lodash.stubArray = stubArray;
|
|
lodash.stubFalse = stubFalse;
|
|
lodash.stubObject = stubObject;
|
|
lodash.stubString = stubString;
|
|
lodash.stubTrue = stubTrue;
|
|
lodash.multiply = multiply;
|
|
lodash.nth = nth;
|
|
lodash.noConflict = noConflict;
|
|
lodash.noop = noop;
|
|
lodash.now = now;
|
|
lodash.pad = pad;
|
|
lodash.padEnd = padEnd;
|
|
lodash.padStart = padStart;
|
|
lodash.parseInt = parseInt;
|
|
lodash.random = random;
|
|
lodash.reduce = reduce;
|
|
lodash.reduceRight = reduceRight;
|
|
lodash.repeat = repeat;
|
|
lodash.replace = replace;
|
|
lodash.result = result;
|
|
lodash.round = round;
|
|
lodash.runInContext = runInContext;
|
|
lodash.sample = sample;
|
|
lodash.size = size;
|
|
lodash.snakeCase = snakeCase;
|
|
lodash.some = some;
|
|
lodash.sortedIndex = sortedIndex;
|
|
lodash.sortedIndexBy = sortedIndexBy;
|
|
lodash.sortedIndexOf = sortedIndexOf;
|
|
lodash.sortedLastIndex = sortedLastIndex;
|
|
lodash.sortedLastIndexBy = sortedLastIndexBy;
|
|
lodash.sortedLastIndexOf = sortedLastIndexOf;
|
|
lodash.startCase = startCase;
|
|
lodash.startsWith = startsWith;
|
|
lodash.subtract = subtract;
|
|
lodash.sum = sum;
|
|
lodash.sumBy = sumBy;
|
|
lodash.template = template;
|
|
lodash.times = times;
|
|
lodash.toFinite = toFinite;
|
|
lodash.toInteger = toInteger;
|
|
lodash.toLength = toLength;
|
|
lodash.toLower = toLower;
|
|
lodash.toNumber = toNumber;
|
|
lodash.toSafeInteger = toSafeInteger;
|
|
lodash.toString = toString;
|
|
lodash.toUpper = toUpper;
|
|
lodash.trim = trim;
|
|
lodash.trimEnd = trimEnd;
|
|
lodash.trimStart = trimStart;
|
|
lodash.truncate = truncate;
|
|
lodash.unescape = unescape;
|
|
lodash.uniqueId = uniqueId;
|
|
lodash.upperCase = upperCase;
|
|
lodash.upperFirst = upperFirst;
|
|
|
|
// Add aliases.
|
|
lodash.each = forEach;
|
|
lodash.eachRight = forEachRight;
|
|
lodash.first = head;
|
|
|
|
mixin(lodash, (function() {
|
|
var source = {};
|
|
baseForOwn(lodash, function(func, methodName) {
|
|
if (!hasOwnProperty.call(lodash.prototype, methodName)) {
|
|
source[methodName] = func;
|
|
}
|
|
});
|
|
return source;
|
|
}()), { 'chain': false });
|
|
|
|
/*------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
* The semantic version number.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @type {string}
|
|
*/
|
|
lodash.VERSION = VERSION;
|
|
|
|
// Assign default placeholders.
|
|
arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
|
|
lodash[methodName].placeholder = lodash;
|
|
});
|
|
|
|
// Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
|
|
arrayEach(['drop', 'take'], function(methodName, index) {
|
|
LazyWrapper.prototype[methodName] = function(n) {
|
|
n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
|
|
|
|
var result = (this.__filtered__ && !index)
|
|
? new LazyWrapper(this)
|
|
: this.clone();
|
|
|
|
if (result.__filtered__) {
|
|
result.__takeCount__ = nativeMin(n, result.__takeCount__);
|
|
} else {
|
|
result.__views__.push({
|
|
'size': nativeMin(n, MAX_ARRAY_LENGTH),
|
|
'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
|
|
});
|
|
}
|
|
return result;
|
|
};
|
|
|
|
LazyWrapper.prototype[methodName + 'Right'] = function(n) {
|
|
return this.reverse()[methodName](n).reverse();
|
|
};
|
|
});
|
|
|
|
// Add `LazyWrapper` methods that accept an `iteratee` value.
|
|
arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
|
|
var type = index + 1,
|
|
isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
|
|
|
|
LazyWrapper.prototype[methodName] = function(iteratee) {
|
|
var result = this.clone();
|
|
result.__iteratees__.push({
|
|
'iteratee': getIteratee(iteratee, 3),
|
|
'type': type
|
|
});
|
|
result.__filtered__ = result.__filtered__ || isFilter;
|
|
return result;
|
|
};
|
|
});
|
|
|
|
// Add `LazyWrapper` methods for `_.head` and `_.last`.
|
|
arrayEach(['head', 'last'], function(methodName, index) {
|
|
var takeName = 'take' + (index ? 'Right' : '');
|
|
|
|
LazyWrapper.prototype[methodName] = function() {
|
|
return this[takeName](1).value()[0];
|
|
};
|
|
});
|
|
|
|
// Add `LazyWrapper` methods for `_.initial` and `_.tail`.
|
|
arrayEach(['initial', 'tail'], function(methodName, index) {
|
|
var dropName = 'drop' + (index ? '' : 'Right');
|
|
|
|
LazyWrapper.prototype[methodName] = function() {
|
|
return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
|
|
};
|
|
});
|
|
|
|
LazyWrapper.prototype.compact = function() {
|
|
return this.filter(identity);
|
|
};
|
|
|
|
LazyWrapper.prototype.find = function(predicate) {
|
|
return this.filter(predicate).head();
|
|
};
|
|
|
|
LazyWrapper.prototype.findLast = function(predicate) {
|
|
return this.reverse().find(predicate);
|
|
};
|
|
|
|
LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
|
|
if (typeof path == 'function') {
|
|
return new LazyWrapper(this);
|
|
}
|
|
return this.map(function(value) {
|
|
return baseInvoke(value, path, args);
|
|
});
|
|
});
|
|
|
|
LazyWrapper.prototype.reject = function(predicate) {
|
|
return this.filter(negate(getIteratee(predicate)));
|
|
};
|
|
|
|
LazyWrapper.prototype.slice = function(start, end) {
|
|
start = toInteger(start);
|
|
|
|
var result = this;
|
|
if (result.__filtered__ && (start > 0 || end < 0)) {
|
|
return new LazyWrapper(result);
|
|
}
|
|
if (start < 0) {
|
|
result = result.takeRight(-start);
|
|
} else if (start) {
|
|
result = result.drop(start);
|
|
}
|
|
if (end !== undefined) {
|
|
end = toInteger(end);
|
|
result = end < 0 ? result.dropRight(-end) : result.take(end - start);
|
|
}
|
|
return result;
|
|
};
|
|
|
|
LazyWrapper.prototype.takeRightWhile = function(predicate) {
|
|
return this.reverse().takeWhile(predicate).reverse();
|
|
};
|
|
|
|
LazyWrapper.prototype.toArray = function() {
|
|
return this.take(MAX_ARRAY_LENGTH);
|
|
};
|
|
|
|
// Add `LazyWrapper` methods to `lodash.prototype`.
|
|
baseForOwn(LazyWrapper.prototype, function(func, methodName) {
|
|
var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
|
|
isTaker = /^(?:head|last)$/.test(methodName),
|
|
lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
|
|
retUnwrapped = isTaker || /^find/.test(methodName);
|
|
|
|
if (!lodashFunc) {
|
|
return;
|
|
}
|
|
lodash.prototype[methodName] = function() {
|
|
var value = this.__wrapped__,
|
|
args = isTaker ? [1] : arguments,
|
|
isLazy = value instanceof LazyWrapper,
|
|
iteratee = args[0],
|
|
useLazy = isLazy || isArray(value);
|
|
|
|
var interceptor = function(value) {
|
|
var result = lodashFunc.apply(lodash, arrayPush([value], args));
|
|
return (isTaker && chainAll) ? result[0] : result;
|
|
};
|
|
|
|
if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
|
|
// Avoid lazy use if the iteratee has a "length" value other than `1`.
|
|
isLazy = useLazy = false;
|
|
}
|
|
var chainAll = this.__chain__,
|
|
isHybrid = !!this.__actions__.length,
|
|
isUnwrapped = retUnwrapped && !chainAll,
|
|
onlyLazy = isLazy && !isHybrid;
|
|
|
|
if (!retUnwrapped && useLazy) {
|
|
value = onlyLazy ? value : new LazyWrapper(this);
|
|
var result = func.apply(value, args);
|
|
result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
|
|
return new LodashWrapper(result, chainAll);
|
|
}
|
|
if (isUnwrapped && onlyLazy) {
|
|
return func.apply(this, args);
|
|
}
|
|
result = this.thru(interceptor);
|
|
return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
|
|
};
|
|
});
|
|
|
|
// Add `Array` methods to `lodash.prototype`.
|
|
arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
|
|
var func = arrayProto[methodName],
|
|
chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
|
|
retUnwrapped = /^(?:pop|shift)$/.test(methodName);
|
|
|
|
lodash.prototype[methodName] = function() {
|
|
var args = arguments;
|
|
if (retUnwrapped && !this.__chain__) {
|
|
var value = this.value();
|
|
return func.apply(isArray(value) ? value : [], args);
|
|
}
|
|
return this[chainName](function(value) {
|
|
return func.apply(isArray(value) ? value : [], args);
|
|
});
|
|
};
|
|
});
|
|
|
|
// Map minified method names to their real names.
|
|
baseForOwn(LazyWrapper.prototype, function(func, methodName) {
|
|
var lodashFunc = lodash[methodName];
|
|
if (lodashFunc) {
|
|
var key = lodashFunc.name + '';
|
|
if (!hasOwnProperty.call(realNames, key)) {
|
|
realNames[key] = [];
|
|
}
|
|
realNames[key].push({ 'name': methodName, 'func': lodashFunc });
|
|
}
|
|
});
|
|
|
|
realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
|
|
'name': 'wrapper',
|
|
'func': undefined
|
|
}];
|
|
|
|
// Add methods to `LazyWrapper`.
|
|
LazyWrapper.prototype.clone = lazyClone;
|
|
LazyWrapper.prototype.reverse = lazyReverse;
|
|
LazyWrapper.prototype.value = lazyValue;
|
|
|
|
// Add chain sequence methods to the `lodash` wrapper.
|
|
lodash.prototype.at = wrapperAt;
|
|
lodash.prototype.chain = wrapperChain;
|
|
lodash.prototype.commit = wrapperCommit;
|
|
lodash.prototype.next = wrapperNext;
|
|
lodash.prototype.plant = wrapperPlant;
|
|
lodash.prototype.reverse = wrapperReverse;
|
|
lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
|
|
|
|
// Add lazy aliases.
|
|
lodash.prototype.first = lodash.prototype.head;
|
|
|
|
if (symIterator) {
|
|
lodash.prototype[symIterator] = wrapperToIterator;
|
|
}
|
|
return lodash;
|
|
});
|
|
|
|
/*--------------------------------------------------------------------------*/
|
|
|
|
// Export lodash.
|
|
var _ = runInContext();
|
|
|
|
// Some AMD build optimizers, like r.js, check for condition patterns like:
|
|
if (true) {
|
|
// Expose Lodash on the global object to prevent errors when Lodash is
|
|
// loaded by a script tag in the presence of an AMD loader.
|
|
// See http://requirejs.org/docs/errors.html#mismatch for more details.
|
|
// Use `_.noConflict` to remove Lodash from the global object.
|
|
root._ = _;
|
|
|
|
// Define as an anonymous module so, through path mapping, it can be
|
|
// referenced as the "underscore" module.
|
|
!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
|
|
return _;
|
|
}).call(exports, __webpack_require__, exports, module),
|
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
}
|
|
// Check for `exports` after `define` in case a build optimizer adds it.
|
|
else {}
|
|
}.call(this));
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/sweetalert2/dist/sweetalert2.min.css":
|
|
/*!***********************************************************!*\
|
|
!*** ./node_modules/sweetalert2/dist/sweetalert2.min.css ***!
|
|
\***********************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _css_loader_dist_cjs_js_clonedRuleSet_8_use_1_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_sweetalert2_min_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./sweetalert2.min.css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/sweetalert2/dist/sweetalert2.min.css");
|
|
|
|
|
|
|
|
var options = {};
|
|
|
|
options.insert = "head";
|
|
options.singleton = false;
|
|
|
|
var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_sweetalert2_min_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_sweetalert2_min_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/css/loader.css":
|
|
/*!**********************************!*\
|
|
!*** ./resources/css/loader.css ***!
|
|
\**********************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_loader_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./loader.css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./resources/css/loader.css");
|
|
|
|
|
|
|
|
var options = {};
|
|
|
|
options.insert = "head";
|
|
options.singleton = false;
|
|
|
|
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_loader_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_loader_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/css/payment.css":
|
|
/*!***********************************!*\
|
|
!*** ./resources/css/payment.css ***!
|
|
\***********************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_payment_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./payment.css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./resources/css/payment.css");
|
|
|
|
|
|
|
|
var options = {};
|
|
|
|
options.insert = "head";
|
|
options.singleton = false;
|
|
|
|
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_payment_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_payment_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/css/register.css":
|
|
/*!************************************!*\
|
|
!*** ./resources/css/register.css ***!
|
|
\************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_register_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./register.css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./resources/css/register.css");
|
|
|
|
|
|
|
|
var options = {};
|
|
|
|
options.insert = "head";
|
|
options.singleton = false;
|
|
|
|
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_register_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_register_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/css/spinner.css":
|
|
/*!***********************************!*\
|
|
!*** ./resources/css/spinner.css ***!
|
|
\***********************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_spinner_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./spinner.css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./resources/css/spinner.css");
|
|
|
|
|
|
|
|
var options = {};
|
|
|
|
options.insert = "head";
|
|
options.singleton = false;
|
|
|
|
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_spinner_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_spinner_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/AddProfile.vue?vue&type=style&index=0&id=41f2e48a&scoped=true&lang=css":
|
|
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/AddProfile.vue?vue&type=style&index=0&id=41f2e48a&scoped=true&lang=css ***!
|
|
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AddProfile_vue_vue_type_style_index_0_id_41f2e48a_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AddProfile.vue?vue&type=style&index=0&id=41f2e48a&scoped=true&lang=css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/AddProfile.vue?vue&type=style&index=0&id=41f2e48a&scoped=true&lang=css");
|
|
|
|
|
|
|
|
var options = {};
|
|
|
|
options.insert = "head";
|
|
options.singleton = false;
|
|
|
|
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AddProfile_vue_vue_type_style_index_0_id_41f2e48a_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AddProfile_vue_vue_type_style_index_0_id_41f2e48a_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/ChoosePackage.vue?vue&type=style&index=0&id=7b3e7646&scoped=true&lang=css":
|
|
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/ChoosePackage.vue?vue&type=style&index=0&id=7b3e7646&scoped=true&lang=css ***!
|
|
\*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_ChoosePackage_vue_vue_type_style_index_0_id_7b3e7646_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./ChoosePackage.vue?vue&type=style&index=0&id=7b3e7646&scoped=true&lang=css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/ChoosePackage.vue?vue&type=style&index=0&id=7b3e7646&scoped=true&lang=css");
|
|
|
|
|
|
|
|
var options = {};
|
|
|
|
options.insert = "head";
|
|
options.singleton = false;
|
|
|
|
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_ChoosePackage_vue_vue_type_style_index_0_id_7b3e7646_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_ChoosePackage_vue_vue_type_style_index_0_id_7b3e7646_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateAccount.vue?vue&type=style&index=0&id=bd535982&scoped=true&lang=css":
|
|
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateAccount.vue?vue&type=style&index=0&id=bd535982&scoped=true&lang=css ***!
|
|
\*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_CreateAccount_vue_vue_type_style_index_0_id_bd535982_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./CreateAccount.vue?vue&type=style&index=0&id=bd535982&scoped=true&lang=css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateAccount.vue?vue&type=style&index=0&id=bd535982&scoped=true&lang=css");
|
|
|
|
|
|
|
|
var options = {};
|
|
|
|
options.insert = "head";
|
|
options.singleton = false;
|
|
|
|
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_CreateAccount_vue_vue_type_style_index_0_id_bd535982_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_CreateAccount_vue_vue_type_style_index_0_id_bd535982_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateCreditReportAccount.vue?vue&type=style&index=0&id=cbb5871c&scoped=true&lang=css":
|
|
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateCreditReportAccount.vue?vue&type=style&index=0&id=cbb5871c&scoped=true&lang=css ***!
|
|
\*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_CreateCreditReportAccount_vue_vue_type_style_index_0_id_cbb5871c_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./CreateCreditReportAccount.vue?vue&type=style&index=0&id=cbb5871c&scoped=true&lang=css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateCreditReportAccount.vue?vue&type=style&index=0&id=cbb5871c&scoped=true&lang=css");
|
|
|
|
|
|
|
|
var options = {};
|
|
|
|
options.insert = "head";
|
|
options.singleton = false;
|
|
|
|
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_CreateCreditReportAccount_vue_vue_type_style_index_0_id_cbb5871c_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_CreateCreditReportAccount_vue_vue_type_style_index_0_id_cbb5871c_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/IdentityIQPkg.vue?vue&type=style&index=0&id=f0648e98&lang=css":
|
|
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/IdentityIQPkg.vue?vue&type=style&index=0&id=f0648e98&lang=css ***!
|
|
\*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_IdentityIQPkg_vue_vue_type_style_index_0_id_f0648e98_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./IdentityIQPkg.vue?vue&type=style&index=0&id=f0648e98&lang=css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/IdentityIQPkg.vue?vue&type=style&index=0&id=f0648e98&lang=css");
|
|
|
|
|
|
|
|
var options = {};
|
|
|
|
options.insert = "head";
|
|
options.singleton = false;
|
|
|
|
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_IdentityIQPkg_vue_vue_type_style_index_0_id_f0648e98_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_IdentityIQPkg_vue_vue_type_style_index_0_id_f0648e98_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/MakePayment.vue?vue&type=style&index=0&id=59807834&scoped=true&lang=css":
|
|
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/MakePayment.vue?vue&type=style&index=0&id=59807834&scoped=true&lang=css ***!
|
|
\*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_MakePayment_vue_vue_type_style_index_0_id_59807834_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./MakePayment.vue?vue&type=style&index=0&id=59807834&scoped=true&lang=css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/MakePayment.vue?vue&type=style&index=0&id=59807834&scoped=true&lang=css");
|
|
|
|
|
|
|
|
var options = {};
|
|
|
|
options.insert = "head";
|
|
options.singleton = false;
|
|
|
|
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_MakePayment_vue_vue_type_style_index_0_id_59807834_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_MakePayment_vue_vue_type_style_index_0_id_59807834_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/PaymentModal.vue?vue&type=style&index=0&id=68f715ee&lang=css":
|
|
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/PaymentModal.vue?vue&type=style&index=0&id=68f715ee&lang=css ***!
|
|
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_PaymentModal_vue_vue_type_style_index_0_id_68f715ee_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./PaymentModal.vue?vue&type=style&index=0&id=68f715ee&lang=css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/PaymentModal.vue?vue&type=style&index=0&id=68f715ee&lang=css");
|
|
|
|
|
|
|
|
var options = {};
|
|
|
|
options.insert = "head";
|
|
options.singleton = false;
|
|
|
|
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_PaymentModal_vue_vue_type_style_index_0_id_68f715ee_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_PaymentModal_vue_vue_type_style_index_0_id_68f715ee_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkg.vue?vue&type=style&index=0&id=7968490c&lang=css":
|
|
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkg.vue?vue&type=style&index=0&id=7968490c&lang=css ***!
|
|
\**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SmartCreditPkg_vue_vue_type_style_index_0_id_7968490c_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./SmartCreditPkg.vue?vue&type=style&index=0&id=7968490c&lang=css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkg.vue?vue&type=style&index=0&id=7968490c&lang=css");
|
|
|
|
|
|
|
|
var options = {};
|
|
|
|
options.insert = "head";
|
|
options.singleton = false;
|
|
|
|
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SmartCreditPkg_vue_vue_type_style_index_0_id_7968490c_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SmartCreditPkg_vue_vue_type_style_index_0_id_7968490c_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkgView.vue?vue&type=style&index=0&id=07ec995e&lang=css":
|
|
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkgView.vue?vue&type=style&index=0&id=07ec995e&lang=css ***!
|
|
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SmartCreditPkgView_vue_vue_type_style_index_0_id_07ec995e_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./SmartCreditPkgView.vue?vue&type=style&index=0&id=07ec995e&lang=css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkgView.vue?vue&type=style&index=0&id=07ec995e&lang=css");
|
|
|
|
|
|
|
|
var options = {};
|
|
|
|
options.insert = "head";
|
|
options.singleton = false;
|
|
|
|
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SmartCreditPkgView_vue_vue_type_style_index_0_id_07ec995e_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SmartCreditPkgView_vue_vue_type_style_index_0_id_07ec995e_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/Success.vue?vue&type=style&index=0&id=106e4531&scoped=true&lang=css":
|
|
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/Success.vue?vue&type=style&index=0&id=106e4531&scoped=true&lang=css ***!
|
|
\***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Success_vue_vue_type_style_index_0_id_106e4531_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./Success.vue?vue&type=style&index=0&id=106e4531&scoped=true&lang=css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/Success.vue?vue&type=style&index=0&id=106e4531&scoped=true&lang=css");
|
|
|
|
|
|
|
|
var options = {};
|
|
|
|
options.insert = "head";
|
|
options.singleton = false;
|
|
|
|
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Success_vue_vue_type_style_index_0_id_106e4531_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Success_vue_vue_type_style_index_0_id_106e4531_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/TopArea.vue?vue&type=style&index=0&id=3dfb8130&scoped=true&lang=css":
|
|
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/TopArea.vue?vue&type=style&index=0&id=3dfb8130&scoped=true&lang=css ***!
|
|
\***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_TopArea_vue_vue_type_style_index_0_id_3dfb8130_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./TopArea.vue?vue&type=style&index=0&id=3dfb8130&scoped=true&lang=css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/TopArea.vue?vue&type=style&index=0&id=3dfb8130&scoped=true&lang=css");
|
|
|
|
|
|
|
|
var options = {};
|
|
|
|
options.insert = "head";
|
|
options.singleton = false;
|
|
|
|
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_TopArea_vue_vue_type_style_index_0_id_3dfb8130_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_TopArea_vue_vue_type_style_index_0_id_3dfb8130_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/modal.vue?vue&type=style&index=0&id=18ecef0a&scoped=true&lang=css":
|
|
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/modal.vue?vue&type=style&index=0&id=18ecef0a&scoped=true&lang=css ***!
|
|
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_modal_vue_vue_type_style_index_0_id_18ecef0a_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./modal.vue?vue&type=style&index=0&id=18ecef0a&scoped=true&lang=css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/modal.vue?vue&type=style&index=0&id=18ecef0a&scoped=true&lang=css");
|
|
|
|
|
|
|
|
var options = {};
|
|
|
|
options.insert = "head";
|
|
options.singleton = false;
|
|
|
|
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_modal_vue_vue_type_style_index_0_id_18ecef0a_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_modal_vue_vue_type_style_index_0_id_18ecef0a_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/sc_partner_cz_logo.vue?vue&type=style&index=0&id=d7b0f3a2&scoped=true&lang=css":
|
|
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/sc_partner_cz_logo.vue?vue&type=style&index=0&id=d7b0f3a2&scoped=true&lang=css ***!
|
|
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_sc_partner_cz_logo_vue_vue_type_style_index_0_id_d7b0f3a2_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./sc_partner_cz_logo.vue?vue&type=style&index=0&id=d7b0f3a2&scoped=true&lang=css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/sc_partner_cz_logo.vue?vue&type=style&index=0&id=d7b0f3a2&scoped=true&lang=css");
|
|
|
|
|
|
|
|
var options = {};
|
|
|
|
options.insert = "head";
|
|
options.singleton = false;
|
|
|
|
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_sc_partner_cz_logo_vue_vue_type_style_index_0_id_d7b0f3a2_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_sc_partner_cz_logo_vue_vue_type_style_index_0_id_d7b0f3a2_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":
|
|
/*!****************************************************************************!*\
|
|
!*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***!
|
|
\****************************************************************************/
|
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
|
|
|
|
var isOldIE = function isOldIE() {
|
|
var memo;
|
|
return function memorize() {
|
|
if (typeof memo === 'undefined') {
|
|
// Test for IE <= 9 as proposed by Browserhacks
|
|
// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
|
|
// Tests for existence of standard globals is to allow style-loader
|
|
// to operate correctly into non-standard environments
|
|
// @see https://github.com/webpack-contrib/style-loader/issues/177
|
|
memo = Boolean(window && document && document.all && !window.atob);
|
|
}
|
|
|
|
return memo;
|
|
};
|
|
}();
|
|
|
|
var getTarget = function getTarget() {
|
|
var memo = {};
|
|
return function memorize(target) {
|
|
if (typeof memo[target] === 'undefined') {
|
|
var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself
|
|
|
|
if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
|
|
try {
|
|
// This will throw an exception if access to iframe is blocked
|
|
// due to cross-origin restrictions
|
|
styleTarget = styleTarget.contentDocument.head;
|
|
} catch (e) {
|
|
// istanbul ignore next
|
|
styleTarget = null;
|
|
}
|
|
}
|
|
|
|
memo[target] = styleTarget;
|
|
}
|
|
|
|
return memo[target];
|
|
};
|
|
}();
|
|
|
|
var stylesInDom = [];
|
|
|
|
function getIndexByIdentifier(identifier) {
|
|
var result = -1;
|
|
|
|
for (var i = 0; i < stylesInDom.length; i++) {
|
|
if (stylesInDom[i].identifier === identifier) {
|
|
result = i;
|
|
break;
|
|
}
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
function modulesToDom(list, options) {
|
|
var idCountMap = {};
|
|
var identifiers = [];
|
|
|
|
for (var i = 0; i < list.length; i++) {
|
|
var item = list[i];
|
|
var id = options.base ? item[0] + options.base : item[0];
|
|
var count = idCountMap[id] || 0;
|
|
var identifier = "".concat(id, " ").concat(count);
|
|
idCountMap[id] = count + 1;
|
|
var index = getIndexByIdentifier(identifier);
|
|
var obj = {
|
|
css: item[1],
|
|
media: item[2],
|
|
sourceMap: item[3]
|
|
};
|
|
|
|
if (index !== -1) {
|
|
stylesInDom[index].references++;
|
|
stylesInDom[index].updater(obj);
|
|
} else {
|
|
stylesInDom.push({
|
|
identifier: identifier,
|
|
updater: addStyle(obj, options),
|
|
references: 1
|
|
});
|
|
}
|
|
|
|
identifiers.push(identifier);
|
|
}
|
|
|
|
return identifiers;
|
|
}
|
|
|
|
function insertStyleElement(options) {
|
|
var style = document.createElement('style');
|
|
var attributes = options.attributes || {};
|
|
|
|
if (typeof attributes.nonce === 'undefined') {
|
|
var nonce = true ? __webpack_require__.nc : 0;
|
|
|
|
if (nonce) {
|
|
attributes.nonce = nonce;
|
|
}
|
|
}
|
|
|
|
Object.keys(attributes).forEach(function (key) {
|
|
style.setAttribute(key, attributes[key]);
|
|
});
|
|
|
|
if (typeof options.insert === 'function') {
|
|
options.insert(style);
|
|
} else {
|
|
var target = getTarget(options.insert || 'head');
|
|
|
|
if (!target) {
|
|
throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
|
|
}
|
|
|
|
target.appendChild(style);
|
|
}
|
|
|
|
return style;
|
|
}
|
|
|
|
function removeStyleElement(style) {
|
|
// istanbul ignore if
|
|
if (style.parentNode === null) {
|
|
return false;
|
|
}
|
|
|
|
style.parentNode.removeChild(style);
|
|
}
|
|
/* istanbul ignore next */
|
|
|
|
|
|
var replaceText = function replaceText() {
|
|
var textStore = [];
|
|
return function replace(index, replacement) {
|
|
textStore[index] = replacement;
|
|
return textStore.filter(Boolean).join('\n');
|
|
};
|
|
}();
|
|
|
|
function applyToSingletonTag(style, index, remove, obj) {
|
|
var css = remove ? '' : obj.media ? "@media ".concat(obj.media, " {").concat(obj.css, "}") : obj.css; // For old IE
|
|
|
|
/* istanbul ignore if */
|
|
|
|
if (style.styleSheet) {
|
|
style.styleSheet.cssText = replaceText(index, css);
|
|
} else {
|
|
var cssNode = document.createTextNode(css);
|
|
var childNodes = style.childNodes;
|
|
|
|
if (childNodes[index]) {
|
|
style.removeChild(childNodes[index]);
|
|
}
|
|
|
|
if (childNodes.length) {
|
|
style.insertBefore(cssNode, childNodes[index]);
|
|
} else {
|
|
style.appendChild(cssNode);
|
|
}
|
|
}
|
|
}
|
|
|
|
function applyToTag(style, options, obj) {
|
|
var css = obj.css;
|
|
var media = obj.media;
|
|
var sourceMap = obj.sourceMap;
|
|
|
|
if (media) {
|
|
style.setAttribute('media', media);
|
|
} else {
|
|
style.removeAttribute('media');
|
|
}
|
|
|
|
if (sourceMap && typeof btoa !== 'undefined') {
|
|
css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
|
|
} // For old IE
|
|
|
|
/* istanbul ignore if */
|
|
|
|
|
|
if (style.styleSheet) {
|
|
style.styleSheet.cssText = css;
|
|
} else {
|
|
while (style.firstChild) {
|
|
style.removeChild(style.firstChild);
|
|
}
|
|
|
|
style.appendChild(document.createTextNode(css));
|
|
}
|
|
}
|
|
|
|
var singleton = null;
|
|
var singletonCounter = 0;
|
|
|
|
function addStyle(obj, options) {
|
|
var style;
|
|
var update;
|
|
var remove;
|
|
|
|
if (options.singleton) {
|
|
var styleIndex = singletonCounter++;
|
|
style = singleton || (singleton = insertStyleElement(options));
|
|
update = applyToSingletonTag.bind(null, style, styleIndex, false);
|
|
remove = applyToSingletonTag.bind(null, style, styleIndex, true);
|
|
} else {
|
|
style = insertStyleElement(options);
|
|
update = applyToTag.bind(null, style, options);
|
|
|
|
remove = function remove() {
|
|
removeStyleElement(style);
|
|
};
|
|
}
|
|
|
|
update(obj);
|
|
return function updateStyle(newObj) {
|
|
if (newObj) {
|
|
if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {
|
|
return;
|
|
}
|
|
|
|
update(obj = newObj);
|
|
} else {
|
|
remove();
|
|
}
|
|
};
|
|
}
|
|
|
|
module.exports = function (list, options) {
|
|
options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
|
|
// tags it will allow on a page
|
|
|
|
if (!options.singleton && typeof options.singleton !== 'boolean') {
|
|
options.singleton = isOldIE();
|
|
}
|
|
|
|
list = list || [];
|
|
var lastIdentifiers = modulesToDom(list, options);
|
|
return function update(newList) {
|
|
newList = newList || [];
|
|
|
|
if (Object.prototype.toString.call(newList) !== '[object Array]') {
|
|
return;
|
|
}
|
|
|
|
for (var i = 0; i < lastIdentifiers.length; i++) {
|
|
var identifier = lastIdentifiers[i];
|
|
var index = getIndexByIdentifier(identifier);
|
|
stylesInDom[index].references--;
|
|
}
|
|
|
|
var newLastIdentifiers = modulesToDom(newList, options);
|
|
|
|
for (var _i = 0; _i < lastIdentifiers.length; _i++) {
|
|
var _identifier = lastIdentifiers[_i];
|
|
|
|
var _index = getIndexByIdentifier(_identifier);
|
|
|
|
if (stylesInDom[_index].references === 0) {
|
|
stylesInDom[_index].updater();
|
|
|
|
stylesInDom.splice(_index, 1);
|
|
}
|
|
}
|
|
|
|
lastIdentifiers = newLastIdentifiers;
|
|
};
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/vue-loader/dist/exportHelper.js":
|
|
/*!******************************************************!*\
|
|
!*** ./node_modules/vue-loader/dist/exportHelper.js ***!
|
|
\******************************************************/
|
|
/***/ ((__unused_webpack_module, exports) => {
|
|
|
|
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
// runtime helper for setting properties on components
|
|
// in a tree-shakable way
|
|
exports["default"] = (sfc, props) => {
|
|
const target = sfc.__vccOpts || sfc;
|
|
for (const [key, val] of props) {
|
|
target[key] = val;
|
|
}
|
|
return target;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/App.vue":
|
|
/*!*****************************************!*\
|
|
!*** ./resources/js/components/App.vue ***!
|
|
\*****************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _App_vue_vue_type_template_id_332fccf4__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./App.vue?vue&type=template&id=332fccf4 */ "./resources/js/components/App.vue?vue&type=template&id=332fccf4");
|
|
/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
|
|
|
|
const script = {}
|
|
|
|
;
|
|
const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_1__["default"])(script, [['render',_App_vue_vue_type_template_id_332fccf4__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/components/App.vue"]])
|
|
/* hot reload */
|
|
if (false) {}
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/Form/SelectInput.vue":
|
|
/*!******************************************************!*\
|
|
!*** ./resources/js/components/Form/SelectInput.vue ***!
|
|
\******************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _SelectInput_vue_vue_type_template_id_0d6c342e__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SelectInput.vue?vue&type=template&id=0d6c342e */ "./resources/js/components/Form/SelectInput.vue?vue&type=template&id=0d6c342e");
|
|
/* harmony import */ var _SelectInput_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SelectInput.vue?vue&type=script&lang=js */ "./resources/js/components/Form/SelectInput.vue?vue&type=script&lang=js");
|
|
/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
|
|
|
|
|
|
|
|
|
|
;
|
|
const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_SelectInput_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_SelectInput_vue_vue_type_template_id_0d6c342e__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/components/Form/SelectInput.vue"]])
|
|
/* hot reload */
|
|
if (false) {}
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/Form/TextInput.vue":
|
|
/*!****************************************************!*\
|
|
!*** ./resources/js/components/Form/TextInput.vue ***!
|
|
\****************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _TextInput_vue_vue_type_template_id_4540c51d__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TextInput.vue?vue&type=template&id=4540c51d */ "./resources/js/components/Form/TextInput.vue?vue&type=template&id=4540c51d");
|
|
/* harmony import */ var _TextInput_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TextInput.vue?vue&type=script&lang=js */ "./resources/js/components/Form/TextInput.vue?vue&type=script&lang=js");
|
|
/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
|
|
|
|
|
|
|
|
|
|
;
|
|
const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_TextInput_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_TextInput_vue_vue_type_template_id_4540c51d__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/components/Form/TextInput.vue"]])
|
|
/* hot reload */
|
|
if (false) {}
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/AddProfile.vue":
|
|
/*!*********************************************************!*\
|
|
!*** ./resources/js/components/partials/AddProfile.vue ***!
|
|
\*********************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _AddProfile_vue_vue_type_template_id_41f2e48a_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AddProfile.vue?vue&type=template&id=41f2e48a&scoped=true */ "./resources/js/components/partials/AddProfile.vue?vue&type=template&id=41f2e48a&scoped=true");
|
|
/* harmony import */ var _AddProfile_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AddProfile.vue?vue&type=script&lang=js */ "./resources/js/components/partials/AddProfile.vue?vue&type=script&lang=js");
|
|
/* harmony import */ var _AddProfile_vue_vue_type_style_index_0_id_41f2e48a_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AddProfile.vue?vue&type=style&index=0&id=41f2e48a&scoped=true&lang=css */ "./resources/js/components/partials/AddProfile.vue?vue&type=style&index=0&id=41f2e48a&scoped=true&lang=css");
|
|
/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
|
|
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_AddProfile_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_AddProfile_vue_vue_type_template_id_41f2e48a_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render],['__scopeId',"data-v-41f2e48a"],['__file',"resources/js/components/partials/AddProfile.vue"]])
|
|
/* hot reload */
|
|
if (false) {}
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/ChoosePackage.vue":
|
|
/*!************************************************************!*\
|
|
!*** ./resources/js/components/partials/ChoosePackage.vue ***!
|
|
\************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _ChoosePackage_vue_vue_type_template_id_7b3e7646_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ChoosePackage.vue?vue&type=template&id=7b3e7646&scoped=true */ "./resources/js/components/partials/ChoosePackage.vue?vue&type=template&id=7b3e7646&scoped=true");
|
|
/* harmony import */ var _ChoosePackage_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ChoosePackage.vue?vue&type=script&lang=js */ "./resources/js/components/partials/ChoosePackage.vue?vue&type=script&lang=js");
|
|
/* harmony import */ var _ChoosePackage_vue_vue_type_style_index_0_id_7b3e7646_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ChoosePackage.vue?vue&type=style&index=0&id=7b3e7646&scoped=true&lang=css */ "./resources/js/components/partials/ChoosePackage.vue?vue&type=style&index=0&id=7b3e7646&scoped=true&lang=css");
|
|
/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
|
|
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_ChoosePackage_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_ChoosePackage_vue_vue_type_template_id_7b3e7646_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render],['__scopeId',"data-v-7b3e7646"],['__file',"resources/js/components/partials/ChoosePackage.vue"]])
|
|
/* hot reload */
|
|
if (false) {}
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/CreateAccount.vue":
|
|
/*!************************************************************!*\
|
|
!*** ./resources/js/components/partials/CreateAccount.vue ***!
|
|
\************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _CreateAccount_vue_vue_type_template_id_bd535982_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CreateAccount.vue?vue&type=template&id=bd535982&scoped=true */ "./resources/js/components/partials/CreateAccount.vue?vue&type=template&id=bd535982&scoped=true");
|
|
/* harmony import */ var _CreateAccount_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CreateAccount.vue?vue&type=script&lang=js */ "./resources/js/components/partials/CreateAccount.vue?vue&type=script&lang=js");
|
|
/* harmony import */ var _CreateAccount_vue_vue_type_style_index_0_id_bd535982_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CreateAccount.vue?vue&type=style&index=0&id=bd535982&scoped=true&lang=css */ "./resources/js/components/partials/CreateAccount.vue?vue&type=style&index=0&id=bd535982&scoped=true&lang=css");
|
|
/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
|
|
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_CreateAccount_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_CreateAccount_vue_vue_type_template_id_bd535982_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render],['__scopeId',"data-v-bd535982"],['__file',"resources/js/components/partials/CreateAccount.vue"]])
|
|
/* hot reload */
|
|
if (false) {}
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/CreateCreditReportAccount.vue":
|
|
/*!************************************************************************!*\
|
|
!*** ./resources/js/components/partials/CreateCreditReportAccount.vue ***!
|
|
\************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _CreateCreditReportAccount_vue_vue_type_template_id_cbb5871c_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CreateCreditReportAccount.vue?vue&type=template&id=cbb5871c&scoped=true */ "./resources/js/components/partials/CreateCreditReportAccount.vue?vue&type=template&id=cbb5871c&scoped=true");
|
|
/* harmony import */ var _CreateCreditReportAccount_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CreateCreditReportAccount.vue?vue&type=script&lang=js */ "./resources/js/components/partials/CreateCreditReportAccount.vue?vue&type=script&lang=js");
|
|
/* harmony import */ var _CreateCreditReportAccount_vue_vue_type_style_index_0_id_cbb5871c_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CreateCreditReportAccount.vue?vue&type=style&index=0&id=cbb5871c&scoped=true&lang=css */ "./resources/js/components/partials/CreateCreditReportAccount.vue?vue&type=style&index=0&id=cbb5871c&scoped=true&lang=css");
|
|
/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
|
|
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_CreateCreditReportAccount_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_CreateCreditReportAccount_vue_vue_type_template_id_cbb5871c_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render],['__scopeId',"data-v-cbb5871c"],['__file',"resources/js/components/partials/CreateCreditReportAccount.vue"]])
|
|
/* hot reload */
|
|
if (false) {}
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/Footer.vue":
|
|
/*!*****************************************************!*\
|
|
!*** ./resources/js/components/partials/Footer.vue ***!
|
|
\*****************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _Footer_vue_vue_type_template_id_bc338846__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Footer.vue?vue&type=template&id=bc338846 */ "./resources/js/components/partials/Footer.vue?vue&type=template&id=bc338846");
|
|
/* harmony import */ var _Footer_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Footer.vue?vue&type=script&lang=js */ "./resources/js/components/partials/Footer.vue?vue&type=script&lang=js");
|
|
/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
|
|
|
|
|
|
|
|
|
|
;
|
|
const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_Footer_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_Footer_vue_vue_type_template_id_bc338846__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/components/partials/Footer.vue"]])
|
|
/* hot reload */
|
|
if (false) {}
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/IdentityIQPkg.vue":
|
|
/*!************************************************************!*\
|
|
!*** ./resources/js/components/partials/IdentityIQPkg.vue ***!
|
|
\************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _IdentityIQPkg_vue_vue_type_template_id_f0648e98__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./IdentityIQPkg.vue?vue&type=template&id=f0648e98 */ "./resources/js/components/partials/IdentityIQPkg.vue?vue&type=template&id=f0648e98");
|
|
/* harmony import */ var _IdentityIQPkg_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./IdentityIQPkg.vue?vue&type=script&lang=js */ "./resources/js/components/partials/IdentityIQPkg.vue?vue&type=script&lang=js");
|
|
/* harmony import */ var _IdentityIQPkg_vue_vue_type_style_index_0_id_f0648e98_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./IdentityIQPkg.vue?vue&type=style&index=0&id=f0648e98&lang=css */ "./resources/js/components/partials/IdentityIQPkg.vue?vue&type=style&index=0&id=f0648e98&lang=css");
|
|
/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
|
|
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_IdentityIQPkg_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_IdentityIQPkg_vue_vue_type_template_id_f0648e98__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/components/partials/IdentityIQPkg.vue"]])
|
|
/* hot reload */
|
|
if (false) {}
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/IdentityIqLogo.vue":
|
|
/*!*************************************************************!*\
|
|
!*** ./resources/js/components/partials/IdentityIqLogo.vue ***!
|
|
\*************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _IdentityIqLogo_vue_vue_type_template_id_31feba93__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./IdentityIqLogo.vue?vue&type=template&id=31feba93 */ "./resources/js/components/partials/IdentityIqLogo.vue?vue&type=template&id=31feba93");
|
|
/* harmony import */ var _IdentityIqLogo_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./IdentityIqLogo.vue?vue&type=script&lang=js */ "./resources/js/components/partials/IdentityIqLogo.vue?vue&type=script&lang=js");
|
|
/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
|
|
|
|
|
|
|
|
|
|
;
|
|
const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_IdentityIqLogo_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_IdentityIqLogo_vue_vue_type_template_id_31feba93__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/components/partials/IdentityIqLogo.vue"]])
|
|
/* hot reload */
|
|
if (false) {}
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/MakePayment.vue":
|
|
/*!**********************************************************!*\
|
|
!*** ./resources/js/components/partials/MakePayment.vue ***!
|
|
\**********************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _MakePayment_vue_vue_type_template_id_59807834_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./MakePayment.vue?vue&type=template&id=59807834&scoped=true */ "./resources/js/components/partials/MakePayment.vue?vue&type=template&id=59807834&scoped=true");
|
|
/* harmony import */ var _MakePayment_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./MakePayment.vue?vue&type=script&lang=js */ "./resources/js/components/partials/MakePayment.vue?vue&type=script&lang=js");
|
|
/* harmony import */ var _MakePayment_vue_vue_type_style_index_0_id_59807834_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./MakePayment.vue?vue&type=style&index=0&id=59807834&scoped=true&lang=css */ "./resources/js/components/partials/MakePayment.vue?vue&type=style&index=0&id=59807834&scoped=true&lang=css");
|
|
/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
|
|
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_MakePayment_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_MakePayment_vue_vue_type_template_id_59807834_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render],['__scopeId',"data-v-59807834"],['__file',"resources/js/components/partials/MakePayment.vue"]])
|
|
/* hot reload */
|
|
if (false) {}
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/PaymentModal.vue":
|
|
/*!***********************************************************!*\
|
|
!*** ./resources/js/components/partials/PaymentModal.vue ***!
|
|
\***********************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _PaymentModal_vue_vue_type_template_id_68f715ee__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PaymentModal.vue?vue&type=template&id=68f715ee */ "./resources/js/components/partials/PaymentModal.vue?vue&type=template&id=68f715ee");
|
|
/* harmony import */ var _PaymentModal_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PaymentModal.vue?vue&type=script&lang=js */ "./resources/js/components/partials/PaymentModal.vue?vue&type=script&lang=js");
|
|
/* harmony import */ var _PaymentModal_vue_vue_type_style_index_0_id_68f715ee_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PaymentModal.vue?vue&type=style&index=0&id=68f715ee&lang=css */ "./resources/js/components/partials/PaymentModal.vue?vue&type=style&index=0&id=68f715ee&lang=css");
|
|
/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
|
|
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_PaymentModal_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_PaymentModal_vue_vue_type_template_id_68f715ee__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/components/partials/PaymentModal.vue"]])
|
|
/* hot reload */
|
|
if (false) {}
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/SmartCreditLogo.vue":
|
|
/*!**************************************************************!*\
|
|
!*** ./resources/js/components/partials/SmartCreditLogo.vue ***!
|
|
\**************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _SmartCreditLogo_vue_vue_type_template_id_29af55ca__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SmartCreditLogo.vue?vue&type=template&id=29af55ca */ "./resources/js/components/partials/SmartCreditLogo.vue?vue&type=template&id=29af55ca");
|
|
/* harmony import */ var _SmartCreditLogo_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SmartCreditLogo.vue?vue&type=script&lang=js */ "./resources/js/components/partials/SmartCreditLogo.vue?vue&type=script&lang=js");
|
|
/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
|
|
|
|
|
|
|
|
|
|
;
|
|
const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_SmartCreditLogo_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_SmartCreditLogo_vue_vue_type_template_id_29af55ca__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/components/partials/SmartCreditLogo.vue"]])
|
|
/* hot reload */
|
|
if (false) {}
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/SmartCreditPkg.vue":
|
|
/*!*************************************************************!*\
|
|
!*** ./resources/js/components/partials/SmartCreditPkg.vue ***!
|
|
\*************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _SmartCreditPkg_vue_vue_type_template_id_7968490c__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SmartCreditPkg.vue?vue&type=template&id=7968490c */ "./resources/js/components/partials/SmartCreditPkg.vue?vue&type=template&id=7968490c");
|
|
/* harmony import */ var _SmartCreditPkg_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SmartCreditPkg.vue?vue&type=script&lang=js */ "./resources/js/components/partials/SmartCreditPkg.vue?vue&type=script&lang=js");
|
|
/* harmony import */ var _SmartCreditPkg_vue_vue_type_style_index_0_id_7968490c_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SmartCreditPkg.vue?vue&type=style&index=0&id=7968490c&lang=css */ "./resources/js/components/partials/SmartCreditPkg.vue?vue&type=style&index=0&id=7968490c&lang=css");
|
|
/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
|
|
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_SmartCreditPkg_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_SmartCreditPkg_vue_vue_type_template_id_7968490c__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/components/partials/SmartCreditPkg.vue"]])
|
|
/* hot reload */
|
|
if (false) {}
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/SmartCreditPkgView.vue":
|
|
/*!*****************************************************************!*\
|
|
!*** ./resources/js/components/partials/SmartCreditPkgView.vue ***!
|
|
\*****************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _SmartCreditPkgView_vue_vue_type_template_id_07ec995e__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SmartCreditPkgView.vue?vue&type=template&id=07ec995e */ "./resources/js/components/partials/SmartCreditPkgView.vue?vue&type=template&id=07ec995e");
|
|
/* harmony import */ var _SmartCreditPkgView_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SmartCreditPkgView.vue?vue&type=script&lang=js */ "./resources/js/components/partials/SmartCreditPkgView.vue?vue&type=script&lang=js");
|
|
/* harmony import */ var _SmartCreditPkgView_vue_vue_type_style_index_0_id_07ec995e_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SmartCreditPkgView.vue?vue&type=style&index=0&id=07ec995e&lang=css */ "./resources/js/components/partials/SmartCreditPkgView.vue?vue&type=style&index=0&id=07ec995e&lang=css");
|
|
/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
|
|
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_SmartCreditPkgView_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_SmartCreditPkgView_vue_vue_type_template_id_07ec995e__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/components/partials/SmartCreditPkgView.vue"]])
|
|
/* hot reload */
|
|
if (false) {}
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/Success.vue":
|
|
/*!******************************************************!*\
|
|
!*** ./resources/js/components/partials/Success.vue ***!
|
|
\******************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _Success_vue_vue_type_template_id_106e4531_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Success.vue?vue&type=template&id=106e4531&scoped=true */ "./resources/js/components/partials/Success.vue?vue&type=template&id=106e4531&scoped=true");
|
|
/* harmony import */ var _Success_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Success.vue?vue&type=script&lang=js */ "./resources/js/components/partials/Success.vue?vue&type=script&lang=js");
|
|
/* harmony import */ var _Success_vue_vue_type_style_index_0_id_106e4531_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Success.vue?vue&type=style&index=0&id=106e4531&scoped=true&lang=css */ "./resources/js/components/partials/Success.vue?vue&type=style&index=0&id=106e4531&scoped=true&lang=css");
|
|
/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
|
|
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_Success_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_Success_vue_vue_type_template_id_106e4531_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render],['__scopeId',"data-v-106e4531"],['__file',"resources/js/components/partials/Success.vue"]])
|
|
/* hot reload */
|
|
if (false) {}
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/TopArea.vue":
|
|
/*!******************************************************!*\
|
|
!*** ./resources/js/components/partials/TopArea.vue ***!
|
|
\******************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _TopArea_vue_vue_type_template_id_3dfb8130_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TopArea.vue?vue&type=template&id=3dfb8130&scoped=true */ "./resources/js/components/partials/TopArea.vue?vue&type=template&id=3dfb8130&scoped=true");
|
|
/* harmony import */ var _TopArea_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TopArea.vue?vue&type=script&lang=js */ "./resources/js/components/partials/TopArea.vue?vue&type=script&lang=js");
|
|
/* harmony import */ var _TopArea_vue_vue_type_style_index_0_id_3dfb8130_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TopArea.vue?vue&type=style&index=0&id=3dfb8130&scoped=true&lang=css */ "./resources/js/components/partials/TopArea.vue?vue&type=style&index=0&id=3dfb8130&scoped=true&lang=css");
|
|
/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
|
|
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_TopArea_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_TopArea_vue_vue_type_template_id_3dfb8130_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render],['__scopeId',"data-v-3dfb8130"],['__file',"resources/js/components/partials/TopArea.vue"]])
|
|
/* hot reload */
|
|
if (false) {}
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/ValidationError.vue":
|
|
/*!**************************************************************!*\
|
|
!*** ./resources/js/components/partials/ValidationError.vue ***!
|
|
\**************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _ValidationError_vue_vue_type_template_id_f199b386__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ValidationError.vue?vue&type=template&id=f199b386 */ "./resources/js/components/partials/ValidationError.vue?vue&type=template&id=f199b386");
|
|
/* harmony import */ var _ValidationError_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ValidationError.vue?vue&type=script&lang=js */ "./resources/js/components/partials/ValidationError.vue?vue&type=script&lang=js");
|
|
/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
|
|
|
|
|
|
|
|
|
|
;
|
|
const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_ValidationError_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_ValidationError_vue_vue_type_template_id_f199b386__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/components/partials/ValidationError.vue"]])
|
|
/* hot reload */
|
|
if (false) {}
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/modal.vue":
|
|
/*!****************************************************!*\
|
|
!*** ./resources/js/components/partials/modal.vue ***!
|
|
\****************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _modal_vue_vue_type_template_id_18ecef0a_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modal.vue?vue&type=template&id=18ecef0a&scoped=true */ "./resources/js/components/partials/modal.vue?vue&type=template&id=18ecef0a&scoped=true");
|
|
/* harmony import */ var _modal_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modal.vue?vue&type=script&lang=js */ "./resources/js/components/partials/modal.vue?vue&type=script&lang=js");
|
|
/* harmony import */ var _modal_vue_vue_type_style_index_0_id_18ecef0a_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modal.vue?vue&type=style&index=0&id=18ecef0a&scoped=true&lang=css */ "./resources/js/components/partials/modal.vue?vue&type=style&index=0&id=18ecef0a&scoped=true&lang=css");
|
|
/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
|
|
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_modal_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_modal_vue_vue_type_template_id_18ecef0a_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render],['__scopeId',"data-v-18ecef0a"],['__file',"resources/js/components/partials/modal.vue"]])
|
|
/* hot reload */
|
|
if (false) {}
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/sc_partner_cz_logo.vue":
|
|
/*!*****************************************************************!*\
|
|
!*** ./resources/js/components/partials/sc_partner_cz_logo.vue ***!
|
|
\*****************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _sc_partner_cz_logo_vue_vue_type_template_id_d7b0f3a2_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sc_partner_cz_logo.vue?vue&type=template&id=d7b0f3a2&scoped=true */ "./resources/js/components/partials/sc_partner_cz_logo.vue?vue&type=template&id=d7b0f3a2&scoped=true");
|
|
/* harmony import */ var _sc_partner_cz_logo_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sc_partner_cz_logo.vue?vue&type=script&lang=js */ "./resources/js/components/partials/sc_partner_cz_logo.vue?vue&type=script&lang=js");
|
|
/* harmony import */ var _sc_partner_cz_logo_vue_vue_type_style_index_0_id_d7b0f3a2_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sc_partner_cz_logo.vue?vue&type=style&index=0&id=d7b0f3a2&scoped=true&lang=css */ "./resources/js/components/partials/sc_partner_cz_logo.vue?vue&type=style&index=0&id=d7b0f3a2&scoped=true&lang=css");
|
|
/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
|
|
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_sc_partner_cz_logo_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_sc_partner_cz_logo_vue_vue_type_template_id_d7b0f3a2_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render],['__scopeId',"data-v-d7b0f3a2"],['__file',"resources/js/components/partials/sc_partner_cz_logo.vue"]])
|
|
/* hot reload */
|
|
if (false) {}
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/step.vue":
|
|
/*!***************************************************!*\
|
|
!*** ./resources/js/components/partials/step.vue ***!
|
|
\***************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _step_vue_vue_type_template_id_04252a24__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./step.vue?vue&type=template&id=04252a24 */ "./resources/js/components/partials/step.vue?vue&type=template&id=04252a24");
|
|
/* harmony import */ var _step_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./step.vue?vue&type=script&lang=js */ "./resources/js/components/partials/step.vue?vue&type=script&lang=js");
|
|
/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
|
|
|
|
|
|
|
|
|
|
;
|
|
const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_step_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_step_vue_vue_type_template_id_04252a24__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/components/partials/step.vue"]])
|
|
/* hot reload */
|
|
if (false) {}
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/Form/SelectInput.vue?vue&type=script&lang=js":
|
|
/*!******************************************************************************!*\
|
|
!*** ./resources/js/components/Form/SelectInput.vue?vue&type=script&lang=js ***!
|
|
\******************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SelectInput_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SelectInput_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./SelectInput.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/Form/SelectInput.vue?vue&type=script&lang=js");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/Form/TextInput.vue?vue&type=script&lang=js":
|
|
/*!****************************************************************************!*\
|
|
!*** ./resources/js/components/Form/TextInput.vue?vue&type=script&lang=js ***!
|
|
\****************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_TextInput_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_TextInput_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./TextInput.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/Form/TextInput.vue?vue&type=script&lang=js");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/AddProfile.vue?vue&type=script&lang=js":
|
|
/*!*********************************************************************************!*\
|
|
!*** ./resources/js/components/partials/AddProfile.vue?vue&type=script&lang=js ***!
|
|
\*********************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AddProfile_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AddProfile_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AddProfile.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/AddProfile.vue?vue&type=script&lang=js");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/ChoosePackage.vue?vue&type=script&lang=js":
|
|
/*!************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/ChoosePackage.vue?vue&type=script&lang=js ***!
|
|
\************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_ChoosePackage_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_ChoosePackage_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./ChoosePackage.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/ChoosePackage.vue?vue&type=script&lang=js");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/CreateAccount.vue?vue&type=script&lang=js":
|
|
/*!************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/CreateAccount.vue?vue&type=script&lang=js ***!
|
|
\************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_CreateAccount_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_CreateAccount_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./CreateAccount.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateAccount.vue?vue&type=script&lang=js");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/CreateCreditReportAccount.vue?vue&type=script&lang=js":
|
|
/*!************************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/CreateCreditReportAccount.vue?vue&type=script&lang=js ***!
|
|
\************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_CreateCreditReportAccount_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_CreateCreditReportAccount_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./CreateCreditReportAccount.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateCreditReportAccount.vue?vue&type=script&lang=js");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/Footer.vue?vue&type=script&lang=js":
|
|
/*!*****************************************************************************!*\
|
|
!*** ./resources/js/components/partials/Footer.vue?vue&type=script&lang=js ***!
|
|
\*****************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Footer_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Footer_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./Footer.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/Footer.vue?vue&type=script&lang=js");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/IdentityIQPkg.vue?vue&type=script&lang=js":
|
|
/*!************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/IdentityIQPkg.vue?vue&type=script&lang=js ***!
|
|
\************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_IdentityIQPkg_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_IdentityIQPkg_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./IdentityIQPkg.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/IdentityIQPkg.vue?vue&type=script&lang=js");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/IdentityIqLogo.vue?vue&type=script&lang=js":
|
|
/*!*************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/IdentityIqLogo.vue?vue&type=script&lang=js ***!
|
|
\*************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_IdentityIqLogo_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_IdentityIqLogo_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./IdentityIqLogo.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/IdentityIqLogo.vue?vue&type=script&lang=js");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/MakePayment.vue?vue&type=script&lang=js":
|
|
/*!**********************************************************************************!*\
|
|
!*** ./resources/js/components/partials/MakePayment.vue?vue&type=script&lang=js ***!
|
|
\**********************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_MakePayment_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_MakePayment_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./MakePayment.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/MakePayment.vue?vue&type=script&lang=js");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/PaymentModal.vue?vue&type=script&lang=js":
|
|
/*!***********************************************************************************!*\
|
|
!*** ./resources/js/components/partials/PaymentModal.vue?vue&type=script&lang=js ***!
|
|
\***********************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_PaymentModal_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_PaymentModal_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./PaymentModal.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/PaymentModal.vue?vue&type=script&lang=js");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/SmartCreditLogo.vue?vue&type=script&lang=js":
|
|
/*!**************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/SmartCreditLogo.vue?vue&type=script&lang=js ***!
|
|
\**************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SmartCreditLogo_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SmartCreditLogo_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./SmartCreditLogo.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditLogo.vue?vue&type=script&lang=js");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/SmartCreditPkg.vue?vue&type=script&lang=js":
|
|
/*!*************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/SmartCreditPkg.vue?vue&type=script&lang=js ***!
|
|
\*************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SmartCreditPkg_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SmartCreditPkg_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./SmartCreditPkg.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkg.vue?vue&type=script&lang=js");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/SmartCreditPkgView.vue?vue&type=script&lang=js":
|
|
/*!*****************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/SmartCreditPkgView.vue?vue&type=script&lang=js ***!
|
|
\*****************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SmartCreditPkgView_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SmartCreditPkgView_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./SmartCreditPkgView.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkgView.vue?vue&type=script&lang=js");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/Success.vue?vue&type=script&lang=js":
|
|
/*!******************************************************************************!*\
|
|
!*** ./resources/js/components/partials/Success.vue?vue&type=script&lang=js ***!
|
|
\******************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Success_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Success_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./Success.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/Success.vue?vue&type=script&lang=js");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/TopArea.vue?vue&type=script&lang=js":
|
|
/*!******************************************************************************!*\
|
|
!*** ./resources/js/components/partials/TopArea.vue?vue&type=script&lang=js ***!
|
|
\******************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_TopArea_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_TopArea_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./TopArea.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/TopArea.vue?vue&type=script&lang=js");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/ValidationError.vue?vue&type=script&lang=js":
|
|
/*!**************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/ValidationError.vue?vue&type=script&lang=js ***!
|
|
\**************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_ValidationError_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_ValidationError_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./ValidationError.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/ValidationError.vue?vue&type=script&lang=js");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/modal.vue?vue&type=script&lang=js":
|
|
/*!****************************************************************************!*\
|
|
!*** ./resources/js/components/partials/modal.vue?vue&type=script&lang=js ***!
|
|
\****************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_modal_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_modal_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./modal.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/modal.vue?vue&type=script&lang=js");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/sc_partner_cz_logo.vue?vue&type=script&lang=js":
|
|
/*!*****************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/sc_partner_cz_logo.vue?vue&type=script&lang=js ***!
|
|
\*****************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_sc_partner_cz_logo_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_sc_partner_cz_logo_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./sc_partner_cz_logo.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/sc_partner_cz_logo.vue?vue&type=script&lang=js");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/step.vue?vue&type=script&lang=js":
|
|
/*!***************************************************************************!*\
|
|
!*** ./resources/js/components/partials/step.vue?vue&type=script&lang=js ***!
|
|
\***************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_step_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_step_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./step.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/step.vue?vue&type=script&lang=js");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/App.vue?vue&type=template&id=332fccf4":
|
|
/*!***********************************************************************!*\
|
|
!*** ./resources/js/components/App.vue?vue&type=template&id=332fccf4 ***!
|
|
\***********************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_App_vue_vue_type_template_id_332fccf4__WEBPACK_IMPORTED_MODULE_0__.render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_App_vue_vue_type_template_id_332fccf4__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./App.vue?vue&type=template&id=332fccf4 */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/App.vue?vue&type=template&id=332fccf4");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/Form/SelectInput.vue?vue&type=template&id=0d6c342e":
|
|
/*!************************************************************************************!*\
|
|
!*** ./resources/js/components/Form/SelectInput.vue?vue&type=template&id=0d6c342e ***!
|
|
\************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SelectInput_vue_vue_type_template_id_0d6c342e__WEBPACK_IMPORTED_MODULE_0__.render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SelectInput_vue_vue_type_template_id_0d6c342e__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./SelectInput.vue?vue&type=template&id=0d6c342e */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/Form/SelectInput.vue?vue&type=template&id=0d6c342e");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/Form/TextInput.vue?vue&type=template&id=4540c51d":
|
|
/*!**********************************************************************************!*\
|
|
!*** ./resources/js/components/Form/TextInput.vue?vue&type=template&id=4540c51d ***!
|
|
\**********************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_TextInput_vue_vue_type_template_id_4540c51d__WEBPACK_IMPORTED_MODULE_0__.render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_TextInput_vue_vue_type_template_id_4540c51d__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./TextInput.vue?vue&type=template&id=4540c51d */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/Form/TextInput.vue?vue&type=template&id=4540c51d");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/AddProfile.vue?vue&type=template&id=41f2e48a&scoped=true":
|
|
/*!***************************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/AddProfile.vue?vue&type=template&id=41f2e48a&scoped=true ***!
|
|
\***************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AddProfile_vue_vue_type_template_id_41f2e48a_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AddProfile_vue_vue_type_template_id_41f2e48a_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AddProfile.vue?vue&type=template&id=41f2e48a&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/AddProfile.vue?vue&type=template&id=41f2e48a&scoped=true");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/ChoosePackage.vue?vue&type=template&id=7b3e7646&scoped=true":
|
|
/*!******************************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/ChoosePackage.vue?vue&type=template&id=7b3e7646&scoped=true ***!
|
|
\******************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_ChoosePackage_vue_vue_type_template_id_7b3e7646_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_ChoosePackage_vue_vue_type_template_id_7b3e7646_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./ChoosePackage.vue?vue&type=template&id=7b3e7646&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/ChoosePackage.vue?vue&type=template&id=7b3e7646&scoped=true");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/CreateAccount.vue?vue&type=template&id=bd535982&scoped=true":
|
|
/*!******************************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/CreateAccount.vue?vue&type=template&id=bd535982&scoped=true ***!
|
|
\******************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_CreateAccount_vue_vue_type_template_id_bd535982_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_CreateAccount_vue_vue_type_template_id_bd535982_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./CreateAccount.vue?vue&type=template&id=bd535982&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateAccount.vue?vue&type=template&id=bd535982&scoped=true");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/CreateCreditReportAccount.vue?vue&type=template&id=cbb5871c&scoped=true":
|
|
/*!******************************************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/CreateCreditReportAccount.vue?vue&type=template&id=cbb5871c&scoped=true ***!
|
|
\******************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_CreateCreditReportAccount_vue_vue_type_template_id_cbb5871c_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_CreateCreditReportAccount_vue_vue_type_template_id_cbb5871c_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./CreateCreditReportAccount.vue?vue&type=template&id=cbb5871c&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateCreditReportAccount.vue?vue&type=template&id=cbb5871c&scoped=true");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/Footer.vue?vue&type=template&id=bc338846":
|
|
/*!***********************************************************************************!*\
|
|
!*** ./resources/js/components/partials/Footer.vue?vue&type=template&id=bc338846 ***!
|
|
\***********************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Footer_vue_vue_type_template_id_bc338846__WEBPACK_IMPORTED_MODULE_0__.render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Footer_vue_vue_type_template_id_bc338846__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./Footer.vue?vue&type=template&id=bc338846 */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/Footer.vue?vue&type=template&id=bc338846");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/IdentityIQPkg.vue?vue&type=template&id=f0648e98":
|
|
/*!******************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/IdentityIQPkg.vue?vue&type=template&id=f0648e98 ***!
|
|
\******************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_IdentityIQPkg_vue_vue_type_template_id_f0648e98__WEBPACK_IMPORTED_MODULE_0__.render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_IdentityIQPkg_vue_vue_type_template_id_f0648e98__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./IdentityIQPkg.vue?vue&type=template&id=f0648e98 */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/IdentityIQPkg.vue?vue&type=template&id=f0648e98");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/IdentityIqLogo.vue?vue&type=template&id=31feba93":
|
|
/*!*******************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/IdentityIqLogo.vue?vue&type=template&id=31feba93 ***!
|
|
\*******************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_IdentityIqLogo_vue_vue_type_template_id_31feba93__WEBPACK_IMPORTED_MODULE_0__.render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_IdentityIqLogo_vue_vue_type_template_id_31feba93__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./IdentityIqLogo.vue?vue&type=template&id=31feba93 */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/IdentityIqLogo.vue?vue&type=template&id=31feba93");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/MakePayment.vue?vue&type=template&id=59807834&scoped=true":
|
|
/*!****************************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/MakePayment.vue?vue&type=template&id=59807834&scoped=true ***!
|
|
\****************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_MakePayment_vue_vue_type_template_id_59807834_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_MakePayment_vue_vue_type_template_id_59807834_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./MakePayment.vue?vue&type=template&id=59807834&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/MakePayment.vue?vue&type=template&id=59807834&scoped=true");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/PaymentModal.vue?vue&type=template&id=68f715ee":
|
|
/*!*****************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/PaymentModal.vue?vue&type=template&id=68f715ee ***!
|
|
\*****************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_PaymentModal_vue_vue_type_template_id_68f715ee__WEBPACK_IMPORTED_MODULE_0__.render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_PaymentModal_vue_vue_type_template_id_68f715ee__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./PaymentModal.vue?vue&type=template&id=68f715ee */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/PaymentModal.vue?vue&type=template&id=68f715ee");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/SmartCreditLogo.vue?vue&type=template&id=29af55ca":
|
|
/*!********************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/SmartCreditLogo.vue?vue&type=template&id=29af55ca ***!
|
|
\********************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SmartCreditLogo_vue_vue_type_template_id_29af55ca__WEBPACK_IMPORTED_MODULE_0__.render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SmartCreditLogo_vue_vue_type_template_id_29af55ca__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./SmartCreditLogo.vue?vue&type=template&id=29af55ca */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditLogo.vue?vue&type=template&id=29af55ca");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/SmartCreditPkg.vue?vue&type=template&id=7968490c":
|
|
/*!*******************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/SmartCreditPkg.vue?vue&type=template&id=7968490c ***!
|
|
\*******************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SmartCreditPkg_vue_vue_type_template_id_7968490c__WEBPACK_IMPORTED_MODULE_0__.render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SmartCreditPkg_vue_vue_type_template_id_7968490c__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./SmartCreditPkg.vue?vue&type=template&id=7968490c */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkg.vue?vue&type=template&id=7968490c");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/SmartCreditPkgView.vue?vue&type=template&id=07ec995e":
|
|
/*!***********************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/SmartCreditPkgView.vue?vue&type=template&id=07ec995e ***!
|
|
\***********************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SmartCreditPkgView_vue_vue_type_template_id_07ec995e__WEBPACK_IMPORTED_MODULE_0__.render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SmartCreditPkgView_vue_vue_type_template_id_07ec995e__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./SmartCreditPkgView.vue?vue&type=template&id=07ec995e */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkgView.vue?vue&type=template&id=07ec995e");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/Success.vue?vue&type=template&id=106e4531&scoped=true":
|
|
/*!************************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/Success.vue?vue&type=template&id=106e4531&scoped=true ***!
|
|
\************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Success_vue_vue_type_template_id_106e4531_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Success_vue_vue_type_template_id_106e4531_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./Success.vue?vue&type=template&id=106e4531&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/Success.vue?vue&type=template&id=106e4531&scoped=true");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/TopArea.vue?vue&type=template&id=3dfb8130&scoped=true":
|
|
/*!************************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/TopArea.vue?vue&type=template&id=3dfb8130&scoped=true ***!
|
|
\************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_TopArea_vue_vue_type_template_id_3dfb8130_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_TopArea_vue_vue_type_template_id_3dfb8130_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./TopArea.vue?vue&type=template&id=3dfb8130&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/TopArea.vue?vue&type=template&id=3dfb8130&scoped=true");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/ValidationError.vue?vue&type=template&id=f199b386":
|
|
/*!********************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/ValidationError.vue?vue&type=template&id=f199b386 ***!
|
|
\********************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_ValidationError_vue_vue_type_template_id_f199b386__WEBPACK_IMPORTED_MODULE_0__.render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_ValidationError_vue_vue_type_template_id_f199b386__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./ValidationError.vue?vue&type=template&id=f199b386 */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/ValidationError.vue?vue&type=template&id=f199b386");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/modal.vue?vue&type=template&id=18ecef0a&scoped=true":
|
|
/*!**********************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/modal.vue?vue&type=template&id=18ecef0a&scoped=true ***!
|
|
\**********************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_modal_vue_vue_type_template_id_18ecef0a_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_modal_vue_vue_type_template_id_18ecef0a_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./modal.vue?vue&type=template&id=18ecef0a&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/modal.vue?vue&type=template&id=18ecef0a&scoped=true");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/sc_partner_cz_logo.vue?vue&type=template&id=d7b0f3a2&scoped=true":
|
|
/*!***********************************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/sc_partner_cz_logo.vue?vue&type=template&id=d7b0f3a2&scoped=true ***!
|
|
\***********************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_sc_partner_cz_logo_vue_vue_type_template_id_d7b0f3a2_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_sc_partner_cz_logo_vue_vue_type_template_id_d7b0f3a2_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./sc_partner_cz_logo.vue?vue&type=template&id=d7b0f3a2&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/sc_partner_cz_logo.vue?vue&type=template&id=d7b0f3a2&scoped=true");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/step.vue?vue&type=template&id=04252a24":
|
|
/*!*********************************************************************************!*\
|
|
!*** ./resources/js/components/partials/step.vue?vue&type=template&id=04252a24 ***!
|
|
\*********************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_step_vue_vue_type_template_id_04252a24__WEBPACK_IMPORTED_MODULE_0__.render)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_step_vue_vue_type_template_id_04252a24__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./step.vue?vue&type=template&id=04252a24 */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/step.vue?vue&type=template&id=04252a24");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/AddProfile.vue?vue&type=style&index=0&id=41f2e48a&scoped=true&lang=css":
|
|
/*!*****************************************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/AddProfile.vue?vue&type=style&index=0&id=41f2e48a&scoped=true&lang=css ***!
|
|
\*****************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AddProfile_vue_vue_type_style_index_0_id_41f2e48a_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/style-loader/dist/cjs.js!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AddProfile.vue?vue&type=style&index=0&id=41f2e48a&scoped=true&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/AddProfile.vue?vue&type=style&index=0&id=41f2e48a&scoped=true&lang=css");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/ChoosePackage.vue?vue&type=style&index=0&id=7b3e7646&scoped=true&lang=css":
|
|
/*!********************************************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/ChoosePackage.vue?vue&type=style&index=0&id=7b3e7646&scoped=true&lang=css ***!
|
|
\********************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_ChoosePackage_vue_vue_type_style_index_0_id_7b3e7646_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/style-loader/dist/cjs.js!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./ChoosePackage.vue?vue&type=style&index=0&id=7b3e7646&scoped=true&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/ChoosePackage.vue?vue&type=style&index=0&id=7b3e7646&scoped=true&lang=css");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/CreateAccount.vue?vue&type=style&index=0&id=bd535982&scoped=true&lang=css":
|
|
/*!********************************************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/CreateAccount.vue?vue&type=style&index=0&id=bd535982&scoped=true&lang=css ***!
|
|
\********************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_CreateAccount_vue_vue_type_style_index_0_id_bd535982_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/style-loader/dist/cjs.js!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./CreateAccount.vue?vue&type=style&index=0&id=bd535982&scoped=true&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateAccount.vue?vue&type=style&index=0&id=bd535982&scoped=true&lang=css");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/CreateCreditReportAccount.vue?vue&type=style&index=0&id=cbb5871c&scoped=true&lang=css":
|
|
/*!********************************************************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/CreateCreditReportAccount.vue?vue&type=style&index=0&id=cbb5871c&scoped=true&lang=css ***!
|
|
\********************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_CreateCreditReportAccount_vue_vue_type_style_index_0_id_cbb5871c_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/style-loader/dist/cjs.js!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./CreateCreditReportAccount.vue?vue&type=style&index=0&id=cbb5871c&scoped=true&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/CreateCreditReportAccount.vue?vue&type=style&index=0&id=cbb5871c&scoped=true&lang=css");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/IdentityIQPkg.vue?vue&type=style&index=0&id=f0648e98&lang=css":
|
|
/*!********************************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/IdentityIQPkg.vue?vue&type=style&index=0&id=f0648e98&lang=css ***!
|
|
\********************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_IdentityIQPkg_vue_vue_type_style_index_0_id_f0648e98_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/style-loader/dist/cjs.js!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./IdentityIQPkg.vue?vue&type=style&index=0&id=f0648e98&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/IdentityIQPkg.vue?vue&type=style&index=0&id=f0648e98&lang=css");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/MakePayment.vue?vue&type=style&index=0&id=59807834&scoped=true&lang=css":
|
|
/*!******************************************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/MakePayment.vue?vue&type=style&index=0&id=59807834&scoped=true&lang=css ***!
|
|
\******************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_MakePayment_vue_vue_type_style_index_0_id_59807834_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/style-loader/dist/cjs.js!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./MakePayment.vue?vue&type=style&index=0&id=59807834&scoped=true&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/MakePayment.vue?vue&type=style&index=0&id=59807834&scoped=true&lang=css");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/PaymentModal.vue?vue&type=style&index=0&id=68f715ee&lang=css":
|
|
/*!*******************************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/PaymentModal.vue?vue&type=style&index=0&id=68f715ee&lang=css ***!
|
|
\*******************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_PaymentModal_vue_vue_type_style_index_0_id_68f715ee_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/style-loader/dist/cjs.js!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./PaymentModal.vue?vue&type=style&index=0&id=68f715ee&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/PaymentModal.vue?vue&type=style&index=0&id=68f715ee&lang=css");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/SmartCreditPkg.vue?vue&type=style&index=0&id=7968490c&lang=css":
|
|
/*!*********************************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/SmartCreditPkg.vue?vue&type=style&index=0&id=7968490c&lang=css ***!
|
|
\*********************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SmartCreditPkg_vue_vue_type_style_index_0_id_7968490c_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/style-loader/dist/cjs.js!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./SmartCreditPkg.vue?vue&type=style&index=0&id=7968490c&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkg.vue?vue&type=style&index=0&id=7968490c&lang=css");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/SmartCreditPkgView.vue?vue&type=style&index=0&id=07ec995e&lang=css":
|
|
/*!*************************************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/SmartCreditPkgView.vue?vue&type=style&index=0&id=07ec995e&lang=css ***!
|
|
\*************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_SmartCreditPkgView_vue_vue_type_style_index_0_id_07ec995e_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/style-loader/dist/cjs.js!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./SmartCreditPkgView.vue?vue&type=style&index=0&id=07ec995e&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/SmartCreditPkgView.vue?vue&type=style&index=0&id=07ec995e&lang=css");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/Success.vue?vue&type=style&index=0&id=106e4531&scoped=true&lang=css":
|
|
/*!**************************************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/Success.vue?vue&type=style&index=0&id=106e4531&scoped=true&lang=css ***!
|
|
\**************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Success_vue_vue_type_style_index_0_id_106e4531_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/style-loader/dist/cjs.js!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./Success.vue?vue&type=style&index=0&id=106e4531&scoped=true&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/Success.vue?vue&type=style&index=0&id=106e4531&scoped=true&lang=css");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/TopArea.vue?vue&type=style&index=0&id=3dfb8130&scoped=true&lang=css":
|
|
/*!**************************************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/TopArea.vue?vue&type=style&index=0&id=3dfb8130&scoped=true&lang=css ***!
|
|
\**************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_TopArea_vue_vue_type_style_index_0_id_3dfb8130_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/style-loader/dist/cjs.js!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./TopArea.vue?vue&type=style&index=0&id=3dfb8130&scoped=true&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/TopArea.vue?vue&type=style&index=0&id=3dfb8130&scoped=true&lang=css");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/modal.vue?vue&type=style&index=0&id=18ecef0a&scoped=true&lang=css":
|
|
/*!************************************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/modal.vue?vue&type=style&index=0&id=18ecef0a&scoped=true&lang=css ***!
|
|
\************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_modal_vue_vue_type_style_index_0_id_18ecef0a_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/style-loader/dist/cjs.js!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./modal.vue?vue&type=style&index=0&id=18ecef0a&scoped=true&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/modal.vue?vue&type=style&index=0&id=18ecef0a&scoped=true&lang=css");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/components/partials/sc_partner_cz_logo.vue?vue&type=style&index=0&id=d7b0f3a2&scoped=true&lang=css":
|
|
/*!*************************************************************************************************************************!*\
|
|
!*** ./resources/js/components/partials/sc_partner_cz_logo.vue?vue&type=style&index=0&id=d7b0f3a2&scoped=true&lang=css ***!
|
|
\*************************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_8_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_8_use_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_sc_partner_cz_logo_vue_vue_type_style_index_0_id_d7b0f3a2_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/style-loader/dist/cjs.js!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./sc_partner_cz_logo.vue?vue&type=style&index=0&id=d7b0f3a2&scoped=true&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-8.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-8.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/partials/sc_partner_cz_logo.vue?vue&type=style&index=0&id=d7b0f3a2&scoped=true&lang=css");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/vue-recaptcha/dist/vue-recaptcha.es.js":
|
|
/*!*************************************************************!*\
|
|
!*** ./node_modules/vue-recaptcha/dist/vue-recaptcha.es.js ***!
|
|
\*************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ VueRecaptcha: () => (/* binding */ Recaptcha)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue_demi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue-demi */ "./node_modules/vue-recaptcha/node_modules/vue-demi/lib/index.mjs");
|
|
|
|
|
|
function _extends() {
|
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
var source = arguments[i];
|
|
|
|
for (var key in source) {
|
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
target[key] = source[key];
|
|
}
|
|
}
|
|
}
|
|
|
|
return target;
|
|
};
|
|
return _extends.apply(this, arguments);
|
|
}
|
|
|
|
var defer = function defer() {
|
|
var state = false; // Resolved or not
|
|
|
|
var callbacks = [];
|
|
|
|
var resolve = function resolve() {
|
|
if (state) {
|
|
return;
|
|
}
|
|
|
|
state = true;
|
|
|
|
for (var i = 0, len = callbacks.length; i < len; i++) {
|
|
callbacks[i]();
|
|
}
|
|
};
|
|
|
|
var then = function then(cb) {
|
|
if (!state) {
|
|
callbacks.push(cb);
|
|
return;
|
|
}
|
|
|
|
cb();
|
|
};
|
|
|
|
var deferred = {
|
|
resolved: function resolved() {
|
|
return state;
|
|
},
|
|
resolve: resolve,
|
|
promise: {
|
|
then: then
|
|
}
|
|
};
|
|
return deferred;
|
|
};
|
|
|
|
var ownProp = Object.prototype.hasOwnProperty;
|
|
function createRecaptcha() {
|
|
var deferred = defer();
|
|
return {
|
|
notify: function notify() {
|
|
deferred.resolve();
|
|
},
|
|
wait: function wait() {
|
|
return deferred.promise;
|
|
},
|
|
render: function render(ele, options, cb) {
|
|
this.wait().then(function () {
|
|
cb(window.grecaptcha.render(ele, options));
|
|
});
|
|
},
|
|
reset: function reset(widgetId) {
|
|
if (typeof widgetId === 'undefined') {
|
|
return;
|
|
}
|
|
|
|
this.assertLoaded();
|
|
this.wait().then(function () {
|
|
return window.grecaptcha.reset(widgetId);
|
|
});
|
|
},
|
|
execute: function execute(widgetId) {
|
|
if (typeof widgetId === 'undefined') {
|
|
return;
|
|
}
|
|
|
|
this.assertLoaded();
|
|
this.wait().then(function () {
|
|
return window.grecaptcha.execute(widgetId);
|
|
});
|
|
},
|
|
checkRecaptchaLoad: function checkRecaptchaLoad() {
|
|
if (ownProp.call(window, 'grecaptcha') && ownProp.call(window.grecaptcha, 'render')) {
|
|
this.notify();
|
|
}
|
|
},
|
|
assertLoaded: function assertLoaded() {
|
|
if (!deferred.resolved()) {
|
|
throw new Error('ReCAPTCHA has not been loaded');
|
|
}
|
|
}
|
|
};
|
|
}
|
|
var recaptcha = createRecaptcha();
|
|
|
|
if (typeof window !== 'undefined') {
|
|
window.vueRecaptchaApiLoaded = recaptcha.notify;
|
|
}
|
|
|
|
var Recaptcha = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
|
|
name: 'VueRecaptcha',
|
|
props: {
|
|
sitekey: {
|
|
type: String,
|
|
required: true
|
|
},
|
|
theme: {
|
|
type: String
|
|
},
|
|
badge: {
|
|
type: String
|
|
},
|
|
type: {
|
|
type: String
|
|
},
|
|
size: {
|
|
type: String
|
|
},
|
|
tabindex: {
|
|
type: String
|
|
},
|
|
loadRecaptchaScript: {
|
|
type: Boolean,
|
|
"default": true
|
|
},
|
|
recaptchaScriptId: {
|
|
type: String,
|
|
"default": '__RECAPTCHA_SCRIPT'
|
|
},
|
|
recaptchaHost: {
|
|
type: String,
|
|
"default": 'www.google.com'
|
|
},
|
|
language: {
|
|
type: String,
|
|
"default": ''
|
|
}
|
|
},
|
|
emits: ['render', 'verify', 'expired', 'error'],
|
|
setup: function setup(props, _ref) {
|
|
var slots = _ref.slots,
|
|
emit = _ref.emit;
|
|
var root = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)(null);
|
|
var widgetId = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)(null);
|
|
|
|
var emitVerify = function emitVerify(response) {
|
|
emit('verify', response);
|
|
};
|
|
|
|
var emitExpired = function emitExpired() {
|
|
emit('expired');
|
|
};
|
|
|
|
var emitError = function emitError() {
|
|
emit('error');
|
|
};
|
|
|
|
(0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.onMounted)(function () {
|
|
recaptcha.checkRecaptchaLoad();
|
|
|
|
if (props.loadRecaptchaScript) {
|
|
if (!document.getElementById(props.recaptchaScriptId)) {
|
|
// Note: vueRecaptchaApiLoaded load callback name is per the latest documentation
|
|
var script = document.createElement('script');
|
|
script.id = props.recaptchaScriptId;
|
|
script.src = "https://" + props.recaptchaHost + "/recaptcha/api.js?onload=vueRecaptchaApiLoaded&render=explicit&hl=" + props.language;
|
|
script.async = true;
|
|
script.defer = true;
|
|
document.head.appendChild(script);
|
|
}
|
|
}
|
|
|
|
var opts = _extends({}, props, {
|
|
callback: emitVerify,
|
|
'expired-callback': emitExpired,
|
|
'error-callback': emitError
|
|
});
|
|
|
|
var $root = root.value;
|
|
var container = slots["default"] ? $root.children[0] : $root;
|
|
recaptcha.render(container, opts, function (id) {
|
|
widgetId.value = id;
|
|
emit('render', id);
|
|
});
|
|
});
|
|
return {
|
|
root: root,
|
|
widgetId: widgetId,
|
|
reset: function reset() {
|
|
recaptcha.reset(widgetId.value);
|
|
},
|
|
execute: function execute() {
|
|
recaptcha.execute(widgetId.value);
|
|
}
|
|
};
|
|
},
|
|
render: function render() {
|
|
var defaultSlot = this.$slots["default"];
|
|
var defaultContent;
|
|
|
|
if (typeof defaultSlot === 'function') {
|
|
defaultContent = defaultSlot();
|
|
} else {
|
|
defaultContent = defaultSlot;
|
|
}
|
|
|
|
return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
|
|
ref: 'root'
|
|
}, defaultContent);
|
|
}
|
|
});
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/vue-sweetalert2/dist/vue-sweetalert.umd.js":
|
|
/*!*****************************************************************!*\
|
|
!*** ./node_modules/vue-sweetalert2/dist/vue-sweetalert.umd.js ***!
|
|
\*****************************************************************/
|
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
|
|
!function(t,e){ true?module.exports=e():0}(this,(function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},e={exports:{}};e.exports=function(){const t=t=>{const e=[];for(let n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n]);return e},e=t=>t.charAt(0).toUpperCase()+t.slice(1),n=t=>Array.prototype.slice.call(t),o=t=>{},i=t=>{},s=[],r=t=>{s.includes(t)||(s.push(t),o(t))},a=(t,e)=>{r('"'.concat(t,'" is deprecated and will be removed in the next major release. Please use "').concat(e,'" instead.'))},c=t=>"function"==typeof t?t():t,l=t=>t&&"function"==typeof t.toPromise,u=t=>l(t)?t.toPromise():Promise.resolve(t),d=t=>t&&Promise.resolve(t)===t,p={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},m=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],g={},h=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],f=t=>Object.prototype.hasOwnProperty.call(p,t),b=t=>-1!==m.indexOf(t),y=t=>g[t],w=t=>{f(t)||o('Unknown parameter "'.concat(t,'"'))},v=t=>{h.includes(t)&&o('The parameter "'.concat(t,'" is incompatible with toasts'))},C=t=>{y(t)&&a(t,y(t))},k=t=>{!t.backdrop&&t.allowOutsideClick&&o('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const e in t)w(e),t.toast&&v(e),C(e)},A="swal2-",P=t=>{const e={};for(const n in t)e[t[n]]=A+t[n];return e},B=P(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),x=P(["success","warning","info","question","error"]),E=()=>document.body.querySelector(".".concat(B.container)),T=t=>{const e=E();return e?e.querySelector(t):null},S=t=>T(".".concat(t)),O=()=>S(B.popup),L=()=>S(B.icon),j=()=>S(B.title),M=()=>S(B["html-container"]),D=()=>S(B.image),I=()=>S(B["progress-steps"]),H=()=>S(B["validation-message"]),q=()=>T(".".concat(B.actions," .").concat(B.confirm)),V=()=>T(".".concat(B.actions," .").concat(B.deny)),N=()=>S(B["input-label"]),R=()=>T(".".concat(B.loader)),F=()=>T(".".concat(B.actions," .").concat(B.cancel)),U=()=>S(B.actions),W=()=>S(B.footer),z=()=>S(B["timer-progress-bar"]),_=()=>S(B.close),K='\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex="0"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n',$=()=>{const e=n(O().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(((t,e)=>{const n=parseInt(t.getAttribute("tabindex")),o=parseInt(e.getAttribute("tabindex"));return n>o?1:n<o?-1:0})),o=n(O().querySelectorAll(K)).filter((t=>"-1"!==t.getAttribute("tabindex")));return t(e.concat(o)).filter((t=>mt(t)))},Y=()=>!Q(document.body,B["toast-shown"])&&!Q(document.body,B["no-backdrop"]),Z=()=>O()&&Q(O(),B.toast),J=()=>O().hasAttribute("data-loading"),X={previousBodyPadding:null},G=(t,e)=>{if(t.textContent="",e){const o=(new DOMParser).parseFromString(e,"text/html");n(o.querySelector("head").childNodes).forEach((e=>{t.appendChild(e)})),n(o.querySelector("body").childNodes).forEach((e=>{t.appendChild(e)}))}},Q=(t,e)=>{if(!e)return!1;const n=e.split(/\s+/);for(let o=0;o<n.length;o++)if(!t.classList.contains(n[o]))return!1;return!0},tt=(t,e)=>{n(t.classList).forEach((n=>{Object.values(B).includes(n)||Object.values(x).includes(n)||Object.values(e.showClass).includes(n)||t.classList.remove(n)}))},et=(t,e,n)=>{if(tt(t,e),e.customClass&&e.customClass[n]){if("string"!=typeof e.customClass[n]&&!e.customClass[n].forEach)return o("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(typeof e.customClass[n],'"'));st(t,e.customClass[n])}},nt=(t,e)=>{if(!e)return null;switch(e){case"select":case"textarea":case"file":return t.querySelector(".".concat(B.popup," > .").concat(B[e]));case"checkbox":return t.querySelector(".".concat(B.popup," > .").concat(B.checkbox," input"));case"radio":return t.querySelector(".".concat(B.popup," > .").concat(B.radio," input:checked"))||t.querySelector(".".concat(B.popup," > .").concat(B.radio," input:first-child"));case"range":return t.querySelector(".".concat(B.popup," > .").concat(B.range," input"));default:return t.querySelector(".".concat(B.popup," > .").concat(B.input))}},ot=t=>{if(t.focus(),"file"!==t.type){const e=t.value;t.value="",t.value=e}},it=(t,e,n)=>{t&&e&&("string"==typeof e&&(e=e.split(/\s+/).filter(Boolean)),e.forEach((e=>{Array.isArray(t)?t.forEach((t=>{n?t.classList.add(e):t.classList.remove(e)})):n?t.classList.add(e):t.classList.remove(e)})))},st=(t,e)=>{it(t,e,!0)},rt=(t,e)=>{it(t,e,!1)},at=(t,e)=>{const o=n(t.childNodes);for(let n=0;n<o.length;n++)if(Q(o[n],e))return o[n]},ct=(t,e,n)=>{n==="".concat(parseInt(n))&&(n=parseInt(n)),n||0===parseInt(n)?t.style[e]="number"==typeof n?"".concat(n,"px"):n:t.style.removeProperty(e)},lt=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";t.style.display=e},ut=t=>{t.style.display="none"},dt=(t,e,n,o)=>{const i=t.querySelector(e);i&&(i.style[n]=o)},pt=(t,e,n)=>{e?lt(t,n):ut(t)},mt=t=>!(!t||!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)),gt=()=>!mt(q())&&!mt(V())&&!mt(F()),ht=t=>!!(t.scrollHeight>t.clientHeight),ft=t=>{const e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),o=parseFloat(e.getPropertyValue("transition-duration")||"0");return n>0||o>0},bt=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=z();mt(n)&&(e&&(n.style.transition="none",n.style.width="100%"),setTimeout((()=>{n.style.transition="width ".concat(t/1e3,"s linear"),n.style.width="0%"}),10))},yt=()=>{const t=z(),e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";const n=e/parseInt(window.getComputedStyle(t).width)*100;t.style.removeProperty("transition"),t.style.width="".concat(n,"%")},wt=()=>"undefined"==typeof window||"undefined"==typeof document,vt=100,Ct={},kt=()=>{Ct.previousActiveElement&&Ct.previousActiveElement.focus?(Ct.previousActiveElement.focus(),Ct.previousActiveElement=null):document.body&&document.body.focus()},At=t=>new Promise((e=>{if(!t)return e();const n=window.scrollX,o=window.scrollY;Ct.restoreFocusTimeout=setTimeout((()=>{kt(),e()}),vt),window.scrollTo(n,o)})),Pt='\n <div aria-labelledby="'.concat(B.title,'" aria-describedby="').concat(B["html-container"],'" class="').concat(B.popup,'" tabindex="-1">\n <button type="button" class="').concat(B.close,'"></button>\n <ul class="').concat(B["progress-steps"],'"></ul>\n <div class="').concat(B.icon,'"></div>\n <img class="').concat(B.image,'" />\n <h2 class="').concat(B.title,'" id="').concat(B.title,'"></h2>\n <div class="').concat(B["html-container"],'" id="').concat(B["html-container"],'"></div>\n <input class="').concat(B.input,'" />\n <input type="file" class="').concat(B.file,'" />\n <div class="').concat(B.range,'">\n <input type="range" />\n <output></output>\n </div>\n <select class="').concat(B.select,'"></select>\n <div class="').concat(B.radio,'"></div>\n <label for="').concat(B.checkbox,'" class="').concat(B.checkbox,'">\n <input type="checkbox" />\n <span class="').concat(B.label,'"></span>\n </label>\n <textarea class="').concat(B.textarea,'"></textarea>\n <div class="').concat(B["validation-message"],'" id="').concat(B["validation-message"],'"></div>\n <div class="').concat(B.actions,'">\n <div class="').concat(B.loader,'"></div>\n <button type="button" class="').concat(B.confirm,'"></button>\n <button type="button" class="').concat(B.deny,'"></button>\n <button type="button" class="').concat(B.cancel,'"></button>\n </div>\n <div class="').concat(B.footer,'"></div>\n <div class="').concat(B["timer-progress-bar-container"],'">\n <div class="').concat(B["timer-progress-bar"],'"></div>\n </div>\n </div>\n').replace(/(^|\n)\s*/g,""),Bt=()=>{const t=E();return!!t&&(t.remove(),rt([document.documentElement,document.body],[B["no-backdrop"],B["toast-shown"],B["has-column"]]),!0)},xt=()=>{Ct.currentInstance.resetValidationMessage()},Et=()=>{const t=O(),e=at(t,B.input),n=at(t,B.file),o=t.querySelector(".".concat(B.range," input")),i=t.querySelector(".".concat(B.range," output")),s=at(t,B.select),r=t.querySelector(".".concat(B.checkbox," input")),a=at(t,B.textarea);e.oninput=xt,n.onchange=xt,s.onchange=xt,r.onchange=xt,a.oninput=xt,o.oninput=()=>{xt(),i.value=o.value},o.onchange=()=>{xt(),o.nextSibling.value=o.value}},Tt=t=>"string"==typeof t?document.querySelector(t):t,St=t=>{const e=O();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")},Ot=t=>{"rtl"===window.getComputedStyle(t).direction&&st(E(),B.rtl)},Lt=t=>{const e=Bt();if(wt())return void i("SweetAlert2 requires document to initialize");const n=document.createElement("div");n.className=B.container,e&&st(n,B["no-transition"]),G(n,Pt);const o=Tt(t.target);o.appendChild(n),St(t),Ot(o),Et()},jt=(t,e)=>{t instanceof HTMLElement?e.appendChild(t):"object"==typeof t?Mt(t,e):t&&G(e,t)},Mt=(t,e)=>{t.jquery?Dt(e,t):G(e,t.toString())},Dt=(t,e)=>{if(t.textContent="",0 in e)for(let n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},It=(()=>{if(wt())return!1;const t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&void 0!==t.style[n])return e[n];return!1})(),Ht=()=>{const t=document.createElement("div");t.className=B["scrollbar-measure"],document.body.appendChild(t);const e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},qt=(t,e)=>{const n=U(),o=R();e.showConfirmButton||e.showDenyButton||e.showCancelButton?lt(n):ut(n),et(n,e,"actions"),Vt(n,o,e),G(o,e.loaderHtml),et(o,e,"loader")};function Vt(t,e,n){const o=q(),i=V(),s=F();Rt(o,"confirm",n),Rt(i,"deny",n),Rt(s,"cancel",n),Nt(o,i,s,n),n.reverseButtons&&(n.toast?(t.insertBefore(s,o),t.insertBefore(i,o)):(t.insertBefore(s,e),t.insertBefore(i,e),t.insertBefore(o,e)))}function Nt(t,e,n,o){if(!o.buttonsStyling)return rt([t,e,n],B.styled);st([t,e,n],B.styled),o.confirmButtonColor&&(t.style.backgroundColor=o.confirmButtonColor,st(t,B["default-outline"])),o.denyButtonColor&&(e.style.backgroundColor=o.denyButtonColor,st(e,B["default-outline"])),o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,st(n,B["default-outline"]))}function Rt(t,n,o){pt(t,o["show".concat(e(n),"Button")],"inline-block"),G(t,o["".concat(n,"ButtonText")]),t.setAttribute("aria-label",o["".concat(n,"ButtonAriaLabel")]),t.className=B[n],et(t,o,"".concat(n,"Button")),st(t,o["".concat(n,"ButtonClass")])}function Ft(t,e){"string"==typeof e?t.style.background=e:e||st([document.documentElement,document.body],B["no-backdrop"])}function Ut(t,e){e in B?st(t,B[e]):(o('The "position" parameter is not valid, defaulting to "center"'),st(t,B.center))}function Wt(t,e){if(e&&"string"==typeof e){const n="grow-".concat(e);n in B&&st(t,B[n])}}const zt=(t,e)=>{const n=E();n&&(Ft(n,e.backdrop),Ut(n,e.position),Wt(n,e.grow),et(n,e,"container"))};var _t={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const Kt=["input","file","range","select","radio","checkbox","textarea"],$t=(t,e)=>{const n=O(),o=_t.innerParams.get(t),i=!o||e.input!==o.input;Kt.forEach((t=>{const o=B[t],s=at(n,o);Jt(t,e.inputAttributes),s.className=o,i&&ut(s)})),e.input&&(i&&Yt(e),Xt(e))},Yt=t=>{if(!ee[t.input])return i('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(t.input,'"'));const e=te(t.input),n=ee[t.input](e,t);lt(n),setTimeout((()=>{ot(n)}))},Zt=t=>{for(let e=0;e<t.attributes.length;e++){const n=t.attributes[e].name;["type","value","style"].includes(n)||t.removeAttribute(n)}},Jt=(t,e)=>{const n=nt(O(),t);if(n){Zt(n);for(const t in e)n.setAttribute(t,e[t])}},Xt=t=>{const e=te(t.input);t.customClass&&st(e,t.customClass.input)},Gt=(t,e)=>{t.placeholder&&!e.inputPlaceholder||(t.placeholder=e.inputPlaceholder)},Qt=(t,e,n)=>{if(n.inputLabel){t.id=B.input;const o=document.createElement("label"),i=B["input-label"];o.setAttribute("for",t.id),o.className=i,st(o,n.customClass.inputLabel),o.innerText=n.inputLabel,e.insertAdjacentElement("beforebegin",o)}},te=t=>{const e=B[t]?B[t]:B.input;return at(O(),e)},ee={};ee.text=ee.email=ee.password=ee.number=ee.tel=ee.url=(t,e)=>("string"==typeof e.inputValue||"number"==typeof e.inputValue?t.value=e.inputValue:d(e.inputValue)||o('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof e.inputValue,'"')),Qt(t,t,e),Gt(t,e),t.type=e.input,t),ee.file=(t,e)=>(Qt(t,t,e),Gt(t,e),t),ee.range=(t,e)=>{const n=t.querySelector("input"),o=t.querySelector("output");return n.value=e.inputValue,n.type=e.input,o.value=e.inputValue,Qt(n,t,e),t},ee.select=(t,e)=>{if(t.textContent="",e.inputPlaceholder){const n=document.createElement("option");G(n,e.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,t.appendChild(n)}return Qt(t,t,e),t},ee.radio=t=>(t.textContent="",t),ee.checkbox=(t,e)=>{const n=nt(O(),"checkbox");n.value="1",n.id=B.checkbox,n.checked=Boolean(e.inputValue);const o=t.querySelector("span");return G(o,e.inputPlaceholder),t},ee.textarea=(t,e)=>{t.value=e.inputValue,Gt(t,e),Qt(t,t,e);const n=t=>parseInt(window.getComputedStyle(t).marginLeft)+parseInt(window.getComputedStyle(t).marginRight);return setTimeout((()=>{if("MutationObserver"in window){const e=parseInt(window.getComputedStyle(O()).width);new MutationObserver((()=>{const o=t.offsetWidth+n(t);O().style.width=o>e?"".concat(o,"px"):null})).observe(t,{attributes:!0,attributeFilter:["style"]})}})),t};const ne=(t,e)=>{const n=M();et(n,e,"htmlContainer"),e.html?(jt(e.html,n),lt(n,"block")):e.text?(n.textContent=e.text,lt(n,"block")):ut(n),$t(t,e)},oe=(t,e)=>{const n=W();pt(n,e.footer),e.footer&&jt(e.footer,n),et(n,e,"footer")},ie=(t,e)=>{const n=_();G(n,e.closeButtonHtml),et(n,e,"closeButton"),pt(n,e.showCloseButton),n.setAttribute("aria-label",e.closeButtonAriaLabel)},se=(t,e)=>{const n=_t.innerParams.get(t),o=L();return n&&e.icon===n.icon?(ue(o,e),void re(o,e)):e.icon||e.iconHtml?e.icon&&-1===Object.keys(x).indexOf(e.icon)?(i('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(e.icon,'"')),ut(o)):(lt(o),ue(o,e),re(o,e),void st(o,e.showClass.icon)):ut(o)},re=(t,e)=>{for(const n in x)e.icon!==n&&rt(t,x[n]);st(t,x[e.icon]),de(t,e),ae(),et(t,e,"icon")},ae=()=>{const t=O(),e=window.getComputedStyle(t).getPropertyValue("background-color"),n=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let o=0;o<n.length;o++)n[o].style.backgroundColor=e},ce='\n <div class="swal2-success-circular-line-left"></div>\n <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n <div class="swal2-success-circular-line-right"></div>\n',le='\n <span class="swal2-x-mark">\n <span class="swal2-x-mark-line-left"></span>\n <span class="swal2-x-mark-line-right"></span>\n </span>\n',ue=(t,e)=>{t.textContent="",e.iconHtml?G(t,pe(e.iconHtml)):"success"===e.icon?G(t,ce):"error"===e.icon?G(t,le):G(t,pe({question:"?",warning:"!",info:"i"}[e.icon]))},de=(t,e)=>{if(e.iconColor){t.style.color=e.iconColor,t.style.borderColor=e.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])dt(t,n,"backgroundColor",e.iconColor);dt(t,".swal2-success-ring","borderColor",e.iconColor)}},pe=t=>'<div class="'.concat(B["icon-content"],'">').concat(t,"</div>"),me=(t,e)=>{const n=D();if(!e.imageUrl)return ut(n);lt(n,""),n.setAttribute("src",e.imageUrl),n.setAttribute("alt",e.imageAlt),ct(n,"width",e.imageWidth),ct(n,"height",e.imageHeight),n.className=B.image,et(n,e,"image")},ge=t=>{const e=document.createElement("li");return st(e,B["progress-step"]),G(e,t),e},he=t=>{const e=document.createElement("li");return st(e,B["progress-step-line"]),t.progressStepsDistance&&(e.style.width=t.progressStepsDistance),e},fe=(t,e)=>{const n=I();if(!e.progressSteps||0===e.progressSteps.length)return ut(n);lt(n),n.textContent="",e.currentProgressStep>=e.progressSteps.length&&o("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),e.progressSteps.forEach(((t,o)=>{const i=ge(t);if(n.appendChild(i),o===e.currentProgressStep&&st(i,B["active-progress-step"]),o!==e.progressSteps.length-1){const t=he(e);n.appendChild(t)}}))},be=(t,e)=>{const n=j();pt(n,e.title||e.titleText,"block"),e.title&&jt(e.title,n),e.titleText&&(n.innerText=e.titleText),et(n,e,"title")},ye=(t,e)=>{const n=E(),o=O();e.toast?(ct(n,"width",e.width),o.style.width="100%",o.insertBefore(R(),L())):ct(o,"width",e.width),ct(o,"padding",e.padding),e.color&&(o.style.color=e.color),e.background&&(o.style.background=e.background),ut(H()),we(o,e)},we=(t,e)=>{t.className="".concat(B.popup," ").concat(mt(t)?e.showClass.popup:""),e.toast?(st([document.documentElement,document.body],B["toast-shown"]),st(t,B.toast)):st(t,B.modal),et(t,e,"popup"),"string"==typeof e.customClass&&st(t,e.customClass),e.icon&&st(t,B["icon-".concat(e.icon)])},ve=(t,e)=>{ye(t,e),zt(t,e),fe(t,e),se(t,e),me(t,e),be(t,e),ie(t,e),ne(t,e),qt(t,e),oe(t,e),"function"==typeof e.didRender&&e.didRender(O())},Ce=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),ke=()=>{n(document.body.children).forEach((t=>{t===E()||t.contains(E())||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")),t.setAttribute("aria-hidden","true"))}))},Ae=()=>{n(document.body.children).forEach((t=>{t.hasAttribute("data-previous-aria-hidden")?(t.setAttribute("aria-hidden",t.getAttribute("data-previous-aria-hidden")),t.removeAttribute("data-previous-aria-hidden")):t.removeAttribute("aria-hidden")}))},Pe=["swal-title","swal-html","swal-footer"],Be=t=>{const e="string"==typeof t.template?document.querySelector(t.template):t.template;if(!e)return{};const n=e.content;return je(n),Object.assign(xe(n),Ee(n),Te(n),Se(n),Oe(n),Le(n,Pe))},xe=t=>{const e={};return n(t.querySelectorAll("swal-param")).forEach((t=>{Me(t,["name","value"]);const n=t.getAttribute("name"),o=t.getAttribute("value");"boolean"==typeof p[n]&&"false"===o&&(e[n]=!1),"object"==typeof p[n]&&(e[n]=JSON.parse(o))})),e},Ee=t=>{const o={};return n(t.querySelectorAll("swal-button")).forEach((t=>{Me(t,["type","color","aria-label"]);const n=t.getAttribute("type");o["".concat(n,"ButtonText")]=t.innerHTML,o["show".concat(e(n),"Button")]=!0,t.hasAttribute("color")&&(o["".concat(n,"ButtonColor")]=t.getAttribute("color")),t.hasAttribute("aria-label")&&(o["".concat(n,"ButtonAriaLabel")]=t.getAttribute("aria-label"))})),o},Te=t=>{const e={},n=t.querySelector("swal-image");return n&&(Me(n,["src","width","height","alt"]),n.hasAttribute("src")&&(e.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(e.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(e.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(e.imageAlt=n.getAttribute("alt"))),e},Se=t=>{const e={},n=t.querySelector("swal-icon");return n&&(Me(n,["type","color"]),n.hasAttribute("type")&&(e.icon=n.getAttribute("type")),n.hasAttribute("color")&&(e.iconColor=n.getAttribute("color")),e.iconHtml=n.innerHTML),e},Oe=t=>{const e={},o=t.querySelector("swal-input");o&&(Me(o,["type","label","placeholder","value"]),e.input=o.getAttribute("type")||"text",o.hasAttribute("label")&&(e.inputLabel=o.getAttribute("label")),o.hasAttribute("placeholder")&&(e.inputPlaceholder=o.getAttribute("placeholder")),o.hasAttribute("value")&&(e.inputValue=o.getAttribute("value")));const i=t.querySelectorAll("swal-input-option");return i.length&&(e.inputOptions={},n(i).forEach((t=>{Me(t,["value"]);const n=t.getAttribute("value"),o=t.innerHTML;e.inputOptions[n]=o}))),e},Le=(t,e)=>{const n={};for(const o in e){const i=e[o],s=t.querySelector(i);s&&(Me(s,[]),n[i.replace(/^swal-/,"")]=s.innerHTML.trim())}return n},je=t=>{const e=Pe.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);n(t.children).forEach((t=>{const n=t.tagName.toLowerCase();-1===e.indexOf(n)&&o("Unrecognized element <".concat(n,">"))}))},Me=(t,e)=>{n(t.attributes).forEach((n=>{-1===e.indexOf(n.name)&&o(['Unrecognized attribute "'.concat(n.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(e.length?"Allowed attributes are: ".concat(e.join(", ")):"To set the value, use HTML within the element.")])}))};var De={email:(t,e)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid email address"),url:(t,e)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid URL")};function Ie(t){t.inputValidator||Object.keys(De).forEach((e=>{t.input===e&&(t.inputValidator=De[e])}))}function He(t){(!t.target||"string"==typeof t.target&&!document.querySelector(t.target)||"string"!=typeof t.target&&!t.target.appendChild)&&(o('Target parameter is not valid, defaulting to "body"'),t.target="body")}function qe(t){Ie(t),t.showLoaderOnConfirm&&!t.preConfirm&&o("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),He(t),"string"==typeof t.title&&(t.title=t.title.split("\n").join("<br />")),Lt(t)}class Ve{constructor(t,e){this.callback=t,this.remaining=e,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}increase(t){const e=this.running;return e&&this.stop(),this.remaining+=t,e&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const Ne=()=>{null===X.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(X.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(X.previousBodyPadding+Ht(),"px"))},Re=()=>{null!==X.previousBodyPadding&&(document.body.style.paddingRight="".concat(X.previousBodyPadding,"px"),X.previousBodyPadding=null)},Fe=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!Q(document.body,B.iosfix)){const t=document.body.scrollTop;document.body.style.top="".concat(-1*t,"px"),st(document.body,B.iosfix),We(),Ue()}},Ue=()=>{const t=navigator.userAgent,e=!!t.match(/iPad/i)||!!t.match(/iPhone/i),n=!!t.match(/WebKit/i);if(e&&n&&!t.match(/CriOS/i)){const t=44;O().scrollHeight>window.innerHeight-t&&(E().style.paddingBottom="".concat(t,"px"))}},We=()=>{const t=E();let e;t.ontouchstart=t=>{e=ze(t)},t.ontouchmove=t=>{e&&(t.preventDefault(),t.stopPropagation())}},ze=t=>{const e=t.target,n=E();return!(_e(t)||Ke(t)||e!==n&&(ht(n)||"INPUT"===e.tagName||"TEXTAREA"===e.tagName||ht(M())&&M().contains(e)))},_e=t=>t.touches&&t.touches.length&&"stylus"===t.touches[0].touchType,Ke=t=>t.touches&&t.touches.length>1,$e=()=>{if(Q(document.body,B.iosfix)){const t=parseInt(document.body.style.top,10);rt(document.body,B.iosfix),document.body.style.top="",document.body.scrollTop=-1*t}},Ye=10,Ze=t=>{const e=E(),n=O();"function"==typeof t.willOpen&&t.willOpen(n);const o=window.getComputedStyle(document.body).overflowY;Qe(e,n,t),setTimeout((()=>{Xe(e,n)}),Ye),Y()&&(Ge(e,t.scrollbarPadding,o),ke()),Z()||Ct.previousActiveElement||(Ct.previousActiveElement=document.activeElement),"function"==typeof t.didOpen&&setTimeout((()=>t.didOpen(n))),rt(e,B["no-transition"])},Je=t=>{const e=O();if(t.target!==e)return;const n=E();e.removeEventListener(It,Je),n.style.overflowY="auto"},Xe=(t,e)=>{It&&ft(e)?(t.style.overflowY="hidden",e.addEventListener(It,Je)):t.style.overflowY="auto"},Ge=(t,e,n)=>{Fe(),e&&"hidden"!==n&&Ne(),setTimeout((()=>{t.scrollTop=0}))},Qe=(t,e,n)=>{st(t,n.showClass.backdrop),e.style.setProperty("opacity","0","important"),lt(e,"grid"),setTimeout((()=>{st(e,n.showClass.popup),e.style.removeProperty("opacity")}),Ye),st([document.documentElement,document.body],B.shown),n.heightAuto&&n.backdrop&&!n.toast&&st([document.documentElement,document.body],B["height-auto"])},tn=t=>{let e=O();e||new _o,e=O();const n=R();Z()?ut(L()):en(e,t),lt(n),e.setAttribute("data-loading",!0),e.setAttribute("aria-busy",!0),e.focus()},en=(t,e)=>{const n=U(),o=R();!e&&mt(q())&&(e=q()),lt(n),e&&(ut(e),o.setAttribute("data-button-to-replace",e.className)),o.parentNode.insertBefore(o,e),st([t,n],B.loading)},nn=(t,e)=>{"select"===e.input||"radio"===e.input?cn(t,e):["text","email","number","tel","textarea"].includes(e.input)&&(l(e.inputValue)||d(e.inputValue))&&(tn(q()),ln(t,e))},on=(t,e)=>{const n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return sn(n);case"radio":return rn(n);case"file":return an(n);default:return e.inputAutoTrim?n.value.trim():n.value}},sn=t=>t.checked?1:0,rn=t=>t.checked?t.value:null,an=t=>t.files.length?null!==t.getAttribute("multiple")?t.files:t.files[0]:null,cn=(t,e)=>{const n=O(),o=t=>un[e.input](n,dn(t),e);l(e.inputOptions)||d(e.inputOptions)?(tn(q()),u(e.inputOptions).then((e=>{t.hideLoading(),o(e)}))):"object"==typeof e.inputOptions?o(e.inputOptions):i("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof e.inputOptions))},ln=(t,e)=>{const n=t.getInput();ut(n),u(e.inputValue).then((o=>{n.value="number"===e.input?parseFloat(o)||0:"".concat(o),lt(n),n.focus(),t.hideLoading()})).catch((e=>{i("Error in inputValue promise: ".concat(e)),n.value="",lt(n),n.focus(),t.hideLoading()}))},un={select:(t,e,n)=>{const o=at(t,B.select),i=(t,e,o)=>{const i=document.createElement("option");i.value=o,G(i,e),i.selected=pn(o,n.inputValue),t.appendChild(i)};e.forEach((t=>{const e=t[0],n=t[1];if(Array.isArray(n)){const t=document.createElement("optgroup");t.label=e,t.disabled=!1,o.appendChild(t),n.forEach((e=>i(t,e[1],e[0])))}else i(o,n,e)})),o.focus()},radio:(t,e,n)=>{const o=at(t,B.radio);e.forEach((t=>{const e=t[0],i=t[1],s=document.createElement("input"),r=document.createElement("label");s.type="radio",s.name=B.radio,s.value=e,pn(e,n.inputValue)&&(s.checked=!0);const a=document.createElement("span");G(a,i),a.className=B.label,r.appendChild(s),r.appendChild(a),o.appendChild(r)}));const i=o.querySelectorAll("input");i.length&&i[0].focus()}},dn=t=>{const e=[];return"undefined"!=typeof Map&&t instanceof Map?t.forEach(((t,n)=>{let o=t;"object"==typeof o&&(o=dn(o)),e.push([n,o])})):Object.keys(t).forEach((n=>{let o=t[n];"object"==typeof o&&(o=dn(o)),e.push([n,o])})),e},pn=(t,e)=>e&&e.toString()===t.toString(),mn=t=>{const e=_t.innerParams.get(t);t.disableButtons(),e.input?fn(t,"confirm"):Cn(t,!0)},gn=t=>{const e=_t.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?fn(t,"deny"):yn(t,!1)},hn=(t,e)=>{t.disableButtons(),e(Ce.cancel)},fn=(t,n)=>{const o=_t.innerParams.get(t);if(!o.input)return i('The "input" parameter is needed to be set when using returnInputValueOn'.concat(e(n)));const s=on(t,o);o.inputValidator?bn(t,s,n):t.getInput().checkValidity()?"deny"===n?yn(t,s):Cn(t,s):(t.enableButtons(),t.showValidationMessage(o.validationMessage))},bn=(t,e,n)=>{const o=_t.innerParams.get(t);t.disableInput(),Promise.resolve().then((()=>u(o.inputValidator(e,o.validationMessage)))).then((o=>{t.enableButtons(),t.enableInput(),o?t.showValidationMessage(o):"deny"===n?yn(t,e):Cn(t,e)}))},yn=(t,e)=>{const n=_t.innerParams.get(t||void 0);n.showLoaderOnDeny&&tn(V()),n.preDeny?(_t.awaitingPromise.set(t||void 0,!0),Promise.resolve().then((()=>u(n.preDeny(e,n.validationMessage)))).then((n=>{!1===n?t.hideLoading():t.closePopup({isDenied:!0,value:void 0===n?e:n})})).catch((e=>vn(t||void 0,e)))):t.closePopup({isDenied:!0,value:e})},wn=(t,e)=>{t.closePopup({isConfirmed:!0,value:e})},vn=(t,e)=>{t.rejectPromise(e)},Cn=(t,e)=>{const n=_t.innerParams.get(t||void 0);n.showLoaderOnConfirm&&tn(),n.preConfirm?(t.resetValidationMessage(),_t.awaitingPromise.set(t||void 0,!0),Promise.resolve().then((()=>u(n.preConfirm(e,n.validationMessage)))).then((n=>{mt(H())||!1===n?t.hideLoading():wn(t,void 0===n?e:n)})).catch((e=>vn(t||void 0,e)))):wn(t,e)},kn=(t,e,n)=>{_t.innerParams.get(t).toast?An(t,e,n):(xn(e),En(e),Tn(t,e,n))},An=(t,e,n)=>{e.popup.onclick=()=>{const e=_t.innerParams.get(t);e&&(Pn(e)||e.timer||e.input)||n(Ce.close)}},Pn=t=>t.showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton;let Bn=!1;const xn=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&(Bn=!0)}}},En=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,(e.target===t.popup||t.popup.contains(e.target))&&(Bn=!0)}}},Tn=(t,e,n)=>{e.container.onclick=o=>{const i=_t.innerParams.get(t);Bn?Bn=!1:o.target===e.container&&c(i.allowOutsideClick)&&n(Ce.backdrop)}},Sn=()=>mt(O()),On=()=>q()&&q().click(),Ln=()=>V()&&V().click(),jn=()=>F()&&F().click(),Mn=(t,e,n,o)=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1),n.toast||(e.keydownHandler=e=>qn(t,e,o),e.keydownTarget=n.keydownListenerCapture?window:O(),e.keydownListenerCapture=n.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)},Dn=(t,e,n)=>{const o=$();if(o.length)return(e+=n)===o.length?e=0:-1===e&&(e=o.length-1),o[e].focus();O().focus()},In=["ArrowRight","ArrowDown"],Hn=["ArrowLeft","ArrowUp"],qn=(t,e,n)=>{const o=_t.innerParams.get(t);o&&(o.stopKeydownPropagation&&e.stopPropagation(),"Enter"===e.key?Vn(t,e,o):"Tab"===e.key?Nn(e,o):[...In,...Hn].includes(e.key)?Rn(e.key):"Escape"===e.key&&Fn(e,o,n))},Vn=(t,e,n)=>{if(c(n.allowEnterKey)&&!e.isComposing&&e.target&&t.getInput()&&e.target.outerHTML===t.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;On(),e.preventDefault()}},Nn=(t,e)=>{const n=t.target,o=$();let i=-1;for(let s=0;s<o.length;s++)if(n===o[s]){i=s;break}t.shiftKey?Dn(e,i,-1):Dn(e,i,1),t.stopPropagation(),t.preventDefault()},Rn=t=>{if(![q(),V(),F()].includes(document.activeElement))return;const e=In.includes(t)?"nextElementSibling":"previousElementSibling",n=document.activeElement[e];n instanceof HTMLElement&&n.focus()},Fn=(t,e,n)=>{c(e.allowEscapeKey)&&(t.preventDefault(),n(Ce.esc))},Un=t=>"object"==typeof t&&t.jquery,Wn=t=>t instanceof Element||Un(t),zn=t=>{const e={};return"object"!=typeof t[0]||Wn(t[0])?["title","html","icon"].forEach(((n,o)=>{const s=t[o];"string"==typeof s||Wn(s)?e[n]=s:void 0!==s&&i("Unexpected type of ".concat(n,'! Expected "string" or "Element", got ').concat(typeof s))})):Object.assign(e,t[0]),e};function _n(){const t=this;for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return new t(...n)}function Kn(t){class e extends(this){_main(e,n){return super._main(e,Object.assign({},t,n))}}return e}const $n=()=>Ct.timeout&&Ct.timeout.getTimerLeft(),Yn=()=>{if(Ct.timeout)return yt(),Ct.timeout.stop()},Zn=()=>{if(Ct.timeout){const t=Ct.timeout.start();return bt(t),t}},Jn=()=>{const t=Ct.timeout;return t&&(t.running?Yn():Zn())},Xn=t=>{if(Ct.timeout){const e=Ct.timeout.increase(t);return bt(e,!0),e}},Gn=()=>Ct.timeout&&Ct.timeout.isRunning();let Qn=!1;const to={};function eo(){to[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,Qn||(document.body.addEventListener("click",no),Qn=!0)}const no=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const t in to){const n=e.getAttribute(t);if(n)return void to[t].fire({template:n})}};var oo=Object.freeze({isValidParameter:f,isUpdatableParameter:b,isDeprecatedParameter:y,argsToParams:zn,isVisible:Sn,clickConfirm:On,clickDeny:Ln,clickCancel:jn,getContainer:E,getPopup:O,getTitle:j,getHtmlContainer:M,getImage:D,getIcon:L,getInputLabel:N,getCloseButton:_,getActions:U,getConfirmButton:q,getDenyButton:V,getCancelButton:F,getLoader:R,getFooter:W,getTimerProgressBar:z,getFocusableElements:$,getValidationMessage:H,isLoading:J,fire:_n,mixin:Kn,showLoading:tn,enableLoading:tn,getTimerLeft:$n,stopTimer:Yn,resumeTimer:Zn,toggleTimer:Jn,increaseTimer:Xn,isTimerRunning:Gn,bindClickHandler:eo});function io(){const t=_t.innerParams.get(this);if(!t)return;const e=_t.domCache.get(this);ut(e.loader),Z()?t.icon&<(L()):so(e),rt([e.popup,e.actions],B.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.denyButton.disabled=!1,e.cancelButton.disabled=!1}const so=t=>{const e=t.popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"));e.length?lt(e[0],"inline-block"):gt()&&ut(t.actions)};function ro(t){const e=_t.innerParams.get(t||this),n=_t.domCache.get(t||this);return n?nt(n.popup,e.input):null}var ao={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};function co(t,e,n,o){Z()?wo(t,o):(At(n).then((()=>wo(t,o))),Ct.keydownTarget.removeEventListener("keydown",Ct.keydownHandler,{capture:Ct.keydownListenerCapture}),Ct.keydownHandlerAdded=!1),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(e.setAttribute("style","display:none !important"),e.removeAttribute("class"),e.innerHTML=""):e.remove(),Y()&&(Re(),$e(),Ae()),lo()}function lo(){rt([document.documentElement,document.body],[B.shown,B["height-auto"],B["no-backdrop"],B["toast-shown"]])}function uo(t){t=fo(t);const e=ao.swalPromiseResolve.get(this),n=mo(this);this.isAwaitingPromise()?t.isDismissed||(ho(this),e(t)):n&&e(t)}function po(){return!!_t.awaitingPromise.get(this)}const mo=t=>{const e=O();if(!e)return!1;const n=_t.innerParams.get(t);if(!n||Q(e,n.hideClass.popup))return!1;rt(e,n.showClass.popup),st(e,n.hideClass.popup);const o=E();return rt(o,n.showClass.backdrop),st(o,n.hideClass.backdrop),bo(t,e,n),!0};function go(t){const e=ao.swalPromiseReject.get(this);ho(this),e&&e(t)}const ho=t=>{t.isAwaitingPromise()&&(_t.awaitingPromise.delete(t),_t.innerParams.get(t)||t._destroy())},fo=t=>void 0===t?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},t),bo=(t,e,n)=>{const o=E(),i=It&&ft(e);"function"==typeof n.willClose&&n.willClose(e),i?yo(t,e,o,n.returnFocus,n.didClose):co(t,o,n.returnFocus,n.didClose)},yo=(t,e,n,o,i)=>{Ct.swalCloseEventFinishedCallback=co.bind(null,t,n,o,i),e.addEventListener(It,(function(t){t.target===e&&(Ct.swalCloseEventFinishedCallback(),delete Ct.swalCloseEventFinishedCallback)}))},wo=(t,e)=>{setTimeout((()=>{"function"==typeof e&&e.bind(t.params)(),t._destroy()}))};function vo(t,e,n){const o=_t.domCache.get(t);e.forEach((t=>{o[t].disabled=n}))}function Co(t,e){if(!t)return!1;if("radio"===t.type){const n=t.parentNode.parentNode.querySelectorAll("input");for(let t=0;t<n.length;t++)n[t].disabled=e}else t.disabled=e}function ko(){vo(this,["confirmButton","denyButton","cancelButton"],!1)}function Ao(){vo(this,["confirmButton","denyButton","cancelButton"],!0)}function Po(){return Co(this.getInput(),!1)}function Bo(){return Co(this.getInput(),!0)}function xo(t){const e=_t.domCache.get(this),n=_t.innerParams.get(this);G(e.validationMessage,t),e.validationMessage.className=B["validation-message"],n.customClass&&n.customClass.validationMessage&&st(e.validationMessage,n.customClass.validationMessage),lt(e.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",B["validation-message"]),ot(o),st(o,B.inputerror))}function Eo(){const t=_t.domCache.get(this);t.validationMessage&&ut(t.validationMessage);const e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedby"),rt(e,B.inputerror))}function To(){return _t.domCache.get(this).progressSteps}function So(t){const e=O(),n=_t.innerParams.get(this);if(!e||Q(e,n.hideClass.popup))return o("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const i=Oo(t),s=Object.assign({},n,i);ve(this,s),_t.innerParams.set(this,s),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})}const Oo=t=>{const e={};return Object.keys(t).forEach((n=>{b(n)?e[n]=t[n]:o('Invalid parameter to update: "'.concat(n,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))})),e};function Lo(){const t=_t.domCache.get(this),e=_t.innerParams.get(this);e?(t.popup&&Ct.swalCloseEventFinishedCallback&&(Ct.swalCloseEventFinishedCallback(),delete Ct.swalCloseEventFinishedCallback),Ct.deferDisposalTimer&&(clearTimeout(Ct.deferDisposalTimer),delete Ct.deferDisposalTimer),"function"==typeof e.didDestroy&&e.didDestroy(),jo(this)):Mo(this)}const jo=t=>{Mo(t),delete t.params,delete Ct.keydownHandler,delete Ct.keydownTarget,delete Ct.currentInstance},Mo=t=>{t.isAwaitingPromise()?(Do(_t,t),_t.awaitingPromise.set(t,!0)):(Do(ao,t),Do(_t,t))},Do=(t,e)=>{for(const n in t)t[n].delete(e)};var Io=Object.freeze({hideLoading:io,disableLoading:io,getInput:ro,close:uo,isAwaitingPromise:po,rejectPromise:go,closePopup:uo,closeModal:uo,closeToast:uo,enableButtons:ko,disableButtons:Ao,enableInput:Po,disableInput:Bo,showValidationMessage:xo,resetValidationMessage:Eo,getProgressSteps:To,update:So,_destroy:Lo});let Ho;class qo{constructor(){if("undefined"==typeof window)return;Ho=this;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];const o=Object.freeze(this.constructor.argsToParams(e));Object.defineProperties(this,{params:{value:o,writable:!1,enumerable:!0,configurable:!0}});const i=this._main(this.params);_t.promise.set(this,i)}_main(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};k(Object.assign({},e,t)),Ct.currentInstance&&(Ct.currentInstance._destroy(),Y()&&Ae()),Ct.currentInstance=this;const n=No(t,e);qe(n),Object.freeze(n),Ct.timeout&&(Ct.timeout.stop(),delete Ct.timeout),clearTimeout(Ct.restoreFocusTimeout);const o=Ro(this);return ve(this,n),_t.innerParams.set(this,n),Vo(this,o,n)}then(t){return _t.promise.get(this).then(t)}finally(t){return _t.promise.get(this).finally(t)}}const Vo=(t,e,n)=>new Promise(((o,i)=>{const s=e=>{t.closePopup({isDismissed:!0,dismiss:e})};ao.swalPromiseResolve.set(t,o),ao.swalPromiseReject.set(t,i),e.confirmButton.onclick=()=>mn(t),e.denyButton.onclick=()=>gn(t),e.cancelButton.onclick=()=>hn(t,s),e.closeButton.onclick=()=>s(Ce.close),kn(t,e,s),Mn(t,Ct,n,s),nn(t,n),Ze(n),Fo(Ct,n,s),Uo(e,n),setTimeout((()=>{e.container.scrollTop=0}))})),No=(t,e)=>{const n=Be(t),o=Object.assign({},p,e,n,t);return o.showClass=Object.assign({},p.showClass,o.showClass),o.hideClass=Object.assign({},p.hideClass,o.hideClass),o},Ro=t=>{const e={popup:O(),container:E(),actions:U(),confirmButton:q(),denyButton:V(),cancelButton:F(),loader:R(),closeButton:_(),validationMessage:H(),progressSteps:I()};return _t.domCache.set(t,e),e},Fo=(t,e,n)=>{const o=z();ut(o),e.timer&&(t.timeout=new Ve((()=>{n("timer"),delete t.timeout}),e.timer),e.timerProgressBar&&(lt(o),et(o,e,"timerProgressBar"),setTimeout((()=>{t.timeout&&t.timeout.running&&bt(e.timer)}))))},Uo=(t,e)=>{if(!e.toast)return c(e.allowEnterKey)?void(Wo(t,e)||Dn(e,-1,1)):zo()},Wo=(t,e)=>e.focusDeny&&mt(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&mt(t.cancelButton)?(t.cancelButton.focus(),!0):!(!e.focusConfirm||!mt(t.confirmButton)||(t.confirmButton.focus(),0)),zo=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};Object.assign(qo.prototype,Io),Object.assign(qo,oo),Object.keys(Io).forEach((t=>{qo[t]=function(){if(Ho)return Ho[t](...arguments)}})),qo.DismissReason=Ce,qo.version="11.4.0";const _o=qo;return _o.default=_o,_o}(),void 0!==t&&t.Sweetalert2&&(t.swal=t.sweetAlert=t.Swal=t.SweetAlert=t.Sweetalert2);var n=e.exports;return class{static install(t,e={}){var o;const i=n.mixin(e),s=function(...t){return i.fire.call(i,...t)};Object.assign(s,n),Object.keys(n).filter((t=>"function"==typeof n[t])).forEach((t=>{s[t]=i[t].bind(i)})),(null==(o=t.config)?void 0:o.globalProperties)&&!t.config.globalProperties.$swal?(t.config.globalProperties.$swal=s,t.provide("$swal",s)):Object.prototype.hasOwnProperty.call(t,"$swal")||(t.prototype.$swal=s,t.swal=s)}}}));
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/vue/dist/vue.esm-bundler.js":
|
|
/*!**************************************************!*\
|
|
!*** ./node_modules/vue/dist/vue.esm-bundler.js ***!
|
|
\**************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ BaseTransition: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.BaseTransition),
|
|
/* harmony export */ BaseTransitionPropsValidators: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.BaseTransitionPropsValidators),
|
|
/* harmony export */ Comment: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.Comment),
|
|
/* harmony export */ EffectScope: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.EffectScope),
|
|
/* harmony export */ Fragment: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.Fragment),
|
|
/* harmony export */ KeepAlive: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.KeepAlive),
|
|
/* harmony export */ ReactiveEffect: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.ReactiveEffect),
|
|
/* harmony export */ Static: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.Static),
|
|
/* harmony export */ Suspense: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.Suspense),
|
|
/* harmony export */ Teleport: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.Teleport),
|
|
/* harmony export */ Text: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.Text),
|
|
/* harmony export */ Transition: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.Transition),
|
|
/* harmony export */ TransitionGroup: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.TransitionGroup),
|
|
/* harmony export */ VueElement: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.VueElement),
|
|
/* harmony export */ assertNumber: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.assertNumber),
|
|
/* harmony export */ callWithAsyncErrorHandling: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.callWithAsyncErrorHandling),
|
|
/* harmony export */ callWithErrorHandling: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.callWithErrorHandling),
|
|
/* harmony export */ camelize: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.camelize),
|
|
/* harmony export */ capitalize: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.capitalize),
|
|
/* harmony export */ cloneVNode: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.cloneVNode),
|
|
/* harmony export */ compatUtils: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.compatUtils),
|
|
/* harmony export */ compile: () => (/* binding */ compileToFunction),
|
|
/* harmony export */ computed: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.computed),
|
|
/* harmony export */ createApp: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createApp),
|
|
/* harmony export */ createBlock: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createBlock),
|
|
/* harmony export */ createCommentVNode: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode),
|
|
/* harmony export */ createElementBlock: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createElementBlock),
|
|
/* harmony export */ createElementVNode: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createElementVNode),
|
|
/* harmony export */ createHydrationRenderer: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createHydrationRenderer),
|
|
/* harmony export */ createPropsRestProxy: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createPropsRestProxy),
|
|
/* harmony export */ createRenderer: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createRenderer),
|
|
/* harmony export */ createSSRApp: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createSSRApp),
|
|
/* harmony export */ createSlots: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createSlots),
|
|
/* harmony export */ createStaticVNode: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createStaticVNode),
|
|
/* harmony export */ createTextVNode: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createTextVNode),
|
|
/* harmony export */ createVNode: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createVNode),
|
|
/* harmony export */ customRef: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.customRef),
|
|
/* harmony export */ defineAsyncComponent: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineAsyncComponent),
|
|
/* harmony export */ defineComponent: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineComponent),
|
|
/* harmony export */ defineCustomElement: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineCustomElement),
|
|
/* harmony export */ defineEmits: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineEmits),
|
|
/* harmony export */ defineExpose: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineExpose),
|
|
/* harmony export */ defineModel: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineModel),
|
|
/* harmony export */ defineOptions: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineOptions),
|
|
/* harmony export */ defineProps: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineProps),
|
|
/* harmony export */ defineSSRCustomElement: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineSSRCustomElement),
|
|
/* harmony export */ defineSlots: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineSlots),
|
|
/* harmony export */ devtools: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.devtools),
|
|
/* harmony export */ effect: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.effect),
|
|
/* harmony export */ effectScope: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.effectScope),
|
|
/* harmony export */ getCurrentInstance: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance),
|
|
/* harmony export */ getCurrentScope: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.getCurrentScope),
|
|
/* harmony export */ getTransitionRawChildren: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.getTransitionRawChildren),
|
|
/* harmony export */ guardReactiveProps: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps),
|
|
/* harmony export */ h: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.h),
|
|
/* harmony export */ handleError: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.handleError),
|
|
/* harmony export */ hasInjectionContext: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.hasInjectionContext),
|
|
/* harmony export */ hydrate: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.hydrate),
|
|
/* harmony export */ initCustomFormatter: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.initCustomFormatter),
|
|
/* harmony export */ initDirectivesForSSR: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.initDirectivesForSSR),
|
|
/* harmony export */ inject: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.inject),
|
|
/* harmony export */ isMemoSame: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isMemoSame),
|
|
/* harmony export */ isProxy: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isProxy),
|
|
/* harmony export */ isReactive: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isReactive),
|
|
/* harmony export */ isReadonly: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isReadonly),
|
|
/* harmony export */ isRef: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isRef),
|
|
/* harmony export */ isRuntimeOnly: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isRuntimeOnly),
|
|
/* harmony export */ isShallow: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isShallow),
|
|
/* harmony export */ isVNode: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isVNode),
|
|
/* harmony export */ markRaw: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.markRaw),
|
|
/* harmony export */ mergeDefaults: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.mergeDefaults),
|
|
/* harmony export */ mergeModels: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.mergeModels),
|
|
/* harmony export */ mergeProps: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.mergeProps),
|
|
/* harmony export */ nextTick: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.nextTick),
|
|
/* harmony export */ normalizeClass: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.normalizeClass),
|
|
/* harmony export */ normalizeProps: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.normalizeProps),
|
|
/* harmony export */ normalizeStyle: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle),
|
|
/* harmony export */ onActivated: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onActivated),
|
|
/* harmony export */ onBeforeMount: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onBeforeMount),
|
|
/* harmony export */ onBeforeUnmount: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onBeforeUnmount),
|
|
/* harmony export */ onBeforeUpdate: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onBeforeUpdate),
|
|
/* harmony export */ onDeactivated: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onDeactivated),
|
|
/* harmony export */ onErrorCaptured: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onErrorCaptured),
|
|
/* harmony export */ onMounted: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onMounted),
|
|
/* harmony export */ onRenderTracked: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onRenderTracked),
|
|
/* harmony export */ onRenderTriggered: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onRenderTriggered),
|
|
/* harmony export */ onScopeDispose: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onScopeDispose),
|
|
/* harmony export */ onServerPrefetch: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onServerPrefetch),
|
|
/* harmony export */ onUnmounted: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onUnmounted),
|
|
/* harmony export */ onUpdated: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onUpdated),
|
|
/* harmony export */ openBlock: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.openBlock),
|
|
/* harmony export */ popScopeId: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.popScopeId),
|
|
/* harmony export */ provide: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.provide),
|
|
/* harmony export */ proxyRefs: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.proxyRefs),
|
|
/* harmony export */ pushScopeId: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.pushScopeId),
|
|
/* harmony export */ queuePostFlushCb: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.queuePostFlushCb),
|
|
/* harmony export */ reactive: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.reactive),
|
|
/* harmony export */ readonly: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.readonly),
|
|
/* harmony export */ ref: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.ref),
|
|
/* harmony export */ registerRuntimeCompiler: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.registerRuntimeCompiler),
|
|
/* harmony export */ render: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.render),
|
|
/* harmony export */ renderList: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.renderList),
|
|
/* harmony export */ renderSlot: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.renderSlot),
|
|
/* harmony export */ resolveComponent: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.resolveComponent),
|
|
/* harmony export */ resolveDirective: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.resolveDirective),
|
|
/* harmony export */ resolveDynamicComponent: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.resolveDynamicComponent),
|
|
/* harmony export */ resolveFilter: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.resolveFilter),
|
|
/* harmony export */ resolveTransitionHooks: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.resolveTransitionHooks),
|
|
/* harmony export */ setBlockTracking: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.setBlockTracking),
|
|
/* harmony export */ setDevtoolsHook: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.setDevtoolsHook),
|
|
/* harmony export */ setTransitionHooks: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.setTransitionHooks),
|
|
/* harmony export */ shallowReactive: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.shallowReactive),
|
|
/* harmony export */ shallowReadonly: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly),
|
|
/* harmony export */ shallowRef: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.shallowRef),
|
|
/* harmony export */ ssrContextKey: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.ssrContextKey),
|
|
/* harmony export */ ssrUtils: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.ssrUtils),
|
|
/* harmony export */ stop: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.stop),
|
|
/* harmony export */ toDisplayString: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.toDisplayString),
|
|
/* harmony export */ toHandlerKey: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.toHandlerKey),
|
|
/* harmony export */ toHandlers: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.toHandlers),
|
|
/* harmony export */ toRaw: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.toRaw),
|
|
/* harmony export */ toRef: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.toRef),
|
|
/* harmony export */ toRefs: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.toRefs),
|
|
/* harmony export */ toValue: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.toValue),
|
|
/* harmony export */ transformVNodeArgs: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.transformVNodeArgs),
|
|
/* harmony export */ triggerRef: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.triggerRef),
|
|
/* harmony export */ unref: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.unref),
|
|
/* harmony export */ useAttrs: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.useAttrs),
|
|
/* harmony export */ useCssModule: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.useCssModule),
|
|
/* harmony export */ useCssVars: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.useCssVars),
|
|
/* harmony export */ useModel: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.useModel),
|
|
/* harmony export */ useSSRContext: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.useSSRContext),
|
|
/* harmony export */ useSlots: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.useSlots),
|
|
/* harmony export */ useTransitionState: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.useTransitionState),
|
|
/* harmony export */ vModelCheckbox: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.vModelCheckbox),
|
|
/* harmony export */ vModelDynamic: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.vModelDynamic),
|
|
/* harmony export */ vModelRadio: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.vModelRadio),
|
|
/* harmony export */ vModelSelect: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.vModelSelect),
|
|
/* harmony export */ vModelText: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.vModelText),
|
|
/* harmony export */ vShow: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.vShow),
|
|
/* harmony export */ version: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.version),
|
|
/* harmony export */ warn: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.warn),
|
|
/* harmony export */ watch: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.watch),
|
|
/* harmony export */ watchEffect: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.watchEffect),
|
|
/* harmony export */ watchPostEffect: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.watchPostEffect),
|
|
/* harmony export */ watchSyncEffect: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.watchSyncEffect),
|
|
/* harmony export */ withAsyncContext: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withAsyncContext),
|
|
/* harmony export */ withCtx: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withCtx),
|
|
/* harmony export */ withDefaults: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withDefaults),
|
|
/* harmony export */ withDirectives: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withDirectives),
|
|
/* harmony export */ withKeys: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withKeys),
|
|
/* harmony export */ withMemo: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withMemo),
|
|
/* harmony export */ withModifiers: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withModifiers),
|
|
/* harmony export */ withScopeId: () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withScopeId)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/runtime-dom */ "./node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js");
|
|
/* harmony import */ var _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/runtime-dom */ "./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js");
|
|
/* harmony import */ var _vue_compiler_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @vue/compiler-dom */ "./node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js");
|
|
/* harmony import */ var _vue_shared__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @vue/shared */ "./node_modules/@vue/shared/dist/shared.esm-bundler.js");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function initDev() {
|
|
{
|
|
(0,_vue_runtime_dom__WEBPACK_IMPORTED_MODULE_1__.initCustomFormatter)();
|
|
}
|
|
}
|
|
|
|
if (true) {
|
|
initDev();
|
|
}
|
|
const compileCache = /* @__PURE__ */ Object.create(null);
|
|
function compileToFunction(template, options) {
|
|
if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_2__.isString)(template)) {
|
|
if (template.nodeType) {
|
|
template = template.innerHTML;
|
|
} else {
|
|
true && (0,_vue_runtime_dom__WEBPACK_IMPORTED_MODULE_1__.warn)(`invalid template option: `, template);
|
|
return _vue_shared__WEBPACK_IMPORTED_MODULE_2__.NOOP;
|
|
}
|
|
}
|
|
const key = template;
|
|
const cached = compileCache[key];
|
|
if (cached) {
|
|
return cached;
|
|
}
|
|
if (template[0] === "#") {
|
|
const el = document.querySelector(template);
|
|
if ( true && !el) {
|
|
(0,_vue_runtime_dom__WEBPACK_IMPORTED_MODULE_1__.warn)(`Template element not found or is empty: ${template}`);
|
|
}
|
|
template = el ? el.innerHTML : ``;
|
|
}
|
|
const opts = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_2__.extend)(
|
|
{
|
|
hoistStatic: true,
|
|
onError: true ? onError : 0,
|
|
onWarn: true ? (e) => onError(e, true) : 0
|
|
},
|
|
options
|
|
);
|
|
if (!opts.isCustomElement && typeof customElements !== "undefined") {
|
|
opts.isCustomElement = (tag) => !!customElements.get(tag);
|
|
}
|
|
const { code } = (0,_vue_compiler_dom__WEBPACK_IMPORTED_MODULE_3__.compile)(template, opts);
|
|
function onError(err, asWarning = false) {
|
|
const message = asWarning ? err.message : `Template compilation error: ${err.message}`;
|
|
const codeFrame = err.loc && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_2__.generateCodeFrame)(
|
|
template,
|
|
err.loc.start.offset,
|
|
err.loc.end.offset
|
|
);
|
|
(0,_vue_runtime_dom__WEBPACK_IMPORTED_MODULE_1__.warn)(codeFrame ? `${message}
|
|
${codeFrame}` : message);
|
|
}
|
|
const render = new Function("Vue", code)(_vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__);
|
|
render._rc = true;
|
|
return compileCache[key] = render;
|
|
}
|
|
(0,_vue_runtime_dom__WEBPACK_IMPORTED_MODULE_1__.registerRuntimeCompiler)(compileToFunction);
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/vuex/dist/vuex.esm-bundler.js":
|
|
/*!****************************************************!*\
|
|
!*** ./node_modules/vuex/dist/vuex.esm-bundler.js ***!
|
|
\****************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Store: () => (/* binding */ Store),
|
|
/* harmony export */ createLogger: () => (/* binding */ createLogger),
|
|
/* harmony export */ createNamespacedHelpers: () => (/* binding */ createNamespacedHelpers),
|
|
/* harmony export */ createStore: () => (/* binding */ createStore),
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
/* harmony export */ mapActions: () => (/* binding */ mapActions),
|
|
/* harmony export */ mapGetters: () => (/* binding */ mapGetters),
|
|
/* harmony export */ mapMutations: () => (/* binding */ mapMutations),
|
|
/* harmony export */ mapState: () => (/* binding */ mapState),
|
|
/* harmony export */ storeKey: () => (/* binding */ storeKey),
|
|
/* harmony export */ useStore: () => (/* binding */ useStore)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
/* harmony import */ var _vue_devtools_api__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/devtools-api */ "./node_modules/@vue/devtools-api/lib/esm/index.js");
|
|
/*!
|
|
* vuex v4.1.0
|
|
* (c) 2022 Evan You
|
|
* @license MIT
|
|
*/
|
|
|
|
|
|
|
|
var storeKey = 'store';
|
|
|
|
function useStore (key) {
|
|
if ( key === void 0 ) key = null;
|
|
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)(key !== null ? key : storeKey)
|
|
}
|
|
|
|
/**
|
|
* Get the first item that pass the test
|
|
* by second argument function
|
|
*
|
|
* @param {Array} list
|
|
* @param {Function} f
|
|
* @return {*}
|
|
*/
|
|
function find (list, f) {
|
|
return list.filter(f)[0]
|
|
}
|
|
|
|
/**
|
|
* Deep copy the given object considering circular structure.
|
|
* This function caches all nested objects and its copies.
|
|
* If it detects circular structure, use cached copy to avoid infinite loop.
|
|
*
|
|
* @param {*} obj
|
|
* @param {Array<Object>} cache
|
|
* @return {*}
|
|
*/
|
|
function deepCopy (obj, cache) {
|
|
if ( cache === void 0 ) cache = [];
|
|
|
|
// just return if obj is immutable value
|
|
if (obj === null || typeof obj !== 'object') {
|
|
return obj
|
|
}
|
|
|
|
// if obj is hit, it is in circular structure
|
|
var hit = find(cache, function (c) { return c.original === obj; });
|
|
if (hit) {
|
|
return hit.copy
|
|
}
|
|
|
|
var copy = Array.isArray(obj) ? [] : {};
|
|
// put the copy into cache at first
|
|
// because we want to refer it in recursive deepCopy
|
|
cache.push({
|
|
original: obj,
|
|
copy: copy
|
|
});
|
|
|
|
Object.keys(obj).forEach(function (key) {
|
|
copy[key] = deepCopy(obj[key], cache);
|
|
});
|
|
|
|
return copy
|
|
}
|
|
|
|
/**
|
|
* forEach for object
|
|
*/
|
|
function forEachValue (obj, fn) {
|
|
Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
|
|
}
|
|
|
|
function isObject (obj) {
|
|
return obj !== null && typeof obj === 'object'
|
|
}
|
|
|
|
function isPromise (val) {
|
|
return val && typeof val.then === 'function'
|
|
}
|
|
|
|
function assert (condition, msg) {
|
|
if (!condition) { throw new Error(("[vuex] " + msg)) }
|
|
}
|
|
|
|
function partial (fn, arg) {
|
|
return function () {
|
|
return fn(arg)
|
|
}
|
|
}
|
|
|
|
function genericSubscribe (fn, subs, options) {
|
|
if (subs.indexOf(fn) < 0) {
|
|
options && options.prepend
|
|
? subs.unshift(fn)
|
|
: subs.push(fn);
|
|
}
|
|
return function () {
|
|
var i = subs.indexOf(fn);
|
|
if (i > -1) {
|
|
subs.splice(i, 1);
|
|
}
|
|
}
|
|
}
|
|
|
|
function resetStore (store, hot) {
|
|
store._actions = Object.create(null);
|
|
store._mutations = Object.create(null);
|
|
store._wrappedGetters = Object.create(null);
|
|
store._modulesNamespaceMap = Object.create(null);
|
|
var state = store.state;
|
|
// init all modules
|
|
installModule(store, state, [], store._modules.root, true);
|
|
// reset state
|
|
resetStoreState(store, state, hot);
|
|
}
|
|
|
|
function resetStoreState (store, state, hot) {
|
|
var oldState = store._state;
|
|
var oldScope = store._scope;
|
|
|
|
// bind store public getters
|
|
store.getters = {};
|
|
// reset local getters cache
|
|
store._makeLocalGettersCache = Object.create(null);
|
|
var wrappedGetters = store._wrappedGetters;
|
|
var computedObj = {};
|
|
var computedCache = {};
|
|
|
|
// create a new effect scope and create computed object inside it to avoid
|
|
// getters (computed) getting destroyed on component unmount.
|
|
var scope = (0,vue__WEBPACK_IMPORTED_MODULE_0__.effectScope)(true);
|
|
|
|
scope.run(function () {
|
|
forEachValue(wrappedGetters, function (fn, key) {
|
|
// use computed to leverage its lazy-caching mechanism
|
|
// direct inline function use will lead to closure preserving oldState.
|
|
// using partial to return function with only arguments preserved in closure environment.
|
|
computedObj[key] = partial(fn, store);
|
|
computedCache[key] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(function () { return computedObj[key](); });
|
|
Object.defineProperty(store.getters, key, {
|
|
get: function () { return computedCache[key].value; },
|
|
enumerable: true // for local getters
|
|
});
|
|
});
|
|
});
|
|
|
|
store._state = (0,vue__WEBPACK_IMPORTED_MODULE_0__.reactive)({
|
|
data: state
|
|
});
|
|
|
|
// register the newly created effect scope to the store so that we can
|
|
// dispose the effects when this method runs again in the future.
|
|
store._scope = scope;
|
|
|
|
// enable strict mode for new state
|
|
if (store.strict) {
|
|
enableStrictMode(store);
|
|
}
|
|
|
|
if (oldState) {
|
|
if (hot) {
|
|
// dispatch changes in all subscribed watchers
|
|
// to force getter re-evaluation for hot reloading.
|
|
store._withCommit(function () {
|
|
oldState.data = null;
|
|
});
|
|
}
|
|
}
|
|
|
|
// dispose previously registered effect scope if there is one.
|
|
if (oldScope) {
|
|
oldScope.stop();
|
|
}
|
|
}
|
|
|
|
function installModule (store, rootState, path, module, hot) {
|
|
var isRoot = !path.length;
|
|
var namespace = store._modules.getNamespace(path);
|
|
|
|
// register in namespace map
|
|
if (module.namespaced) {
|
|
if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
|
|
console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
|
|
}
|
|
store._modulesNamespaceMap[namespace] = module;
|
|
}
|
|
|
|
// set state
|
|
if (!isRoot && !hot) {
|
|
var parentState = getNestedState(rootState, path.slice(0, -1));
|
|
var moduleName = path[path.length - 1];
|
|
store._withCommit(function () {
|
|
if ((true)) {
|
|
if (moduleName in parentState) {
|
|
console.warn(
|
|
("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
|
|
);
|
|
}
|
|
}
|
|
parentState[moduleName] = module.state;
|
|
});
|
|
}
|
|
|
|
var local = module.context = makeLocalContext(store, namespace, path);
|
|
|
|
module.forEachMutation(function (mutation, key) {
|
|
var namespacedType = namespace + key;
|
|
registerMutation(store, namespacedType, mutation, local);
|
|
});
|
|
|
|
module.forEachAction(function (action, key) {
|
|
var type = action.root ? key : namespace + key;
|
|
var handler = action.handler || action;
|
|
registerAction(store, type, handler, local);
|
|
});
|
|
|
|
module.forEachGetter(function (getter, key) {
|
|
var namespacedType = namespace + key;
|
|
registerGetter(store, namespacedType, getter, local);
|
|
});
|
|
|
|
module.forEachChild(function (child, key) {
|
|
installModule(store, rootState, path.concat(key), child, hot);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* make localized dispatch, commit, getters and state
|
|
* if there is no namespace, just use root ones
|
|
*/
|
|
function makeLocalContext (store, namespace, path) {
|
|
var noNamespace = namespace === '';
|
|
|
|
var local = {
|
|
dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
|
|
var args = unifyObjectStyle(_type, _payload, _options);
|
|
var payload = args.payload;
|
|
var options = args.options;
|
|
var type = args.type;
|
|
|
|
if (!options || !options.root) {
|
|
type = namespace + type;
|
|
if (( true) && !store._actions[type]) {
|
|
console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
|
|
return
|
|
}
|
|
}
|
|
|
|
return store.dispatch(type, payload)
|
|
},
|
|
|
|
commit: noNamespace ? store.commit : function (_type, _payload, _options) {
|
|
var args = unifyObjectStyle(_type, _payload, _options);
|
|
var payload = args.payload;
|
|
var options = args.options;
|
|
var type = args.type;
|
|
|
|
if (!options || !options.root) {
|
|
type = namespace + type;
|
|
if (( true) && !store._mutations[type]) {
|
|
console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
|
|
return
|
|
}
|
|
}
|
|
|
|
store.commit(type, payload, options);
|
|
}
|
|
};
|
|
|
|
// getters and state object must be gotten lazily
|
|
// because they will be changed by state update
|
|
Object.defineProperties(local, {
|
|
getters: {
|
|
get: noNamespace
|
|
? function () { return store.getters; }
|
|
: function () { return makeLocalGetters(store, namespace); }
|
|
},
|
|
state: {
|
|
get: function () { return getNestedState(store.state, path); }
|
|
}
|
|
});
|
|
|
|
return local
|
|
}
|
|
|
|
function makeLocalGetters (store, namespace) {
|
|
if (!store._makeLocalGettersCache[namespace]) {
|
|
var gettersProxy = {};
|
|
var splitPos = namespace.length;
|
|
Object.keys(store.getters).forEach(function (type) {
|
|
// skip if the target getter is not match this namespace
|
|
if (type.slice(0, splitPos) !== namespace) { return }
|
|
|
|
// extract local getter type
|
|
var localType = type.slice(splitPos);
|
|
|
|
// Add a port to the getters proxy.
|
|
// Define as getter property because
|
|
// we do not want to evaluate the getters in this time.
|
|
Object.defineProperty(gettersProxy, localType, {
|
|
get: function () { return store.getters[type]; },
|
|
enumerable: true
|
|
});
|
|
});
|
|
store._makeLocalGettersCache[namespace] = gettersProxy;
|
|
}
|
|
|
|
return store._makeLocalGettersCache[namespace]
|
|
}
|
|
|
|
function registerMutation (store, type, handler, local) {
|
|
var entry = store._mutations[type] || (store._mutations[type] = []);
|
|
entry.push(function wrappedMutationHandler (payload) {
|
|
handler.call(store, local.state, payload);
|
|
});
|
|
}
|
|
|
|
function registerAction (store, type, handler, local) {
|
|
var entry = store._actions[type] || (store._actions[type] = []);
|
|
entry.push(function wrappedActionHandler (payload) {
|
|
var res = handler.call(store, {
|
|
dispatch: local.dispatch,
|
|
commit: local.commit,
|
|
getters: local.getters,
|
|
state: local.state,
|
|
rootGetters: store.getters,
|
|
rootState: store.state
|
|
}, payload);
|
|
if (!isPromise(res)) {
|
|
res = Promise.resolve(res);
|
|
}
|
|
if (store._devtoolHook) {
|
|
return res.catch(function (err) {
|
|
store._devtoolHook.emit('vuex:error', err);
|
|
throw err
|
|
})
|
|
} else {
|
|
return res
|
|
}
|
|
});
|
|
}
|
|
|
|
function registerGetter (store, type, rawGetter, local) {
|
|
if (store._wrappedGetters[type]) {
|
|
if ((true)) {
|
|
console.error(("[vuex] duplicate getter key: " + type));
|
|
}
|
|
return
|
|
}
|
|
store._wrappedGetters[type] = function wrappedGetter (store) {
|
|
return rawGetter(
|
|
local.state, // local state
|
|
local.getters, // local getters
|
|
store.state, // root state
|
|
store.getters // root getters
|
|
)
|
|
};
|
|
}
|
|
|
|
function enableStrictMode (store) {
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(function () { return store._state.data; }, function () {
|
|
if ((true)) {
|
|
assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
|
|
}
|
|
}, { deep: true, flush: 'sync' });
|
|
}
|
|
|
|
function getNestedState (state, path) {
|
|
return path.reduce(function (state, key) { return state[key]; }, state)
|
|
}
|
|
|
|
function unifyObjectStyle (type, payload, options) {
|
|
if (isObject(type) && type.type) {
|
|
options = payload;
|
|
payload = type;
|
|
type = type.type;
|
|
}
|
|
|
|
if ((true)) {
|
|
assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
|
|
}
|
|
|
|
return { type: type, payload: payload, options: options }
|
|
}
|
|
|
|
var LABEL_VUEX_BINDINGS = 'vuex bindings';
|
|
var MUTATIONS_LAYER_ID = 'vuex:mutations';
|
|
var ACTIONS_LAYER_ID = 'vuex:actions';
|
|
var INSPECTOR_ID = 'vuex';
|
|
|
|
var actionId = 0;
|
|
|
|
function addDevtools (app, store) {
|
|
(0,_vue_devtools_api__WEBPACK_IMPORTED_MODULE_1__.setupDevtoolsPlugin)(
|
|
{
|
|
id: 'org.vuejs.vuex',
|
|
app: app,
|
|
label: 'Vuex',
|
|
homepage: 'https://next.vuex.vuejs.org/',
|
|
logo: 'https://vuejs.org/images/icons/favicon-96x96.png',
|
|
packageName: 'vuex',
|
|
componentStateTypes: [LABEL_VUEX_BINDINGS]
|
|
},
|
|
function (api) {
|
|
api.addTimelineLayer({
|
|
id: MUTATIONS_LAYER_ID,
|
|
label: 'Vuex Mutations',
|
|
color: COLOR_LIME_500
|
|
});
|
|
|
|
api.addTimelineLayer({
|
|
id: ACTIONS_LAYER_ID,
|
|
label: 'Vuex Actions',
|
|
color: COLOR_LIME_500
|
|
});
|
|
|
|
api.addInspector({
|
|
id: INSPECTOR_ID,
|
|
label: 'Vuex',
|
|
icon: 'storage',
|
|
treeFilterPlaceholder: 'Filter stores...'
|
|
});
|
|
|
|
api.on.getInspectorTree(function (payload) {
|
|
if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
|
|
if (payload.filter) {
|
|
var nodes = [];
|
|
flattenStoreForInspectorTree(nodes, store._modules.root, payload.filter, '');
|
|
payload.rootNodes = nodes;
|
|
} else {
|
|
payload.rootNodes = [
|
|
formatStoreForInspectorTree(store._modules.root, '')
|
|
];
|
|
}
|
|
}
|
|
});
|
|
|
|
api.on.getInspectorState(function (payload) {
|
|
if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
|
|
var modulePath = payload.nodeId;
|
|
makeLocalGetters(store, modulePath);
|
|
payload.state = formatStoreForInspectorState(
|
|
getStoreModule(store._modules, modulePath),
|
|
modulePath === 'root' ? store.getters : store._makeLocalGettersCache,
|
|
modulePath
|
|
);
|
|
}
|
|
});
|
|
|
|
api.on.editInspectorState(function (payload) {
|
|
if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
|
|
var modulePath = payload.nodeId;
|
|
var path = payload.path;
|
|
if (modulePath !== 'root') {
|
|
path = modulePath.split('/').filter(Boolean).concat( path);
|
|
}
|
|
store._withCommit(function () {
|
|
payload.set(store._state.data, path, payload.state.value);
|
|
});
|
|
}
|
|
});
|
|
|
|
store.subscribe(function (mutation, state) {
|
|
var data = {};
|
|
|
|
if (mutation.payload) {
|
|
data.payload = mutation.payload;
|
|
}
|
|
|
|
data.state = state;
|
|
|
|
api.notifyComponentUpdate();
|
|
api.sendInspectorTree(INSPECTOR_ID);
|
|
api.sendInspectorState(INSPECTOR_ID);
|
|
|
|
api.addTimelineEvent({
|
|
layerId: MUTATIONS_LAYER_ID,
|
|
event: {
|
|
time: Date.now(),
|
|
title: mutation.type,
|
|
data: data
|
|
}
|
|
});
|
|
});
|
|
|
|
store.subscribeAction({
|
|
before: function (action, state) {
|
|
var data = {};
|
|
if (action.payload) {
|
|
data.payload = action.payload;
|
|
}
|
|
action._id = actionId++;
|
|
action._time = Date.now();
|
|
data.state = state;
|
|
|
|
api.addTimelineEvent({
|
|
layerId: ACTIONS_LAYER_ID,
|
|
event: {
|
|
time: action._time,
|
|
title: action.type,
|
|
groupId: action._id,
|
|
subtitle: 'start',
|
|
data: data
|
|
}
|
|
});
|
|
},
|
|
after: function (action, state) {
|
|
var data = {};
|
|
var duration = Date.now() - action._time;
|
|
data.duration = {
|
|
_custom: {
|
|
type: 'duration',
|
|
display: (duration + "ms"),
|
|
tooltip: 'Action duration',
|
|
value: duration
|
|
}
|
|
};
|
|
if (action.payload) {
|
|
data.payload = action.payload;
|
|
}
|
|
data.state = state;
|
|
|
|
api.addTimelineEvent({
|
|
layerId: ACTIONS_LAYER_ID,
|
|
event: {
|
|
time: Date.now(),
|
|
title: action.type,
|
|
groupId: action._id,
|
|
subtitle: 'end',
|
|
data: data
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}
|
|
);
|
|
}
|
|
|
|
// extracted from tailwind palette
|
|
var COLOR_LIME_500 = 0x84cc16;
|
|
var COLOR_DARK = 0x666666;
|
|
var COLOR_WHITE = 0xffffff;
|
|
|
|
var TAG_NAMESPACED = {
|
|
label: 'namespaced',
|
|
textColor: COLOR_WHITE,
|
|
backgroundColor: COLOR_DARK
|
|
};
|
|
|
|
/**
|
|
* @param {string} path
|
|
*/
|
|
function extractNameFromPath (path) {
|
|
return path && path !== 'root' ? path.split('/').slice(-2, -1)[0] : 'Root'
|
|
}
|
|
|
|
/**
|
|
* @param {*} module
|
|
* @return {import('@vue/devtools-api').CustomInspectorNode}
|
|
*/
|
|
function formatStoreForInspectorTree (module, path) {
|
|
return {
|
|
id: path || 'root',
|
|
// all modules end with a `/`, we want the last segment only
|
|
// cart/ -> cart
|
|
// nested/cart/ -> cart
|
|
label: extractNameFromPath(path),
|
|
tags: module.namespaced ? [TAG_NAMESPACED] : [],
|
|
children: Object.keys(module._children).map(function (moduleName) { return formatStoreForInspectorTree(
|
|
module._children[moduleName],
|
|
path + moduleName + '/'
|
|
); }
|
|
)
|
|
}
|
|
}
|
|
|
|
/**
|
|
* @param {import('@vue/devtools-api').CustomInspectorNode[]} result
|
|
* @param {*} module
|
|
* @param {string} filter
|
|
* @param {string} path
|
|
*/
|
|
function flattenStoreForInspectorTree (result, module, filter, path) {
|
|
if (path.includes(filter)) {
|
|
result.push({
|
|
id: path || 'root',
|
|
label: path.endsWith('/') ? path.slice(0, path.length - 1) : path || 'Root',
|
|
tags: module.namespaced ? [TAG_NAMESPACED] : []
|
|
});
|
|
}
|
|
Object.keys(module._children).forEach(function (moduleName) {
|
|
flattenStoreForInspectorTree(result, module._children[moduleName], filter, path + moduleName + '/');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* @param {*} module
|
|
* @return {import('@vue/devtools-api').CustomInspectorState}
|
|
*/
|
|
function formatStoreForInspectorState (module, getters, path) {
|
|
getters = path === 'root' ? getters : getters[path];
|
|
var gettersKeys = Object.keys(getters);
|
|
var storeState = {
|
|
state: Object.keys(module.state).map(function (key) { return ({
|
|
key: key,
|
|
editable: true,
|
|
value: module.state[key]
|
|
}); })
|
|
};
|
|
|
|
if (gettersKeys.length) {
|
|
var tree = transformPathsToObjectTree(getters);
|
|
storeState.getters = Object.keys(tree).map(function (key) { return ({
|
|
key: key.endsWith('/') ? extractNameFromPath(key) : key,
|
|
editable: false,
|
|
value: canThrow(function () { return tree[key]; })
|
|
}); });
|
|
}
|
|
|
|
return storeState
|
|
}
|
|
|
|
function transformPathsToObjectTree (getters) {
|
|
var result = {};
|
|
Object.keys(getters).forEach(function (key) {
|
|
var path = key.split('/');
|
|
if (path.length > 1) {
|
|
var target = result;
|
|
var leafKey = path.pop();
|
|
path.forEach(function (p) {
|
|
if (!target[p]) {
|
|
target[p] = {
|
|
_custom: {
|
|
value: {},
|
|
display: p,
|
|
tooltip: 'Module',
|
|
abstract: true
|
|
}
|
|
};
|
|
}
|
|
target = target[p]._custom.value;
|
|
});
|
|
target[leafKey] = canThrow(function () { return getters[key]; });
|
|
} else {
|
|
result[key] = canThrow(function () { return getters[key]; });
|
|
}
|
|
});
|
|
return result
|
|
}
|
|
|
|
function getStoreModule (moduleMap, path) {
|
|
var names = path.split('/').filter(function (n) { return n; });
|
|
return names.reduce(
|
|
function (module, moduleName, i) {
|
|
var child = module[moduleName];
|
|
if (!child) {
|
|
throw new Error(("Missing module \"" + moduleName + "\" for path \"" + path + "\"."))
|
|
}
|
|
return i === names.length - 1 ? child : child._children
|
|
},
|
|
path === 'root' ? moduleMap : moduleMap.root._children
|
|
)
|
|
}
|
|
|
|
function canThrow (cb) {
|
|
try {
|
|
return cb()
|
|
} catch (e) {
|
|
return e
|
|
}
|
|
}
|
|
|
|
// Base data struct for store's module, package with some attribute and method
|
|
var Module = function Module (rawModule, runtime) {
|
|
this.runtime = runtime;
|
|
// Store some children item
|
|
this._children = Object.create(null);
|
|
// Store the origin module object which passed by programmer
|
|
this._rawModule = rawModule;
|
|
var rawState = rawModule.state;
|
|
|
|
// Store the origin module's state
|
|
this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
|
|
};
|
|
|
|
var prototypeAccessors$1 = { namespaced: { configurable: true } };
|
|
|
|
prototypeAccessors$1.namespaced.get = function () {
|
|
return !!this._rawModule.namespaced
|
|
};
|
|
|
|
Module.prototype.addChild = function addChild (key, module) {
|
|
this._children[key] = module;
|
|
};
|
|
|
|
Module.prototype.removeChild = function removeChild (key) {
|
|
delete this._children[key];
|
|
};
|
|
|
|
Module.prototype.getChild = function getChild (key) {
|
|
return this._children[key]
|
|
};
|
|
|
|
Module.prototype.hasChild = function hasChild (key) {
|
|
return key in this._children
|
|
};
|
|
|
|
Module.prototype.update = function update (rawModule) {
|
|
this._rawModule.namespaced = rawModule.namespaced;
|
|
if (rawModule.actions) {
|
|
this._rawModule.actions = rawModule.actions;
|
|
}
|
|
if (rawModule.mutations) {
|
|
this._rawModule.mutations = rawModule.mutations;
|
|
}
|
|
if (rawModule.getters) {
|
|
this._rawModule.getters = rawModule.getters;
|
|
}
|
|
};
|
|
|
|
Module.prototype.forEachChild = function forEachChild (fn) {
|
|
forEachValue(this._children, fn);
|
|
};
|
|
|
|
Module.prototype.forEachGetter = function forEachGetter (fn) {
|
|
if (this._rawModule.getters) {
|
|
forEachValue(this._rawModule.getters, fn);
|
|
}
|
|
};
|
|
|
|
Module.prototype.forEachAction = function forEachAction (fn) {
|
|
if (this._rawModule.actions) {
|
|
forEachValue(this._rawModule.actions, fn);
|
|
}
|
|
};
|
|
|
|
Module.prototype.forEachMutation = function forEachMutation (fn) {
|
|
if (this._rawModule.mutations) {
|
|
forEachValue(this._rawModule.mutations, fn);
|
|
}
|
|
};
|
|
|
|
Object.defineProperties( Module.prototype, prototypeAccessors$1 );
|
|
|
|
var ModuleCollection = function ModuleCollection (rawRootModule) {
|
|
// register root module (Vuex.Store options)
|
|
this.register([], rawRootModule, false);
|
|
};
|
|
|
|
ModuleCollection.prototype.get = function get (path) {
|
|
return path.reduce(function (module, key) {
|
|
return module.getChild(key)
|
|
}, this.root)
|
|
};
|
|
|
|
ModuleCollection.prototype.getNamespace = function getNamespace (path) {
|
|
var module = this.root;
|
|
return path.reduce(function (namespace, key) {
|
|
module = module.getChild(key);
|
|
return namespace + (module.namespaced ? key + '/' : '')
|
|
}, '')
|
|
};
|
|
|
|
ModuleCollection.prototype.update = function update$1 (rawRootModule) {
|
|
update([], this.root, rawRootModule);
|
|
};
|
|
|
|
ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
|
|
var this$1$1 = this;
|
|
if ( runtime === void 0 ) runtime = true;
|
|
|
|
if ((true)) {
|
|
assertRawModule(path, rawModule);
|
|
}
|
|
|
|
var newModule = new Module(rawModule, runtime);
|
|
if (path.length === 0) {
|
|
this.root = newModule;
|
|
} else {
|
|
var parent = this.get(path.slice(0, -1));
|
|
parent.addChild(path[path.length - 1], newModule);
|
|
}
|
|
|
|
// register nested modules
|
|
if (rawModule.modules) {
|
|
forEachValue(rawModule.modules, function (rawChildModule, key) {
|
|
this$1$1.register(path.concat(key), rawChildModule, runtime);
|
|
});
|
|
}
|
|
};
|
|
|
|
ModuleCollection.prototype.unregister = function unregister (path) {
|
|
var parent = this.get(path.slice(0, -1));
|
|
var key = path[path.length - 1];
|
|
var child = parent.getChild(key);
|
|
|
|
if (!child) {
|
|
if ((true)) {
|
|
console.warn(
|
|
"[vuex] trying to unregister module '" + key + "', which is " +
|
|
"not registered"
|
|
);
|
|
}
|
|
return
|
|
}
|
|
|
|
if (!child.runtime) {
|
|
return
|
|
}
|
|
|
|
parent.removeChild(key);
|
|
};
|
|
|
|
ModuleCollection.prototype.isRegistered = function isRegistered (path) {
|
|
var parent = this.get(path.slice(0, -1));
|
|
var key = path[path.length - 1];
|
|
|
|
if (parent) {
|
|
return parent.hasChild(key)
|
|
}
|
|
|
|
return false
|
|
};
|
|
|
|
function update (path, targetModule, newModule) {
|
|
if ((true)) {
|
|
assertRawModule(path, newModule);
|
|
}
|
|
|
|
// update target module
|
|
targetModule.update(newModule);
|
|
|
|
// update nested modules
|
|
if (newModule.modules) {
|
|
for (var key in newModule.modules) {
|
|
if (!targetModule.getChild(key)) {
|
|
if ((true)) {
|
|
console.warn(
|
|
"[vuex] trying to add a new module '" + key + "' on hot reloading, " +
|
|
'manual reload is needed'
|
|
);
|
|
}
|
|
return
|
|
}
|
|
update(
|
|
path.concat(key),
|
|
targetModule.getChild(key),
|
|
newModule.modules[key]
|
|
);
|
|
}
|
|
}
|
|
}
|
|
|
|
var functionAssert = {
|
|
assert: function (value) { return typeof value === 'function'; },
|
|
expected: 'function'
|
|
};
|
|
|
|
var objectAssert = {
|
|
assert: function (value) { return typeof value === 'function' ||
|
|
(typeof value === 'object' && typeof value.handler === 'function'); },
|
|
expected: 'function or object with "handler" function'
|
|
};
|
|
|
|
var assertTypes = {
|
|
getters: functionAssert,
|
|
mutations: functionAssert,
|
|
actions: objectAssert
|
|
};
|
|
|
|
function assertRawModule (path, rawModule) {
|
|
Object.keys(assertTypes).forEach(function (key) {
|
|
if (!rawModule[key]) { return }
|
|
|
|
var assertOptions = assertTypes[key];
|
|
|
|
forEachValue(rawModule[key], function (value, type) {
|
|
assert(
|
|
assertOptions.assert(value),
|
|
makeAssertionMessage(path, key, type, value, assertOptions.expected)
|
|
);
|
|
});
|
|
});
|
|
}
|
|
|
|
function makeAssertionMessage (path, key, type, value, expected) {
|
|
var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
|
|
if (path.length > 0) {
|
|
buf += " in module \"" + (path.join('.')) + "\"";
|
|
}
|
|
buf += " is " + (JSON.stringify(value)) + ".";
|
|
return buf
|
|
}
|
|
|
|
function createStore (options) {
|
|
return new Store(options)
|
|
}
|
|
|
|
var Store = function Store (options) {
|
|
var this$1$1 = this;
|
|
if ( options === void 0 ) options = {};
|
|
|
|
if ((true)) {
|
|
assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
|
|
assert(this instanceof Store, "store must be called with the new operator.");
|
|
}
|
|
|
|
var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
|
|
var strict = options.strict; if ( strict === void 0 ) strict = false;
|
|
var devtools = options.devtools;
|
|
|
|
// store internal state
|
|
this._committing = false;
|
|
this._actions = Object.create(null);
|
|
this._actionSubscribers = [];
|
|
this._mutations = Object.create(null);
|
|
this._wrappedGetters = Object.create(null);
|
|
this._modules = new ModuleCollection(options);
|
|
this._modulesNamespaceMap = Object.create(null);
|
|
this._subscribers = [];
|
|
this._makeLocalGettersCache = Object.create(null);
|
|
|
|
// EffectScope instance. when registering new getters, we wrap them inside
|
|
// EffectScope so that getters (computed) would not be destroyed on
|
|
// component unmount.
|
|
this._scope = null;
|
|
|
|
this._devtools = devtools;
|
|
|
|
// bind commit and dispatch to self
|
|
var store = this;
|
|
var ref = this;
|
|
var dispatch = ref.dispatch;
|
|
var commit = ref.commit;
|
|
this.dispatch = function boundDispatch (type, payload) {
|
|
return dispatch.call(store, type, payload)
|
|
};
|
|
this.commit = function boundCommit (type, payload, options) {
|
|
return commit.call(store, type, payload, options)
|
|
};
|
|
|
|
// strict mode
|
|
this.strict = strict;
|
|
|
|
var state = this._modules.root.state;
|
|
|
|
// init root module.
|
|
// this also recursively registers all sub-modules
|
|
// and collects all module getters inside this._wrappedGetters
|
|
installModule(this, state, [], this._modules.root);
|
|
|
|
// initialize the store state, which is responsible for the reactivity
|
|
// (also registers _wrappedGetters as computed properties)
|
|
resetStoreState(this, state);
|
|
|
|
// apply plugins
|
|
plugins.forEach(function (plugin) { return plugin(this$1$1); });
|
|
};
|
|
|
|
var prototypeAccessors = { state: { configurable: true } };
|
|
|
|
Store.prototype.install = function install (app, injectKey) {
|
|
app.provide(injectKey || storeKey, this);
|
|
app.config.globalProperties.$store = this;
|
|
|
|
var useDevtools = this._devtools !== undefined
|
|
? this._devtools
|
|
: ( true) || 0;
|
|
|
|
if (useDevtools) {
|
|
addDevtools(app, this);
|
|
}
|
|
};
|
|
|
|
prototypeAccessors.state.get = function () {
|
|
return this._state.data
|
|
};
|
|
|
|
prototypeAccessors.state.set = function (v) {
|
|
if ((true)) {
|
|
assert(false, "use store.replaceState() to explicit replace store state.");
|
|
}
|
|
};
|
|
|
|
Store.prototype.commit = function commit (_type, _payload, _options) {
|
|
var this$1$1 = this;
|
|
|
|
// check object-style commit
|
|
var ref = unifyObjectStyle(_type, _payload, _options);
|
|
var type = ref.type;
|
|
var payload = ref.payload;
|
|
var options = ref.options;
|
|
|
|
var mutation = { type: type, payload: payload };
|
|
var entry = this._mutations[type];
|
|
if (!entry) {
|
|
if ((true)) {
|
|
console.error(("[vuex] unknown mutation type: " + type));
|
|
}
|
|
return
|
|
}
|
|
this._withCommit(function () {
|
|
entry.forEach(function commitIterator (handler) {
|
|
handler(payload);
|
|
});
|
|
});
|
|
|
|
this._subscribers
|
|
.slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
|
|
.forEach(function (sub) { return sub(mutation, this$1$1.state); });
|
|
|
|
if (
|
|
( true) &&
|
|
options && options.silent
|
|
) {
|
|
console.warn(
|
|
"[vuex] mutation type: " + type + ". Silent option has been removed. " +
|
|
'Use the filter functionality in the vue-devtools'
|
|
);
|
|
}
|
|
};
|
|
|
|
Store.prototype.dispatch = function dispatch (_type, _payload) {
|
|
var this$1$1 = this;
|
|
|
|
// check object-style dispatch
|
|
var ref = unifyObjectStyle(_type, _payload);
|
|
var type = ref.type;
|
|
var payload = ref.payload;
|
|
|
|
var action = { type: type, payload: payload };
|
|
var entry = this._actions[type];
|
|
if (!entry) {
|
|
if ((true)) {
|
|
console.error(("[vuex] unknown action type: " + type));
|
|
}
|
|
return
|
|
}
|
|
|
|
try {
|
|
this._actionSubscribers
|
|
.slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
|
|
.filter(function (sub) { return sub.before; })
|
|
.forEach(function (sub) { return sub.before(action, this$1$1.state); });
|
|
} catch (e) {
|
|
if ((true)) {
|
|
console.warn("[vuex] error in before action subscribers: ");
|
|
console.error(e);
|
|
}
|
|
}
|
|
|
|
var result = entry.length > 1
|
|
? Promise.all(entry.map(function (handler) { return handler(payload); }))
|
|
: entry[0](payload);
|
|
|
|
return new Promise(function (resolve, reject) {
|
|
result.then(function (res) {
|
|
try {
|
|
this$1$1._actionSubscribers
|
|
.filter(function (sub) { return sub.after; })
|
|
.forEach(function (sub) { return sub.after(action, this$1$1.state); });
|
|
} catch (e) {
|
|
if ((true)) {
|
|
console.warn("[vuex] error in after action subscribers: ");
|
|
console.error(e);
|
|
}
|
|
}
|
|
resolve(res);
|
|
}, function (error) {
|
|
try {
|
|
this$1$1._actionSubscribers
|
|
.filter(function (sub) { return sub.error; })
|
|
.forEach(function (sub) { return sub.error(action, this$1$1.state, error); });
|
|
} catch (e) {
|
|
if ((true)) {
|
|
console.warn("[vuex] error in error action subscribers: ");
|
|
console.error(e);
|
|
}
|
|
}
|
|
reject(error);
|
|
});
|
|
})
|
|
};
|
|
|
|
Store.prototype.subscribe = function subscribe (fn, options) {
|
|
return genericSubscribe(fn, this._subscribers, options)
|
|
};
|
|
|
|
Store.prototype.subscribeAction = function subscribeAction (fn, options) {
|
|
var subs = typeof fn === 'function' ? { before: fn } : fn;
|
|
return genericSubscribe(subs, this._actionSubscribers, options)
|
|
};
|
|
|
|
Store.prototype.watch = function watch$1 (getter, cb, options) {
|
|
var this$1$1 = this;
|
|
|
|
if ((true)) {
|
|
assert(typeof getter === 'function', "store.watch only accepts a function.");
|
|
}
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(function () { return getter(this$1$1.state, this$1$1.getters); }, cb, Object.assign({}, options))
|
|
};
|
|
|
|
Store.prototype.replaceState = function replaceState (state) {
|
|
var this$1$1 = this;
|
|
|
|
this._withCommit(function () {
|
|
this$1$1._state.data = state;
|
|
});
|
|
};
|
|
|
|
Store.prototype.registerModule = function registerModule (path, rawModule, options) {
|
|
if ( options === void 0 ) options = {};
|
|
|
|
if (typeof path === 'string') { path = [path]; }
|
|
|
|
if ((true)) {
|
|
assert(Array.isArray(path), "module path must be a string or an Array.");
|
|
assert(path.length > 0, 'cannot register the root module by using registerModule.');
|
|
}
|
|
|
|
this._modules.register(path, rawModule);
|
|
installModule(this, this.state, path, this._modules.get(path), options.preserveState);
|
|
// reset store to update getters...
|
|
resetStoreState(this, this.state);
|
|
};
|
|
|
|
Store.prototype.unregisterModule = function unregisterModule (path) {
|
|
var this$1$1 = this;
|
|
|
|
if (typeof path === 'string') { path = [path]; }
|
|
|
|
if ((true)) {
|
|
assert(Array.isArray(path), "module path must be a string or an Array.");
|
|
}
|
|
|
|
this._modules.unregister(path);
|
|
this._withCommit(function () {
|
|
var parentState = getNestedState(this$1$1.state, path.slice(0, -1));
|
|
delete parentState[path[path.length - 1]];
|
|
});
|
|
resetStore(this);
|
|
};
|
|
|
|
Store.prototype.hasModule = function hasModule (path) {
|
|
if (typeof path === 'string') { path = [path]; }
|
|
|
|
if ((true)) {
|
|
assert(Array.isArray(path), "module path must be a string or an Array.");
|
|
}
|
|
|
|
return this._modules.isRegistered(path)
|
|
};
|
|
|
|
Store.prototype.hotUpdate = function hotUpdate (newOptions) {
|
|
this._modules.update(newOptions);
|
|
resetStore(this, true);
|
|
};
|
|
|
|
Store.prototype._withCommit = function _withCommit (fn) {
|
|
var committing = this._committing;
|
|
this._committing = true;
|
|
fn();
|
|
this._committing = committing;
|
|
};
|
|
|
|
Object.defineProperties( Store.prototype, prototypeAccessors );
|
|
|
|
/**
|
|
* Reduce the code which written in Vue.js for getting the state.
|
|
* @param {String} [namespace] - Module's namespace
|
|
* @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.
|
|
* @param {Object}
|
|
*/
|
|
var mapState = normalizeNamespace(function (namespace, states) {
|
|
var res = {};
|
|
if (( true) && !isValidMap(states)) {
|
|
console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
|
|
}
|
|
normalizeMap(states).forEach(function (ref) {
|
|
var key = ref.key;
|
|
var val = ref.val;
|
|
|
|
res[key] = function mappedState () {
|
|
var state = this.$store.state;
|
|
var getters = this.$store.getters;
|
|
if (namespace) {
|
|
var module = getModuleByNamespace(this.$store, 'mapState', namespace);
|
|
if (!module) {
|
|
return
|
|
}
|
|
state = module.context.state;
|
|
getters = module.context.getters;
|
|
}
|
|
return typeof val === 'function'
|
|
? val.call(this, state, getters)
|
|
: state[val]
|
|
};
|
|
// mark vuex getter for devtools
|
|
res[key].vuex = true;
|
|
});
|
|
return res
|
|
});
|
|
|
|
/**
|
|
* Reduce the code which written in Vue.js for committing the mutation
|
|
* @param {String} [namespace] - Module's namespace
|
|
* @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept another params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.
|
|
* @return {Object}
|
|
*/
|
|
var mapMutations = normalizeNamespace(function (namespace, mutations) {
|
|
var res = {};
|
|
if (( true) && !isValidMap(mutations)) {
|
|
console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
|
|
}
|
|
normalizeMap(mutations).forEach(function (ref) {
|
|
var key = ref.key;
|
|
var val = ref.val;
|
|
|
|
res[key] = function mappedMutation () {
|
|
var args = [], len = arguments.length;
|
|
while ( len-- ) args[ len ] = arguments[ len ];
|
|
|
|
// Get the commit method from store
|
|
var commit = this.$store.commit;
|
|
if (namespace) {
|
|
var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
|
|
if (!module) {
|
|
return
|
|
}
|
|
commit = module.context.commit;
|
|
}
|
|
return typeof val === 'function'
|
|
? val.apply(this, [commit].concat(args))
|
|
: commit.apply(this.$store, [val].concat(args))
|
|
};
|
|
});
|
|
return res
|
|
});
|
|
|
|
/**
|
|
* Reduce the code which written in Vue.js for getting the getters
|
|
* @param {String} [namespace] - Module's namespace
|
|
* @param {Object|Array} getters
|
|
* @return {Object}
|
|
*/
|
|
var mapGetters = normalizeNamespace(function (namespace, getters) {
|
|
var res = {};
|
|
if (( true) && !isValidMap(getters)) {
|
|
console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
|
|
}
|
|
normalizeMap(getters).forEach(function (ref) {
|
|
var key = ref.key;
|
|
var val = ref.val;
|
|
|
|
// The namespace has been mutated by normalizeNamespace
|
|
val = namespace + val;
|
|
res[key] = function mappedGetter () {
|
|
if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
|
|
return
|
|
}
|
|
if (( true) && !(val in this.$store.getters)) {
|
|
console.error(("[vuex] unknown getter: " + val));
|
|
return
|
|
}
|
|
return this.$store.getters[val]
|
|
};
|
|
// mark vuex getter for devtools
|
|
res[key].vuex = true;
|
|
});
|
|
return res
|
|
});
|
|
|
|
/**
|
|
* Reduce the code which written in Vue.js for dispatch the action
|
|
* @param {String} [namespace] - Module's namespace
|
|
* @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.
|
|
* @return {Object}
|
|
*/
|
|
var mapActions = normalizeNamespace(function (namespace, actions) {
|
|
var res = {};
|
|
if (( true) && !isValidMap(actions)) {
|
|
console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
|
|
}
|
|
normalizeMap(actions).forEach(function (ref) {
|
|
var key = ref.key;
|
|
var val = ref.val;
|
|
|
|
res[key] = function mappedAction () {
|
|
var args = [], len = arguments.length;
|
|
while ( len-- ) args[ len ] = arguments[ len ];
|
|
|
|
// get dispatch function from store
|
|
var dispatch = this.$store.dispatch;
|
|
if (namespace) {
|
|
var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
|
|
if (!module) {
|
|
return
|
|
}
|
|
dispatch = module.context.dispatch;
|
|
}
|
|
return typeof val === 'function'
|
|
? val.apply(this, [dispatch].concat(args))
|
|
: dispatch.apply(this.$store, [val].concat(args))
|
|
};
|
|
});
|
|
return res
|
|
});
|
|
|
|
/**
|
|
* Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
|
|
* @param {String} namespace
|
|
* @return {Object}
|
|
*/
|
|
var createNamespacedHelpers = function (namespace) { return ({
|
|
mapState: mapState.bind(null, namespace),
|
|
mapGetters: mapGetters.bind(null, namespace),
|
|
mapMutations: mapMutations.bind(null, namespace),
|
|
mapActions: mapActions.bind(null, namespace)
|
|
}); };
|
|
|
|
/**
|
|
* Normalize the map
|
|
* normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
|
|
* normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
|
|
* @param {Array|Object} map
|
|
* @return {Object}
|
|
*/
|
|
function normalizeMap (map) {
|
|
if (!isValidMap(map)) {
|
|
return []
|
|
}
|
|
return Array.isArray(map)
|
|
? map.map(function (key) { return ({ key: key, val: key }); })
|
|
: Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
|
|
}
|
|
|
|
/**
|
|
* Validate whether given map is valid or not
|
|
* @param {*} map
|
|
* @return {Boolean}
|
|
*/
|
|
function isValidMap (map) {
|
|
return Array.isArray(map) || isObject(map)
|
|
}
|
|
|
|
/**
|
|
* Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.
|
|
* @param {Function} fn
|
|
* @return {Function}
|
|
*/
|
|
function normalizeNamespace (fn) {
|
|
return function (namespace, map) {
|
|
if (typeof namespace !== 'string') {
|
|
map = namespace;
|
|
namespace = '';
|
|
} else if (namespace.charAt(namespace.length - 1) !== '/') {
|
|
namespace += '/';
|
|
}
|
|
return fn(namespace, map)
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Search a special module from store by namespace. if module not exist, print error message.
|
|
* @param {Object} store
|
|
* @param {String} helper
|
|
* @param {String} namespace
|
|
* @return {Object}
|
|
*/
|
|
function getModuleByNamespace (store, helper, namespace) {
|
|
var module = store._modulesNamespaceMap[namespace];
|
|
if (( true) && !module) {
|
|
console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
|
|
}
|
|
return module
|
|
}
|
|
|
|
// Credits: borrowed code from fcomb/redux-logger
|
|
|
|
function createLogger (ref) {
|
|
if ( ref === void 0 ) ref = {};
|
|
var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;
|
|
var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };
|
|
var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };
|
|
var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };
|
|
var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };
|
|
var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };
|
|
var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;
|
|
var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;
|
|
var logger = ref.logger; if ( logger === void 0 ) logger = console;
|
|
|
|
return function (store) {
|
|
var prevState = deepCopy(store.state);
|
|
|
|
if (typeof logger === 'undefined') {
|
|
return
|
|
}
|
|
|
|
if (logMutations) {
|
|
store.subscribe(function (mutation, state) {
|
|
var nextState = deepCopy(state);
|
|
|
|
if (filter(mutation, prevState, nextState)) {
|
|
var formattedTime = getFormattedTime();
|
|
var formattedMutation = mutationTransformer(mutation);
|
|
var message = "mutation " + (mutation.type) + formattedTime;
|
|
|
|
startMessage(logger, message, collapsed);
|
|
logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));
|
|
logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);
|
|
logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));
|
|
endMessage(logger);
|
|
}
|
|
|
|
prevState = nextState;
|
|
});
|
|
}
|
|
|
|
if (logActions) {
|
|
store.subscribeAction(function (action, state) {
|
|
if (actionFilter(action, state)) {
|
|
var formattedTime = getFormattedTime();
|
|
var formattedAction = actionTransformer(action);
|
|
var message = "action " + (action.type) + formattedTime;
|
|
|
|
startMessage(logger, message, collapsed);
|
|
logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);
|
|
endMessage(logger);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
|
|
function startMessage (logger, message, collapsed) {
|
|
var startMessage = collapsed
|
|
? logger.groupCollapsed
|
|
: logger.group;
|
|
|
|
// render
|
|
try {
|
|
startMessage.call(logger, message);
|
|
} catch (e) {
|
|
logger.log(message);
|
|
}
|
|
}
|
|
|
|
function endMessage (logger) {
|
|
try {
|
|
logger.groupEnd();
|
|
} catch (e) {
|
|
logger.log('—— log end ——');
|
|
}
|
|
}
|
|
|
|
function getFormattedTime () {
|
|
var time = new Date();
|
|
return (" @ " + (pad(time.getHours(), 2)) + ":" + (pad(time.getMinutes(), 2)) + ":" + (pad(time.getSeconds(), 2)) + "." + (pad(time.getMilliseconds(), 3)))
|
|
}
|
|
|
|
function repeat (str, times) {
|
|
return (new Array(times + 1)).join(str)
|
|
}
|
|
|
|
function pad (num, maxLength) {
|
|
return repeat('0', maxLength - num.toString().length) + num
|
|
}
|
|
|
|
var index = {
|
|
version: '4.1.0',
|
|
Store: Store,
|
|
storeKey: storeKey,
|
|
createStore: createStore,
|
|
useStore: useStore,
|
|
mapState: mapState,
|
|
mapMutations: mapMutations,
|
|
mapGetters: mapGetters,
|
|
mapActions: mapActions,
|
|
createNamespacedHelpers: createNamespacedHelpers,
|
|
createLogger: createLogger
|
|
};
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (index);
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/dist/browser/axios.cjs":
|
|
/*!***************************************************!*\
|
|
!*** ./node_modules/axios/dist/browser/axios.cjs ***!
|
|
\***************************************************/
|
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js")["Buffer"];
|
|
// Axios v1.4.0 Copyright (c) 2023 Matt Zabriskie and contributors
|
|
|
|
|
|
function bind(fn, thisArg) {
|
|
return function wrap() {
|
|
return fn.apply(thisArg, arguments);
|
|
};
|
|
}
|
|
|
|
// utils is a library of generic helper functions non-specific to axios
|
|
|
|
const {toString} = Object.prototype;
|
|
const {getPrototypeOf} = Object;
|
|
|
|
const kindOf = (cache => thing => {
|
|
const str = toString.call(thing);
|
|
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
})(Object.create(null));
|
|
|
|
const kindOfTest = (type) => {
|
|
type = type.toLowerCase();
|
|
return (thing) => kindOf(thing) === type
|
|
};
|
|
|
|
const typeOfTest = type => thing => typeof thing === type;
|
|
|
|
/**
|
|
* Determine if a value is an Array
|
|
*
|
|
* @param {Object} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is an Array, otherwise false
|
|
*/
|
|
const {isArray} = Array;
|
|
|
|
/**
|
|
* Determine if a value is undefined
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if the value is undefined, otherwise false
|
|
*/
|
|
const isUndefined = typeOfTest('undefined');
|
|
|
|
/**
|
|
* Determine if a value is a Buffer
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a Buffer, otherwise false
|
|
*/
|
|
function isBuffer(val) {
|
|
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
|
|
&& isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
|
|
}
|
|
|
|
/**
|
|
* Determine if a value is an ArrayBuffer
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
|
*/
|
|
const isArrayBuffer = kindOfTest('ArrayBuffer');
|
|
|
|
|
|
/**
|
|
* Determine if a value is a view on an ArrayBuffer
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
|
|
*/
|
|
function isArrayBufferView(val) {
|
|
let result;
|
|
if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
|
|
result = ArrayBuffer.isView(val);
|
|
} else {
|
|
result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Determine if a value is a String
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a String, otherwise false
|
|
*/
|
|
const isString = typeOfTest('string');
|
|
|
|
/**
|
|
* Determine if a value is a Function
|
|
*
|
|
* @param {*} val The value to test
|
|
* @returns {boolean} True if value is a Function, otherwise false
|
|
*/
|
|
const isFunction = typeOfTest('function');
|
|
|
|
/**
|
|
* Determine if a value is a Number
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a Number, otherwise false
|
|
*/
|
|
const isNumber = typeOfTest('number');
|
|
|
|
/**
|
|
* Determine if a value is an Object
|
|
*
|
|
* @param {*} thing The value to test
|
|
*
|
|
* @returns {boolean} True if value is an Object, otherwise false
|
|
*/
|
|
const isObject = (thing) => thing !== null && typeof thing === 'object';
|
|
|
|
/**
|
|
* Determine if a value is a Boolean
|
|
*
|
|
* @param {*} thing The value to test
|
|
* @returns {boolean} True if value is a Boolean, otherwise false
|
|
*/
|
|
const isBoolean = thing => thing === true || thing === false;
|
|
|
|
/**
|
|
* Determine if a value is a plain Object
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a plain Object, otherwise false
|
|
*/
|
|
const isPlainObject = (val) => {
|
|
if (kindOf(val) !== 'object') {
|
|
return false;
|
|
}
|
|
|
|
const prototype = getPrototypeOf(val);
|
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
|
|
};
|
|
|
|
/**
|
|
* Determine if a value is a Date
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a Date, otherwise false
|
|
*/
|
|
const isDate = kindOfTest('Date');
|
|
|
|
/**
|
|
* Determine if a value is a File
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a File, otherwise false
|
|
*/
|
|
const isFile = kindOfTest('File');
|
|
|
|
/**
|
|
* Determine if a value is a Blob
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a Blob, otherwise false
|
|
*/
|
|
const isBlob = kindOfTest('Blob');
|
|
|
|
/**
|
|
* Determine if a value is a FileList
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a File, otherwise false
|
|
*/
|
|
const isFileList = kindOfTest('FileList');
|
|
|
|
/**
|
|
* Determine if a value is a Stream
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a Stream, otherwise false
|
|
*/
|
|
const isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
|
|
/**
|
|
* Determine if a value is a FormData
|
|
*
|
|
* @param {*} thing The value to test
|
|
*
|
|
* @returns {boolean} True if value is an FormData, otherwise false
|
|
*/
|
|
const isFormData = (thing) => {
|
|
let kind;
|
|
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]')
|
|
)
|
|
)
|
|
)
|
|
};
|
|
|
|
/**
|
|
* Determine if a value is a URLSearchParams object
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
|
*/
|
|
const isURLSearchParams = kindOfTest('URLSearchParams');
|
|
|
|
/**
|
|
* Trim excess whitespace off the beginning and end of a string
|
|
*
|
|
* @param {String} str The String to trim
|
|
*
|
|
* @returns {String} The String freed of excess whitespace
|
|
*/
|
|
const trim = (str) => str.trim ?
|
|
str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
|
|
|
/**
|
|
* Iterate over an Array or an Object invoking a function for each item.
|
|
*
|
|
* If `obj` is an Array callback will be called passing
|
|
* the value, index, and complete array for each item.
|
|
*
|
|
* If 'obj' is an Object callback will be called passing
|
|
* the value, key, and complete object for each property.
|
|
*
|
|
* @param {Object|Array} obj The object to iterate
|
|
* @param {Function} fn The callback to invoke for each item
|
|
*
|
|
* @param {Boolean} [allOwnKeys = false]
|
|
* @returns {any}
|
|
*/
|
|
function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
// Don't bother if no value provided
|
|
if (obj === null || typeof obj === 'undefined') {
|
|
return;
|
|
}
|
|
|
|
let i;
|
|
let l;
|
|
|
|
// Force an array if not already something iterable
|
|
if (typeof obj !== 'object') {
|
|
/*eslint no-param-reassign:0*/
|
|
obj = [obj];
|
|
}
|
|
|
|
if (isArray(obj)) {
|
|
// Iterate over array values
|
|
for (i = 0, l = obj.length; i < l; i++) {
|
|
fn.call(null, obj[i], i, obj);
|
|
}
|
|
} else {
|
|
// Iterate over object keys
|
|
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
|
const len = keys.length;
|
|
let key;
|
|
|
|
for (i = 0; i < len; i++) {
|
|
key = keys[i];
|
|
fn.call(null, obj[key], key, obj);
|
|
}
|
|
}
|
|
}
|
|
|
|
function findKey(obj, key) {
|
|
key = key.toLowerCase();
|
|
const keys = Object.keys(obj);
|
|
let i = keys.length;
|
|
let _key;
|
|
while (i-- > 0) {
|
|
_key = keys[i];
|
|
if (key === _key.toLowerCase()) {
|
|
return _key;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
const _global = (() => {
|
|
/*eslint no-undef:0*/
|
|
if (typeof globalThis !== "undefined") return globalThis;
|
|
return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : __webpack_require__.g)
|
|
})();
|
|
|
|
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
|
|
|
/**
|
|
* Accepts varargs expecting each argument to be an object, then
|
|
* immutably merges the properties of each object and returns result.
|
|
*
|
|
* When multiple objects contain the same key the later object in
|
|
* the arguments list will take precedence.
|
|
*
|
|
* Example:
|
|
*
|
|
* ```js
|
|
* var result = merge({foo: 123}, {foo: 456});
|
|
* console.log(result.foo); // outputs 456
|
|
* ```
|
|
*
|
|
* @param {Object} obj1 Object to merge
|
|
*
|
|
* @returns {Object} Result of all merge properties
|
|
*/
|
|
function merge(/* obj1, obj2, obj3, ... */) {
|
|
const {caseless} = isContextDefined(this) && this || {};
|
|
const result = {};
|
|
const assignValue = (val, key) => {
|
|
const targetKey = caseless && findKey(result, key) || key;
|
|
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
|
|
result[targetKey] = merge(result[targetKey], val);
|
|
} else if (isPlainObject(val)) {
|
|
result[targetKey] = merge({}, val);
|
|
} else if (isArray(val)) {
|
|
result[targetKey] = val.slice();
|
|
} else {
|
|
result[targetKey] = val;
|
|
}
|
|
};
|
|
|
|
for (let i = 0, l = arguments.length; i < l; i++) {
|
|
arguments[i] && forEach(arguments[i], assignValue);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Extends object a by mutably adding to it the properties of object b.
|
|
*
|
|
* @param {Object} a The object to be extended
|
|
* @param {Object} b The object to copy properties from
|
|
* @param {Object} thisArg The object to bind function to
|
|
*
|
|
* @param {Boolean} [allOwnKeys]
|
|
* @returns {Object} The resulting value of object a
|
|
*/
|
|
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
|
|
forEach(b, (val, key) => {
|
|
if (thisArg && isFunction(val)) {
|
|
a[key] = bind(val, thisArg);
|
|
} else {
|
|
a[key] = val;
|
|
}
|
|
}, {allOwnKeys});
|
|
return a;
|
|
};
|
|
|
|
/**
|
|
* Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
|
|
*
|
|
* @param {string} content with BOM
|
|
*
|
|
* @returns {string} content value without BOM
|
|
*/
|
|
const stripBOM = (content) => {
|
|
if (content.charCodeAt(0) === 0xFEFF) {
|
|
content = content.slice(1);
|
|
}
|
|
return content;
|
|
};
|
|
|
|
/**
|
|
* Inherit the prototype methods from one constructor into another
|
|
* @param {function} constructor
|
|
* @param {function} superConstructor
|
|
* @param {object} [props]
|
|
* @param {object} [descriptors]
|
|
*
|
|
* @returns {void}
|
|
*/
|
|
const inherits = (constructor, superConstructor, props, descriptors) => {
|
|
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
constructor.prototype.constructor = constructor;
|
|
Object.defineProperty(constructor, 'super', {
|
|
value: superConstructor.prototype
|
|
});
|
|
props && Object.assign(constructor.prototype, props);
|
|
};
|
|
|
|
/**
|
|
* Resolve object with deep prototype chain to a flat object
|
|
* @param {Object} sourceObj source object
|
|
* @param {Object} [destObj]
|
|
* @param {Function|Boolean} [filter]
|
|
* @param {Function} [propFilter]
|
|
*
|
|
* @returns {Object}
|
|
*/
|
|
const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
|
|
let props;
|
|
let i;
|
|
let prop;
|
|
const merged = {};
|
|
|
|
destObj = destObj || {};
|
|
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
if (sourceObj == null) return destObj;
|
|
|
|
do {
|
|
props = Object.getOwnPropertyNames(sourceObj);
|
|
i = props.length;
|
|
while (i-- > 0) {
|
|
prop = props[i];
|
|
if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
|
|
destObj[prop] = sourceObj[prop];
|
|
merged[prop] = true;
|
|
}
|
|
}
|
|
sourceObj = filter !== false && getPrototypeOf(sourceObj);
|
|
} while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
|
|
|
|
return destObj;
|
|
};
|
|
|
|
/**
|
|
* Determines whether a string ends with the characters of a specified string
|
|
*
|
|
* @param {String} str
|
|
* @param {String} searchString
|
|
* @param {Number} [position= 0]
|
|
*
|
|
* @returns {boolean}
|
|
*/
|
|
const endsWith = (str, searchString, position) => {
|
|
str = String(str);
|
|
if (position === undefined || position > str.length) {
|
|
position = str.length;
|
|
}
|
|
position -= searchString.length;
|
|
const lastIndex = str.indexOf(searchString, position);
|
|
return lastIndex !== -1 && lastIndex === position;
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns new array from array like object or null if failed
|
|
*
|
|
* @param {*} [thing]
|
|
*
|
|
* @returns {?Array}
|
|
*/
|
|
const toArray = (thing) => {
|
|
if (!thing) return null;
|
|
if (isArray(thing)) return thing;
|
|
let i = thing.length;
|
|
if (!isNumber(i)) return null;
|
|
const arr = new Array(i);
|
|
while (i-- > 0) {
|
|
arr[i] = thing[i];
|
|
}
|
|
return arr;
|
|
};
|
|
|
|
/**
|
|
* Checking if the Uint8Array exists and if it does, it returns a function that checks if the
|
|
* thing passed in is an instance of Uint8Array
|
|
*
|
|
* @param {TypedArray}
|
|
*
|
|
* @returns {Array}
|
|
*/
|
|
// eslint-disable-next-line func-names
|
|
const isTypedArray = (TypedArray => {
|
|
// eslint-disable-next-line func-names
|
|
return thing => {
|
|
return TypedArray && thing instanceof TypedArray;
|
|
};
|
|
})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
|
|
|
|
/**
|
|
* For each entry in the object, call the function with the key and value.
|
|
*
|
|
* @param {Object<any, any>} obj - The object to iterate over.
|
|
* @param {Function} fn - The function to call for each entry.
|
|
*
|
|
* @returns {void}
|
|
*/
|
|
const forEachEntry = (obj, fn) => {
|
|
const generator = obj && obj[Symbol.iterator];
|
|
|
|
const iterator = generator.call(obj);
|
|
|
|
let result;
|
|
|
|
while ((result = iterator.next()) && !result.done) {
|
|
const pair = result.value;
|
|
fn.call(obj, pair[0], pair[1]);
|
|
}
|
|
};
|
|
|
|
/**
|
|
* It takes a regular expression and a string, and returns an array of all the matches
|
|
*
|
|
* @param {string} regExp - The regular expression to match against.
|
|
* @param {string} str - The string to search.
|
|
*
|
|
* @returns {Array<boolean>}
|
|
*/
|
|
const matchAll = (regExp, str) => {
|
|
let matches;
|
|
const arr = [];
|
|
|
|
while ((matches = regExp.exec(str)) !== null) {
|
|
arr.push(matches);
|
|
}
|
|
|
|
return arr;
|
|
};
|
|
|
|
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
|
|
const isHTMLForm = kindOfTest('HTMLFormElement');
|
|
|
|
const toCamelCase = str => {
|
|
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
|
|
function replacer(m, p1, p2) {
|
|
return p1.toUpperCase() + p2;
|
|
}
|
|
);
|
|
};
|
|
|
|
/* Creating a function that will check if an object has a property. */
|
|
const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
|
|
|
|
/**
|
|
* Determine if a value is a RegExp object
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a RegExp object, otherwise false
|
|
*/
|
|
const isRegExp = kindOfTest('RegExp');
|
|
|
|
const reduceDescriptors = (obj, reducer) => {
|
|
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
const reducedDescriptors = {};
|
|
|
|
forEach(descriptors, (descriptor, name) => {
|
|
if (reducer(descriptor, name, obj) !== false) {
|
|
reducedDescriptors[name] = descriptor;
|
|
}
|
|
});
|
|
|
|
Object.defineProperties(obj, reducedDescriptors);
|
|
};
|
|
|
|
/**
|
|
* Makes all methods read-only
|
|
* @param {Object} obj
|
|
*/
|
|
|
|
const freezeMethods = (obj) => {
|
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
// skip restricted props in strict mode
|
|
if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
|
|
return false;
|
|
}
|
|
|
|
const value = obj[name];
|
|
|
|
if (!isFunction(value)) return;
|
|
|
|
descriptor.enumerable = false;
|
|
|
|
if ('writable' in descriptor) {
|
|
descriptor.writable = false;
|
|
return;
|
|
}
|
|
|
|
if (!descriptor.set) {
|
|
descriptor.set = () => {
|
|
throw Error('Can not rewrite read-only method \'' + name + '\'');
|
|
};
|
|
}
|
|
});
|
|
};
|
|
|
|
const toObjectSet = (arrayOrString, delimiter) => {
|
|
const obj = {};
|
|
|
|
const define = (arr) => {
|
|
arr.forEach(value => {
|
|
obj[value] = true;
|
|
});
|
|
};
|
|
|
|
isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
|
|
|
|
return obj;
|
|
};
|
|
|
|
const noop = () => {};
|
|
|
|
const toFiniteNumber = (value, defaultValue) => {
|
|
value = +value;
|
|
return Number.isFinite(value) ? value : defaultValue;
|
|
};
|
|
|
|
const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
|
|
|
|
const DIGIT = '0123456789';
|
|
|
|
const ALPHABET = {
|
|
DIGIT,
|
|
ALPHA,
|
|
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
};
|
|
|
|
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
let str = '';
|
|
const {length} = alphabet;
|
|
while (size--) {
|
|
str += alphabet[Math.random() * length|0];
|
|
}
|
|
|
|
return str;
|
|
};
|
|
|
|
/**
|
|
* If the thing is a FormData object, return true, otherwise return false.
|
|
*
|
|
* @param {unknown} thing - The thing to check.
|
|
*
|
|
* @returns {boolean}
|
|
*/
|
|
function isSpecCompliantForm(thing) {
|
|
return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
|
|
}
|
|
|
|
const toJSONObject = (obj) => {
|
|
const stack = new Array(10);
|
|
|
|
const visit = (source, i) => {
|
|
|
|
if (isObject(source)) {
|
|
if (stack.indexOf(source) >= 0) {
|
|
return;
|
|
}
|
|
|
|
if(!('toJSON' in source)) {
|
|
stack[i] = source;
|
|
const target = isArray(source) ? [] : {};
|
|
|
|
forEach(source, (value, key) => {
|
|
const reducedValue = visit(value, i + 1);
|
|
!isUndefined(reducedValue) && (target[key] = reducedValue);
|
|
});
|
|
|
|
stack[i] = undefined;
|
|
|
|
return target;
|
|
}
|
|
}
|
|
|
|
return source;
|
|
};
|
|
|
|
return visit(obj, 0);
|
|
};
|
|
|
|
const isAsyncFn = kindOfTest('AsyncFunction');
|
|
|
|
const isThenable = (thing) =>
|
|
thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
|
|
|
var utils = {
|
|
isArray,
|
|
isArrayBuffer,
|
|
isBuffer,
|
|
isFormData,
|
|
isArrayBufferView,
|
|
isString,
|
|
isNumber,
|
|
isBoolean,
|
|
isObject,
|
|
isPlainObject,
|
|
isUndefined,
|
|
isDate,
|
|
isFile,
|
|
isBlob,
|
|
isRegExp,
|
|
isFunction,
|
|
isStream,
|
|
isURLSearchParams,
|
|
isTypedArray,
|
|
isFileList,
|
|
forEach,
|
|
merge,
|
|
extend,
|
|
trim,
|
|
stripBOM,
|
|
inherits,
|
|
toFlatObject,
|
|
kindOf,
|
|
kindOfTest,
|
|
endsWith,
|
|
toArray,
|
|
forEachEntry,
|
|
matchAll,
|
|
isHTMLForm,
|
|
hasOwnProperty,
|
|
hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
|
|
reduceDescriptors,
|
|
freezeMethods,
|
|
toObjectSet,
|
|
toCamelCase,
|
|
noop,
|
|
toFiniteNumber,
|
|
findKey,
|
|
global: _global,
|
|
isContextDefined,
|
|
ALPHABET,
|
|
generateString,
|
|
isSpecCompliantForm,
|
|
toJSONObject,
|
|
isAsyncFn,
|
|
isThenable
|
|
};
|
|
|
|
/**
|
|
* Create an Error with the specified message, config, error code, request and response.
|
|
*
|
|
* @param {string} message The error message.
|
|
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
* @param {Object} [config] The config.
|
|
* @param {Object} [request] The request.
|
|
* @param {Object} [response] The response.
|
|
*
|
|
* @returns {Error} The created error.
|
|
*/
|
|
function AxiosError(message, code, config, request, response) {
|
|
Error.call(this);
|
|
|
|
if (Error.captureStackTrace) {
|
|
Error.captureStackTrace(this, this.constructor);
|
|
} else {
|
|
this.stack = (new Error()).stack;
|
|
}
|
|
|
|
this.message = message;
|
|
this.name = 'AxiosError';
|
|
code && (this.code = code);
|
|
config && (this.config = config);
|
|
request && (this.request = request);
|
|
response && (this.response = response);
|
|
}
|
|
|
|
utils.inherits(AxiosError, Error, {
|
|
toJSON: function toJSON() {
|
|
return {
|
|
// Standard
|
|
message: this.message,
|
|
name: this.name,
|
|
// Microsoft
|
|
description: this.description,
|
|
number: this.number,
|
|
// Mozilla
|
|
fileName: this.fileName,
|
|
lineNumber: this.lineNumber,
|
|
columnNumber: this.columnNumber,
|
|
stack: this.stack,
|
|
// Axios
|
|
config: utils.toJSONObject(this.config),
|
|
code: this.code,
|
|
status: this.response && this.response.status ? this.response.status : null
|
|
};
|
|
}
|
|
});
|
|
|
|
const prototype$1 = AxiosError.prototype;
|
|
const descriptors = {};
|
|
|
|
[
|
|
'ERR_BAD_OPTION_VALUE',
|
|
'ERR_BAD_OPTION',
|
|
'ECONNABORTED',
|
|
'ETIMEDOUT',
|
|
'ERR_NETWORK',
|
|
'ERR_FR_TOO_MANY_REDIRECTS',
|
|
'ERR_DEPRECATED',
|
|
'ERR_BAD_RESPONSE',
|
|
'ERR_BAD_REQUEST',
|
|
'ERR_CANCELED',
|
|
'ERR_NOT_SUPPORT',
|
|
'ERR_INVALID_URL'
|
|
// eslint-disable-next-line func-names
|
|
].forEach(code => {
|
|
descriptors[code] = {value: code};
|
|
});
|
|
|
|
Object.defineProperties(AxiosError, descriptors);
|
|
Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
|
|
|
|
// eslint-disable-next-line func-names
|
|
AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
const axiosError = Object.create(prototype$1);
|
|
|
|
utils.toFlatObject(error, axiosError, function filter(obj) {
|
|
return obj !== Error.prototype;
|
|
}, prop => {
|
|
return prop !== 'isAxiosError';
|
|
});
|
|
|
|
AxiosError.call(axiosError, error.message, code, config, request, response);
|
|
|
|
axiosError.cause = error;
|
|
|
|
axiosError.name = error.name;
|
|
|
|
customProps && Object.assign(axiosError, customProps);
|
|
|
|
return axiosError;
|
|
};
|
|
|
|
// eslint-disable-next-line strict
|
|
var httpAdapter = null;
|
|
|
|
/**
|
|
* Determines if the given thing is a array or js object.
|
|
*
|
|
* @param {string} thing - The object or array to be visited.
|
|
*
|
|
* @returns {boolean}
|
|
*/
|
|
function isVisitable(thing) {
|
|
return utils.isPlainObject(thing) || utils.isArray(thing);
|
|
}
|
|
|
|
/**
|
|
* It removes the brackets from the end of a string
|
|
*
|
|
* @param {string} key - The key of the parameter.
|
|
*
|
|
* @returns {string} the key without the brackets.
|
|
*/
|
|
function removeBrackets(key) {
|
|
return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
|
|
}
|
|
|
|
/**
|
|
* It takes a path, a key, and a boolean, and returns a string
|
|
*
|
|
* @param {string} path - The path to the current key.
|
|
* @param {string} key - The key of the current object being iterated over.
|
|
* @param {string} dots - If true, the key will be rendered with dots instead of brackets.
|
|
*
|
|
* @returns {string} The path to the current key.
|
|
*/
|
|
function renderKey(path, key, dots) {
|
|
if (!path) return key;
|
|
return path.concat(key).map(function each(token, i) {
|
|
// eslint-disable-next-line no-param-reassign
|
|
token = removeBrackets(token);
|
|
return !dots && i ? '[' + token + ']' : token;
|
|
}).join(dots ? '.' : '');
|
|
}
|
|
|
|
/**
|
|
* If the array is an array and none of its elements are visitable, then it's a flat array.
|
|
*
|
|
* @param {Array<any>} arr - The array to check
|
|
*
|
|
* @returns {boolean}
|
|
*/
|
|
function isFlatArray(arr) {
|
|
return utils.isArray(arr) && !arr.some(isVisitable);
|
|
}
|
|
|
|
const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
|
|
return /^is[A-Z]/.test(prop);
|
|
});
|
|
|
|
/**
|
|
* Convert a data object to FormData
|
|
*
|
|
* @param {Object} obj
|
|
* @param {?Object} [formData]
|
|
* @param {?Object} [options]
|
|
* @param {Function} [options.visitor]
|
|
* @param {Boolean} [options.metaTokens = true]
|
|
* @param {Boolean} [options.dots = false]
|
|
* @param {?Boolean} [options.indexes = false]
|
|
*
|
|
* @returns {Object}
|
|
**/
|
|
|
|
/**
|
|
* It converts an object into a FormData object
|
|
*
|
|
* @param {Object<any, any>} obj - The object to convert to form data.
|
|
* @param {string} formData - The FormData object to append to.
|
|
* @param {Object<string, any>} options
|
|
*
|
|
* @returns
|
|
*/
|
|
function toFormData(obj, formData, options) {
|
|
if (!utils.isObject(obj)) {
|
|
throw new TypeError('target must be an object');
|
|
}
|
|
|
|
// eslint-disable-next-line no-param-reassign
|
|
formData = formData || new (FormData)();
|
|
|
|
// eslint-disable-next-line no-param-reassign
|
|
options = utils.toFlatObject(options, {
|
|
metaTokens: true,
|
|
dots: false,
|
|
indexes: false
|
|
}, false, function defined(option, source) {
|
|
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
return !utils.isUndefined(source[option]);
|
|
});
|
|
|
|
const metaTokens = options.metaTokens;
|
|
// eslint-disable-next-line no-use-before-define
|
|
const visitor = options.visitor || defaultVisitor;
|
|
const dots = options.dots;
|
|
const indexes = options.indexes;
|
|
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
|
const useBlob = _Blob && utils.isSpecCompliantForm(formData);
|
|
|
|
if (!utils.isFunction(visitor)) {
|
|
throw new TypeError('visitor must be a function');
|
|
}
|
|
|
|
function convertValue(value) {
|
|
if (value === null) return '';
|
|
|
|
if (utils.isDate(value)) {
|
|
return value.toISOString();
|
|
}
|
|
|
|
if (!useBlob && utils.isBlob(value)) {
|
|
throw new AxiosError('Blob is not supported. Use a Buffer instead.');
|
|
}
|
|
|
|
if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
|
|
return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
|
|
}
|
|
|
|
return value;
|
|
}
|
|
|
|
/**
|
|
* Default visitor.
|
|
*
|
|
* @param {*} value
|
|
* @param {String|Number} key
|
|
* @param {Array<String|Number>} path
|
|
* @this {FormData}
|
|
*
|
|
* @returns {boolean} return true to visit the each prop of the value recursively
|
|
*/
|
|
function defaultVisitor(value, key, path) {
|
|
let arr = value;
|
|
|
|
if (value && !path && typeof value === 'object') {
|
|
if (utils.endsWith(key, '{}')) {
|
|
// eslint-disable-next-line no-param-reassign
|
|
key = metaTokens ? key : key.slice(0, -2);
|
|
// eslint-disable-next-line no-param-reassign
|
|
value = JSON.stringify(value);
|
|
} else if (
|
|
(utils.isArray(value) && isFlatArray(value)) ||
|
|
((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
|
|
)) {
|
|
// eslint-disable-next-line no-param-reassign
|
|
key = removeBrackets(key);
|
|
|
|
arr.forEach(function each(el, index) {
|
|
!(utils.isUndefined(el) || el === null) && formData.append(
|
|
// eslint-disable-next-line no-nested-ternary
|
|
indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
|
|
convertValue(el)
|
|
);
|
|
});
|
|
return false;
|
|
}
|
|
}
|
|
|
|
if (isVisitable(value)) {
|
|
return true;
|
|
}
|
|
|
|
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
|
|
return false;
|
|
}
|
|
|
|
const stack = [];
|
|
|
|
const exposedHelpers = Object.assign(predicates, {
|
|
defaultVisitor,
|
|
convertValue,
|
|
isVisitable
|
|
});
|
|
|
|
function build(value, path) {
|
|
if (utils.isUndefined(value)) return;
|
|
|
|
if (stack.indexOf(value) !== -1) {
|
|
throw Error('Circular reference detected in ' + path.join('.'));
|
|
}
|
|
|
|
stack.push(value);
|
|
|
|
utils.forEach(value, function each(el, key) {
|
|
const result = !(utils.isUndefined(el) || el === null) && visitor.call(
|
|
formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers
|
|
);
|
|
|
|
if (result === true) {
|
|
build(el, path ? path.concat(key) : [key]);
|
|
}
|
|
});
|
|
|
|
stack.pop();
|
|
}
|
|
|
|
if (!utils.isObject(obj)) {
|
|
throw new TypeError('data must be an object');
|
|
}
|
|
|
|
build(obj);
|
|
|
|
return formData;
|
|
}
|
|
|
|
/**
|
|
* It encodes a string by replacing all characters that are not in the unreserved set with
|
|
* their percent-encoded equivalents
|
|
*
|
|
* @param {string} str - The string to encode.
|
|
*
|
|
* @returns {string} The encoded string.
|
|
*/
|
|
function encode$1(str) {
|
|
const charMap = {
|
|
'!': '%21',
|
|
"'": '%27',
|
|
'(': '%28',
|
|
')': '%29',
|
|
'~': '%7E',
|
|
'%20': '+',
|
|
'%00': '\x00'
|
|
};
|
|
return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
|
|
return charMap[match];
|
|
});
|
|
}
|
|
|
|
/**
|
|
* It takes a params object and converts it to a FormData object
|
|
*
|
|
* @param {Object<string, any>} params - The parameters to be converted to a FormData object.
|
|
* @param {Object<string, any>} options - The options object passed to the Axios constructor.
|
|
*
|
|
* @returns {void}
|
|
*/
|
|
function AxiosURLSearchParams(params, options) {
|
|
this._pairs = [];
|
|
|
|
params && toFormData(params, this, options);
|
|
}
|
|
|
|
const prototype = AxiosURLSearchParams.prototype;
|
|
|
|
prototype.append = function append(name, value) {
|
|
this._pairs.push([name, value]);
|
|
};
|
|
|
|
prototype.toString = function toString(encoder) {
|
|
const _encode = encoder ? function(value) {
|
|
return encoder.call(this, value, encode$1);
|
|
} : encode$1;
|
|
|
|
return this._pairs.map(function each(pair) {
|
|
return _encode(pair[0]) + '=' + _encode(pair[1]);
|
|
}, '').join('&');
|
|
};
|
|
|
|
/**
|
|
* It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
|
|
* URI encoded counterparts
|
|
*
|
|
* @param {string} val The value to be encoded.
|
|
*
|
|
* @returns {string} The encoded value.
|
|
*/
|
|
function encode(val) {
|
|
return encodeURIComponent(val).
|
|
replace(/%3A/gi, ':').
|
|
replace(/%24/g, '$').
|
|
replace(/%2C/gi, ',').
|
|
replace(/%20/g, '+').
|
|
replace(/%5B/gi, '[').
|
|
replace(/%5D/gi, ']');
|
|
}
|
|
|
|
/**
|
|
* Build a URL by appending params to the end
|
|
*
|
|
* @param {string} url The base of the url (e.g., http://www.google.com)
|
|
* @param {object} [params] The params to be appended
|
|
* @param {?object} options
|
|
*
|
|
* @returns {string} The formatted url
|
|
*/
|
|
function buildURL(url, params, options) {
|
|
/*eslint no-param-reassign:0*/
|
|
if (!params) {
|
|
return url;
|
|
}
|
|
|
|
const _encode = options && options.encode || encode;
|
|
|
|
const serializeFn = options && options.serialize;
|
|
|
|
let serializedParams;
|
|
|
|
if (serializeFn) {
|
|
serializedParams = serializeFn(params, options);
|
|
} else {
|
|
serializedParams = utils.isURLSearchParams(params) ?
|
|
params.toString() :
|
|
new AxiosURLSearchParams(params, options).toString(_encode);
|
|
}
|
|
|
|
if (serializedParams) {
|
|
const hashmarkIndex = url.indexOf("#");
|
|
|
|
if (hashmarkIndex !== -1) {
|
|
url = url.slice(0, hashmarkIndex);
|
|
}
|
|
url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
|
|
}
|
|
|
|
return url;
|
|
}
|
|
|
|
class InterceptorManager {
|
|
constructor() {
|
|
this.handlers = [];
|
|
}
|
|
|
|
/**
|
|
* Add a new interceptor to the stack
|
|
*
|
|
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
*
|
|
* @return {Number} An ID used to remove interceptor later
|
|
*/
|
|
use(fulfilled, rejected, options) {
|
|
this.handlers.push({
|
|
fulfilled,
|
|
rejected,
|
|
synchronous: options ? options.synchronous : false,
|
|
runWhen: options ? options.runWhen : null
|
|
});
|
|
return this.handlers.length - 1;
|
|
}
|
|
|
|
/**
|
|
* Remove an interceptor from the stack
|
|
*
|
|
* @param {Number} id The ID that was returned by `use`
|
|
*
|
|
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
*/
|
|
eject(id) {
|
|
if (this.handlers[id]) {
|
|
this.handlers[id] = null;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Clear all interceptors from the stack
|
|
*
|
|
* @returns {void}
|
|
*/
|
|
clear() {
|
|
if (this.handlers) {
|
|
this.handlers = [];
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Iterate over all the registered interceptors
|
|
*
|
|
* This method is particularly useful for skipping over any
|
|
* interceptors that may have become `null` calling `eject`.
|
|
*
|
|
* @param {Function} fn The function to call for each interceptor
|
|
*
|
|
* @returns {void}
|
|
*/
|
|
forEach(fn) {
|
|
utils.forEach(this.handlers, function forEachHandler(h) {
|
|
if (h !== null) {
|
|
fn(h);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
var InterceptorManager$1 = InterceptorManager;
|
|
|
|
var transitionalDefaults = {
|
|
silentJSONParsing: true,
|
|
forcedJSONParsing: true,
|
|
clarifyTimeoutError: false
|
|
};
|
|
|
|
var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
|
|
|
|
var FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
|
|
|
|
var Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
|
|
|
|
/**
|
|
* Determine if we're running in a standard browser environment
|
|
*
|
|
* This allows axios to run in a web worker, and react-native.
|
|
* Both environments support XMLHttpRequest, but not fully standard globals.
|
|
*
|
|
* web workers:
|
|
* typeof window -> undefined
|
|
* typeof document -> undefined
|
|
*
|
|
* react-native:
|
|
* navigator.product -> 'ReactNative'
|
|
* nativescript
|
|
* navigator.product -> 'NativeScript' or 'NS'
|
|
*
|
|
* @returns {boolean}
|
|
*/
|
|
const isStandardBrowserEnv = (() => {
|
|
let product;
|
|
if (typeof navigator !== 'undefined' && (
|
|
(product = navigator.product) === 'ReactNative' ||
|
|
product === 'NativeScript' ||
|
|
product === 'NS')
|
|
) {
|
|
return false;
|
|
}
|
|
|
|
return typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
})();
|
|
|
|
/**
|
|
* Determine if we're running in a standard browser webWorker environment
|
|
*
|
|
* Although the `isStandardBrowserEnv` method indicates that
|
|
* `allows axios to run in a web worker`, the WebWorker will still be
|
|
* filtered out due to its judgment standard
|
|
* `typeof window !== 'undefined' && typeof document !== 'undefined'`.
|
|
* This leads to a problem when axios post `FormData` in webWorker
|
|
*/
|
|
const isStandardBrowserWebWorkerEnv = (() => {
|
|
return (
|
|
typeof WorkerGlobalScope !== 'undefined' &&
|
|
// eslint-disable-next-line no-undef
|
|
self instanceof WorkerGlobalScope &&
|
|
typeof self.importScripts === 'function'
|
|
);
|
|
})();
|
|
|
|
|
|
var platform = {
|
|
isBrowser: true,
|
|
classes: {
|
|
URLSearchParams: URLSearchParams$1,
|
|
FormData: FormData$1,
|
|
Blob: Blob$1
|
|
},
|
|
isStandardBrowserEnv,
|
|
isStandardBrowserWebWorkerEnv,
|
|
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
|
};
|
|
|
|
function toURLEncodedForm(data, options) {
|
|
return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
|
|
visitor: function(value, key, path, helpers) {
|
|
if (platform.isNode && utils.isBuffer(value)) {
|
|
this.append(key, value.toString('base64'));
|
|
return false;
|
|
}
|
|
|
|
return helpers.defaultVisitor.apply(this, arguments);
|
|
}
|
|
}, options));
|
|
}
|
|
|
|
/**
|
|
* It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
|
|
*
|
|
* @param {string} name - The name of the property to get.
|
|
*
|
|
* @returns An array of strings.
|
|
*/
|
|
function parsePropPath(name) {
|
|
// foo[x][y][z]
|
|
// foo.x.y.z
|
|
// foo-x-y-z
|
|
// foo x y z
|
|
return utils.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
|
return match[0] === '[]' ? '' : match[1] || match[0];
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Convert an array to an object.
|
|
*
|
|
* @param {Array<any>} arr - The array to convert to an object.
|
|
*
|
|
* @returns An object with the same keys and values as the array.
|
|
*/
|
|
function arrayToObject(arr) {
|
|
const obj = {};
|
|
const keys = Object.keys(arr);
|
|
let i;
|
|
const len = keys.length;
|
|
let key;
|
|
for (i = 0; i < len; i++) {
|
|
key = keys[i];
|
|
obj[key] = arr[key];
|
|
}
|
|
return obj;
|
|
}
|
|
|
|
/**
|
|
* It takes a FormData object and returns a JavaScript object
|
|
*
|
|
* @param {string} formData The FormData object to convert to JSON.
|
|
*
|
|
* @returns {Object<string, any> | null} The converted object.
|
|
*/
|
|
function formDataToJSON(formData) {
|
|
function buildPath(path, value, target, index) {
|
|
let name = path[index++];
|
|
const isNumericKey = Number.isFinite(+name);
|
|
const isLast = index >= path.length;
|
|
name = !name && utils.isArray(target) ? target.length : name;
|
|
|
|
if (isLast) {
|
|
if (utils.hasOwnProp(target, name)) {
|
|
target[name] = [target[name], value];
|
|
} else {
|
|
target[name] = value;
|
|
}
|
|
|
|
return !isNumericKey;
|
|
}
|
|
|
|
if (!target[name] || !utils.isObject(target[name])) {
|
|
target[name] = [];
|
|
}
|
|
|
|
const result = buildPath(path, value, target[name], index);
|
|
|
|
if (result && utils.isArray(target[name])) {
|
|
target[name] = arrayToObject(target[name]);
|
|
}
|
|
|
|
return !isNumericKey;
|
|
}
|
|
|
|
if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
|
|
const obj = {};
|
|
|
|
utils.forEachEntry(formData, (name, value) => {
|
|
buildPath(parsePropPath(name), value, obj, 0);
|
|
});
|
|
|
|
return obj;
|
|
}
|
|
|
|
return null;
|
|
}
|
|
|
|
const DEFAULT_CONTENT_TYPE = {
|
|
'Content-Type': undefined
|
|
};
|
|
|
|
/**
|
|
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
|
* of the input
|
|
*
|
|
* @param {any} rawValue - The value to be stringified.
|
|
* @param {Function} parser - A function that parses a string into a JavaScript object.
|
|
* @param {Function} encoder - A function that takes a value and returns a string.
|
|
*
|
|
* @returns {string} A stringified version of the rawValue.
|
|
*/
|
|
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);
|
|
}
|
|
|
|
const defaults = {
|
|
|
|
transitional: transitionalDefaults,
|
|
|
|
adapter: ['xhr', 'http'],
|
|
|
|
transformRequest: [function transformRequest(data, headers) {
|
|
const contentType = headers.getContentType() || '';
|
|
const hasJSONContentType = contentType.indexOf('application/json') > -1;
|
|
const isObjectPayload = utils.isObject(data);
|
|
|
|
if (isObjectPayload && utils.isHTMLForm(data)) {
|
|
data = new FormData(data);
|
|
}
|
|
|
|
const isFormData = utils.isFormData(data);
|
|
|
|
if (isFormData) {
|
|
if (!hasJSONContentType) {
|
|
return data;
|
|
}
|
|
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
}
|
|
|
|
if (utils.isArrayBuffer(data) ||
|
|
utils.isBuffer(data) ||
|
|
utils.isStream(data) ||
|
|
utils.isFile(data) ||
|
|
utils.isBlob(data)
|
|
) {
|
|
return data;
|
|
}
|
|
if (utils.isArrayBufferView(data)) {
|
|
return data.buffer;
|
|
}
|
|
if (utils.isURLSearchParams(data)) {
|
|
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
return data.toString();
|
|
}
|
|
|
|
let isFileList;
|
|
|
|
if (isObjectPayload) {
|
|
if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
|
|
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
}
|
|
|
|
if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
|
|
const _FormData = this.env && this.env.FormData;
|
|
|
|
return toFormData(
|
|
isFileList ? {'files[]': data} : data,
|
|
_FormData && new _FormData(),
|
|
this.formSerializer
|
|
);
|
|
}
|
|
}
|
|
|
|
if (isObjectPayload || hasJSONContentType ) {
|
|
headers.setContentType('application/json', false);
|
|
return stringifySafely(data);
|
|
}
|
|
|
|
return data;
|
|
}],
|
|
|
|
transformResponse: [function transformResponse(data) {
|
|
const transitional = this.transitional || defaults.transitional;
|
|
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
const JSONRequested = this.responseType === 'json';
|
|
|
|
if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
|
|
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
|
|
try {
|
|
return JSON.parse(data);
|
|
} catch (e) {
|
|
if (strictJSONParsing) {
|
|
if (e.name === 'SyntaxError') {
|
|
throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
|
|
}
|
|
throw e;
|
|
}
|
|
}
|
|
}
|
|
|
|
return data;
|
|
}],
|
|
|
|
/**
|
|
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
* timeout is not created.
|
|
*/
|
|
timeout: 0,
|
|
|
|
xsrfCookieName: 'XSRF-TOKEN',
|
|
xsrfHeaderName: 'X-XSRF-TOKEN',
|
|
|
|
maxContentLength: -1,
|
|
maxBodyLength: -1,
|
|
|
|
env: {
|
|
FormData: platform.classes.FormData,
|
|
Blob: platform.classes.Blob
|
|
},
|
|
|
|
validateStatus: function validateStatus(status) {
|
|
return status >= 200 && status < 300;
|
|
},
|
|
|
|
headers: {
|
|
common: {
|
|
'Accept': 'application/json, text/plain, */*'
|
|
}
|
|
}
|
|
};
|
|
|
|
utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
|
|
defaults.headers[method] = {};
|
|
});
|
|
|
|
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
|
|
});
|
|
|
|
var defaults$1 = defaults;
|
|
|
|
// RawAxiosHeaders whose duplicates are ignored by node
|
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
const ignoreDuplicateOf = utils.toObjectSet([
|
|
'age', 'authorization', 'content-length', 'content-type', 'etag',
|
|
'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
|
|
'last-modified', 'location', 'max-forwards', 'proxy-authorization',
|
|
'referer', 'retry-after', 'user-agent'
|
|
]);
|
|
|
|
/**
|
|
* Parse headers into an object
|
|
*
|
|
* ```
|
|
* Date: Wed, 27 Aug 2014 08:58:49 GMT
|
|
* Content-Type: application/json
|
|
* Connection: keep-alive
|
|
* Transfer-Encoding: chunked
|
|
* ```
|
|
*
|
|
* @param {String} rawHeaders Headers needing to be parsed
|
|
*
|
|
* @returns {Object} Headers parsed into an object
|
|
*/
|
|
var parseHeaders = rawHeaders => {
|
|
const parsed = {};
|
|
let key;
|
|
let val;
|
|
let i;
|
|
|
|
rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
|
|
i = line.indexOf(':');
|
|
key = line.substring(0, i).trim().toLowerCase();
|
|
val = line.substring(i + 1).trim();
|
|
|
|
if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
|
|
return;
|
|
}
|
|
|
|
if (key === 'set-cookie') {
|
|
if (parsed[key]) {
|
|
parsed[key].push(val);
|
|
} else {
|
|
parsed[key] = [val];
|
|
}
|
|
} else {
|
|
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
}
|
|
});
|
|
|
|
return parsed;
|
|
};
|
|
|
|
const $internals = Symbol('internals');
|
|
|
|
function normalizeHeader(header) {
|
|
return header && String(header).trim().toLowerCase();
|
|
}
|
|
|
|
function normalizeValue(value) {
|
|
if (value === false || value == null) {
|
|
return value;
|
|
}
|
|
|
|
return utils.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
}
|
|
|
|
function parseTokens(str) {
|
|
const tokens = Object.create(null);
|
|
const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
let match;
|
|
|
|
while ((match = tokensRE.exec(str))) {
|
|
tokens[match[1]] = match[2];
|
|
}
|
|
|
|
return tokens;
|
|
}
|
|
|
|
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
|
|
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
if (utils.isFunction(filter)) {
|
|
return filter.call(this, value, header);
|
|
}
|
|
|
|
if (isHeaderNameFilter) {
|
|
value = header;
|
|
}
|
|
|
|
if (!utils.isString(value)) return;
|
|
|
|
if (utils.isString(filter)) {
|
|
return value.indexOf(filter) !== -1;
|
|
}
|
|
|
|
if (utils.isRegExp(filter)) {
|
|
return filter.test(value);
|
|
}
|
|
}
|
|
|
|
function formatHeader(header) {
|
|
return header.trim()
|
|
.toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
|
|
return char.toUpperCase() + str;
|
|
});
|
|
}
|
|
|
|
function buildAccessors(obj, header) {
|
|
const accessorName = utils.toCamelCase(' ' + header);
|
|
|
|
['get', 'set', 'has'].forEach(methodName => {
|
|
Object.defineProperty(obj, methodName + accessorName, {
|
|
value: function(arg1, arg2, arg3) {
|
|
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
},
|
|
configurable: true
|
|
});
|
|
});
|
|
}
|
|
|
|
class AxiosHeaders {
|
|
constructor(headers) {
|
|
headers && this.set(headers);
|
|
}
|
|
|
|
set(header, valueOrRewrite, rewrite) {
|
|
const self = this;
|
|
|
|
function setHeader(_value, _header, _rewrite) {
|
|
const lHeader = normalizeHeader(_header);
|
|
|
|
if (!lHeader) {
|
|
throw new Error('header name must be a non-empty string');
|
|
}
|
|
|
|
const key = utils.findKey(self, lHeader);
|
|
|
|
if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
|
|
self[key || _header] = normalizeValue(_value);
|
|
}
|
|
}
|
|
|
|
const setHeaders = (headers, _rewrite) =>
|
|
utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
|
|
if (utils.isPlainObject(header) || header instanceof this.constructor) {
|
|
setHeaders(header, valueOrRewrite);
|
|
} else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
} else {
|
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
}
|
|
|
|
return this;
|
|
}
|
|
|
|
get(header, parser) {
|
|
header = normalizeHeader(header);
|
|
|
|
if (header) {
|
|
const key = utils.findKey(this, header);
|
|
|
|
if (key) {
|
|
const value = this[key];
|
|
|
|
if (!parser) {
|
|
return value;
|
|
}
|
|
|
|
if (parser === true) {
|
|
return parseTokens(value);
|
|
}
|
|
|
|
if (utils.isFunction(parser)) {
|
|
return parser.call(this, value, key);
|
|
}
|
|
|
|
if (utils.isRegExp(parser)) {
|
|
return parser.exec(value);
|
|
}
|
|
|
|
throw new TypeError('parser must be boolean|regexp|function');
|
|
}
|
|
}
|
|
}
|
|
|
|
has(header, matcher) {
|
|
header = normalizeHeader(header);
|
|
|
|
if (header) {
|
|
const key = utils.findKey(this, header);
|
|
|
|
return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
delete(header, matcher) {
|
|
const self = this;
|
|
let deleted = false;
|
|
|
|
function deleteHeader(_header) {
|
|
_header = normalizeHeader(_header);
|
|
|
|
if (_header) {
|
|
const key = utils.findKey(self, _header);
|
|
|
|
if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
|
|
delete self[key];
|
|
|
|
deleted = true;
|
|
}
|
|
}
|
|
}
|
|
|
|
if (utils.isArray(header)) {
|
|
header.forEach(deleteHeader);
|
|
} else {
|
|
deleteHeader(header);
|
|
}
|
|
|
|
return deleted;
|
|
}
|
|
|
|
clear(matcher) {
|
|
const keys = Object.keys(this);
|
|
let i = keys.length;
|
|
let deleted = false;
|
|
|
|
while (i--) {
|
|
const key = keys[i];
|
|
if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
delete this[key];
|
|
deleted = true;
|
|
}
|
|
}
|
|
|
|
return deleted;
|
|
}
|
|
|
|
normalize(format) {
|
|
const self = this;
|
|
const headers = {};
|
|
|
|
utils.forEach(this, (value, header) => {
|
|
const key = utils.findKey(headers, header);
|
|
|
|
if (key) {
|
|
self[key] = normalizeValue(value);
|
|
delete self[header];
|
|
return;
|
|
}
|
|
|
|
const normalized = format ? formatHeader(header) : String(header).trim();
|
|
|
|
if (normalized !== header) {
|
|
delete self[header];
|
|
}
|
|
|
|
self[normalized] = normalizeValue(value);
|
|
|
|
headers[normalized] = true;
|
|
});
|
|
|
|
return this;
|
|
}
|
|
|
|
concat(...targets) {
|
|
return this.constructor.concat(this, ...targets);
|
|
}
|
|
|
|
toJSON(asStrings) {
|
|
const obj = Object.create(null);
|
|
|
|
utils.forEach(this, (value, header) => {
|
|
value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);
|
|
});
|
|
|
|
return obj;
|
|
}
|
|
|
|
[Symbol.iterator]() {
|
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
}
|
|
|
|
toString() {
|
|
return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
|
|
}
|
|
|
|
get [Symbol.toStringTag]() {
|
|
return 'AxiosHeaders';
|
|
}
|
|
|
|
static from(thing) {
|
|
return thing instanceof this ? thing : new this(thing);
|
|
}
|
|
|
|
static concat(first, ...targets) {
|
|
const computed = new this(first);
|
|
|
|
targets.forEach((target) => computed.set(target));
|
|
|
|
return computed;
|
|
}
|
|
|
|
static accessor(header) {
|
|
const internals = this[$internals] = (this[$internals] = {
|
|
accessors: {}
|
|
});
|
|
|
|
const accessors = internals.accessors;
|
|
const prototype = this.prototype;
|
|
|
|
function defineAccessor(_header) {
|
|
const lHeader = normalizeHeader(_header);
|
|
|
|
if (!accessors[lHeader]) {
|
|
buildAccessors(prototype, _header);
|
|
accessors[lHeader] = true;
|
|
}
|
|
}
|
|
|
|
utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
|
|
return this;
|
|
}
|
|
}
|
|
|
|
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
|
|
|
utils.freezeMethods(AxiosHeaders.prototype);
|
|
utils.freezeMethods(AxiosHeaders);
|
|
|
|
var AxiosHeaders$1 = AxiosHeaders;
|
|
|
|
/**
|
|
* Transform the data for a request or a response
|
|
*
|
|
* @param {Array|Function} fns A single function or Array of functions
|
|
* @param {?Object} response The response object
|
|
*
|
|
* @returns {*} The resulting transformed data
|
|
*/
|
|
function transformData(fns, response) {
|
|
const config = this || defaults$1;
|
|
const context = response || config;
|
|
const headers = AxiosHeaders$1.from(context.headers);
|
|
let data = context.data;
|
|
|
|
utils.forEach(fns, function transform(fn) {
|
|
data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
|
|
});
|
|
|
|
headers.normalize();
|
|
|
|
return data;
|
|
}
|
|
|
|
function isCancel(value) {
|
|
return !!(value && value.__CANCEL__);
|
|
}
|
|
|
|
/**
|
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
*
|
|
* @param {string=} message The message.
|
|
* @param {Object=} config The config.
|
|
* @param {Object=} request The request.
|
|
*
|
|
* @returns {CanceledError} The created error.
|
|
*/
|
|
function CanceledError(message, config, request) {
|
|
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);
|
|
this.name = 'CanceledError';
|
|
}
|
|
|
|
utils.inherits(CanceledError, AxiosError, {
|
|
__CANCEL__: true
|
|
});
|
|
|
|
/**
|
|
* Resolve or reject a Promise based on response status.
|
|
*
|
|
* @param {Function} resolve A function that resolves the promise.
|
|
* @param {Function} reject A function that rejects the promise.
|
|
* @param {object} response The response.
|
|
*
|
|
* @returns {object} The response.
|
|
*/
|
|
function settle(resolve, reject, response) {
|
|
const validateStatus = response.config.validateStatus;
|
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
resolve(response);
|
|
} else {
|
|
reject(new AxiosError(
|
|
'Request failed with status code ' + response.status,
|
|
[AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
|
response.config,
|
|
response.request,
|
|
response
|
|
));
|
|
}
|
|
}
|
|
|
|
var cookies = platform.isStandardBrowserEnv ?
|
|
|
|
// Standard browser envs support document.cookie
|
|
(function standardBrowserEnv() {
|
|
return {
|
|
write: function write(name, value, expires, path, domain, secure) {
|
|
const cookie = [];
|
|
cookie.push(name + '=' + encodeURIComponent(value));
|
|
|
|
if (utils.isNumber(expires)) {
|
|
cookie.push('expires=' + new Date(expires).toGMTString());
|
|
}
|
|
|
|
if (utils.isString(path)) {
|
|
cookie.push('path=' + path);
|
|
}
|
|
|
|
if (utils.isString(domain)) {
|
|
cookie.push('domain=' + domain);
|
|
}
|
|
|
|
if (secure === true) {
|
|
cookie.push('secure');
|
|
}
|
|
|
|
document.cookie = cookie.join('; ');
|
|
},
|
|
|
|
read: function read(name) {
|
|
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
|
return (match ? decodeURIComponent(match[3]) : null);
|
|
},
|
|
|
|
remove: function remove(name) {
|
|
this.write(name, '', Date.now() - 86400000);
|
|
}
|
|
};
|
|
})() :
|
|
|
|
// Non standard browser env (web workers, react-native) lack needed support.
|
|
(function nonStandardBrowserEnv() {
|
|
return {
|
|
write: function write() {},
|
|
read: function read() { return null; },
|
|
remove: function remove() {}
|
|
};
|
|
})();
|
|
|
|
/**
|
|
* Determines whether the specified URL is absolute
|
|
*
|
|
* @param {string} url The URL to test
|
|
*
|
|
* @returns {boolean} True if the specified URL is absolute, otherwise false
|
|
*/
|
|
function isAbsoluteURL(url) {
|
|
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
// by any combination of letters, digits, plus, period, or hyphen.
|
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
}
|
|
|
|
/**
|
|
* Creates a new URL by combining the specified URLs
|
|
*
|
|
* @param {string} baseURL The base URL
|
|
* @param {string} relativeURL The relative URL
|
|
*
|
|
* @returns {string} The combined URL
|
|
*/
|
|
function combineURLs(baseURL, relativeURL) {
|
|
return relativeURL
|
|
? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
|
|
: baseURL;
|
|
}
|
|
|
|
/**
|
|
* Creates a new URL by combining the baseURL with the requestedURL,
|
|
* only when the requestedURL is not already an absolute URL.
|
|
* If the requestURL is absolute, this function returns the requestedURL untouched.
|
|
*
|
|
* @param {string} baseURL The base URL
|
|
* @param {string} requestedURL Absolute or relative URL to combine
|
|
*
|
|
* @returns {string} The combined full path
|
|
*/
|
|
function buildFullPath(baseURL, requestedURL) {
|
|
if (baseURL && !isAbsoluteURL(requestedURL)) {
|
|
return combineURLs(baseURL, requestedURL);
|
|
}
|
|
return requestedURL;
|
|
}
|
|
|
|
var isURLSameOrigin = platform.isStandardBrowserEnv ?
|
|
|
|
// Standard browser envs have full support of the APIs needed to test
|
|
// whether the request URL is of the same origin as current location.
|
|
(function standardBrowserEnv() {
|
|
const msie = /(msie|trident)/i.test(navigator.userAgent);
|
|
const urlParsingNode = document.createElement('a');
|
|
let originURL;
|
|
|
|
/**
|
|
* Parse a URL to discover it's components
|
|
*
|
|
* @param {String} url The URL to be parsed
|
|
* @returns {Object}
|
|
*/
|
|
function resolveURL(url) {
|
|
let href = url;
|
|
|
|
if (msie) {
|
|
// IE needs attribute set twice to normalize properties
|
|
urlParsingNode.setAttribute('href', href);
|
|
href = urlParsingNode.href;
|
|
}
|
|
|
|
urlParsingNode.setAttribute('href', href);
|
|
|
|
// urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
|
|
return {
|
|
href: urlParsingNode.href,
|
|
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
|
|
host: urlParsingNode.host,
|
|
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
|
|
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
|
|
hostname: urlParsingNode.hostname,
|
|
port: urlParsingNode.port,
|
|
pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
|
|
urlParsingNode.pathname :
|
|
'/' + urlParsingNode.pathname
|
|
};
|
|
}
|
|
|
|
originURL = resolveURL(window.location.href);
|
|
|
|
/**
|
|
* Determine if a URL shares the same origin as the current location
|
|
*
|
|
* @param {String} requestURL The URL to test
|
|
* @returns {boolean} True if URL shares the same origin, otherwise false
|
|
*/
|
|
return function isURLSameOrigin(requestURL) {
|
|
const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
|
return (parsed.protocol === originURL.protocol &&
|
|
parsed.host === originURL.host);
|
|
};
|
|
})() :
|
|
|
|
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
(function nonStandardBrowserEnv() {
|
|
return function isURLSameOrigin() {
|
|
return true;
|
|
};
|
|
})();
|
|
|
|
function parseProtocol(url) {
|
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
return match && match[1] || '';
|
|
}
|
|
|
|
/**
|
|
* Calculate data maxRate
|
|
* @param {Number} [samplesCount= 10]
|
|
* @param {Number} [min= 1000]
|
|
* @returns {Function}
|
|
*/
|
|
function speedometer(samplesCount, min) {
|
|
samplesCount = samplesCount || 10;
|
|
const bytes = new Array(samplesCount);
|
|
const timestamps = new Array(samplesCount);
|
|
let head = 0;
|
|
let tail = 0;
|
|
let firstSampleTS;
|
|
|
|
min = min !== undefined ? min : 1000;
|
|
|
|
return function push(chunkLength) {
|
|
const now = Date.now();
|
|
|
|
const startedAt = timestamps[tail];
|
|
|
|
if (!firstSampleTS) {
|
|
firstSampleTS = now;
|
|
}
|
|
|
|
bytes[head] = chunkLength;
|
|
timestamps[head] = now;
|
|
|
|
let i = tail;
|
|
let bytesCount = 0;
|
|
|
|
while (i !== head) {
|
|
bytesCount += bytes[i++];
|
|
i = i % samplesCount;
|
|
}
|
|
|
|
head = (head + 1) % samplesCount;
|
|
|
|
if (head === tail) {
|
|
tail = (tail + 1) % samplesCount;
|
|
}
|
|
|
|
if (now - firstSampleTS < min) {
|
|
return;
|
|
}
|
|
|
|
const passed = startedAt && now - startedAt;
|
|
|
|
return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
|
|
};
|
|
}
|
|
|
|
function progressEventReducer(listener, isDownloadStream) {
|
|
let bytesNotified = 0;
|
|
const _speedometer = speedometer(50, 250);
|
|
|
|
return e => {
|
|
const loaded = e.loaded;
|
|
const total = e.lengthComputable ? e.total : undefined;
|
|
const progressBytes = loaded - bytesNotified;
|
|
const rate = _speedometer(progressBytes);
|
|
const inRange = loaded <= total;
|
|
|
|
bytesNotified = loaded;
|
|
|
|
const data = {
|
|
loaded,
|
|
total,
|
|
progress: total ? (loaded / total) : undefined,
|
|
bytes: progressBytes,
|
|
rate: rate ? rate : undefined,
|
|
estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
|
|
event: e
|
|
};
|
|
|
|
data[isDownloadStream ? 'download' : 'upload'] = true;
|
|
|
|
listener(data);
|
|
};
|
|
}
|
|
|
|
const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
|
var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
let requestData = config.data;
|
|
const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();
|
|
const responseType = config.responseType;
|
|
let onCanceled;
|
|
function done() {
|
|
if (config.cancelToken) {
|
|
config.cancelToken.unsubscribe(onCanceled);
|
|
}
|
|
|
|
if (config.signal) {
|
|
config.signal.removeEventListener('abort', onCanceled);
|
|
}
|
|
}
|
|
|
|
if (utils.isFormData(requestData)) {
|
|
if (platform.isStandardBrowserEnv || platform.isStandardBrowserWebWorkerEnv) {
|
|
requestHeaders.setContentType(false); // Let the browser set it
|
|
} else {
|
|
requestHeaders.setContentType('multipart/form-data;', false); // mobile/desktop app frameworks
|
|
}
|
|
}
|
|
|
|
let request = new XMLHttpRequest();
|
|
|
|
// HTTP basic authentication
|
|
if (config.auth) {
|
|
const username = config.auth.username || '';
|
|
const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
|
|
requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));
|
|
}
|
|
|
|
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
|
|
request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
|
|
|
|
// Set the request timeout in MS
|
|
request.timeout = config.timeout;
|
|
|
|
function onloadend() {
|
|
if (!request) {
|
|
return;
|
|
}
|
|
// Prepare the response
|
|
const responseHeaders = AxiosHeaders$1.from(
|
|
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
);
|
|
const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
|
|
request.responseText : request.response;
|
|
const response = {
|
|
data: responseData,
|
|
status: request.status,
|
|
statusText: request.statusText,
|
|
headers: responseHeaders,
|
|
config,
|
|
request
|
|
};
|
|
|
|
settle(function _resolve(value) {
|
|
resolve(value);
|
|
done();
|
|
}, function _reject(err) {
|
|
reject(err);
|
|
done();
|
|
}, response);
|
|
|
|
// 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() {
|
|
if (!request) {
|
|
return;
|
|
}
|
|
|
|
reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
|
|
|
|
// Clean up request
|
|
request = null;
|
|
};
|
|
|
|
// Handle low level network errors
|
|
request.onerror = function handleError() {
|
|
// Real errors are hidden from us by the browser
|
|
// onerror should only fire if it's a network error
|
|
reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));
|
|
|
|
// Clean up request
|
|
request = null;
|
|
};
|
|
|
|
// Handle timeout
|
|
request.ontimeout = function handleTimeout() {
|
|
let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
const transitional = config.transitional || transitionalDefaults;
|
|
if (config.timeoutErrorMessage) {
|
|
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
}
|
|
reject(new AxiosError(
|
|
timeoutErrorMessage,
|
|
transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
|
|
config,
|
|
request));
|
|
|
|
// Clean up request
|
|
request = null;
|
|
};
|
|
|
|
// Add xsrf header
|
|
// This is only done if running in a standard browser environment.
|
|
// Specifically not if we're in a web worker, or react-native.
|
|
if (platform.isStandardBrowserEnv) {
|
|
// Add xsrf header
|
|
const xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath))
|
|
&& config.xsrfCookieName && cookies.read(config.xsrfCookieName);
|
|
|
|
if (xsrfValue) {
|
|
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
|
}
|
|
}
|
|
|
|
// Remove Content-Type if data is undefined
|
|
requestData === undefined && requestHeaders.setContentType(null);
|
|
|
|
// Add headers to the request
|
|
if ('setRequestHeader' in request) {
|
|
utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
request.setRequestHeader(key, val);
|
|
});
|
|
}
|
|
|
|
// Add withCredentials to request if needed
|
|
if (!utils.isUndefined(config.withCredentials)) {
|
|
request.withCredentials = !!config.withCredentials;
|
|
}
|
|
|
|
// Add responseType to request if needed
|
|
if (responseType && responseType !== 'json') {
|
|
request.responseType = config.responseType;
|
|
}
|
|
|
|
// Handle progress if needed
|
|
if (typeof config.onDownloadProgress === 'function') {
|
|
request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));
|
|
}
|
|
|
|
// Not all browsers support upload events
|
|
if (typeof config.onUploadProgress === 'function' && request.upload) {
|
|
request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));
|
|
}
|
|
|
|
if (config.cancelToken || config.signal) {
|
|
// Handle cancellation
|
|
// eslint-disable-next-line func-names
|
|
onCanceled = cancel => {
|
|
if (!request) {
|
|
return;
|
|
}
|
|
reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
|
|
request.abort();
|
|
request = null;
|
|
};
|
|
|
|
config.cancelToken && config.cancelToken.subscribe(onCanceled);
|
|
if (config.signal) {
|
|
config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
|
|
}
|
|
}
|
|
|
|
const protocol = parseProtocol(fullPath);
|
|
|
|
if (protocol && platform.protocols.indexOf(protocol) === -1) {
|
|
reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
|
|
return;
|
|
}
|
|
|
|
|
|
// Send the request
|
|
request.send(requestData || null);
|
|
});
|
|
};
|
|
|
|
const knownAdapters = {
|
|
http: httpAdapter,
|
|
xhr: xhrAdapter
|
|
};
|
|
|
|
utils.forEach(knownAdapters, (fn, value) => {
|
|
if(fn) {
|
|
try {
|
|
Object.defineProperty(fn, 'name', {value});
|
|
} catch (e) {
|
|
// eslint-disable-next-line no-empty
|
|
}
|
|
Object.defineProperty(fn, 'adapterName', {value});
|
|
}
|
|
});
|
|
|
|
var adapters = {
|
|
getAdapter: (adapters) => {
|
|
adapters = utils.isArray(adapters) ? adapters : [adapters];
|
|
|
|
const {length} = adapters;
|
|
let nameOrAdapter;
|
|
let adapter;
|
|
|
|
for (let i = 0; i < length; i++) {
|
|
nameOrAdapter = adapters[i];
|
|
if((adapter = utils.isString(nameOrAdapter) ? knownAdapters[nameOrAdapter.toLowerCase()] : nameOrAdapter)) {
|
|
break;
|
|
}
|
|
}
|
|
|
|
if (!adapter) {
|
|
if (adapter === false) {
|
|
throw new AxiosError(
|
|
`Adapter ${nameOrAdapter} is not supported by the environment`,
|
|
'ERR_NOT_SUPPORT'
|
|
);
|
|
}
|
|
|
|
throw new Error(
|
|
utils.hasOwnProp(knownAdapters, nameOrAdapter) ?
|
|
`Adapter '${nameOrAdapter}' is not available in the build` :
|
|
`Unknown adapter '${nameOrAdapter}'`
|
|
);
|
|
}
|
|
|
|
if (!utils.isFunction(adapter)) {
|
|
throw new TypeError('adapter is not a function');
|
|
}
|
|
|
|
return adapter;
|
|
},
|
|
adapters: knownAdapters
|
|
};
|
|
|
|
/**
|
|
* Throws a `CanceledError` if cancellation has been requested.
|
|
*
|
|
* @param {Object} config The config that is to be used for the request
|
|
*
|
|
* @returns {void}
|
|
*/
|
|
function throwIfCancellationRequested(config) {
|
|
if (config.cancelToken) {
|
|
config.cancelToken.throwIfRequested();
|
|
}
|
|
|
|
if (config.signal && config.signal.aborted) {
|
|
throw new CanceledError(null, config);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Dispatch a request to the server using the configured adapter.
|
|
*
|
|
* @param {object} config The config that is to be used for the request
|
|
*
|
|
* @returns {Promise} The Promise to be fulfilled
|
|
*/
|
|
function dispatchRequest(config) {
|
|
throwIfCancellationRequested(config);
|
|
|
|
config.headers = AxiosHeaders$1.from(config.headers);
|
|
|
|
// Transform request data
|
|
config.data = transformData.call(
|
|
config,
|
|
config.transformRequest
|
|
);
|
|
|
|
if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
|
|
config.headers.setContentType('application/x-www-form-urlencoded', false);
|
|
}
|
|
|
|
const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);
|
|
|
|
return adapter(config).then(function onAdapterResolution(response) {
|
|
throwIfCancellationRequested(config);
|
|
|
|
// Transform response data
|
|
response.data = transformData.call(
|
|
config,
|
|
config.transformResponse,
|
|
response
|
|
);
|
|
|
|
response.headers = AxiosHeaders$1.from(response.headers);
|
|
|
|
return response;
|
|
}, function onAdapterRejection(reason) {
|
|
if (!isCancel(reason)) {
|
|
throwIfCancellationRequested(config);
|
|
|
|
// Transform response data
|
|
if (reason && reason.response) {
|
|
reason.response.data = transformData.call(
|
|
config,
|
|
config.transformResponse,
|
|
reason.response
|
|
);
|
|
reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
|
|
}
|
|
}
|
|
|
|
return Promise.reject(reason);
|
|
});
|
|
}
|
|
|
|
const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? thing.toJSON() : thing;
|
|
|
|
/**
|
|
* Config-specific merge-function which creates a new config-object
|
|
* by merging two configuration objects together.
|
|
*
|
|
* @param {Object} config1
|
|
* @param {Object} config2
|
|
*
|
|
* @returns {Object} New object resulting from merging config2 to config1
|
|
*/
|
|
function mergeConfig(config1, config2) {
|
|
// eslint-disable-next-line no-param-reassign
|
|
config2 = config2 || {};
|
|
const config = {};
|
|
|
|
function getMergedValue(target, source, caseless) {
|
|
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
|
return utils.merge.call({caseless}, target, source);
|
|
} else if (utils.isPlainObject(source)) {
|
|
return utils.merge({}, source);
|
|
} else if (utils.isArray(source)) {
|
|
return source.slice();
|
|
}
|
|
return source;
|
|
}
|
|
|
|
// eslint-disable-next-line consistent-return
|
|
function mergeDeepProperties(a, b, caseless) {
|
|
if (!utils.isUndefined(b)) {
|
|
return getMergedValue(a, b, caseless);
|
|
} else if (!utils.isUndefined(a)) {
|
|
return getMergedValue(undefined, a, caseless);
|
|
}
|
|
}
|
|
|
|
// eslint-disable-next-line consistent-return
|
|
function valueFromConfig2(a, b) {
|
|
if (!utils.isUndefined(b)) {
|
|
return getMergedValue(undefined, b);
|
|
}
|
|
}
|
|
|
|
// eslint-disable-next-line consistent-return
|
|
function defaultToConfig2(a, b) {
|
|
if (!utils.isUndefined(b)) {
|
|
return getMergedValue(undefined, b);
|
|
} else if (!utils.isUndefined(a)) {
|
|
return getMergedValue(undefined, a);
|
|
}
|
|
}
|
|
|
|
// eslint-disable-next-line consistent-return
|
|
function mergeDirectKeys(a, b, prop) {
|
|
if (prop in config2) {
|
|
return getMergedValue(a, b);
|
|
} else if (prop in config1) {
|
|
return getMergedValue(undefined, a);
|
|
}
|
|
}
|
|
|
|
const mergeMap = {
|
|
url: valueFromConfig2,
|
|
method: valueFromConfig2,
|
|
data: valueFromConfig2,
|
|
baseURL: defaultToConfig2,
|
|
transformRequest: defaultToConfig2,
|
|
transformResponse: defaultToConfig2,
|
|
paramsSerializer: defaultToConfig2,
|
|
timeout: defaultToConfig2,
|
|
timeoutMessage: defaultToConfig2,
|
|
withCredentials: defaultToConfig2,
|
|
adapter: defaultToConfig2,
|
|
responseType: defaultToConfig2,
|
|
xsrfCookieName: defaultToConfig2,
|
|
xsrfHeaderName: defaultToConfig2,
|
|
onUploadProgress: defaultToConfig2,
|
|
onDownloadProgress: defaultToConfig2,
|
|
decompress: defaultToConfig2,
|
|
maxContentLength: defaultToConfig2,
|
|
maxBodyLength: defaultToConfig2,
|
|
beforeRedirect: defaultToConfig2,
|
|
transport: defaultToConfig2,
|
|
httpAgent: defaultToConfig2,
|
|
httpsAgent: defaultToConfig2,
|
|
cancelToken: defaultToConfig2,
|
|
socketPath: defaultToConfig2,
|
|
responseEncoding: defaultToConfig2,
|
|
validateStatus: mergeDirectKeys,
|
|
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
|
};
|
|
|
|
utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
const merge = mergeMap[prop] || mergeDeepProperties;
|
|
const configValue = merge(config1[prop], config2[prop], prop);
|
|
(utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
});
|
|
|
|
return config;
|
|
}
|
|
|
|
const VERSION = "1.4.0";
|
|
|
|
const validators$1 = {};
|
|
|
|
// eslint-disable-next-line func-names
|
|
['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {
|
|
validators$1[type] = function validator(thing) {
|
|
return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
|
|
};
|
|
});
|
|
|
|
const deprecatedWarnings = {};
|
|
|
|
/**
|
|
* Transitional option validator
|
|
*
|
|
* @param {function|boolean?} validator - set to false if the transitional option has been removed
|
|
* @param {string?} version - deprecated version / removed since version
|
|
* @param {string?} message - some message with additional info
|
|
*
|
|
* @returns {function}
|
|
*/
|
|
validators$1.transitional = function transitional(validator, version, message) {
|
|
function formatMessage(opt, desc) {
|
|
return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
|
|
}
|
|
|
|
// eslint-disable-next-line func-names
|
|
return (value, opt, opts) => {
|
|
if (validator === false) {
|
|
throw new AxiosError(
|
|
formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
|
|
AxiosError.ERR_DEPRECATED
|
|
);
|
|
}
|
|
|
|
if (version && !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
|
|
*
|
|
* @returns {object}
|
|
*/
|
|
|
|
function assertOptions(options, schema, allowUnknown) {
|
|
if (typeof options !== 'object') {
|
|
throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
|
|
}
|
|
const keys = Object.keys(options);
|
|
let i = keys.length;
|
|
while (i-- > 0) {
|
|
const opt = keys[i];
|
|
const validator = schema[opt];
|
|
if (validator) {
|
|
const value = options[opt];
|
|
const result = value === undefined || validator(value, opt, options);
|
|
if (result !== true) {
|
|
throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);
|
|
}
|
|
continue;
|
|
}
|
|
if (allowUnknown !== true) {
|
|
throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
|
|
}
|
|
}
|
|
}
|
|
|
|
var validator = {
|
|
assertOptions,
|
|
validators: validators$1
|
|
};
|
|
|
|
const validators = validator.validators;
|
|
|
|
/**
|
|
* Create a new instance of Axios
|
|
*
|
|
* @param {Object} instanceConfig The default config for the instance
|
|
*
|
|
* @return {Axios} A new instance of Axios
|
|
*/
|
|
class Axios {
|
|
constructor(instanceConfig) {
|
|
this.defaults = instanceConfig;
|
|
this.interceptors = {
|
|
request: new InterceptorManager$1(),
|
|
response: new InterceptorManager$1()
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Dispatch a request
|
|
*
|
|
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
* @param {?Object} config
|
|
*
|
|
* @returns {Promise} The Promise to be fulfilled
|
|
*/
|
|
request(configOrUrl, config) {
|
|
/*eslint no-param-reassign:0*/
|
|
// Allow for axios('example/url'[, config]) a la fetch API
|
|
if (typeof configOrUrl === 'string') {
|
|
config = config || {};
|
|
config.url = configOrUrl;
|
|
} else {
|
|
config = configOrUrl || {};
|
|
}
|
|
|
|
config = mergeConfig(this.defaults, config);
|
|
|
|
const {transitional, paramsSerializer, headers} = config;
|
|
|
|
if (transitional !== undefined) {
|
|
validator.assertOptions(transitional, {
|
|
silentJSONParsing: validators.transitional(validators.boolean),
|
|
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
clarifyTimeoutError: validators.transitional(validators.boolean)
|
|
}, false);
|
|
}
|
|
|
|
if (paramsSerializer != null) {
|
|
if (utils.isFunction(paramsSerializer)) {
|
|
config.paramsSerializer = {
|
|
serialize: paramsSerializer
|
|
};
|
|
} else {
|
|
validator.assertOptions(paramsSerializer, {
|
|
encode: validators.function,
|
|
serialize: validators.function
|
|
}, true);
|
|
}
|
|
}
|
|
|
|
// Set config.method
|
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
|
|
|
let contextHeaders;
|
|
|
|
// Flatten headers
|
|
contextHeaders = headers && utils.merge(
|
|
headers.common,
|
|
headers[config.method]
|
|
);
|
|
|
|
contextHeaders && utils.forEach(
|
|
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
|
(method) => {
|
|
delete headers[method];
|
|
}
|
|
);
|
|
|
|
config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
|
|
|
|
// filter out skipped interceptors
|
|
const requestInterceptorChain = [];
|
|
let synchronousRequestInterceptors = true;
|
|
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
|
if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
|
|
return;
|
|
}
|
|
|
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
|
|
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
});
|
|
|
|
const responseInterceptorChain = [];
|
|
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
|
responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
});
|
|
|
|
let promise;
|
|
let i = 0;
|
|
let len;
|
|
|
|
if (!synchronousRequestInterceptors) {
|
|
const chain = [dispatchRequest.bind(this), undefined];
|
|
chain.unshift.apply(chain, requestInterceptorChain);
|
|
chain.push.apply(chain, responseInterceptorChain);
|
|
len = chain.length;
|
|
|
|
promise = Promise.resolve(config);
|
|
|
|
while (i < len) {
|
|
promise = promise.then(chain[i++], chain[i++]);
|
|
}
|
|
|
|
return promise;
|
|
}
|
|
|
|
len = requestInterceptorChain.length;
|
|
|
|
let newConfig = config;
|
|
|
|
i = 0;
|
|
|
|
while (i < len) {
|
|
const onFulfilled = requestInterceptorChain[i++];
|
|
const onRejected = requestInterceptorChain[i++];
|
|
try {
|
|
newConfig = onFulfilled(newConfig);
|
|
} catch (error) {
|
|
onRejected.call(this, error);
|
|
break;
|
|
}
|
|
}
|
|
|
|
try {
|
|
promise = dispatchRequest.call(this, newConfig);
|
|
} catch (error) {
|
|
return Promise.reject(error);
|
|
}
|
|
|
|
i = 0;
|
|
len = responseInterceptorChain.length;
|
|
|
|
while (i < len) {
|
|
promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
|
|
}
|
|
|
|
return promise;
|
|
}
|
|
|
|
getUri(config) {
|
|
config = mergeConfig(this.defaults, config);
|
|
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
}
|
|
}
|
|
|
|
// Provide aliases for supported request methods
|
|
utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
/*eslint func-names:0*/
|
|
Axios.prototype[method] = function(url, config) {
|
|
return this.request(mergeConfig(config || {}, {
|
|
method,
|
|
url,
|
|
data: (config || {}).data
|
|
}));
|
|
};
|
|
});
|
|
|
|
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
/*eslint func-names:0*/
|
|
|
|
function generateHTTPMethod(isForm) {
|
|
return function httpMethod(url, data, config) {
|
|
return this.request(mergeConfig(config || {}, {
|
|
method,
|
|
headers: isForm ? {
|
|
'Content-Type': 'multipart/form-data'
|
|
} : {},
|
|
url,
|
|
data
|
|
}));
|
|
};
|
|
}
|
|
|
|
Axios.prototype[method] = generateHTTPMethod();
|
|
|
|
Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
|
|
});
|
|
|
|
var Axios$1 = Axios;
|
|
|
|
/**
|
|
* A `CancelToken` is an object that can be used to request cancellation of an operation.
|
|
*
|
|
* @param {Function} executor The executor function.
|
|
*
|
|
* @returns {CancelToken}
|
|
*/
|
|
class CancelToken {
|
|
constructor(executor) {
|
|
if (typeof executor !== 'function') {
|
|
throw new TypeError('executor must be a function.');
|
|
}
|
|
|
|
let resolvePromise;
|
|
|
|
this.promise = new Promise(function promiseExecutor(resolve) {
|
|
resolvePromise = resolve;
|
|
});
|
|
|
|
const token = this;
|
|
|
|
// eslint-disable-next-line func-names
|
|
this.promise.then(cancel => {
|
|
if (!token._listeners) return;
|
|
|
|
let i = token._listeners.length;
|
|
|
|
while (i-- > 0) {
|
|
token._listeners[i](cancel);
|
|
}
|
|
token._listeners = null;
|
|
});
|
|
|
|
// eslint-disable-next-line func-names
|
|
this.promise.then = onfulfilled => {
|
|
let _resolve;
|
|
// eslint-disable-next-line func-names
|
|
const promise = new Promise(resolve => {
|
|
token.subscribe(resolve);
|
|
_resolve = resolve;
|
|
}).then(onfulfilled);
|
|
|
|
promise.cancel = function reject() {
|
|
token.unsubscribe(_resolve);
|
|
};
|
|
|
|
return promise;
|
|
};
|
|
|
|
executor(function cancel(message, config, request) {
|
|
if (token.reason) {
|
|
// Cancellation has already been requested
|
|
return;
|
|
}
|
|
|
|
token.reason = new CanceledError(message, config, request);
|
|
resolvePromise(token.reason);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Throws a `CanceledError` if cancellation has been requested.
|
|
*/
|
|
throwIfRequested() {
|
|
if (this.reason) {
|
|
throw this.reason;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Subscribe to the cancel signal
|
|
*/
|
|
|
|
subscribe(listener) {
|
|
if (this.reason) {
|
|
listener(this.reason);
|
|
return;
|
|
}
|
|
|
|
if (this._listeners) {
|
|
this._listeners.push(listener);
|
|
} else {
|
|
this._listeners = [listener];
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Unsubscribe from the cancel signal
|
|
*/
|
|
|
|
unsubscribe(listener) {
|
|
if (!this._listeners) {
|
|
return;
|
|
}
|
|
const index = this._listeners.indexOf(listener);
|
|
if (index !== -1) {
|
|
this._listeners.splice(index, 1);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
* cancels the `CancelToken`.
|
|
*/
|
|
static source() {
|
|
let cancel;
|
|
const token = new CancelToken(function executor(c) {
|
|
cancel = c;
|
|
});
|
|
return {
|
|
token,
|
|
cancel
|
|
};
|
|
}
|
|
}
|
|
|
|
var CancelToken$1 = CancelToken;
|
|
|
|
/**
|
|
* Syntactic sugar for invoking a function and expanding an array for arguments.
|
|
*
|
|
* Common use case would be to use `Function.prototype.apply`.
|
|
*
|
|
* ```js
|
|
* function f(x, y, z) {}
|
|
* var args = [1, 2, 3];
|
|
* f.apply(null, args);
|
|
* ```
|
|
*
|
|
* With `spread` this example can be re-written.
|
|
*
|
|
* ```js
|
|
* spread(function(x, y, z) {})([1, 2, 3]);
|
|
* ```
|
|
*
|
|
* @param {Function} callback
|
|
*
|
|
* @returns {Function}
|
|
*/
|
|
function spread(callback) {
|
|
return function wrap(arr) {
|
|
return callback.apply(null, arr);
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Determines whether the payload is an error thrown by Axios
|
|
*
|
|
* @param {*} payload The value to test
|
|
*
|
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
*/
|
|
function isAxiosError(payload) {
|
|
return utils.isObject(payload) && (payload.isAxiosError === true);
|
|
}
|
|
|
|
const HttpStatusCode = {
|
|
Continue: 100,
|
|
SwitchingProtocols: 101,
|
|
Processing: 102,
|
|
EarlyHints: 103,
|
|
Ok: 200,
|
|
Created: 201,
|
|
Accepted: 202,
|
|
NonAuthoritativeInformation: 203,
|
|
NoContent: 204,
|
|
ResetContent: 205,
|
|
PartialContent: 206,
|
|
MultiStatus: 207,
|
|
AlreadyReported: 208,
|
|
ImUsed: 226,
|
|
MultipleChoices: 300,
|
|
MovedPermanently: 301,
|
|
Found: 302,
|
|
SeeOther: 303,
|
|
NotModified: 304,
|
|
UseProxy: 305,
|
|
Unused: 306,
|
|
TemporaryRedirect: 307,
|
|
PermanentRedirect: 308,
|
|
BadRequest: 400,
|
|
Unauthorized: 401,
|
|
PaymentRequired: 402,
|
|
Forbidden: 403,
|
|
NotFound: 404,
|
|
MethodNotAllowed: 405,
|
|
NotAcceptable: 406,
|
|
ProxyAuthenticationRequired: 407,
|
|
RequestTimeout: 408,
|
|
Conflict: 409,
|
|
Gone: 410,
|
|
LengthRequired: 411,
|
|
PreconditionFailed: 412,
|
|
PayloadTooLarge: 413,
|
|
UriTooLong: 414,
|
|
UnsupportedMediaType: 415,
|
|
RangeNotSatisfiable: 416,
|
|
ExpectationFailed: 417,
|
|
ImATeapot: 418,
|
|
MisdirectedRequest: 421,
|
|
UnprocessableEntity: 422,
|
|
Locked: 423,
|
|
FailedDependency: 424,
|
|
TooEarly: 425,
|
|
UpgradeRequired: 426,
|
|
PreconditionRequired: 428,
|
|
TooManyRequests: 429,
|
|
RequestHeaderFieldsTooLarge: 431,
|
|
UnavailableForLegalReasons: 451,
|
|
InternalServerError: 500,
|
|
NotImplemented: 501,
|
|
BadGateway: 502,
|
|
ServiceUnavailable: 503,
|
|
GatewayTimeout: 504,
|
|
HttpVersionNotSupported: 505,
|
|
VariantAlsoNegotiates: 506,
|
|
InsufficientStorage: 507,
|
|
LoopDetected: 508,
|
|
NotExtended: 510,
|
|
NetworkAuthenticationRequired: 511,
|
|
};
|
|
|
|
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
HttpStatusCode[value] = key;
|
|
});
|
|
|
|
var HttpStatusCode$1 = HttpStatusCode;
|
|
|
|
/**
|
|
* Create an instance of Axios
|
|
*
|
|
* @param {Object} defaultConfig The default config for the instance
|
|
*
|
|
* @returns {Axios} A new instance of Axios
|
|
*/
|
|
function createInstance(defaultConfig) {
|
|
const context = new Axios$1(defaultConfig);
|
|
const instance = bind(Axios$1.prototype.request, context);
|
|
|
|
// Copy axios.prototype to instance
|
|
utils.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
|
|
|
|
// Copy context to instance
|
|
utils.extend(instance, context, null, {allOwnKeys: true});
|
|
|
|
// Factory for creating new instances
|
|
instance.create = function create(instanceConfig) {
|
|
return createInstance(mergeConfig(defaultConfig, instanceConfig));
|
|
};
|
|
|
|
return instance;
|
|
}
|
|
|
|
// Create the default instance to be exported
|
|
const axios = createInstance(defaults$1);
|
|
|
|
// Expose Axios class to allow class inheritance
|
|
axios.Axios = Axios$1;
|
|
|
|
// Expose Cancel & CancelToken
|
|
axios.CanceledError = CanceledError;
|
|
axios.CancelToken = CancelToken$1;
|
|
axios.isCancel = isCancel;
|
|
axios.VERSION = VERSION;
|
|
axios.toFormData = toFormData;
|
|
|
|
// Expose AxiosError class
|
|
axios.AxiosError = AxiosError;
|
|
|
|
// alias for CanceledError for backward compatibility
|
|
axios.Cancel = axios.CanceledError;
|
|
|
|
// Expose all/spread
|
|
axios.all = function all(promises) {
|
|
return Promise.all(promises);
|
|
};
|
|
|
|
axios.spread = spread;
|
|
|
|
// Expose isAxiosError
|
|
axios.isAxiosError = isAxiosError;
|
|
|
|
// Expose mergeConfig
|
|
axios.mergeConfig = mergeConfig;
|
|
|
|
axios.AxiosHeaders = AxiosHeaders$1;
|
|
|
|
axios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
|
|
axios.HttpStatusCode = HttpStatusCode$1;
|
|
|
|
axios.default = axios;
|
|
|
|
module.exports = axios;
|
|
//# sourceMappingURL=axios.cjs.map
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/@vuelidate/core/dist/index.mjs":
|
|
/*!*****************************************************!*\
|
|
!*** ./node_modules/@vuelidate/core/dist/index.mjs ***!
|
|
\*****************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ CollectFlag: () => (/* binding */ CollectFlag),
|
|
/* harmony export */ "default": () => (/* binding */ useVuelidate),
|
|
/* harmony export */ useVuelidate: () => (/* binding */ useVuelidate)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue_demi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue-demi */ "./node_modules/@vuelidate/core/node_modules/vue-demi/lib/index.mjs");
|
|
|
|
|
|
function ownKeys(object, enumerableOnly) {
|
|
var keys = Object.keys(object);
|
|
|
|
if (Object.getOwnPropertySymbols) {
|
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
})), keys.push.apply(keys, symbols);
|
|
}
|
|
|
|
return keys;
|
|
}
|
|
|
|
function _objectSpread2(target) {
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
var source = null != arguments[i] ? arguments[i] : {};
|
|
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
_defineProperty(target, key, source[key]);
|
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
});
|
|
}
|
|
|
|
return target;
|
|
}
|
|
|
|
function _defineProperty(obj, key, value) {
|
|
if (key in obj) {
|
|
Object.defineProperty(obj, key, {
|
|
value: value,
|
|
enumerable: true,
|
|
configurable: true,
|
|
writable: true
|
|
});
|
|
} else {
|
|
obj[key] = value;
|
|
}
|
|
|
|
return obj;
|
|
}
|
|
|
|
function unwrapObj(obj) {
|
|
let ignoreKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
return Object.keys(obj).reduce((o, k) => {
|
|
if (ignoreKeys.includes(k)) return o;
|
|
o[k] = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(obj[k]);
|
|
return o;
|
|
}, {});
|
|
}
|
|
function isFunction(val) {
|
|
return typeof val === 'function';
|
|
}
|
|
function isProxy(value) {
|
|
return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.isReactive)(value) || (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.isReadonly)(value);
|
|
}
|
|
function get(obj, stringPath, def) {
|
|
let current = obj;
|
|
const path = stringPath.split('.');
|
|
|
|
for (let i = 0; i < path.length; i++) {
|
|
if (!current[path[i]]) return def;
|
|
current = current[path[i]];
|
|
}
|
|
|
|
return current;
|
|
}
|
|
function gatherBooleanGroupProperties(group, nestedResults, property) {
|
|
return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => {
|
|
return group.some(path => {
|
|
return get(nestedResults, path, {
|
|
[property]: false
|
|
})[property];
|
|
});
|
|
});
|
|
}
|
|
function gatherArrayGroupProperties(group, nestedResults, property) {
|
|
return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => {
|
|
return group.reduce((all, path) => {
|
|
const fetchedProperty = get(nestedResults, path, {
|
|
[property]: false
|
|
})[property] || [];
|
|
return all.concat(fetchedProperty);
|
|
}, []);
|
|
});
|
|
}
|
|
|
|
function callRule(rule, value, siblingState, instance) {
|
|
return rule.call(instance, (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(value), (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(siblingState), instance);
|
|
}
|
|
|
|
function normalizeValidatorResponse(result) {
|
|
return result.$valid !== undefined ? !result.$valid : !result;
|
|
}
|
|
|
|
function createAsyncResult(rule, model, $pending, $dirty, _ref, $response, instance) {
|
|
let {
|
|
$lazy,
|
|
$rewardEarly
|
|
} = _ref;
|
|
let watchTargets = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : [];
|
|
let siblingState = arguments.length > 8 ? arguments[8] : undefined;
|
|
let $lastInvalidState = arguments.length > 9 ? arguments[9] : undefined;
|
|
let $lastCommittedOn = arguments.length > 10 ? arguments[10] : undefined;
|
|
const $invalid = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)(!!$dirty.value);
|
|
const $pendingCounter = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)(0);
|
|
$pending.value = false;
|
|
const $unwatch = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.watch)([model, $dirty].concat(watchTargets, $lastCommittedOn), () => {
|
|
if ($lazy && !$dirty.value || $rewardEarly && !$lastInvalidState.value && !$pending.value) {
|
|
return;
|
|
}
|
|
|
|
let ruleResult;
|
|
|
|
try {
|
|
ruleResult = callRule(rule, model, siblingState, instance);
|
|
} catch (err) {
|
|
ruleResult = Promise.reject(err);
|
|
}
|
|
|
|
$pendingCounter.value++;
|
|
$pending.value = !!$pendingCounter.value;
|
|
$invalid.value = false;
|
|
Promise.resolve(ruleResult).then(data => {
|
|
$pendingCounter.value--;
|
|
$pending.value = !!$pendingCounter.value;
|
|
$response.value = data;
|
|
$invalid.value = normalizeValidatorResponse(data);
|
|
}).catch(error => {
|
|
$pendingCounter.value--;
|
|
$pending.value = !!$pendingCounter.value;
|
|
$response.value = error;
|
|
$invalid.value = true;
|
|
});
|
|
}, {
|
|
immediate: true,
|
|
deep: typeof model === 'object'
|
|
});
|
|
return {
|
|
$invalid,
|
|
$unwatch
|
|
};
|
|
}
|
|
|
|
function createSyncResult(rule, model, $dirty, _ref2, $response, instance, siblingState, $lastInvalidState) {
|
|
let {
|
|
$lazy,
|
|
$rewardEarly
|
|
} = _ref2;
|
|
|
|
const $unwatch = () => ({});
|
|
|
|
const $invalid = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => {
|
|
if ($lazy && !$dirty.value || $rewardEarly && !$lastInvalidState.value) {
|
|
return false;
|
|
}
|
|
|
|
let returnValue = true;
|
|
|
|
try {
|
|
const result = callRule(rule, model, siblingState, instance);
|
|
$response.value = result;
|
|
returnValue = normalizeValidatorResponse(result);
|
|
} catch (err) {
|
|
$response.value = err;
|
|
}
|
|
|
|
return returnValue;
|
|
});
|
|
return {
|
|
$unwatch,
|
|
$invalid
|
|
};
|
|
}
|
|
|
|
function createValidatorResult(rule, model, $dirty, config, instance, validatorName, propertyKey, propertyPath, siblingState, $lastInvalidState, $lastCommittedOn) {
|
|
const $pending = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)(false);
|
|
const $params = rule.$params || {};
|
|
const $response = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)(null);
|
|
let $invalid;
|
|
let $unwatch;
|
|
|
|
if (rule.$async) {
|
|
({
|
|
$invalid,
|
|
$unwatch
|
|
} = createAsyncResult(rule.$validator, model, $pending, $dirty, config, $response, instance, rule.$watchTargets, siblingState, $lastInvalidState, $lastCommittedOn));
|
|
} else {
|
|
({
|
|
$invalid,
|
|
$unwatch
|
|
} = createSyncResult(rule.$validator, model, $dirty, config, $response, instance, siblingState, $lastInvalidState));
|
|
}
|
|
|
|
const message = rule.$message;
|
|
const $message = isFunction(message) ? (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => message(unwrapObj({
|
|
$pending,
|
|
$invalid,
|
|
$params: unwrapObj($params),
|
|
$model: model,
|
|
$response,
|
|
$validator: validatorName,
|
|
$propertyPath: propertyPath,
|
|
$property: propertyKey
|
|
}))) : message || '';
|
|
return {
|
|
$message,
|
|
$params,
|
|
$pending,
|
|
$invalid,
|
|
$response,
|
|
$unwatch
|
|
};
|
|
}
|
|
|
|
function sortValidations() {
|
|
let validationsRaw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
const validations = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(validationsRaw);
|
|
const validationKeys = Object.keys(validations);
|
|
const rules = {};
|
|
const nestedValidators = {};
|
|
const config = {};
|
|
let validationGroups = null;
|
|
validationKeys.forEach(key => {
|
|
const v = validations[key];
|
|
|
|
switch (true) {
|
|
case isFunction(v.$validator):
|
|
rules[key] = v;
|
|
break;
|
|
|
|
case isFunction(v):
|
|
rules[key] = {
|
|
$validator: v
|
|
};
|
|
break;
|
|
|
|
case key === '$validationGroups':
|
|
validationGroups = v;
|
|
break;
|
|
|
|
case key.startsWith('$'):
|
|
config[key] = v;
|
|
break;
|
|
|
|
default:
|
|
nestedValidators[key] = v;
|
|
}
|
|
});
|
|
return {
|
|
rules,
|
|
nestedValidators,
|
|
config,
|
|
validationGroups
|
|
};
|
|
}
|
|
|
|
const ROOT_PATH = '__root';
|
|
|
|
function createValidationResults(rules, model, key, resultsCache, path, config, instance, externalResults, siblingState) {
|
|
const ruleKeys = Object.keys(rules);
|
|
const cachedResult = resultsCache.get(path, rules);
|
|
const $dirty = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)(false);
|
|
const $lastInvalidState = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)(false);
|
|
const $lastCommittedOn = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)(0);
|
|
|
|
if (cachedResult) {
|
|
if (!cachedResult.$partial) return cachedResult;
|
|
cachedResult.$unwatch();
|
|
$dirty.value = cachedResult.$dirty.value;
|
|
}
|
|
|
|
const result = {
|
|
$dirty,
|
|
$path: path,
|
|
$touch: () => {
|
|
if (!$dirty.value) $dirty.value = true;
|
|
},
|
|
$reset: () => {
|
|
if ($dirty.value) $dirty.value = false;
|
|
},
|
|
$commit: () => {}
|
|
};
|
|
|
|
if (!ruleKeys.length) {
|
|
cachedResult && resultsCache.set(path, rules, result);
|
|
return result;
|
|
}
|
|
|
|
ruleKeys.forEach(ruleKey => {
|
|
result[ruleKey] = createValidatorResult(rules[ruleKey], model, result.$dirty, config, instance, ruleKey, key, path, siblingState, $lastInvalidState, $lastCommittedOn);
|
|
});
|
|
result.$externalResults = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => {
|
|
if (!externalResults.value) return [];
|
|
return [].concat(externalResults.value).map((stringError, index) => ({
|
|
$propertyPath: path,
|
|
$property: key,
|
|
$validator: '$externalResults',
|
|
$uid: `${path}-externalResult-${index}`,
|
|
$message: stringError,
|
|
$params: {},
|
|
$response: null,
|
|
$pending: false
|
|
}));
|
|
});
|
|
result.$invalid = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => {
|
|
const r = ruleKeys.some(ruleKey => (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(result[ruleKey].$invalid));
|
|
$lastInvalidState.value = r;
|
|
return !!result.$externalResults.value.length || r;
|
|
});
|
|
result.$pending = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => ruleKeys.some(ruleKey => (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(result[ruleKey].$pending)));
|
|
result.$error = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => result.$dirty.value ? result.$pending.value || result.$invalid.value : false);
|
|
result.$silentErrors = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => ruleKeys.filter(ruleKey => (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(result[ruleKey].$invalid)).map(ruleKey => {
|
|
const res = result[ruleKey];
|
|
return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.reactive)({
|
|
$propertyPath: path,
|
|
$property: key,
|
|
$validator: ruleKey,
|
|
$uid: `${path}-${ruleKey}`,
|
|
$message: res.$message,
|
|
$params: res.$params,
|
|
$response: res.$response,
|
|
$pending: res.$pending
|
|
});
|
|
}).concat(result.$externalResults.value));
|
|
result.$errors = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => result.$dirty.value ? result.$silentErrors.value : []);
|
|
|
|
result.$unwatch = () => ruleKeys.forEach(ruleKey => {
|
|
result[ruleKey].$unwatch();
|
|
});
|
|
|
|
result.$commit = () => {
|
|
$lastInvalidState.value = true;
|
|
$lastCommittedOn.value = Date.now();
|
|
};
|
|
|
|
resultsCache.set(path, rules, result);
|
|
return result;
|
|
}
|
|
|
|
function collectNestedValidationResults(validations, nestedState, path, resultsCache, config, instance, nestedExternalResults) {
|
|
const nestedValidationKeys = Object.keys(validations);
|
|
if (!nestedValidationKeys.length) return {};
|
|
return nestedValidationKeys.reduce((results, nestedKey) => {
|
|
results[nestedKey] = setValidations({
|
|
validations: validations[nestedKey],
|
|
state: nestedState,
|
|
key: nestedKey,
|
|
parentKey: path,
|
|
resultsCache,
|
|
globalConfig: config,
|
|
instance,
|
|
externalResults: nestedExternalResults
|
|
});
|
|
return results;
|
|
}, {});
|
|
}
|
|
|
|
function createMetaFields(results, nestedResults, childResults) {
|
|
const allResults = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => [nestedResults, childResults].filter(res => res).reduce((allRes, res) => {
|
|
return allRes.concat(Object.values((0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(res)));
|
|
}, []));
|
|
const $dirty = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)({
|
|
get() {
|
|
return results.$dirty.value || (allResults.value.length ? allResults.value.every(r => r.$dirty) : false);
|
|
},
|
|
|
|
set(v) {
|
|
results.$dirty.value = v;
|
|
}
|
|
|
|
});
|
|
const $silentErrors = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => {
|
|
const modelErrors = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(results.$silentErrors) || [];
|
|
const nestedErrors = allResults.value.filter(result => ((0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(result).$silentErrors || []).length).reduce((errors, result) => {
|
|
return errors.concat(...result.$silentErrors);
|
|
}, []);
|
|
return modelErrors.concat(nestedErrors);
|
|
});
|
|
const $errors = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => {
|
|
const modelErrors = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(results.$errors) || [];
|
|
const nestedErrors = allResults.value.filter(result => ((0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(result).$errors || []).length).reduce((errors, result) => {
|
|
return errors.concat(...result.$errors);
|
|
}, []);
|
|
return modelErrors.concat(nestedErrors);
|
|
});
|
|
const $invalid = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => allResults.value.some(r => r.$invalid) || (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(results.$invalid) || false);
|
|
const $pending = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => allResults.value.some(r => (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(r.$pending)) || (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(results.$pending) || false);
|
|
const $anyDirty = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => allResults.value.some(r => r.$dirty) || allResults.value.some(r => r.$anyDirty) || $dirty.value);
|
|
const $error = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => $dirty.value ? $pending.value || $invalid.value : false);
|
|
|
|
const $touch = () => {
|
|
results.$touch();
|
|
allResults.value.forEach(result => {
|
|
result.$touch();
|
|
});
|
|
};
|
|
|
|
const $commit = () => {
|
|
results.$commit();
|
|
allResults.value.forEach(result => {
|
|
result.$commit();
|
|
});
|
|
};
|
|
|
|
const $reset = () => {
|
|
results.$reset();
|
|
allResults.value.forEach(result => {
|
|
result.$reset();
|
|
});
|
|
};
|
|
|
|
if (allResults.value.length && allResults.value.every(nr => nr.$dirty)) $touch();
|
|
return {
|
|
$dirty,
|
|
$errors,
|
|
$invalid,
|
|
$anyDirty,
|
|
$error,
|
|
$pending,
|
|
$touch,
|
|
$reset,
|
|
$silentErrors,
|
|
$commit
|
|
};
|
|
}
|
|
|
|
function setValidations(_ref) {
|
|
let {
|
|
validations,
|
|
state,
|
|
key,
|
|
parentKey,
|
|
childResults,
|
|
resultsCache,
|
|
globalConfig = {},
|
|
instance,
|
|
externalResults
|
|
} = _ref;
|
|
const path = parentKey ? `${parentKey}.${key}` : key;
|
|
const {
|
|
rules,
|
|
nestedValidators,
|
|
config,
|
|
validationGroups
|
|
} = sortValidations(validations);
|
|
|
|
const mergedConfig = _objectSpread2(_objectSpread2({}, globalConfig), config);
|
|
|
|
const nestedState = key ? (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => {
|
|
const s = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(state);
|
|
return s ? (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(s[key]) : undefined;
|
|
}) : state;
|
|
|
|
const cachedExternalResults = _objectSpread2({}, (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(externalResults) || {});
|
|
|
|
const nestedExternalResults = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => {
|
|
const results = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(externalResults);
|
|
if (!key) return results;
|
|
return results ? (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(results[key]) : undefined;
|
|
});
|
|
const results = createValidationResults(rules, nestedState, key, resultsCache, path, mergedConfig, instance, nestedExternalResults, state);
|
|
const nestedResults = collectNestedValidationResults(nestedValidators, nestedState, path, resultsCache, mergedConfig, instance, nestedExternalResults);
|
|
const $validationGroups = {};
|
|
|
|
if (validationGroups) {
|
|
Object.entries(validationGroups).forEach(_ref2 => {
|
|
let [key, group] = _ref2;
|
|
$validationGroups[key] = {
|
|
$invalid: gatherBooleanGroupProperties(group, nestedResults, '$invalid'),
|
|
$error: gatherBooleanGroupProperties(group, nestedResults, '$error'),
|
|
$pending: gatherBooleanGroupProperties(group, nestedResults, '$pending'),
|
|
$errors: gatherArrayGroupProperties(group, nestedResults, '$errors'),
|
|
$silentErrors: gatherArrayGroupProperties(group, nestedResults, '$silentErrors')
|
|
};
|
|
});
|
|
}
|
|
|
|
const {
|
|
$dirty,
|
|
$errors,
|
|
$invalid,
|
|
$anyDirty,
|
|
$error,
|
|
$pending,
|
|
$touch,
|
|
$reset,
|
|
$silentErrors,
|
|
$commit
|
|
} = createMetaFields(results, nestedResults, childResults);
|
|
const $model = key ? (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)({
|
|
get: () => (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(nestedState),
|
|
set: val => {
|
|
$dirty.value = true;
|
|
const s = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(state);
|
|
const external = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(externalResults);
|
|
|
|
if (external) {
|
|
external[key] = cachedExternalResults[key];
|
|
}
|
|
|
|
if ((0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.isRef)(s[key])) {
|
|
s[key].value = val;
|
|
} else {
|
|
s[key] = val;
|
|
}
|
|
}
|
|
}) : null;
|
|
|
|
if (key && mergedConfig.$autoDirty) {
|
|
(0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.watch)(nestedState, () => {
|
|
if (!$dirty.value) $touch();
|
|
const external = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(externalResults);
|
|
|
|
if (external) {
|
|
external[key] = cachedExternalResults[key];
|
|
}
|
|
}, {
|
|
flush: 'sync'
|
|
});
|
|
}
|
|
|
|
async function $validate() {
|
|
$touch();
|
|
|
|
if (mergedConfig.$rewardEarly) {
|
|
$commit();
|
|
await (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.nextTick)();
|
|
}
|
|
|
|
await (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.nextTick)();
|
|
return new Promise(resolve => {
|
|
if (!$pending.value) return resolve(!$invalid.value);
|
|
const unwatch = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.watch)($pending, () => {
|
|
resolve(!$invalid.value);
|
|
unwatch();
|
|
});
|
|
});
|
|
}
|
|
|
|
function $getResultsForChild(key) {
|
|
return (childResults.value || {})[key];
|
|
}
|
|
|
|
function $clearExternalResults() {
|
|
if ((0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.isRef)(externalResults)) {
|
|
externalResults.value = cachedExternalResults;
|
|
} else {
|
|
if (Object.keys(cachedExternalResults).length === 0) {
|
|
Object.keys(externalResults).forEach(k => {
|
|
delete externalResults[k];
|
|
});
|
|
} else {
|
|
Object.assign(externalResults, cachedExternalResults);
|
|
}
|
|
}
|
|
}
|
|
|
|
return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.reactive)(_objectSpread2(_objectSpread2(_objectSpread2({}, results), {}, {
|
|
$model,
|
|
$dirty,
|
|
$error,
|
|
$errors,
|
|
$invalid,
|
|
$anyDirty,
|
|
$pending,
|
|
$touch,
|
|
$reset,
|
|
$path: path || ROOT_PATH,
|
|
$silentErrors,
|
|
$validate,
|
|
$commit
|
|
}, childResults && {
|
|
$getResultsForChild,
|
|
$clearExternalResults,
|
|
$validationGroups
|
|
}), nestedResults));
|
|
}
|
|
|
|
class ResultsStorage {
|
|
constructor() {
|
|
this.storage = new Map();
|
|
}
|
|
|
|
set(path, rules, result) {
|
|
this.storage.set(path, {
|
|
rules,
|
|
result
|
|
});
|
|
}
|
|
|
|
checkRulesValidity(path, rules, storedRules) {
|
|
const storedRulesKeys = Object.keys(storedRules);
|
|
const newRulesKeys = Object.keys(rules);
|
|
if (newRulesKeys.length !== storedRulesKeys.length) return false;
|
|
const hasAllValidators = newRulesKeys.every(ruleKey => storedRulesKeys.includes(ruleKey));
|
|
if (!hasAllValidators) return false;
|
|
return newRulesKeys.every(ruleKey => {
|
|
if (!rules[ruleKey].$params) return true;
|
|
return Object.keys(rules[ruleKey].$params).every(paramKey => {
|
|
return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(storedRules[ruleKey].$params[paramKey]) === (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(rules[ruleKey].$params[paramKey]);
|
|
});
|
|
});
|
|
}
|
|
|
|
get(path, rules) {
|
|
const storedRuleResultPair = this.storage.get(path);
|
|
if (!storedRuleResultPair) return undefined;
|
|
const {
|
|
rules: storedRules,
|
|
result
|
|
} = storedRuleResultPair;
|
|
const isValidCache = this.checkRulesValidity(path, rules, storedRules);
|
|
const $unwatch = result.$unwatch ? result.$unwatch : () => ({});
|
|
if (!isValidCache) return {
|
|
$dirty: result.$dirty,
|
|
$partial: true,
|
|
$unwatch
|
|
};
|
|
return result;
|
|
}
|
|
|
|
}
|
|
|
|
const CollectFlag = {
|
|
COLLECT_ALL: true,
|
|
COLLECT_NONE: false
|
|
};
|
|
const VuelidateInjectChildResults = Symbol('vuelidate#injectChildResults');
|
|
const VuelidateRemoveChildResults = Symbol('vuelidate#removeChildResults');
|
|
function nestedValidations(_ref) {
|
|
let {
|
|
$scope,
|
|
instance
|
|
} = _ref;
|
|
const childResultsRaw = {};
|
|
const childResultsKeys = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)([]);
|
|
const childResults = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => childResultsKeys.value.reduce((results, key) => {
|
|
results[key] = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(childResultsRaw[key]);
|
|
return results;
|
|
}, {}));
|
|
|
|
function injectChildResultsIntoParent(results, _ref2) {
|
|
let {
|
|
$registerAs: key,
|
|
$scope: childScope,
|
|
$stopPropagation
|
|
} = _ref2;
|
|
if ($stopPropagation || $scope === CollectFlag.COLLECT_NONE || childScope === CollectFlag.COLLECT_NONE || $scope !== CollectFlag.COLLECT_ALL && $scope !== childScope) return;
|
|
childResultsRaw[key] = results;
|
|
childResultsKeys.value.push(key);
|
|
}
|
|
|
|
instance.__vuelidateInjectInstances = [].concat(instance.__vuelidateInjectInstances || [], injectChildResultsIntoParent);
|
|
|
|
function removeChildResultsFromParent(key) {
|
|
childResultsKeys.value = childResultsKeys.value.filter(childKey => childKey !== key);
|
|
delete childResultsRaw[key];
|
|
}
|
|
|
|
instance.__vuelidateRemoveInstances = [].concat(instance.__vuelidateRemoveInstances || [], removeChildResultsFromParent);
|
|
const sendValidationResultsToParent = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.inject)(VuelidateInjectChildResults, []);
|
|
(0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.provide)(VuelidateInjectChildResults, instance.__vuelidateInjectInstances);
|
|
const removeValidationResultsFromParent = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.inject)(VuelidateRemoveChildResults, []);
|
|
(0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.provide)(VuelidateRemoveChildResults, instance.__vuelidateRemoveInstances);
|
|
return {
|
|
childResults,
|
|
sendValidationResultsToParent,
|
|
removeValidationResultsFromParent
|
|
};
|
|
}
|
|
|
|
function ComputedProxyFactory(target) {
|
|
return new Proxy(target, {
|
|
get(target, prop) {
|
|
return typeof target[prop] === 'object' ? ComputedProxyFactory(target[prop]) : (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => target[prop]);
|
|
}
|
|
|
|
});
|
|
}
|
|
|
|
let uid = 0;
|
|
function useVuelidate(validations, state) {
|
|
var _getCurrentInstance;
|
|
|
|
let globalConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
|
|
if (arguments.length === 1) {
|
|
globalConfig = validations;
|
|
validations = undefined;
|
|
state = undefined;
|
|
}
|
|
|
|
let {
|
|
$registerAs,
|
|
$scope = CollectFlag.COLLECT_ALL,
|
|
$stopPropagation,
|
|
$externalResults,
|
|
currentVueInstance
|
|
} = globalConfig;
|
|
const instance = currentVueInstance || ((_getCurrentInstance = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance)()) === null || _getCurrentInstance === void 0 ? void 0 : _getCurrentInstance.proxy);
|
|
const componentOptions = instance ? instance.$options : {};
|
|
|
|
if (!$registerAs) {
|
|
uid += 1;
|
|
$registerAs = `_vuelidate_${uid}`;
|
|
}
|
|
|
|
const validationResults = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)({});
|
|
const resultsCache = new ResultsStorage();
|
|
const {
|
|
childResults,
|
|
sendValidationResultsToParent,
|
|
removeValidationResultsFromParent
|
|
} = instance ? nestedValidations({
|
|
$scope,
|
|
instance
|
|
}) : {
|
|
childResults: (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)({})
|
|
};
|
|
|
|
if (!validations && componentOptions.validations) {
|
|
const rules = componentOptions.validations;
|
|
state = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.ref)({});
|
|
(0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.onBeforeMount)(() => {
|
|
state.value = instance;
|
|
(0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.watch)(() => isFunction(rules) ? rules.call(state.value, new ComputedProxyFactory(state.value)) : rules, validations => {
|
|
validationResults.value = setValidations({
|
|
validations,
|
|
state,
|
|
childResults,
|
|
resultsCache,
|
|
globalConfig,
|
|
instance,
|
|
externalResults: $externalResults || instance.vuelidateExternalResults
|
|
});
|
|
}, {
|
|
immediate: true
|
|
});
|
|
});
|
|
globalConfig = componentOptions.validationsConfig || globalConfig;
|
|
} else {
|
|
const validationsWatchTarget = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.isRef)(validations) || isProxy(validations) ? validations : (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.reactive)(validations || {});
|
|
(0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.watch)(validationsWatchTarget, newValidationRules => {
|
|
validationResults.value = setValidations({
|
|
validations: newValidationRules,
|
|
state,
|
|
childResults,
|
|
resultsCache,
|
|
globalConfig,
|
|
instance: instance !== null && instance !== void 0 ? instance : {},
|
|
externalResults: $externalResults
|
|
});
|
|
}, {
|
|
immediate: true
|
|
});
|
|
}
|
|
|
|
if (instance) {
|
|
sendValidationResultsToParent.forEach(f => f(validationResults, {
|
|
$registerAs,
|
|
$scope,
|
|
$stopPropagation
|
|
}));
|
|
(0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.onBeforeUnmount)(() => removeValidationResultsFromParent.forEach(f => f($registerAs)));
|
|
}
|
|
|
|
return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.computed)(() => {
|
|
return _objectSpread2(_objectSpread2({}, (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(validationResults.value)), childResults.value);
|
|
});
|
|
}
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/@vuelidate/core/node_modules/vue-demi/lib/index.mjs":
|
|
/*!**************************************************************************!*\
|
|
!*** ./node_modules/@vuelidate/core/node_modules/vue-demi/lib/index.mjs ***!
|
|
\**************************************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ BaseTransition: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.BaseTransition),
|
|
/* harmony export */ BaseTransitionPropsValidators: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.BaseTransitionPropsValidators),
|
|
/* harmony export */ Comment: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Comment),
|
|
/* harmony export */ EffectScope: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.EffectScope),
|
|
/* harmony export */ Fragment: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Fragment),
|
|
/* harmony export */ KeepAlive: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.KeepAlive),
|
|
/* harmony export */ ReactiveEffect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ReactiveEffect),
|
|
/* harmony export */ Static: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Static),
|
|
/* harmony export */ Suspense: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Suspense),
|
|
/* harmony export */ Teleport: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Teleport),
|
|
/* harmony export */ Text: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Text),
|
|
/* harmony export */ Transition: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Transition),
|
|
/* harmony export */ TransitionGroup: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.TransitionGroup),
|
|
/* harmony export */ Vue: () => (/* reexport module object */ vue__WEBPACK_IMPORTED_MODULE_0__),
|
|
/* harmony export */ Vue2: () => (/* binding */ Vue2),
|
|
/* harmony export */ VueElement: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.VueElement),
|
|
/* harmony export */ assertNumber: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.assertNumber),
|
|
/* harmony export */ callWithAsyncErrorHandling: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.callWithAsyncErrorHandling),
|
|
/* harmony export */ callWithErrorHandling: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.callWithErrorHandling),
|
|
/* harmony export */ camelize: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.camelize),
|
|
/* harmony export */ capitalize: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.capitalize),
|
|
/* harmony export */ cloneVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.cloneVNode),
|
|
/* harmony export */ compatUtils: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.compatUtils),
|
|
/* harmony export */ compile: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.compile),
|
|
/* harmony export */ computed: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.computed),
|
|
/* harmony export */ createApp: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createApp),
|
|
/* harmony export */ createBlock: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createBlock),
|
|
/* harmony export */ createCommentVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode),
|
|
/* harmony export */ createElementBlock: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock),
|
|
/* harmony export */ createElementVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode),
|
|
/* harmony export */ createHydrationRenderer: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createHydrationRenderer),
|
|
/* harmony export */ createPropsRestProxy: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createPropsRestProxy),
|
|
/* harmony export */ createRenderer: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createRenderer),
|
|
/* harmony export */ createSSRApp: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createSSRApp),
|
|
/* harmony export */ createSlots: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createSlots),
|
|
/* harmony export */ createStaticVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createStaticVNode),
|
|
/* harmony export */ createTextVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode),
|
|
/* harmony export */ createVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createVNode),
|
|
/* harmony export */ customRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.customRef),
|
|
/* harmony export */ defineAsyncComponent: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineAsyncComponent),
|
|
/* harmony export */ defineComponent: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent),
|
|
/* harmony export */ defineCustomElement: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineCustomElement),
|
|
/* harmony export */ defineEmits: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineEmits),
|
|
/* harmony export */ defineExpose: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineExpose),
|
|
/* harmony export */ defineModel: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineModel),
|
|
/* harmony export */ defineOptions: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineOptions),
|
|
/* harmony export */ defineProps: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineProps),
|
|
/* harmony export */ defineSSRCustomElement: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineSSRCustomElement),
|
|
/* harmony export */ defineSlots: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineSlots),
|
|
/* harmony export */ del: () => (/* binding */ del),
|
|
/* harmony export */ devtools: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.devtools),
|
|
/* harmony export */ effect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.effect),
|
|
/* harmony export */ effectScope: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.effectScope),
|
|
/* harmony export */ getCurrentInstance: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance),
|
|
/* harmony export */ getCurrentScope: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.getCurrentScope),
|
|
/* harmony export */ getTransitionRawChildren: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.getTransitionRawChildren),
|
|
/* harmony export */ guardReactiveProps: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps),
|
|
/* harmony export */ h: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.h),
|
|
/* harmony export */ handleError: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.handleError),
|
|
/* harmony export */ hasInjectionContext: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.hasInjectionContext),
|
|
/* harmony export */ hydrate: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.hydrate),
|
|
/* harmony export */ initCustomFormatter: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.initCustomFormatter),
|
|
/* harmony export */ initDirectivesForSSR: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.initDirectivesForSSR),
|
|
/* harmony export */ inject: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.inject),
|
|
/* harmony export */ install: () => (/* binding */ install),
|
|
/* harmony export */ isMemoSame: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isMemoSame),
|
|
/* harmony export */ isProxy: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isProxy),
|
|
/* harmony export */ isReactive: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isReactive),
|
|
/* harmony export */ isReadonly: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isReadonly),
|
|
/* harmony export */ isRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isRef),
|
|
/* harmony export */ isRuntimeOnly: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isRuntimeOnly),
|
|
/* harmony export */ isShallow: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isShallow),
|
|
/* harmony export */ isVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isVNode),
|
|
/* harmony export */ isVue2: () => (/* binding */ isVue2),
|
|
/* harmony export */ isVue3: () => (/* binding */ isVue3),
|
|
/* harmony export */ markRaw: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.markRaw),
|
|
/* harmony export */ mergeDefaults: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.mergeDefaults),
|
|
/* harmony export */ mergeModels: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.mergeModels),
|
|
/* harmony export */ mergeProps: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps),
|
|
/* harmony export */ nextTick: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.nextTick),
|
|
/* harmony export */ normalizeClass: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass),
|
|
/* harmony export */ normalizeProps: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.normalizeProps),
|
|
/* harmony export */ normalizeStyle: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle),
|
|
/* harmony export */ onActivated: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onActivated),
|
|
/* harmony export */ onBeforeMount: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onBeforeMount),
|
|
/* harmony export */ onBeforeUnmount: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onBeforeUnmount),
|
|
/* harmony export */ onBeforeUpdate: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onBeforeUpdate),
|
|
/* harmony export */ onDeactivated: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onDeactivated),
|
|
/* harmony export */ onErrorCaptured: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onErrorCaptured),
|
|
/* harmony export */ onMounted: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onMounted),
|
|
/* harmony export */ onRenderTracked: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onRenderTracked),
|
|
/* harmony export */ onRenderTriggered: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onRenderTriggered),
|
|
/* harmony export */ onScopeDispose: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onScopeDispose),
|
|
/* harmony export */ onServerPrefetch: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onServerPrefetch),
|
|
/* harmony export */ onUnmounted: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onUnmounted),
|
|
/* harmony export */ onUpdated: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onUpdated),
|
|
/* harmony export */ openBlock: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.openBlock),
|
|
/* harmony export */ popScopeId: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId),
|
|
/* harmony export */ provide: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.provide),
|
|
/* harmony export */ proxyRefs: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.proxyRefs),
|
|
/* harmony export */ pushScopeId: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId),
|
|
/* harmony export */ queuePostFlushCb: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.queuePostFlushCb),
|
|
/* harmony export */ reactive: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.reactive),
|
|
/* harmony export */ readonly: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.readonly),
|
|
/* harmony export */ ref: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ref),
|
|
/* harmony export */ registerRuntimeCompiler: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.registerRuntimeCompiler),
|
|
/* harmony export */ render: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.render),
|
|
/* harmony export */ renderList: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.renderList),
|
|
/* harmony export */ renderSlot: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot),
|
|
/* harmony export */ resolveComponent: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent),
|
|
/* harmony export */ resolveDirective: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveDirective),
|
|
/* harmony export */ resolveDynamicComponent: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveDynamicComponent),
|
|
/* harmony export */ resolveFilter: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveFilter),
|
|
/* harmony export */ resolveTransitionHooks: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveTransitionHooks),
|
|
/* harmony export */ set: () => (/* binding */ set),
|
|
/* harmony export */ setBlockTracking: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.setBlockTracking),
|
|
/* harmony export */ setDevtoolsHook: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.setDevtoolsHook),
|
|
/* harmony export */ setTransitionHooks: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.setTransitionHooks),
|
|
/* harmony export */ shallowReactive: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.shallowReactive),
|
|
/* harmony export */ shallowReadonly: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly),
|
|
/* harmony export */ shallowRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.shallowRef),
|
|
/* harmony export */ ssrContextKey: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ssrContextKey),
|
|
/* harmony export */ ssrUtils: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ssrUtils),
|
|
/* harmony export */ stop: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.stop),
|
|
/* harmony export */ toDisplayString: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString),
|
|
/* harmony export */ toHandlerKey: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toHandlerKey),
|
|
/* harmony export */ toHandlers: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toHandlers),
|
|
/* harmony export */ toRaw: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toRaw),
|
|
/* harmony export */ toRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toRef),
|
|
/* harmony export */ toRefs: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toRefs),
|
|
/* harmony export */ toValue: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toValue),
|
|
/* harmony export */ transformVNodeArgs: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.transformVNodeArgs),
|
|
/* harmony export */ triggerRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.triggerRef),
|
|
/* harmony export */ unref: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.unref),
|
|
/* harmony export */ useAttrs: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useAttrs),
|
|
/* harmony export */ useCssModule: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useCssModule),
|
|
/* harmony export */ useCssVars: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useCssVars),
|
|
/* harmony export */ useModel: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useModel),
|
|
/* harmony export */ useSSRContext: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useSSRContext),
|
|
/* harmony export */ useSlots: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useSlots),
|
|
/* harmony export */ useTransitionState: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useTransitionState),
|
|
/* harmony export */ vModelCheckbox: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelCheckbox),
|
|
/* harmony export */ vModelDynamic: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelDynamic),
|
|
/* harmony export */ vModelRadio: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelRadio),
|
|
/* harmony export */ vModelSelect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelSelect),
|
|
/* harmony export */ vModelText: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelText),
|
|
/* harmony export */ vShow: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vShow),
|
|
/* harmony export */ version: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.version),
|
|
/* harmony export */ warn: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.warn),
|
|
/* harmony export */ watch: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.watch),
|
|
/* harmony export */ watchEffect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.watchEffect),
|
|
/* harmony export */ watchPostEffect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.watchPostEffect),
|
|
/* harmony export */ watchSyncEffect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.watchSyncEffect),
|
|
/* harmony export */ withAsyncContext: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withAsyncContext),
|
|
/* harmony export */ withCtx: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withCtx),
|
|
/* harmony export */ withDefaults: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withDefaults),
|
|
/* harmony export */ withDirectives: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives),
|
|
/* harmony export */ withKeys: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withKeys),
|
|
/* harmony export */ withMemo: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withMemo),
|
|
/* harmony export */ withModifiers: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers),
|
|
/* harmony export */ withScopeId: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withScopeId)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
|
|
var isVue2 = false
|
|
var isVue3 = true
|
|
var Vue2 = undefined
|
|
|
|
function install() {}
|
|
|
|
function set(target, key, val) {
|
|
if (Array.isArray(target)) {
|
|
target.length = Math.max(target.length, key)
|
|
target.splice(key, 1, val)
|
|
return val
|
|
}
|
|
target[key] = val
|
|
return val
|
|
}
|
|
|
|
function del(target, key) {
|
|
if (Array.isArray(target)) {
|
|
target.splice(key, 1)
|
|
return
|
|
}
|
|
delete target[key]
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/@vuelidate/validators/dist/index.mjs":
|
|
/*!***********************************************************!*\
|
|
!*** ./node_modules/@vuelidate/validators/dist/index.mjs ***!
|
|
\***********************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ alpha: () => (/* binding */ alpha),
|
|
/* harmony export */ alphaNum: () => (/* binding */ alphaNum),
|
|
/* harmony export */ and: () => (/* binding */ and),
|
|
/* harmony export */ between: () => (/* binding */ between),
|
|
/* harmony export */ createI18nMessage: () => (/* binding */ createI18nMessage),
|
|
/* harmony export */ decimal: () => (/* binding */ decimal),
|
|
/* harmony export */ email: () => (/* binding */ email),
|
|
/* harmony export */ helpers: () => (/* binding */ common),
|
|
/* harmony export */ integer: () => (/* binding */ integer),
|
|
/* harmony export */ ipAddress: () => (/* binding */ ipAddress),
|
|
/* harmony export */ macAddress: () => (/* binding */ macAddress),
|
|
/* harmony export */ maxLength: () => (/* binding */ maxLength),
|
|
/* harmony export */ maxValue: () => (/* binding */ maxValue),
|
|
/* harmony export */ minLength: () => (/* binding */ minLength),
|
|
/* harmony export */ minValue: () => (/* binding */ minValue),
|
|
/* harmony export */ not: () => (/* binding */ not),
|
|
/* harmony export */ numeric: () => (/* binding */ numeric),
|
|
/* harmony export */ or: () => (/* binding */ or),
|
|
/* harmony export */ required: () => (/* binding */ required),
|
|
/* harmony export */ requiredIf: () => (/* binding */ requiredIf),
|
|
/* harmony export */ requiredUnless: () => (/* binding */ requiredUnless),
|
|
/* harmony export */ sameAs: () => (/* binding */ sameAs),
|
|
/* harmony export */ url: () => (/* binding */ url)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue_demi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue-demi */ "./node_modules/@vuelidate/validators/node_modules/vue-demi/lib/index.mjs");
|
|
|
|
|
|
function ownKeys(object, enumerableOnly) {
|
|
var keys = Object.keys(object);
|
|
|
|
if (Object.getOwnPropertySymbols) {
|
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
})), keys.push.apply(keys, symbols);
|
|
}
|
|
|
|
return keys;
|
|
}
|
|
|
|
function _objectSpread2(target) {
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
var source = null != arguments[i] ? arguments[i] : {};
|
|
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
_defineProperty(target, key, source[key]);
|
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
});
|
|
}
|
|
|
|
return target;
|
|
}
|
|
|
|
function _defineProperty(obj, key, value) {
|
|
if (key in obj) {
|
|
Object.defineProperty(obj, key, {
|
|
value: value,
|
|
enumerable: true,
|
|
configurable: true,
|
|
writable: true
|
|
});
|
|
} else {
|
|
obj[key] = value;
|
|
}
|
|
|
|
return obj;
|
|
}
|
|
|
|
function isFunction(val) {
|
|
return typeof val === 'function';
|
|
}
|
|
function isObject(o) {
|
|
return o !== null && typeof o === 'object' && !Array.isArray(o);
|
|
}
|
|
function normalizeValidatorObject(validator) {
|
|
return isFunction(validator.$validator) ? _objectSpread2({}, validator) : {
|
|
$validator: validator
|
|
};
|
|
}
|
|
function isPromise(object) {
|
|
return isObject(object) && isFunction(object.then);
|
|
}
|
|
function unwrapValidatorResponse(result) {
|
|
if (typeof result === 'object') return result.$valid;
|
|
return result;
|
|
}
|
|
function unwrapNormalizedValidator(validator) {
|
|
return validator.$validator || validator;
|
|
}
|
|
|
|
function withParams($params, $validator) {
|
|
if (!isObject($params)) throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof $params}`);
|
|
if (!isObject($validator) && !isFunction($validator)) throw new Error(`[@vuelidate/validators]: Validator must be a function or object with $validator parameter`);
|
|
const validatorObj = normalizeValidatorObject($validator);
|
|
validatorObj.$params = _objectSpread2(_objectSpread2({}, validatorObj.$params || {}), $params);
|
|
return validatorObj;
|
|
}
|
|
|
|
function withMessage($message, $validator) {
|
|
if (!isFunction($message) && typeof (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)($message) !== 'string') throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof $message}`);
|
|
if (!isObject($validator) && !isFunction($validator)) throw new Error(`[@vuelidate/validators]: Validator must be a function or object with $validator parameter`);
|
|
const validatorObj = normalizeValidatorObject($validator);
|
|
validatorObj.$message = $message;
|
|
return validatorObj;
|
|
}
|
|
|
|
function withAsync($validator) {
|
|
let $watchTargets = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
const validatorObj = normalizeValidatorObject($validator);
|
|
return _objectSpread2(_objectSpread2({}, validatorObj), {}, {
|
|
$async: true,
|
|
$watchTargets
|
|
});
|
|
}
|
|
|
|
function forEach(validators) {
|
|
return {
|
|
$validator(collection) {
|
|
for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
others[_key - 1] = arguments[_key];
|
|
}
|
|
|
|
return (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(collection).reduce((previous, collectionItem, index) => {
|
|
const collectionEntryResult = Object.entries(collectionItem).reduce((all, _ref) => {
|
|
let [property, $model] = _ref;
|
|
const innerValidators = validators[property] || {};
|
|
const propertyResult = Object.entries(innerValidators).reduce((all, _ref2) => {
|
|
let [validatorName, currentValidator] = _ref2;
|
|
const validatorFunction = unwrapNormalizedValidator(currentValidator);
|
|
const $response = validatorFunction.call(this, $model, collectionItem, index, ...others);
|
|
const $valid = unwrapValidatorResponse($response);
|
|
all.$data[validatorName] = $response;
|
|
all.$data.$invalid = !$valid || !!all.$data.$invalid;
|
|
all.$data.$error = all.$data.$invalid;
|
|
|
|
if (!$valid) {
|
|
let $message = currentValidator.$message || '';
|
|
const $params = currentValidator.$params || {};
|
|
|
|
if (typeof $message === 'function') {
|
|
$message = $message({
|
|
$pending: false,
|
|
$invalid: !$valid,
|
|
$params,
|
|
$model,
|
|
$response
|
|
});
|
|
}
|
|
|
|
all.$errors.push({
|
|
$property: property,
|
|
$message,
|
|
$params,
|
|
$response,
|
|
$model,
|
|
$pending: false,
|
|
$validator: validatorName
|
|
});
|
|
}
|
|
|
|
return {
|
|
$valid: all.$valid && $valid,
|
|
$data: all.$data,
|
|
$errors: all.$errors
|
|
};
|
|
}, {
|
|
$valid: true,
|
|
$data: {},
|
|
$errors: []
|
|
});
|
|
all.$data[property] = propertyResult.$data;
|
|
all.$errors[property] = propertyResult.$errors;
|
|
return {
|
|
$valid: all.$valid && propertyResult.$valid,
|
|
$data: all.$data,
|
|
$errors: all.$errors
|
|
};
|
|
}, {
|
|
$valid: true,
|
|
$data: {},
|
|
$errors: {}
|
|
});
|
|
return {
|
|
$valid: previous.$valid && collectionEntryResult.$valid,
|
|
$data: previous.$data.concat(collectionEntryResult.$data),
|
|
$errors: previous.$errors.concat(collectionEntryResult.$errors)
|
|
};
|
|
}, {
|
|
$valid: true,
|
|
$data: [],
|
|
$errors: []
|
|
});
|
|
},
|
|
|
|
$message: _ref3 => {
|
|
let {
|
|
$response
|
|
} = _ref3;
|
|
return $response ? $response.$errors.map(context => {
|
|
return Object.values(context).map(errors => errors.map(error => error.$message)).reduce((a, b) => a.concat(b), []);
|
|
}) : [];
|
|
}
|
|
};
|
|
}
|
|
|
|
const req = value => {
|
|
value = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(value);
|
|
if (Array.isArray(value)) return !!value.length;
|
|
|
|
if (value === undefined || value === null) {
|
|
return false;
|
|
}
|
|
|
|
if (value === false) {
|
|
return true;
|
|
}
|
|
|
|
if (value instanceof Date) {
|
|
return !isNaN(value.getTime());
|
|
}
|
|
|
|
if (typeof value === 'object') {
|
|
for (let _ in value) return true;
|
|
|
|
return false;
|
|
}
|
|
|
|
return !!String(value).length;
|
|
};
|
|
const len = value => {
|
|
value = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(value);
|
|
if (Array.isArray(value)) return value.length;
|
|
|
|
if (typeof value === 'object') {
|
|
return Object.keys(value).length;
|
|
}
|
|
|
|
return String(value).length;
|
|
};
|
|
function regex() {
|
|
for (var _len = arguments.length, expr = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
expr[_key] = arguments[_key];
|
|
}
|
|
|
|
return value => {
|
|
value = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(value);
|
|
return !req(value) || expr.every(reg => {
|
|
reg.lastIndex = 0;
|
|
return reg.test(value);
|
|
});
|
|
};
|
|
}
|
|
|
|
var common = /*#__PURE__*/Object.freeze({
|
|
__proto__: null,
|
|
forEach: forEach,
|
|
len: len,
|
|
normalizeValidatorObject: normalizeValidatorObject,
|
|
regex: regex,
|
|
req: req,
|
|
unwrap: vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref,
|
|
unwrapNormalizedValidator: unwrapNormalizedValidator,
|
|
unwrapValidatorResponse: unwrapValidatorResponse,
|
|
withAsync: withAsync,
|
|
withMessage: withMessage,
|
|
withParams: withParams
|
|
});
|
|
|
|
var alpha$1 = regex(/^[a-zA-Z]*$/);
|
|
|
|
var alpha = {
|
|
$validator: alpha$1,
|
|
$message: 'The value is not alphabetical',
|
|
$params: {
|
|
type: 'alpha'
|
|
}
|
|
};
|
|
|
|
var alphaNum$1 = regex(/^[a-zA-Z0-9]*$/);
|
|
|
|
var alphaNum = {
|
|
$validator: alphaNum$1,
|
|
$message: 'The value must be alpha-numeric',
|
|
$params: {
|
|
type: 'alphaNum'
|
|
}
|
|
};
|
|
|
|
var numeric$1 = regex(/^\d*(\.\d+)?$/);
|
|
|
|
var numeric = {
|
|
$validator: numeric$1,
|
|
$message: 'Value must be numeric',
|
|
$params: {
|
|
type: 'numeric'
|
|
}
|
|
};
|
|
|
|
function between$1 (min, max) {
|
|
return value => !req(value) || (!/\s/.test(value) || value instanceof Date) && +(0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(min) <= +value && +(0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(max) >= +value;
|
|
}
|
|
|
|
function between (min, max) {
|
|
return {
|
|
$validator: between$1(min, max),
|
|
$message: _ref => {
|
|
let {
|
|
$params
|
|
} = _ref;
|
|
return `The value must be between ${$params.min} and ${$params.max}`;
|
|
},
|
|
$params: {
|
|
min,
|
|
max,
|
|
type: 'between'
|
|
}
|
|
};
|
|
}
|
|
|
|
const emailRegex = /^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;
|
|
var email$1 = regex(emailRegex);
|
|
|
|
var email = {
|
|
$validator: email$1,
|
|
$message: 'Value is not a valid email address',
|
|
$params: {
|
|
type: 'email'
|
|
}
|
|
};
|
|
|
|
function ipAddress$1 (value) {
|
|
if (!req(value)) {
|
|
return true;
|
|
}
|
|
|
|
if (typeof value !== 'string') {
|
|
return false;
|
|
}
|
|
|
|
const nibbles = value.split('.');
|
|
return nibbles.length === 4 && nibbles.every(nibbleValid);
|
|
}
|
|
|
|
const nibbleValid = nibble => {
|
|
if (nibble.length > 3 || nibble.length === 0) {
|
|
return false;
|
|
}
|
|
|
|
if (nibble[0] === '0' && nibble !== '0') {
|
|
return false;
|
|
}
|
|
|
|
if (!nibble.match(/^\d+$/)) {
|
|
return false;
|
|
}
|
|
|
|
const numeric = +nibble | 0;
|
|
return numeric >= 0 && numeric <= 255;
|
|
};
|
|
|
|
var ipAddress = {
|
|
$validator: ipAddress$1,
|
|
$message: 'The value is not a valid IP address',
|
|
$params: {
|
|
type: 'ipAddress'
|
|
}
|
|
};
|
|
|
|
function macAddress$1 () {
|
|
let separator = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ':';
|
|
return value => {
|
|
separator = (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(separator);
|
|
|
|
if (!req(value)) {
|
|
return true;
|
|
}
|
|
|
|
if (typeof value !== 'string') {
|
|
return false;
|
|
}
|
|
|
|
const parts = typeof separator === 'string' && separator !== '' ? value.split(separator) : value.length === 12 || value.length === 16 ? value.match(/.{2}/g) : null;
|
|
return parts !== null && (parts.length === 6 || parts.length === 8) && parts.every(hexValid);
|
|
};
|
|
}
|
|
|
|
const hexValid = hex => hex.toLowerCase().match(/^[0-9a-f]{2}$/);
|
|
|
|
function macAddress (separator) {
|
|
return {
|
|
$validator: macAddress$1(separator),
|
|
$message: 'The value is not a valid MAC Address',
|
|
$params: {
|
|
type: 'macAddress'
|
|
}
|
|
};
|
|
}
|
|
|
|
function maxLength$1 (length) {
|
|
return value => !req(value) || len(value) <= (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(length);
|
|
}
|
|
|
|
function maxLength (max) {
|
|
return {
|
|
$validator: maxLength$1(max),
|
|
$message: _ref => {
|
|
let {
|
|
$params
|
|
} = _ref;
|
|
return `The maximum length allowed is ${$params.max}`;
|
|
},
|
|
$params: {
|
|
max,
|
|
type: 'maxLength'
|
|
}
|
|
};
|
|
}
|
|
|
|
function minLength$1 (length) {
|
|
return value => !req(value) || len(value) >= (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(length);
|
|
}
|
|
|
|
function minLength (min) {
|
|
return {
|
|
$validator: minLength$1(min),
|
|
$message: _ref => {
|
|
let {
|
|
$params
|
|
} = _ref;
|
|
return `This field should be at least ${$params.min} characters long`;
|
|
},
|
|
$params: {
|
|
min,
|
|
type: 'minLength'
|
|
}
|
|
};
|
|
}
|
|
|
|
function required$1 (value) {
|
|
if (typeof value === 'string') {
|
|
value = value.trim();
|
|
}
|
|
|
|
return req(value);
|
|
}
|
|
|
|
var required = {
|
|
$validator: required$1,
|
|
$message: 'Value is required',
|
|
$params: {
|
|
type: 'required'
|
|
}
|
|
};
|
|
|
|
const validate$1 = (prop, val) => prop ? req(typeof val === 'string' ? val.trim() : val) : true;
|
|
|
|
function requiredIf$1(propOrFunction) {
|
|
return function (value, parentVM) {
|
|
if (typeof propOrFunction !== 'function') {
|
|
return validate$1((0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(propOrFunction), value);
|
|
}
|
|
|
|
const result = propOrFunction.call(this, value, parentVM);
|
|
return validate$1(result, value);
|
|
};
|
|
}
|
|
|
|
function requiredIf (prop) {
|
|
return {
|
|
$validator: requiredIf$1(prop),
|
|
$message: 'The value is required',
|
|
$params: {
|
|
type: 'requiredIf',
|
|
prop
|
|
}
|
|
};
|
|
}
|
|
|
|
const validate = (prop, val) => !prop ? req(typeof val === 'string' ? val.trim() : val) : true;
|
|
|
|
function requiredUnless$1(propOrFunction) {
|
|
return function (value, parentVM) {
|
|
if (typeof propOrFunction !== 'function') {
|
|
return validate((0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(propOrFunction), value);
|
|
}
|
|
|
|
const result = propOrFunction.call(this, value, parentVM);
|
|
return validate(result, value);
|
|
};
|
|
}
|
|
|
|
function requiredUnless (prop) {
|
|
return {
|
|
$validator: requiredUnless$1(prop),
|
|
$message: 'The value is required',
|
|
$params: {
|
|
type: 'requiredUnless',
|
|
prop
|
|
}
|
|
};
|
|
}
|
|
|
|
function sameAs$1 (equalTo) {
|
|
return value => (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(value) === (0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(equalTo);
|
|
}
|
|
|
|
function sameAs (equalTo) {
|
|
let otherName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'other';
|
|
return {
|
|
$validator: sameAs$1(equalTo),
|
|
$message: _ref => {
|
|
return `The value must be equal to the ${otherName} value`;
|
|
},
|
|
$params: {
|
|
equalTo,
|
|
otherName,
|
|
type: 'sameAs'
|
|
}
|
|
};
|
|
}
|
|
|
|
const urlRegex = /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;
|
|
var url$1 = regex(urlRegex);
|
|
|
|
var url = {
|
|
$validator: url$1,
|
|
$message: 'The value is not a valid URL address',
|
|
$params: {
|
|
type: 'url'
|
|
}
|
|
};
|
|
|
|
function syncOr(validators) {
|
|
return function () {
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
return validators.reduce((valid, fn) => {
|
|
if (unwrapValidatorResponse(valid)) return valid;
|
|
return unwrapNormalizedValidator(fn).apply(this, args);
|
|
}, false);
|
|
};
|
|
}
|
|
|
|
function asyncOr(validators) {
|
|
return function () {
|
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
args[_key2] = arguments[_key2];
|
|
}
|
|
|
|
return validators.reduce(async (valid, fn) => {
|
|
const r = await valid;
|
|
if (unwrapValidatorResponse(r)) return r;
|
|
return unwrapNormalizedValidator(fn).apply(this, args);
|
|
}, Promise.resolve(false));
|
|
};
|
|
}
|
|
|
|
function or$1() {
|
|
for (var _len3 = arguments.length, validators = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
validators[_key3] = arguments[_key3];
|
|
}
|
|
|
|
const $async = validators.some(v => v.$async);
|
|
const $watchTargets = validators.reduce((all, v) => {
|
|
if (!v.$watchTargets) return all;
|
|
return all.concat(v.$watchTargets);
|
|
}, []);
|
|
|
|
let $validator = () => false;
|
|
|
|
if (validators.length) $validator = $async ? asyncOr(validators) : syncOr(validators);
|
|
return {
|
|
$async,
|
|
$validator,
|
|
$watchTargets
|
|
};
|
|
}
|
|
|
|
function or () {
|
|
return withParams({
|
|
type: 'or'
|
|
}, withMessage('The value does not match any of the provided validators', or$1(...arguments)));
|
|
}
|
|
|
|
function syncAnd(validators) {
|
|
return function () {
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
return validators.reduce((valid, fn) => {
|
|
if (!unwrapValidatorResponse(valid)) return valid;
|
|
return unwrapNormalizedValidator(fn).apply(this, args);
|
|
}, true);
|
|
};
|
|
}
|
|
|
|
function asyncAnd(validators) {
|
|
return function () {
|
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
args[_key2] = arguments[_key2];
|
|
}
|
|
|
|
return validators.reduce(async (valid, fn) => {
|
|
const r = await valid;
|
|
if (!unwrapValidatorResponse(r)) return r;
|
|
return unwrapNormalizedValidator(fn).apply(this, args);
|
|
}, Promise.resolve(true));
|
|
};
|
|
}
|
|
|
|
function and$1() {
|
|
for (var _len3 = arguments.length, validators = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
validators[_key3] = arguments[_key3];
|
|
}
|
|
|
|
const $async = validators.some(v => v.$async);
|
|
const $watchTargets = validators.reduce((all, v) => {
|
|
if (!v.$watchTargets) return all;
|
|
return all.concat(v.$watchTargets);
|
|
}, []);
|
|
|
|
let $validator = () => false;
|
|
|
|
if (validators.length) $validator = $async ? asyncAnd(validators) : syncAnd(validators);
|
|
return {
|
|
$async,
|
|
$validator,
|
|
$watchTargets
|
|
};
|
|
}
|
|
|
|
function and () {
|
|
return withParams({
|
|
type: 'and'
|
|
}, withMessage('The value does not match all of the provided validators', and$1(...arguments)));
|
|
}
|
|
|
|
function not$1 (validator) {
|
|
return function (value, vm) {
|
|
if (!req(value)) return true;
|
|
const response = unwrapNormalizedValidator(validator).call(this, value, vm);
|
|
if (!isPromise(response)) return !unwrapValidatorResponse(response);
|
|
return response.then(r => !unwrapValidatorResponse(r));
|
|
};
|
|
}
|
|
|
|
function not (validator) {
|
|
return {
|
|
$validator: not$1(validator),
|
|
$message: `The value does not match the provided validator`,
|
|
$params: {
|
|
type: 'not'
|
|
}
|
|
};
|
|
}
|
|
|
|
function minValue$1 (min) {
|
|
return value => !req(value) || (!/\s/.test(value) || value instanceof Date) && +value >= +(0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(min);
|
|
}
|
|
|
|
function minValue (min) {
|
|
return {
|
|
$validator: minValue$1(min),
|
|
$message: _ref => {
|
|
let {
|
|
$params
|
|
} = _ref;
|
|
return `The minimum value allowed is ${$params.min}`;
|
|
},
|
|
$params: {
|
|
min,
|
|
type: 'minValue'
|
|
}
|
|
};
|
|
}
|
|
|
|
function maxValue$1 (max) {
|
|
return value => !req(value) || (!/\s/.test(value) || value instanceof Date) && +value <= +(0,vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref)(max);
|
|
}
|
|
|
|
var maxValue = (max => ({
|
|
$validator: maxValue$1(max),
|
|
$message: _ref => {
|
|
let {
|
|
$params
|
|
} = _ref;
|
|
return `The maximum value allowed is ${$params.max}`;
|
|
},
|
|
$params: {
|
|
max,
|
|
type: 'maxValue'
|
|
}
|
|
}));
|
|
|
|
var integer$1 = regex(/(^[0-9]*$)|(^-[0-9]+$)/);
|
|
|
|
var integer = {
|
|
$validator: integer$1,
|
|
$message: 'Value is not an integer',
|
|
$params: {
|
|
type: 'integer'
|
|
}
|
|
};
|
|
|
|
var decimal$1 = regex(/^[-]?\d*(\.\d+)?$/);
|
|
|
|
var decimal = {
|
|
$validator: decimal$1,
|
|
$message: 'Value must be decimal',
|
|
$params: {
|
|
type: 'decimal'
|
|
}
|
|
};
|
|
|
|
function createI18nMessage(_ref) {
|
|
let {
|
|
t,
|
|
messagePath = _ref2 => {
|
|
let {
|
|
$validator
|
|
} = _ref2;
|
|
return `validations.${$validator}`;
|
|
},
|
|
messageParams = params => params
|
|
} = _ref;
|
|
return function withI18nMessage(validator) {
|
|
let {
|
|
withArguments = false,
|
|
messagePath: localMessagePath = messagePath,
|
|
messageParams: localMessageParams = messageParams
|
|
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
|
|
function message(props) {
|
|
return t(localMessagePath(props), localMessageParams(_objectSpread2({
|
|
model: props.$model,
|
|
property: props.$property,
|
|
pending: props.$pending,
|
|
invalid: props.$invalid,
|
|
response: props.$response,
|
|
validator: props.$validator,
|
|
propertyPath: props.$propertyPath
|
|
}, props.$params)));
|
|
}
|
|
|
|
if (withArguments && typeof validator === 'function') {
|
|
return function () {
|
|
return withMessage(message, validator(...arguments));
|
|
};
|
|
}
|
|
|
|
return withMessage(message, validator);
|
|
};
|
|
}
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/@vuelidate/validators/node_modules/vue-demi/lib/index.mjs":
|
|
/*!********************************************************************************!*\
|
|
!*** ./node_modules/@vuelidate/validators/node_modules/vue-demi/lib/index.mjs ***!
|
|
\********************************************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ BaseTransition: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.BaseTransition),
|
|
/* harmony export */ BaseTransitionPropsValidators: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.BaseTransitionPropsValidators),
|
|
/* harmony export */ Comment: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Comment),
|
|
/* harmony export */ EffectScope: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.EffectScope),
|
|
/* harmony export */ Fragment: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Fragment),
|
|
/* harmony export */ KeepAlive: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.KeepAlive),
|
|
/* harmony export */ ReactiveEffect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ReactiveEffect),
|
|
/* harmony export */ Static: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Static),
|
|
/* harmony export */ Suspense: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Suspense),
|
|
/* harmony export */ Teleport: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Teleport),
|
|
/* harmony export */ Text: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Text),
|
|
/* harmony export */ Transition: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Transition),
|
|
/* harmony export */ TransitionGroup: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.TransitionGroup),
|
|
/* harmony export */ Vue: () => (/* reexport module object */ vue__WEBPACK_IMPORTED_MODULE_0__),
|
|
/* harmony export */ Vue2: () => (/* binding */ Vue2),
|
|
/* harmony export */ VueElement: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.VueElement),
|
|
/* harmony export */ assertNumber: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.assertNumber),
|
|
/* harmony export */ callWithAsyncErrorHandling: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.callWithAsyncErrorHandling),
|
|
/* harmony export */ callWithErrorHandling: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.callWithErrorHandling),
|
|
/* harmony export */ camelize: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.camelize),
|
|
/* harmony export */ capitalize: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.capitalize),
|
|
/* harmony export */ cloneVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.cloneVNode),
|
|
/* harmony export */ compatUtils: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.compatUtils),
|
|
/* harmony export */ compile: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.compile),
|
|
/* harmony export */ computed: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.computed),
|
|
/* harmony export */ createApp: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createApp),
|
|
/* harmony export */ createBlock: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createBlock),
|
|
/* harmony export */ createCommentVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode),
|
|
/* harmony export */ createElementBlock: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock),
|
|
/* harmony export */ createElementVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode),
|
|
/* harmony export */ createHydrationRenderer: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createHydrationRenderer),
|
|
/* harmony export */ createPropsRestProxy: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createPropsRestProxy),
|
|
/* harmony export */ createRenderer: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createRenderer),
|
|
/* harmony export */ createSSRApp: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createSSRApp),
|
|
/* harmony export */ createSlots: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createSlots),
|
|
/* harmony export */ createStaticVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createStaticVNode),
|
|
/* harmony export */ createTextVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode),
|
|
/* harmony export */ createVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createVNode),
|
|
/* harmony export */ customRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.customRef),
|
|
/* harmony export */ defineAsyncComponent: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineAsyncComponent),
|
|
/* harmony export */ defineComponent: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent),
|
|
/* harmony export */ defineCustomElement: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineCustomElement),
|
|
/* harmony export */ defineEmits: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineEmits),
|
|
/* harmony export */ defineExpose: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineExpose),
|
|
/* harmony export */ defineModel: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineModel),
|
|
/* harmony export */ defineOptions: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineOptions),
|
|
/* harmony export */ defineProps: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineProps),
|
|
/* harmony export */ defineSSRCustomElement: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineSSRCustomElement),
|
|
/* harmony export */ defineSlots: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineSlots),
|
|
/* harmony export */ del: () => (/* binding */ del),
|
|
/* harmony export */ devtools: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.devtools),
|
|
/* harmony export */ effect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.effect),
|
|
/* harmony export */ effectScope: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.effectScope),
|
|
/* harmony export */ getCurrentInstance: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance),
|
|
/* harmony export */ getCurrentScope: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.getCurrentScope),
|
|
/* harmony export */ getTransitionRawChildren: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.getTransitionRawChildren),
|
|
/* harmony export */ guardReactiveProps: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps),
|
|
/* harmony export */ h: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.h),
|
|
/* harmony export */ handleError: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.handleError),
|
|
/* harmony export */ hasInjectionContext: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.hasInjectionContext),
|
|
/* harmony export */ hydrate: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.hydrate),
|
|
/* harmony export */ initCustomFormatter: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.initCustomFormatter),
|
|
/* harmony export */ initDirectivesForSSR: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.initDirectivesForSSR),
|
|
/* harmony export */ inject: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.inject),
|
|
/* harmony export */ install: () => (/* binding */ install),
|
|
/* harmony export */ isMemoSame: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isMemoSame),
|
|
/* harmony export */ isProxy: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isProxy),
|
|
/* harmony export */ isReactive: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isReactive),
|
|
/* harmony export */ isReadonly: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isReadonly),
|
|
/* harmony export */ isRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isRef),
|
|
/* harmony export */ isRuntimeOnly: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isRuntimeOnly),
|
|
/* harmony export */ isShallow: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isShallow),
|
|
/* harmony export */ isVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isVNode),
|
|
/* harmony export */ isVue2: () => (/* binding */ isVue2),
|
|
/* harmony export */ isVue3: () => (/* binding */ isVue3),
|
|
/* harmony export */ markRaw: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.markRaw),
|
|
/* harmony export */ mergeDefaults: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.mergeDefaults),
|
|
/* harmony export */ mergeModels: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.mergeModels),
|
|
/* harmony export */ mergeProps: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps),
|
|
/* harmony export */ nextTick: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.nextTick),
|
|
/* harmony export */ normalizeClass: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass),
|
|
/* harmony export */ normalizeProps: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.normalizeProps),
|
|
/* harmony export */ normalizeStyle: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle),
|
|
/* harmony export */ onActivated: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onActivated),
|
|
/* harmony export */ onBeforeMount: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onBeforeMount),
|
|
/* harmony export */ onBeforeUnmount: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onBeforeUnmount),
|
|
/* harmony export */ onBeforeUpdate: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onBeforeUpdate),
|
|
/* harmony export */ onDeactivated: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onDeactivated),
|
|
/* harmony export */ onErrorCaptured: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onErrorCaptured),
|
|
/* harmony export */ onMounted: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onMounted),
|
|
/* harmony export */ onRenderTracked: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onRenderTracked),
|
|
/* harmony export */ onRenderTriggered: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onRenderTriggered),
|
|
/* harmony export */ onScopeDispose: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onScopeDispose),
|
|
/* harmony export */ onServerPrefetch: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onServerPrefetch),
|
|
/* harmony export */ onUnmounted: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onUnmounted),
|
|
/* harmony export */ onUpdated: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onUpdated),
|
|
/* harmony export */ openBlock: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.openBlock),
|
|
/* harmony export */ popScopeId: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId),
|
|
/* harmony export */ provide: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.provide),
|
|
/* harmony export */ proxyRefs: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.proxyRefs),
|
|
/* harmony export */ pushScopeId: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId),
|
|
/* harmony export */ queuePostFlushCb: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.queuePostFlushCb),
|
|
/* harmony export */ reactive: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.reactive),
|
|
/* harmony export */ readonly: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.readonly),
|
|
/* harmony export */ ref: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ref),
|
|
/* harmony export */ registerRuntimeCompiler: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.registerRuntimeCompiler),
|
|
/* harmony export */ render: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.render),
|
|
/* harmony export */ renderList: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.renderList),
|
|
/* harmony export */ renderSlot: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot),
|
|
/* harmony export */ resolveComponent: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent),
|
|
/* harmony export */ resolveDirective: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveDirective),
|
|
/* harmony export */ resolveDynamicComponent: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveDynamicComponent),
|
|
/* harmony export */ resolveFilter: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveFilter),
|
|
/* harmony export */ resolveTransitionHooks: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveTransitionHooks),
|
|
/* harmony export */ set: () => (/* binding */ set),
|
|
/* harmony export */ setBlockTracking: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.setBlockTracking),
|
|
/* harmony export */ setDevtoolsHook: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.setDevtoolsHook),
|
|
/* harmony export */ setTransitionHooks: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.setTransitionHooks),
|
|
/* harmony export */ shallowReactive: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.shallowReactive),
|
|
/* harmony export */ shallowReadonly: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly),
|
|
/* harmony export */ shallowRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.shallowRef),
|
|
/* harmony export */ ssrContextKey: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ssrContextKey),
|
|
/* harmony export */ ssrUtils: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ssrUtils),
|
|
/* harmony export */ stop: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.stop),
|
|
/* harmony export */ toDisplayString: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString),
|
|
/* harmony export */ toHandlerKey: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toHandlerKey),
|
|
/* harmony export */ toHandlers: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toHandlers),
|
|
/* harmony export */ toRaw: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toRaw),
|
|
/* harmony export */ toRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toRef),
|
|
/* harmony export */ toRefs: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toRefs),
|
|
/* harmony export */ toValue: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toValue),
|
|
/* harmony export */ transformVNodeArgs: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.transformVNodeArgs),
|
|
/* harmony export */ triggerRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.triggerRef),
|
|
/* harmony export */ unref: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.unref),
|
|
/* harmony export */ useAttrs: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useAttrs),
|
|
/* harmony export */ useCssModule: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useCssModule),
|
|
/* harmony export */ useCssVars: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useCssVars),
|
|
/* harmony export */ useModel: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useModel),
|
|
/* harmony export */ useSSRContext: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useSSRContext),
|
|
/* harmony export */ useSlots: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useSlots),
|
|
/* harmony export */ useTransitionState: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useTransitionState),
|
|
/* harmony export */ vModelCheckbox: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelCheckbox),
|
|
/* harmony export */ vModelDynamic: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelDynamic),
|
|
/* harmony export */ vModelRadio: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelRadio),
|
|
/* harmony export */ vModelSelect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelSelect),
|
|
/* harmony export */ vModelText: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelText),
|
|
/* harmony export */ vShow: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vShow),
|
|
/* harmony export */ version: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.version),
|
|
/* harmony export */ warn: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.warn),
|
|
/* harmony export */ watch: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.watch),
|
|
/* harmony export */ watchEffect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.watchEffect),
|
|
/* harmony export */ watchPostEffect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.watchPostEffect),
|
|
/* harmony export */ watchSyncEffect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.watchSyncEffect),
|
|
/* harmony export */ withAsyncContext: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withAsyncContext),
|
|
/* harmony export */ withCtx: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withCtx),
|
|
/* harmony export */ withDefaults: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withDefaults),
|
|
/* harmony export */ withDirectives: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives),
|
|
/* harmony export */ withKeys: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withKeys),
|
|
/* harmony export */ withMemo: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withMemo),
|
|
/* harmony export */ withModifiers: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers),
|
|
/* harmony export */ withScopeId: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withScopeId)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
|
|
var isVue2 = false
|
|
var isVue3 = true
|
|
var Vue2 = undefined
|
|
|
|
function install() {}
|
|
|
|
function set(target, key, val) {
|
|
if (Array.isArray(target)) {
|
|
target.length = Math.max(target.length, key)
|
|
target.splice(key, 1, val)
|
|
return val
|
|
}
|
|
target[key] = val
|
|
return val
|
|
}
|
|
|
|
function del(target, key) {
|
|
if (Array.isArray(target)) {
|
|
target.splice(key, 1)
|
|
return
|
|
}
|
|
delete target[key]
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/adapters/adapters.js":
|
|
/*!*****************************************************!*\
|
|
!*** ./node_modules/axios/lib/adapters/adapters.js ***!
|
|
\*****************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
/* harmony import */ var _http_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./http.js */ "./node_modules/axios/lib/helpers/null.js");
|
|
/* harmony import */ var _xhr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./xhr.js */ "./node_modules/axios/lib/adapters/xhr.js");
|
|
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js");
|
|
|
|
|
|
|
|
|
|
|
|
const knownAdapters = {
|
|
http: _http_js__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
xhr: _xhr_js__WEBPACK_IMPORTED_MODULE_1__["default"]
|
|
}
|
|
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].forEach(knownAdapters, (fn, value) => {
|
|
if(fn) {
|
|
try {
|
|
Object.defineProperty(fn, 'name', {value});
|
|
} catch (e) {
|
|
// eslint-disable-next-line no-empty
|
|
}
|
|
Object.defineProperty(fn, 'adapterName', {value});
|
|
}
|
|
});
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
getAdapter: (adapters) => {
|
|
adapters = _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isArray(adapters) ? adapters : [adapters];
|
|
|
|
const {length} = adapters;
|
|
let nameOrAdapter;
|
|
let adapter;
|
|
|
|
for (let i = 0; i < length; i++) {
|
|
nameOrAdapter = adapters[i];
|
|
if((adapter = _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isString(nameOrAdapter) ? knownAdapters[nameOrAdapter.toLowerCase()] : nameOrAdapter)) {
|
|
break;
|
|
}
|
|
}
|
|
|
|
if (!adapter) {
|
|
if (adapter === false) {
|
|
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](
|
|
`Adapter ${nameOrAdapter} is not supported by the environment`,
|
|
'ERR_NOT_SUPPORT'
|
|
);
|
|
}
|
|
|
|
throw new Error(
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].hasOwnProp(knownAdapters, nameOrAdapter) ?
|
|
`Adapter '${nameOrAdapter}' is not available in the build` :
|
|
`Unknown adapter '${nameOrAdapter}'`
|
|
);
|
|
}
|
|
|
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isFunction(adapter)) {
|
|
throw new TypeError('adapter is not a function');
|
|
}
|
|
|
|
return adapter;
|
|
},
|
|
adapters: knownAdapters
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/adapters/xhr.js":
|
|
/*!************************************************!*\
|
|
!*** ./node_modules/axios/lib/adapters/xhr.js ***!
|
|
\************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../core/settle.js */ "./node_modules/axios/lib/core/settle.js");
|
|
/* harmony import */ var _helpers_cookies_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./../helpers/cookies.js */ "./node_modules/axios/lib/helpers/cookies.js");
|
|
/* harmony import */ var _helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../helpers/buildURL.js */ "./node_modules/axios/lib/helpers/buildURL.js");
|
|
/* harmony import */ var _core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/buildFullPath.js */ "./node_modules/axios/lib/core/buildFullPath.js");
|
|
/* harmony import */ var _helpers_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./../helpers/isURLSameOrigin.js */ "./node_modules/axios/lib/helpers/isURLSameOrigin.js");
|
|
/* harmony import */ var _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../defaults/transitional.js */ "./node_modules/axios/lib/defaults/transitional.js");
|
|
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js");
|
|
/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js");
|
|
/* harmony import */ var _helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../helpers/parseProtocol.js */ "./node_modules/axios/lib/helpers/parseProtocol.js");
|
|
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/browser/index.js");
|
|
/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js");
|
|
/* harmony import */ var _helpers_speedometer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/speedometer.js */ "./node_modules/axios/lib/helpers/speedometer.js");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function progressEventReducer(listener, isDownloadStream) {
|
|
let bytesNotified = 0;
|
|
const _speedometer = (0,_helpers_speedometer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(50, 250);
|
|
|
|
return e => {
|
|
const loaded = e.loaded;
|
|
const total = e.lengthComputable ? e.total : undefined;
|
|
const progressBytes = loaded - bytesNotified;
|
|
const rate = _speedometer(progressBytes);
|
|
const inRange = loaded <= total;
|
|
|
|
bytesNotified = loaded;
|
|
|
|
const data = {
|
|
loaded,
|
|
total,
|
|
progress: total ? (loaded / total) : undefined,
|
|
bytes: progressBytes,
|
|
rate: rate ? rate : undefined,
|
|
estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
|
|
event: e
|
|
};
|
|
|
|
data[isDownloadStream ? 'download' : 'upload'] = true;
|
|
|
|
listener(data);
|
|
};
|
|
}
|
|
|
|
const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isXHRAdapterSupported && function (config) {
|
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
let requestData = config.data;
|
|
const requestHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(config.headers).normalize();
|
|
const responseType = config.responseType;
|
|
let onCanceled;
|
|
function done() {
|
|
if (config.cancelToken) {
|
|
config.cancelToken.unsubscribe(onCanceled);
|
|
}
|
|
|
|
if (config.signal) {
|
|
config.signal.removeEventListener('abort', onCanceled);
|
|
}
|
|
}
|
|
|
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isFormData(requestData)) {
|
|
if (_platform_index_js__WEBPACK_IMPORTED_MODULE_3__["default"].isStandardBrowserEnv || _platform_index_js__WEBPACK_IMPORTED_MODULE_3__["default"].isStandardBrowserWebWorkerEnv) {
|
|
requestHeaders.setContentType(false); // Let the browser set it
|
|
} else {
|
|
requestHeaders.setContentType('multipart/form-data;', false); // mobile/desktop app frameworks
|
|
}
|
|
}
|
|
|
|
let request = new XMLHttpRequest();
|
|
|
|
// HTTP basic authentication
|
|
if (config.auth) {
|
|
const username = config.auth.username || '';
|
|
const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
|
|
requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));
|
|
}
|
|
|
|
const fullPath = (0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__["default"])(config.baseURL, config.url);
|
|
|
|
request.open(config.method.toUpperCase(), (0,_helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_5__["default"])(fullPath, config.params, config.paramsSerializer), true);
|
|
|
|
// Set the request timeout in MS
|
|
request.timeout = config.timeout;
|
|
|
|
function onloadend() {
|
|
if (!request) {
|
|
return;
|
|
}
|
|
// Prepare the response
|
|
const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(
|
|
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
);
|
|
const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
|
|
request.responseText : request.response;
|
|
const response = {
|
|
data: responseData,
|
|
status: request.status,
|
|
statusText: request.statusText,
|
|
headers: responseHeaders,
|
|
config,
|
|
request
|
|
};
|
|
|
|
(0,_core_settle_js__WEBPACK_IMPORTED_MODULE_6__["default"])(function _resolve(value) {
|
|
resolve(value);
|
|
done();
|
|
}, function _reject(err) {
|
|
reject(err);
|
|
done();
|
|
}, response);
|
|
|
|
// 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() {
|
|
if (!request) {
|
|
return;
|
|
}
|
|
|
|
reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__["default"]('Request aborted', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__["default"].ECONNABORTED, config, request));
|
|
|
|
// Clean up request
|
|
request = null;
|
|
};
|
|
|
|
// Handle low level network errors
|
|
request.onerror = function handleError() {
|
|
// Real errors are hidden from us by the browser
|
|
// onerror should only fire if it's a network error
|
|
reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__["default"]('Network Error', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__["default"].ERR_NETWORK, config, request));
|
|
|
|
// Clean up request
|
|
request = null;
|
|
};
|
|
|
|
// Handle timeout
|
|
request.ontimeout = function handleTimeout() {
|
|
let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
const transitional = config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_8__["default"];
|
|
if (config.timeoutErrorMessage) {
|
|
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
}
|
|
reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__["default"](
|
|
timeoutErrorMessage,
|
|
transitional.clarifyTimeoutError ? _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__["default"].ETIMEDOUT : _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__["default"].ECONNABORTED,
|
|
config,
|
|
request));
|
|
|
|
// Clean up request
|
|
request = null;
|
|
};
|
|
|
|
// Add xsrf header
|
|
// This is only done if running in a standard browser environment.
|
|
// Specifically not if we're in a web worker, or react-native.
|
|
if (_platform_index_js__WEBPACK_IMPORTED_MODULE_3__["default"].isStandardBrowserEnv) {
|
|
// Add xsrf header
|
|
const xsrfValue = (config.withCredentials || (0,_helpers_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_9__["default"])(fullPath))
|
|
&& config.xsrfCookieName && _helpers_cookies_js__WEBPACK_IMPORTED_MODULE_10__["default"].read(config.xsrfCookieName);
|
|
|
|
if (xsrfValue) {
|
|
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
|
}
|
|
}
|
|
|
|
// Remove Content-Type if data is undefined
|
|
requestData === undefined && requestHeaders.setContentType(null);
|
|
|
|
// Add headers to the request
|
|
if ('setRequestHeader' in request) {
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
request.setRequestHeader(key, val);
|
|
});
|
|
}
|
|
|
|
// Add withCredentials to request if needed
|
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isUndefined(config.withCredentials)) {
|
|
request.withCredentials = !!config.withCredentials;
|
|
}
|
|
|
|
// Add responseType to request if needed
|
|
if (responseType && responseType !== 'json') {
|
|
request.responseType = config.responseType;
|
|
}
|
|
|
|
// Handle progress if needed
|
|
if (typeof config.onDownloadProgress === 'function') {
|
|
request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));
|
|
}
|
|
|
|
// Not all browsers support upload events
|
|
if (typeof config.onUploadProgress === 'function' && request.upload) {
|
|
request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));
|
|
}
|
|
|
|
if (config.cancelToken || config.signal) {
|
|
// Handle cancellation
|
|
// eslint-disable-next-line func-names
|
|
onCanceled = cancel => {
|
|
if (!request) {
|
|
return;
|
|
}
|
|
reject(!cancel || cancel.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_11__["default"](null, config, request) : cancel);
|
|
request.abort();
|
|
request = null;
|
|
};
|
|
|
|
config.cancelToken && config.cancelToken.subscribe(onCanceled);
|
|
if (config.signal) {
|
|
config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
|
|
}
|
|
}
|
|
|
|
const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_12__["default"])(fullPath);
|
|
|
|
if (protocol && _platform_index_js__WEBPACK_IMPORTED_MODULE_3__["default"].protocols.indexOf(protocol) === -1) {
|
|
reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__["default"]('Unsupported protocol ' + protocol + ':', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__["default"].ERR_BAD_REQUEST, config));
|
|
return;
|
|
}
|
|
|
|
|
|
// Send the request
|
|
request.send(requestData || null);
|
|
});
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/axios.js":
|
|
/*!*****************************************!*\
|
|
!*** ./node_modules/axios/lib/axios.js ***!
|
|
\*****************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils.js */ "./node_modules/axios/lib/utils.js");
|
|
/* harmony import */ var _helpers_bind_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers/bind.js */ "./node_modules/axios/lib/helpers/bind.js");
|
|
/* harmony import */ var _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core/Axios.js */ "./node_modules/axios/lib/core/Axios.js");
|
|
/* harmony import */ var _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./core/mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js");
|
|
/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./defaults/index.js */ "./node_modules/axios/lib/defaults/index.js");
|
|
/* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./helpers/formDataToJSON.js */ "./node_modules/axios/lib/helpers/formDataToJSON.js");
|
|
/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js");
|
|
/* harmony import */ var _cancel_CancelToken_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./cancel/CancelToken.js */ "./node_modules/axios/lib/cancel/CancelToken.js");
|
|
/* harmony import */ var _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./cancel/isCancel.js */ "./node_modules/axios/lib/cancel/isCancel.js");
|
|
/* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./env/data.js */ "./node_modules/axios/lib/env/data.js");
|
|
/* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./helpers/toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js");
|
|
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js");
|
|
/* harmony import */ var _helpers_spread_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helpers/spread.js */ "./node_modules/axios/lib/helpers/spread.js");
|
|
/* harmony import */ var _helpers_isAxiosError_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./helpers/isAxiosError.js */ "./node_modules/axios/lib/helpers/isAxiosError.js");
|
|
/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js");
|
|
/* harmony import */ var _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./helpers/HttpStatusCode.js */ "./node_modules/axios/lib/helpers/HttpStatusCode.js");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Create an instance of Axios
|
|
*
|
|
* @param {Object} defaultConfig The default config for the instance
|
|
*
|
|
* @returns {Axios} A new instance of Axios
|
|
*/
|
|
function createInstance(defaultConfig) {
|
|
const context = new _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"](defaultConfig);
|
|
const instance = (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"].prototype.request, context);
|
|
|
|
// Copy axios.prototype to instance
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].extend(instance, _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"].prototype, context, {allOwnKeys: true});
|
|
|
|
// Copy context to instance
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].extend(instance, context, null, {allOwnKeys: true});
|
|
|
|
// Factory for creating new instances
|
|
instance.create = function create(instanceConfig) {
|
|
return createInstance((0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"])(defaultConfig, instanceConfig));
|
|
};
|
|
|
|
return instance;
|
|
}
|
|
|
|
// Create the default instance to be exported
|
|
const axios = createInstance(_defaults_index_js__WEBPACK_IMPORTED_MODULE_4__["default"]);
|
|
|
|
// Expose Axios class to allow class inheritance
|
|
axios.Axios = _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"];
|
|
|
|
// Expose Cancel & CancelToken
|
|
axios.CanceledError = _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_5__["default"];
|
|
axios.CancelToken = _cancel_CancelToken_js__WEBPACK_IMPORTED_MODULE_6__["default"];
|
|
axios.isCancel = _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_7__["default"];
|
|
axios.VERSION = _env_data_js__WEBPACK_IMPORTED_MODULE_8__.VERSION;
|
|
axios.toFormData = _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_9__["default"];
|
|
|
|
// Expose AxiosError class
|
|
axios.AxiosError = _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_10__["default"];
|
|
|
|
// alias for CanceledError for backward compatibility
|
|
axios.Cancel = axios.CanceledError;
|
|
|
|
// Expose all/spread
|
|
axios.all = function all(promises) {
|
|
return Promise.all(promises);
|
|
};
|
|
|
|
axios.spread = _helpers_spread_js__WEBPACK_IMPORTED_MODULE_11__["default"];
|
|
|
|
// Expose isAxiosError
|
|
axios.isAxiosError = _helpers_isAxiosError_js__WEBPACK_IMPORTED_MODULE_12__["default"];
|
|
|
|
// Expose mergeConfig
|
|
axios.mergeConfig = _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"];
|
|
|
|
axios.AxiosHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_13__["default"];
|
|
|
|
axios.formToJSON = thing => (0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_14__["default"])(_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
|
|
axios.HttpStatusCode = _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_15__["default"];
|
|
|
|
axios.default = axios;
|
|
|
|
// this module should only have a default export
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (axios);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/cancel/CancelToken.js":
|
|
/*!******************************************************!*\
|
|
!*** ./node_modules/axios/lib/cancel/CancelToken.js ***!
|
|
\******************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _CanceledError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js");
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A `CancelToken` is an object that can be used to request cancellation of an operation.
|
|
*
|
|
* @param {Function} executor The executor function.
|
|
*
|
|
* @returns {CancelToken}
|
|
*/
|
|
class CancelToken {
|
|
constructor(executor) {
|
|
if (typeof executor !== 'function') {
|
|
throw new TypeError('executor must be a function.');
|
|
}
|
|
|
|
let resolvePromise;
|
|
|
|
this.promise = new Promise(function promiseExecutor(resolve) {
|
|
resolvePromise = resolve;
|
|
});
|
|
|
|
const token = this;
|
|
|
|
// eslint-disable-next-line func-names
|
|
this.promise.then(cancel => {
|
|
if (!token._listeners) return;
|
|
|
|
let i = token._listeners.length;
|
|
|
|
while (i-- > 0) {
|
|
token._listeners[i](cancel);
|
|
}
|
|
token._listeners = null;
|
|
});
|
|
|
|
// eslint-disable-next-line func-names
|
|
this.promise.then = onfulfilled => {
|
|
let _resolve;
|
|
// eslint-disable-next-line func-names
|
|
const promise = new Promise(resolve => {
|
|
token.subscribe(resolve);
|
|
_resolve = resolve;
|
|
}).then(onfulfilled);
|
|
|
|
promise.cancel = function reject() {
|
|
token.unsubscribe(_resolve);
|
|
};
|
|
|
|
return promise;
|
|
};
|
|
|
|
executor(function cancel(message, config, request) {
|
|
if (token.reason) {
|
|
// Cancellation has already been requested
|
|
return;
|
|
}
|
|
|
|
token.reason = new _CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](message, config, request);
|
|
resolvePromise(token.reason);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Throws a `CanceledError` if cancellation has been requested.
|
|
*/
|
|
throwIfRequested() {
|
|
if (this.reason) {
|
|
throw this.reason;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Subscribe to the cancel signal
|
|
*/
|
|
|
|
subscribe(listener) {
|
|
if (this.reason) {
|
|
listener(this.reason);
|
|
return;
|
|
}
|
|
|
|
if (this._listeners) {
|
|
this._listeners.push(listener);
|
|
} else {
|
|
this._listeners = [listener];
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Unsubscribe from the cancel signal
|
|
*/
|
|
|
|
unsubscribe(listener) {
|
|
if (!this._listeners) {
|
|
return;
|
|
}
|
|
const index = this._listeners.indexOf(listener);
|
|
if (index !== -1) {
|
|
this._listeners.splice(index, 1);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
* cancels the `CancelToken`.
|
|
*/
|
|
static source() {
|
|
let cancel;
|
|
const token = new CancelToken(function executor(c) {
|
|
cancel = c;
|
|
});
|
|
return {
|
|
token,
|
|
cancel
|
|
};
|
|
}
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CancelToken);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/cancel/CanceledError.js":
|
|
/*!********************************************************!*\
|
|
!*** ./node_modules/axios/lib/cancel/CanceledError.js ***!
|
|
\********************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js");
|
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
*
|
|
* @param {string=} message The message.
|
|
* @param {Object=} config The config.
|
|
* @param {Object=} request The request.
|
|
*
|
|
* @returns {CanceledError} The created error.
|
|
*/
|
|
function CanceledError(message, config, request) {
|
|
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, message == null ? 'canceled' : message, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_CANCELED, config, request);
|
|
this.name = 'CanceledError';
|
|
}
|
|
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].inherits(CanceledError, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"], {
|
|
__CANCEL__: true
|
|
});
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CanceledError);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/cancel/isCancel.js":
|
|
/*!***************************************************!*\
|
|
!*** ./node_modules/axios/lib/cancel/isCancel.js ***!
|
|
\***************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* binding */ isCancel)
|
|
/* harmony export */ });
|
|
|
|
|
|
function isCancel(value) {
|
|
return !!(value && value.__CANCEL__);
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/core/Axios.js":
|
|
/*!**********************************************!*\
|
|
!*** ./node_modules/axios/lib/core/Axios.js ***!
|
|
\**********************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
/* harmony import */ var _helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../helpers/buildURL.js */ "./node_modules/axios/lib/helpers/buildURL.js");
|
|
/* harmony import */ var _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InterceptorManager.js */ "./node_modules/axios/lib/core/InterceptorManager.js");
|
|
/* harmony import */ var _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./dispatchRequest.js */ "./node_modules/axios/lib/core/dispatchRequest.js");
|
|
/* harmony import */ var _mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js");
|
|
/* harmony import */ var _buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./buildFullPath.js */ "./node_modules/axios/lib/core/buildFullPath.js");
|
|
/* harmony import */ var _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/validator.js */ "./node_modules/axios/lib/helpers/validator.js");
|
|
/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const validators = _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].validators;
|
|
|
|
/**
|
|
* Create a new instance of Axios
|
|
*
|
|
* @param {Object} instanceConfig The default config for the instance
|
|
*
|
|
* @return {Axios} A new instance of Axios
|
|
*/
|
|
class Axios {
|
|
constructor(instanceConfig) {
|
|
this.defaults = instanceConfig;
|
|
this.interceptors = {
|
|
request: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__["default"](),
|
|
response: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__["default"]()
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Dispatch a request
|
|
*
|
|
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
* @param {?Object} config
|
|
*
|
|
* @returns {Promise} The Promise to be fulfilled
|
|
*/
|
|
request(configOrUrl, config) {
|
|
/*eslint no-param-reassign:0*/
|
|
// Allow for axios('example/url'[, config]) a la fetch API
|
|
if (typeof configOrUrl === 'string') {
|
|
config = config || {};
|
|
config.url = configOrUrl;
|
|
} else {
|
|
config = configOrUrl || {};
|
|
}
|
|
|
|
config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this.defaults, config);
|
|
|
|
const {transitional, paramsSerializer, headers} = config;
|
|
|
|
if (transitional !== undefined) {
|
|
_helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].assertOptions(transitional, {
|
|
silentJSONParsing: validators.transitional(validators.boolean),
|
|
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
clarifyTimeoutError: validators.transitional(validators.boolean)
|
|
}, false);
|
|
}
|
|
|
|
if (paramsSerializer != null) {
|
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isFunction(paramsSerializer)) {
|
|
config.paramsSerializer = {
|
|
serialize: paramsSerializer
|
|
}
|
|
} else {
|
|
_helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].assertOptions(paramsSerializer, {
|
|
encode: validators.function,
|
|
serialize: validators.function
|
|
}, true);
|
|
}
|
|
}
|
|
|
|
// Set config.method
|
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
|
|
|
let contextHeaders;
|
|
|
|
// Flatten headers
|
|
contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].merge(
|
|
headers.common,
|
|
headers[config.method]
|
|
);
|
|
|
|
contextHeaders && _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(
|
|
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
|
(method) => {
|
|
delete headers[method];
|
|
}
|
|
);
|
|
|
|
config.headers = _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].concat(contextHeaders, headers);
|
|
|
|
// filter out skipped interceptors
|
|
const requestInterceptorChain = [];
|
|
let synchronousRequestInterceptors = true;
|
|
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
|
if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
|
|
return;
|
|
}
|
|
|
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
|
|
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
});
|
|
|
|
const responseInterceptorChain = [];
|
|
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
|
responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
});
|
|
|
|
let promise;
|
|
let i = 0;
|
|
let len;
|
|
|
|
if (!synchronousRequestInterceptors) {
|
|
const chain = [_dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__["default"].bind(this), undefined];
|
|
chain.unshift.apply(chain, requestInterceptorChain);
|
|
chain.push.apply(chain, responseInterceptorChain);
|
|
len = chain.length;
|
|
|
|
promise = Promise.resolve(config);
|
|
|
|
while (i < len) {
|
|
promise = promise.then(chain[i++], chain[i++]);
|
|
}
|
|
|
|
return promise;
|
|
}
|
|
|
|
len = requestInterceptorChain.length;
|
|
|
|
let newConfig = config;
|
|
|
|
i = 0;
|
|
|
|
while (i < len) {
|
|
const onFulfilled = requestInterceptorChain[i++];
|
|
const onRejected = requestInterceptorChain[i++];
|
|
try {
|
|
newConfig = onFulfilled(newConfig);
|
|
} catch (error) {
|
|
onRejected.call(this, error);
|
|
break;
|
|
}
|
|
}
|
|
|
|
try {
|
|
promise = _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__["default"].call(this, newConfig);
|
|
} catch (error) {
|
|
return Promise.reject(error);
|
|
}
|
|
|
|
i = 0;
|
|
len = responseInterceptorChain.length;
|
|
|
|
while (i < len) {
|
|
promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
|
|
}
|
|
|
|
return promise;
|
|
}
|
|
|
|
getUri(config) {
|
|
config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this.defaults, config);
|
|
const fullPath = (0,_buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__["default"])(config.baseURL, config.url);
|
|
return (0,_helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_7__["default"])(fullPath, config.params, config.paramsSerializer);
|
|
}
|
|
}
|
|
|
|
// Provide aliases for supported request methods
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
/*eslint func-names:0*/
|
|
Axios.prototype[method] = function(url, config) {
|
|
return this.request((0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(config || {}, {
|
|
method,
|
|
url,
|
|
data: (config || {}).data
|
|
}));
|
|
};
|
|
});
|
|
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
/*eslint func-names:0*/
|
|
|
|
function generateHTTPMethod(isForm) {
|
|
return function httpMethod(url, data, config) {
|
|
return this.request((0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(config || {}, {
|
|
method,
|
|
headers: isForm ? {
|
|
'Content-Type': 'multipart/form-data'
|
|
} : {},
|
|
url,
|
|
data
|
|
}));
|
|
};
|
|
}
|
|
|
|
Axios.prototype[method] = generateHTTPMethod();
|
|
|
|
Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
|
|
});
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Axios);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/core/AxiosError.js":
|
|
/*!***************************************************!*\
|
|
!*** ./node_modules/axios/lib/core/AxiosError.js ***!
|
|
\***************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Create an Error with the specified message, config, error code, request and response.
|
|
*
|
|
* @param {string} message The error message.
|
|
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
* @param {Object} [config] The config.
|
|
* @param {Object} [request] The request.
|
|
* @param {Object} [response] The response.
|
|
*
|
|
* @returns {Error} The created error.
|
|
*/
|
|
function AxiosError(message, code, config, request, response) {
|
|
Error.call(this);
|
|
|
|
if (Error.captureStackTrace) {
|
|
Error.captureStackTrace(this, this.constructor);
|
|
} else {
|
|
this.stack = (new Error()).stack;
|
|
}
|
|
|
|
this.message = message;
|
|
this.name = 'AxiosError';
|
|
code && (this.code = code);
|
|
config && (this.config = config);
|
|
request && (this.request = request);
|
|
response && (this.response = response);
|
|
}
|
|
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].inherits(AxiosError, Error, {
|
|
toJSON: function toJSON() {
|
|
return {
|
|
// Standard
|
|
message: this.message,
|
|
name: this.name,
|
|
// Microsoft
|
|
description: this.description,
|
|
number: this.number,
|
|
// Mozilla
|
|
fileName: this.fileName,
|
|
lineNumber: this.lineNumber,
|
|
columnNumber: this.columnNumber,
|
|
stack: this.stack,
|
|
// Axios
|
|
config: _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toJSONObject(this.config),
|
|
code: this.code,
|
|
status: this.response && this.response.status ? this.response.status : null
|
|
};
|
|
}
|
|
});
|
|
|
|
const prototype = AxiosError.prototype;
|
|
const descriptors = {};
|
|
|
|
[
|
|
'ERR_BAD_OPTION_VALUE',
|
|
'ERR_BAD_OPTION',
|
|
'ECONNABORTED',
|
|
'ETIMEDOUT',
|
|
'ERR_NETWORK',
|
|
'ERR_FR_TOO_MANY_REDIRECTS',
|
|
'ERR_DEPRECATED',
|
|
'ERR_BAD_RESPONSE',
|
|
'ERR_BAD_REQUEST',
|
|
'ERR_CANCELED',
|
|
'ERR_NOT_SUPPORT',
|
|
'ERR_INVALID_URL'
|
|
// eslint-disable-next-line func-names
|
|
].forEach(code => {
|
|
descriptors[code] = {value: code};
|
|
});
|
|
|
|
Object.defineProperties(AxiosError, descriptors);
|
|
Object.defineProperty(prototype, 'isAxiosError', {value: true});
|
|
|
|
// eslint-disable-next-line func-names
|
|
AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
const axiosError = Object.create(prototype);
|
|
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(error, axiosError, function filter(obj) {
|
|
return obj !== Error.prototype;
|
|
}, prop => {
|
|
return prop !== 'isAxiosError';
|
|
});
|
|
|
|
AxiosError.call(axiosError, error.message, code, config, request, response);
|
|
|
|
axiosError.cause = error;
|
|
|
|
axiosError.name = error.name;
|
|
|
|
customProps && Object.assign(axiosError, customProps);
|
|
|
|
return axiosError;
|
|
};
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosError);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/core/AxiosHeaders.js":
|
|
/*!*****************************************************!*\
|
|
!*** ./node_modules/axios/lib/core/AxiosHeaders.js ***!
|
|
\*****************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
/* harmony import */ var _helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/parseHeaders.js */ "./node_modules/axios/lib/helpers/parseHeaders.js");
|
|
|
|
|
|
|
|
|
|
|
|
const $internals = Symbol('internals');
|
|
|
|
function normalizeHeader(header) {
|
|
return header && String(header).trim().toLowerCase();
|
|
}
|
|
|
|
function normalizeValue(value) {
|
|
if (value === false || value == null) {
|
|
return value;
|
|
}
|
|
|
|
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.map(normalizeValue) : String(value);
|
|
}
|
|
|
|
function parseTokens(str) {
|
|
const tokens = Object.create(null);
|
|
const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
let match;
|
|
|
|
while ((match = tokensRE.exec(str))) {
|
|
tokens[match[1]] = match[2];
|
|
}
|
|
|
|
return tokens;
|
|
}
|
|
|
|
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
|
|
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(filter)) {
|
|
return filter.call(this, value, header);
|
|
}
|
|
|
|
if (isHeaderNameFilter) {
|
|
value = header;
|
|
}
|
|
|
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(value)) return;
|
|
|
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(filter)) {
|
|
return value.indexOf(filter) !== -1;
|
|
}
|
|
|
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isRegExp(filter)) {
|
|
return filter.test(value);
|
|
}
|
|
}
|
|
|
|
function formatHeader(header) {
|
|
return header.trim()
|
|
.toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
|
|
return char.toUpperCase() + str;
|
|
});
|
|
}
|
|
|
|
function buildAccessors(obj, header) {
|
|
const accessorName = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toCamelCase(' ' + header);
|
|
|
|
['get', 'set', 'has'].forEach(methodName => {
|
|
Object.defineProperty(obj, methodName + accessorName, {
|
|
value: function(arg1, arg2, arg3) {
|
|
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
},
|
|
configurable: true
|
|
});
|
|
});
|
|
}
|
|
|
|
class AxiosHeaders {
|
|
constructor(headers) {
|
|
headers && this.set(headers);
|
|
}
|
|
|
|
set(header, valueOrRewrite, rewrite) {
|
|
const self = this;
|
|
|
|
function setHeader(_value, _header, _rewrite) {
|
|
const lHeader = normalizeHeader(_header);
|
|
|
|
if (!lHeader) {
|
|
throw new Error('header name must be a non-empty string');
|
|
}
|
|
|
|
const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(self, lHeader);
|
|
|
|
if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
|
|
self[key || _header] = normalizeValue(_value);
|
|
}
|
|
}
|
|
|
|
const setHeaders = (headers, _rewrite) =>
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
|
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(header) || header instanceof this.constructor) {
|
|
setHeaders(header, valueOrRewrite)
|
|
} else if(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
setHeaders((0,_helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"])(header), valueOrRewrite);
|
|
} else {
|
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
}
|
|
|
|
return this;
|
|
}
|
|
|
|
get(header, parser) {
|
|
header = normalizeHeader(header);
|
|
|
|
if (header) {
|
|
const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(this, header);
|
|
|
|
if (key) {
|
|
const value = this[key];
|
|
|
|
if (!parser) {
|
|
return value;
|
|
}
|
|
|
|
if (parser === true) {
|
|
return parseTokens(value);
|
|
}
|
|
|
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(parser)) {
|
|
return parser.call(this, value, key);
|
|
}
|
|
|
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isRegExp(parser)) {
|
|
return parser.exec(value);
|
|
}
|
|
|
|
throw new TypeError('parser must be boolean|regexp|function');
|
|
}
|
|
}
|
|
}
|
|
|
|
has(header, matcher) {
|
|
header = normalizeHeader(header);
|
|
|
|
if (header) {
|
|
const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(this, header);
|
|
|
|
return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
delete(header, matcher) {
|
|
const self = this;
|
|
let deleted = false;
|
|
|
|
function deleteHeader(_header) {
|
|
_header = normalizeHeader(_header);
|
|
|
|
if (_header) {
|
|
const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(self, _header);
|
|
|
|
if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
|
|
delete self[key];
|
|
|
|
deleted = true;
|
|
}
|
|
}
|
|
}
|
|
|
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(header)) {
|
|
header.forEach(deleteHeader);
|
|
} else {
|
|
deleteHeader(header);
|
|
}
|
|
|
|
return deleted;
|
|
}
|
|
|
|
clear(matcher) {
|
|
const keys = Object.keys(this);
|
|
let i = keys.length;
|
|
let deleted = false;
|
|
|
|
while (i--) {
|
|
const key = keys[i];
|
|
if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
delete this[key];
|
|
deleted = true;
|
|
}
|
|
}
|
|
|
|
return deleted;
|
|
}
|
|
|
|
normalize(format) {
|
|
const self = this;
|
|
const headers = {};
|
|
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this, (value, header) => {
|
|
const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(headers, header);
|
|
|
|
if (key) {
|
|
self[key] = normalizeValue(value);
|
|
delete self[header];
|
|
return;
|
|
}
|
|
|
|
const normalized = format ? formatHeader(header) : String(header).trim();
|
|
|
|
if (normalized !== header) {
|
|
delete self[header];
|
|
}
|
|
|
|
self[normalized] = normalizeValue(value);
|
|
|
|
headers[normalized] = true;
|
|
});
|
|
|
|
return this;
|
|
}
|
|
|
|
concat(...targets) {
|
|
return this.constructor.concat(this, ...targets);
|
|
}
|
|
|
|
toJSON(asStrings) {
|
|
const obj = Object.create(null);
|
|
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this, (value, header) => {
|
|
value != null && value !== false && (obj[header] = asStrings && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.join(', ') : value);
|
|
});
|
|
|
|
return obj;
|
|
}
|
|
|
|
[Symbol.iterator]() {
|
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
}
|
|
|
|
toString() {
|
|
return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
|
|
}
|
|
|
|
get [Symbol.toStringTag]() {
|
|
return 'AxiosHeaders';
|
|
}
|
|
|
|
static from(thing) {
|
|
return thing instanceof this ? thing : new this(thing);
|
|
}
|
|
|
|
static concat(first, ...targets) {
|
|
const computed = new this(first);
|
|
|
|
targets.forEach((target) => computed.set(target));
|
|
|
|
return computed;
|
|
}
|
|
|
|
static accessor(header) {
|
|
const internals = this[$internals] = (this[$internals] = {
|
|
accessors: {}
|
|
});
|
|
|
|
const accessors = internals.accessors;
|
|
const prototype = this.prototype;
|
|
|
|
function defineAccessor(_header) {
|
|
const lHeader = normalizeHeader(_header);
|
|
|
|
if (!accessors[lHeader]) {
|
|
buildAccessors(prototype, _header);
|
|
accessors[lHeader] = true;
|
|
}
|
|
}
|
|
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
|
|
return this;
|
|
}
|
|
}
|
|
|
|
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
|
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].freezeMethods(AxiosHeaders.prototype);
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].freezeMethods(AxiosHeaders);
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosHeaders);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/core/InterceptorManager.js":
|
|
/*!***********************************************************!*\
|
|
!*** ./node_modules/axios/lib/core/InterceptorManager.js ***!
|
|
\***********************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
|
|
|
|
|
|
|
|
class InterceptorManager {
|
|
constructor() {
|
|
this.handlers = [];
|
|
}
|
|
|
|
/**
|
|
* Add a new interceptor to the stack
|
|
*
|
|
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
*
|
|
* @return {Number} An ID used to remove interceptor later
|
|
*/
|
|
use(fulfilled, rejected, options) {
|
|
this.handlers.push({
|
|
fulfilled,
|
|
rejected,
|
|
synchronous: options ? options.synchronous : false,
|
|
runWhen: options ? options.runWhen : null
|
|
});
|
|
return this.handlers.length - 1;
|
|
}
|
|
|
|
/**
|
|
* Remove an interceptor from the stack
|
|
*
|
|
* @param {Number} id The ID that was returned by `use`
|
|
*
|
|
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
*/
|
|
eject(id) {
|
|
if (this.handlers[id]) {
|
|
this.handlers[id] = null;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Clear all interceptors from the stack
|
|
*
|
|
* @returns {void}
|
|
*/
|
|
clear() {
|
|
if (this.handlers) {
|
|
this.handlers = [];
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Iterate over all the registered interceptors
|
|
*
|
|
* This method is particularly useful for skipping over any
|
|
* interceptors that may have become `null` calling `eject`.
|
|
*
|
|
* @param {Function} fn The function to call for each interceptor
|
|
*
|
|
* @returns {void}
|
|
*/
|
|
forEach(fn) {
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this.handlers, function forEachHandler(h) {
|
|
if (h !== null) {
|
|
fn(h);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InterceptorManager);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/core/buildFullPath.js":
|
|
/*!******************************************************!*\
|
|
!*** ./node_modules/axios/lib/core/buildFullPath.js ***!
|
|
\******************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* binding */ buildFullPath)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/isAbsoluteURL.js */ "./node_modules/axios/lib/helpers/isAbsoluteURL.js");
|
|
/* harmony import */ var _helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/combineURLs.js */ "./node_modules/axios/lib/helpers/combineURLs.js");
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Creates a new URL by combining the baseURL with the requestedURL,
|
|
* only when the requestedURL is not already an absolute URL.
|
|
* If the requestURL is absolute, this function returns the requestedURL untouched.
|
|
*
|
|
* @param {string} baseURL The base URL
|
|
* @param {string} requestedURL Absolute or relative URL to combine
|
|
*
|
|
* @returns {string} The combined full path
|
|
*/
|
|
function buildFullPath(baseURL, requestedURL) {
|
|
if (baseURL && !(0,_helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__["default"])(requestedURL)) {
|
|
return (0,_helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__["default"])(baseURL, requestedURL);
|
|
}
|
|
return requestedURL;
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/core/dispatchRequest.js":
|
|
/*!********************************************************!*\
|
|
!*** ./node_modules/axios/lib/core/dispatchRequest.js ***!
|
|
\********************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* binding */ dispatchRequest)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _transformData_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transformData.js */ "./node_modules/axios/lib/core/transformData.js");
|
|
/* harmony import */ var _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../cancel/isCancel.js */ "./node_modules/axios/lib/cancel/isCancel.js");
|
|
/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../defaults/index.js */ "./node_modules/axios/lib/defaults/index.js");
|
|
/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js");
|
|
/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js");
|
|
/* harmony import */ var _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../adapters/adapters.js */ "./node_modules/axios/lib/adapters/adapters.js");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Throws a `CanceledError` if cancellation has been requested.
|
|
*
|
|
* @param {Object} config The config that is to be used for the request
|
|
*
|
|
* @returns {void}
|
|
*/
|
|
function throwIfCancellationRequested(config) {
|
|
if (config.cancelToken) {
|
|
config.cancelToken.throwIfRequested();
|
|
}
|
|
|
|
if (config.signal && config.signal.aborted) {
|
|
throw new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](null, config);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Dispatch a request to the server using the configured adapter.
|
|
*
|
|
* @param {object} config The config that is to be used for the request
|
|
*
|
|
* @returns {Promise} The Promise to be fulfilled
|
|
*/
|
|
function dispatchRequest(config) {
|
|
throwIfCancellationRequested(config);
|
|
|
|
config.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(config.headers);
|
|
|
|
// Transform request data
|
|
config.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call(
|
|
config,
|
|
config.transformRequest
|
|
);
|
|
|
|
if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
|
|
config.headers.setContentType('application/x-www-form-urlencoded', false);
|
|
}
|
|
|
|
const adapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_3__["default"].getAdapter(config.adapter || _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].adapter);
|
|
|
|
return adapter(config).then(function onAdapterResolution(response) {
|
|
throwIfCancellationRequested(config);
|
|
|
|
// Transform response data
|
|
response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call(
|
|
config,
|
|
config.transformResponse,
|
|
response
|
|
);
|
|
|
|
response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(response.headers);
|
|
|
|
return response;
|
|
}, function onAdapterRejection(reason) {
|
|
if (!(0,_cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_5__["default"])(reason)) {
|
|
throwIfCancellationRequested(config);
|
|
|
|
// Transform response data
|
|
if (reason && reason.response) {
|
|
reason.response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call(
|
|
config,
|
|
config.transformResponse,
|
|
reason.response
|
|
);
|
|
reason.response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(reason.response.headers);
|
|
}
|
|
}
|
|
|
|
return Promise.reject(reason);
|
|
});
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/core/mergeConfig.js":
|
|
/*!****************************************************!*\
|
|
!*** ./node_modules/axios/lib/core/mergeConfig.js ***!
|
|
\****************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* binding */ mergeConfig)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js");
|
|
|
|
|
|
|
|
|
|
|
|
const headersToObject = (thing) => thing instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_0__["default"] ? thing.toJSON() : thing;
|
|
|
|
/**
|
|
* Config-specific merge-function which creates a new config-object
|
|
* by merging two configuration objects together.
|
|
*
|
|
* @param {Object} config1
|
|
* @param {Object} config2
|
|
*
|
|
* @returns {Object} New object resulting from merging config2 to config1
|
|
*/
|
|
function mergeConfig(config1, config2) {
|
|
// eslint-disable-next-line no-param-reassign
|
|
config2 = config2 || {};
|
|
const config = {};
|
|
|
|
function getMergedValue(target, source, caseless) {
|
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(target) && _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(source)) {
|
|
return _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge.call({caseless}, target, source);
|
|
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(source)) {
|
|
return _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge({}, source);
|
|
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArray(source)) {
|
|
return source.slice();
|
|
}
|
|
return source;
|
|
}
|
|
|
|
// eslint-disable-next-line consistent-return
|
|
function mergeDeepProperties(a, b, caseless) {
|
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) {
|
|
return getMergedValue(a, b, caseless);
|
|
} else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(a)) {
|
|
return getMergedValue(undefined, a, caseless);
|
|
}
|
|
}
|
|
|
|
// eslint-disable-next-line consistent-return
|
|
function valueFromConfig2(a, b) {
|
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) {
|
|
return getMergedValue(undefined, b);
|
|
}
|
|
}
|
|
|
|
// eslint-disable-next-line consistent-return
|
|
function defaultToConfig2(a, b) {
|
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) {
|
|
return getMergedValue(undefined, b);
|
|
} else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(a)) {
|
|
return getMergedValue(undefined, a);
|
|
}
|
|
}
|
|
|
|
// eslint-disable-next-line consistent-return
|
|
function mergeDirectKeys(a, b, prop) {
|
|
if (prop in config2) {
|
|
return getMergedValue(a, b);
|
|
} else if (prop in config1) {
|
|
return getMergedValue(undefined, a);
|
|
}
|
|
}
|
|
|
|
const mergeMap = {
|
|
url: valueFromConfig2,
|
|
method: valueFromConfig2,
|
|
data: valueFromConfig2,
|
|
baseURL: defaultToConfig2,
|
|
transformRequest: defaultToConfig2,
|
|
transformResponse: defaultToConfig2,
|
|
paramsSerializer: defaultToConfig2,
|
|
timeout: defaultToConfig2,
|
|
timeoutMessage: defaultToConfig2,
|
|
withCredentials: defaultToConfig2,
|
|
adapter: defaultToConfig2,
|
|
responseType: defaultToConfig2,
|
|
xsrfCookieName: defaultToConfig2,
|
|
xsrfHeaderName: defaultToConfig2,
|
|
onUploadProgress: defaultToConfig2,
|
|
onDownloadProgress: defaultToConfig2,
|
|
decompress: defaultToConfig2,
|
|
maxContentLength: defaultToConfig2,
|
|
maxBodyLength: defaultToConfig2,
|
|
beforeRedirect: defaultToConfig2,
|
|
transport: defaultToConfig2,
|
|
httpAgent: defaultToConfig2,
|
|
httpsAgent: defaultToConfig2,
|
|
cancelToken: defaultToConfig2,
|
|
socketPath: defaultToConfig2,
|
|
responseEncoding: defaultToConfig2,
|
|
validateStatus: mergeDirectKeys,
|
|
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
|
};
|
|
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
const merge = mergeMap[prop] || mergeDeepProperties;
|
|
const configValue = merge(config1[prop], config2[prop], prop);
|
|
(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
});
|
|
|
|
return config;
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/core/settle.js":
|
|
/*!***********************************************!*\
|
|
!*** ./node_modules/axios/lib/core/settle.js ***!
|
|
\***********************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* binding */ settle)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js");
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Resolve or reject a Promise based on response status.
|
|
*
|
|
* @param {Function} resolve A function that resolves the promise.
|
|
* @param {Function} reject A function that rejects the promise.
|
|
* @param {object} response The response.
|
|
*
|
|
* @returns {object} The response.
|
|
*/
|
|
function settle(resolve, reject, response) {
|
|
const validateStatus = response.config.validateStatus;
|
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
resolve(response);
|
|
} else {
|
|
reject(new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"](
|
|
'Request failed with status code ' + response.status,
|
|
[_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_REQUEST, _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
|
response.config,
|
|
response.request,
|
|
response
|
|
));
|
|
}
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/core/transformData.js":
|
|
/*!******************************************************!*\
|
|
!*** ./node_modules/axios/lib/core/transformData.js ***!
|
|
\******************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* binding */ transformData)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../defaults/index.js */ "./node_modules/axios/lib/defaults/index.js");
|
|
/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Transform the data for a request or a response
|
|
*
|
|
* @param {Array|Function} fns A single function or Array of functions
|
|
* @param {?Object} response The response object
|
|
*
|
|
* @returns {*} The resulting transformed data
|
|
*/
|
|
function transformData(fns, response) {
|
|
const config = this || _defaults_index_js__WEBPACK_IMPORTED_MODULE_0__["default"];
|
|
const context = response || config;
|
|
const headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(context.headers);
|
|
let data = context.data;
|
|
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].forEach(fns, function transform(fn) {
|
|
data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
|
|
});
|
|
|
|
headers.normalize();
|
|
|
|
return data;
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/defaults/index.js":
|
|
/*!**************************************************!*\
|
|
!*** ./node_modules/axios/lib/defaults/index.js ***!
|
|
\**************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js");
|
|
/* harmony import */ var _transitional_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transitional.js */ "./node_modules/axios/lib/defaults/transitional.js");
|
|
/* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js");
|
|
/* harmony import */ var _helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/toURLEncodedForm.js */ "./node_modules/axios/lib/helpers/toURLEncodedForm.js");
|
|
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/browser/index.js");
|
|
/* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../helpers/formDataToJSON.js */ "./node_modules/axios/lib/helpers/formDataToJSON.js");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const DEFAULT_CONTENT_TYPE = {
|
|
'Content-Type': undefined
|
|
};
|
|
|
|
/**
|
|
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
|
* of the input
|
|
*
|
|
* @param {any} rawValue - The value to be stringified.
|
|
* @param {Function} parser - A function that parses a string into a JavaScript object.
|
|
* @param {Function} encoder - A function that takes a value and returns a string.
|
|
*
|
|
* @returns {string} A stringified version of the rawValue.
|
|
*/
|
|
function stringifySafely(rawValue, parser, encoder) {
|
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(rawValue)) {
|
|
try {
|
|
(parser || JSON.parse)(rawValue);
|
|
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].trim(rawValue);
|
|
} catch (e) {
|
|
if (e.name !== 'SyntaxError') {
|
|
throw e;
|
|
}
|
|
}
|
|
}
|
|
|
|
return (encoder || JSON.stringify)(rawValue);
|
|
}
|
|
|
|
const defaults = {
|
|
|
|
transitional: _transitional_js__WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
|
|
adapter: ['xhr', 'http'],
|
|
|
|
transformRequest: [function transformRequest(data, headers) {
|
|
const contentType = headers.getContentType() || '';
|
|
const hasJSONContentType = contentType.indexOf('application/json') > -1;
|
|
const isObjectPayload = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(data);
|
|
|
|
if (isObjectPayload && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHTMLForm(data)) {
|
|
data = new FormData(data);
|
|
}
|
|
|
|
const isFormData = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(data);
|
|
|
|
if (isFormData) {
|
|
if (!hasJSONContentType) {
|
|
return data;
|
|
}
|
|
return hasJSONContentType ? JSON.stringify((0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_2__["default"])(data)) : data;
|
|
}
|
|
|
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBuffer(data) ||
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBuffer(data) ||
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isStream(data) ||
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFile(data) ||
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(data)
|
|
) {
|
|
return data;
|
|
}
|
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBufferView(data)) {
|
|
return data.buffer;
|
|
}
|
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(data)) {
|
|
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
return data.toString();
|
|
}
|
|
|
|
let isFileList;
|
|
|
|
if (isObjectPayload) {
|
|
if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
|
|
return (0,_helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_3__["default"])(data, this.formSerializer).toString();
|
|
}
|
|
|
|
if ((isFileList = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
|
|
const _FormData = this.env && this.env.FormData;
|
|
|
|
return (0,_helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_4__["default"])(
|
|
isFileList ? {'files[]': data} : data,
|
|
_FormData && new _FormData(),
|
|
this.formSerializer
|
|
);
|
|
}
|
|
}
|
|
|
|
if (isObjectPayload || hasJSONContentType ) {
|
|
headers.setContentType('application/json', false);
|
|
return stringifySafely(data);
|
|
}
|
|
|
|
return data;
|
|
}],
|
|
|
|
transformResponse: [function transformResponse(data) {
|
|
const transitional = this.transitional || defaults.transitional;
|
|
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
const JSONRequested = this.responseType === 'json';
|
|
|
|
if (data && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
|
|
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
|
|
try {
|
|
return JSON.parse(data);
|
|
} catch (e) {
|
|
if (strictJSONParsing) {
|
|
if (e.name === 'SyntaxError') {
|
|
throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__["default"].from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__["default"].ERR_BAD_RESPONSE, this, null, this.response);
|
|
}
|
|
throw e;
|
|
}
|
|
}
|
|
}
|
|
|
|
return data;
|
|
}],
|
|
|
|
/**
|
|
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
* timeout is not created.
|
|
*/
|
|
timeout: 0,
|
|
|
|
xsrfCookieName: 'XSRF-TOKEN',
|
|
xsrfHeaderName: 'X-XSRF-TOKEN',
|
|
|
|
maxContentLength: -1,
|
|
maxBodyLength: -1,
|
|
|
|
env: {
|
|
FormData: _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].classes.FormData,
|
|
Blob: _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].classes.Blob
|
|
},
|
|
|
|
validateStatus: function validateStatus(status) {
|
|
return status >= 200 && status < 300;
|
|
},
|
|
|
|
headers: {
|
|
common: {
|
|
'Accept': 'application/json, text/plain, */*'
|
|
}
|
|
}
|
|
};
|
|
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
|
|
defaults.headers[method] = {};
|
|
});
|
|
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
defaults.headers[method] = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge(DEFAULT_CONTENT_TYPE);
|
|
});
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/defaults/transitional.js":
|
|
/*!*********************************************************!*\
|
|
!*** ./node_modules/axios/lib/defaults/transitional.js ***!
|
|
\*********************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
silentJSONParsing: true,
|
|
forcedJSONParsing: true,
|
|
clarifyTimeoutError: false
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/env/data.js":
|
|
/*!********************************************!*\
|
|
!*** ./node_modules/axios/lib/env/data.js ***!
|
|
\********************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ VERSION: () => (/* binding */ VERSION)
|
|
/* harmony export */ });
|
|
const VERSION = "1.4.0";
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js":
|
|
/*!****************************************************************!*\
|
|
!*** ./node_modules/axios/lib/helpers/AxiosURLSearchParams.js ***!
|
|
\****************************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js");
|
|
|
|
|
|
|
|
|
|
/**
|
|
* It encodes a string by replacing all characters that are not in the unreserved set with
|
|
* their percent-encoded equivalents
|
|
*
|
|
* @param {string} str - The string to encode.
|
|
*
|
|
* @returns {string} The encoded string.
|
|
*/
|
|
function encode(str) {
|
|
const charMap = {
|
|
'!': '%21',
|
|
"'": '%27',
|
|
'(': '%28',
|
|
')': '%29',
|
|
'~': '%7E',
|
|
'%20': '+',
|
|
'%00': '\x00'
|
|
};
|
|
return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
|
|
return charMap[match];
|
|
});
|
|
}
|
|
|
|
/**
|
|
* It takes a params object and converts it to a FormData object
|
|
*
|
|
* @param {Object<string, any>} params - The parameters to be converted to a FormData object.
|
|
* @param {Object<string, any>} options - The options object passed to the Axios constructor.
|
|
*
|
|
* @returns {void}
|
|
*/
|
|
function AxiosURLSearchParams(params, options) {
|
|
this._pairs = [];
|
|
|
|
params && (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params, this, options);
|
|
}
|
|
|
|
const prototype = AxiosURLSearchParams.prototype;
|
|
|
|
prototype.append = function append(name, value) {
|
|
this._pairs.push([name, value]);
|
|
};
|
|
|
|
prototype.toString = function toString(encoder) {
|
|
const _encode = encoder ? function(value) {
|
|
return encoder.call(this, value, encode);
|
|
} : encode;
|
|
|
|
return this._pairs.map(function each(pair) {
|
|
return _encode(pair[0]) + '=' + _encode(pair[1]);
|
|
}, '').join('&');
|
|
};
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosURLSearchParams);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/helpers/HttpStatusCode.js":
|
|
/*!**********************************************************!*\
|
|
!*** ./node_modules/axios/lib/helpers/HttpStatusCode.js ***!
|
|
\**********************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
const HttpStatusCode = {
|
|
Continue: 100,
|
|
SwitchingProtocols: 101,
|
|
Processing: 102,
|
|
EarlyHints: 103,
|
|
Ok: 200,
|
|
Created: 201,
|
|
Accepted: 202,
|
|
NonAuthoritativeInformation: 203,
|
|
NoContent: 204,
|
|
ResetContent: 205,
|
|
PartialContent: 206,
|
|
MultiStatus: 207,
|
|
AlreadyReported: 208,
|
|
ImUsed: 226,
|
|
MultipleChoices: 300,
|
|
MovedPermanently: 301,
|
|
Found: 302,
|
|
SeeOther: 303,
|
|
NotModified: 304,
|
|
UseProxy: 305,
|
|
Unused: 306,
|
|
TemporaryRedirect: 307,
|
|
PermanentRedirect: 308,
|
|
BadRequest: 400,
|
|
Unauthorized: 401,
|
|
PaymentRequired: 402,
|
|
Forbidden: 403,
|
|
NotFound: 404,
|
|
MethodNotAllowed: 405,
|
|
NotAcceptable: 406,
|
|
ProxyAuthenticationRequired: 407,
|
|
RequestTimeout: 408,
|
|
Conflict: 409,
|
|
Gone: 410,
|
|
LengthRequired: 411,
|
|
PreconditionFailed: 412,
|
|
PayloadTooLarge: 413,
|
|
UriTooLong: 414,
|
|
UnsupportedMediaType: 415,
|
|
RangeNotSatisfiable: 416,
|
|
ExpectationFailed: 417,
|
|
ImATeapot: 418,
|
|
MisdirectedRequest: 421,
|
|
UnprocessableEntity: 422,
|
|
Locked: 423,
|
|
FailedDependency: 424,
|
|
TooEarly: 425,
|
|
UpgradeRequired: 426,
|
|
PreconditionRequired: 428,
|
|
TooManyRequests: 429,
|
|
RequestHeaderFieldsTooLarge: 431,
|
|
UnavailableForLegalReasons: 451,
|
|
InternalServerError: 500,
|
|
NotImplemented: 501,
|
|
BadGateway: 502,
|
|
ServiceUnavailable: 503,
|
|
GatewayTimeout: 504,
|
|
HttpVersionNotSupported: 505,
|
|
VariantAlsoNegotiates: 506,
|
|
InsufficientStorage: 507,
|
|
LoopDetected: 508,
|
|
NotExtended: 510,
|
|
NetworkAuthenticationRequired: 511,
|
|
};
|
|
|
|
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
HttpStatusCode[value] = key;
|
|
});
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (HttpStatusCode);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/helpers/bind.js":
|
|
/*!************************************************!*\
|
|
!*** ./node_modules/axios/lib/helpers/bind.js ***!
|
|
\************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* binding */ bind)
|
|
/* harmony export */ });
|
|
|
|
|
|
function bind(fn, thisArg) {
|
|
return function wrap() {
|
|
return fn.apply(thisArg, arguments);
|
|
};
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/helpers/buildURL.js":
|
|
/*!****************************************************!*\
|
|
!*** ./node_modules/axios/lib/helpers/buildURL.js ***!
|
|
\****************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* binding */ buildURL)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
/* harmony import */ var _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/AxiosURLSearchParams.js */ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js");
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
|
|
* URI encoded counterparts
|
|
*
|
|
* @param {string} val The value to be encoded.
|
|
*
|
|
* @returns {string} The encoded value.
|
|
*/
|
|
function encode(val) {
|
|
return encodeURIComponent(val).
|
|
replace(/%3A/gi, ':').
|
|
replace(/%24/g, '$').
|
|
replace(/%2C/gi, ',').
|
|
replace(/%20/g, '+').
|
|
replace(/%5B/gi, '[').
|
|
replace(/%5D/gi, ']');
|
|
}
|
|
|
|
/**
|
|
* Build a URL by appending params to the end
|
|
*
|
|
* @param {string} url The base of the url (e.g., http://www.google.com)
|
|
* @param {object} [params] The params to be appended
|
|
* @param {?object} options
|
|
*
|
|
* @returns {string} The formatted url
|
|
*/
|
|
function buildURL(url, params, options) {
|
|
/*eslint no-param-reassign:0*/
|
|
if (!params) {
|
|
return url;
|
|
}
|
|
|
|
const _encode = options && options.encode || encode;
|
|
|
|
const serializeFn = options && options.serialize;
|
|
|
|
let serializedParams;
|
|
|
|
if (serializeFn) {
|
|
serializedParams = serializeFn(params, options);
|
|
} else {
|
|
serializedParams = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(params) ?
|
|
params.toString() :
|
|
new _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__["default"](params, options).toString(_encode);
|
|
}
|
|
|
|
if (serializedParams) {
|
|
const hashmarkIndex = url.indexOf("#");
|
|
|
|
if (hashmarkIndex !== -1) {
|
|
url = url.slice(0, hashmarkIndex);
|
|
}
|
|
url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
|
|
}
|
|
|
|
return url;
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/helpers/combineURLs.js":
|
|
/*!*******************************************************!*\
|
|
!*** ./node_modules/axios/lib/helpers/combineURLs.js ***!
|
|
\*******************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* binding */ combineURLs)
|
|
/* harmony export */ });
|
|
|
|
|
|
/**
|
|
* Creates a new URL by combining the specified URLs
|
|
*
|
|
* @param {string} baseURL The base URL
|
|
* @param {string} relativeURL The relative URL
|
|
*
|
|
* @returns {string} The combined URL
|
|
*/
|
|
function combineURLs(baseURL, relativeURL) {
|
|
return relativeURL
|
|
? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
|
|
: baseURL;
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/helpers/cookies.js":
|
|
/*!***************************************************!*\
|
|
!*** ./node_modules/axios/lib/helpers/cookies.js ***!
|
|
\***************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/browser/index.js");
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].isStandardBrowserEnv ?
|
|
|
|
// Standard browser envs support document.cookie
|
|
(function standardBrowserEnv() {
|
|
return {
|
|
write: function write(name, value, expires, path, domain, secure) {
|
|
const cookie = [];
|
|
cookie.push(name + '=' + encodeURIComponent(value));
|
|
|
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(expires)) {
|
|
cookie.push('expires=' + new Date(expires).toGMTString());
|
|
}
|
|
|
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(path)) {
|
|
cookie.push('path=' + path);
|
|
}
|
|
|
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(domain)) {
|
|
cookie.push('domain=' + domain);
|
|
}
|
|
|
|
if (secure === true) {
|
|
cookie.push('secure');
|
|
}
|
|
|
|
document.cookie = cookie.join('; ');
|
|
},
|
|
|
|
read: function read(name) {
|
|
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
|
return (match ? decodeURIComponent(match[3]) : null);
|
|
},
|
|
|
|
remove: function remove(name) {
|
|
this.write(name, '', Date.now() - 86400000);
|
|
}
|
|
};
|
|
})() :
|
|
|
|
// Non standard browser env (web workers, react-native) lack needed support.
|
|
(function nonStandardBrowserEnv() {
|
|
return {
|
|
write: function write() {},
|
|
read: function read() { return null; },
|
|
remove: function remove() {}
|
|
};
|
|
})());
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/helpers/formDataToJSON.js":
|
|
/*!**********************************************************!*\
|
|
!*** ./node_modules/axios/lib/helpers/formDataToJSON.js ***!
|
|
\**********************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
|
|
|
|
|
|
|
|
/**
|
|
* It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
|
|
*
|
|
* @param {string} name - The name of the property to get.
|
|
*
|
|
* @returns An array of strings.
|
|
*/
|
|
function parsePropPath(name) {
|
|
// foo[x][y][z]
|
|
// foo.x.y.z
|
|
// foo-x-y-z
|
|
// foo x y z
|
|
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
|
return match[0] === '[]' ? '' : match[1] || match[0];
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Convert an array to an object.
|
|
*
|
|
* @param {Array<any>} arr - The array to convert to an object.
|
|
*
|
|
* @returns An object with the same keys and values as the array.
|
|
*/
|
|
function arrayToObject(arr) {
|
|
const obj = {};
|
|
const keys = Object.keys(arr);
|
|
let i;
|
|
const len = keys.length;
|
|
let key;
|
|
for (i = 0; i < len; i++) {
|
|
key = keys[i];
|
|
obj[key] = arr[key];
|
|
}
|
|
return obj;
|
|
}
|
|
|
|
/**
|
|
* It takes a FormData object and returns a JavaScript object
|
|
*
|
|
* @param {string} formData The FormData object to convert to JSON.
|
|
*
|
|
* @returns {Object<string, any> | null} The converted object.
|
|
*/
|
|
function formDataToJSON(formData) {
|
|
function buildPath(path, value, target, index) {
|
|
let name = path[index++];
|
|
const isNumericKey = Number.isFinite(+name);
|
|
const isLast = index >= path.length;
|
|
name = !name && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(target) ? target.length : name;
|
|
|
|
if (isLast) {
|
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(target, name)) {
|
|
target[name] = [target[name], value];
|
|
} else {
|
|
target[name] = value;
|
|
}
|
|
|
|
return !isNumericKey;
|
|
}
|
|
|
|
if (!target[name] || !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(target[name])) {
|
|
target[name] = [];
|
|
}
|
|
|
|
const result = buildPath(path, value, target[name], index);
|
|
|
|
if (result && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(target[name])) {
|
|
target[name] = arrayToObject(target[name]);
|
|
}
|
|
|
|
return !isNumericKey;
|
|
}
|
|
|
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(formData) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(formData.entries)) {
|
|
const obj = {};
|
|
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEachEntry(formData, (name, value) => {
|
|
buildPath(parsePropPath(name), value, obj, 0);
|
|
});
|
|
|
|
return obj;
|
|
}
|
|
|
|
return null;
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (formDataToJSON);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/helpers/isAbsoluteURL.js":
|
|
/*!*********************************************************!*\
|
|
!*** ./node_modules/axios/lib/helpers/isAbsoluteURL.js ***!
|
|
\*********************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* binding */ isAbsoluteURL)
|
|
/* harmony export */ });
|
|
|
|
|
|
/**
|
|
* Determines whether the specified URL is absolute
|
|
*
|
|
* @param {string} url The URL to test
|
|
*
|
|
* @returns {boolean} True if the specified URL is absolute, otherwise false
|
|
*/
|
|
function isAbsoluteURL(url) {
|
|
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
// by any combination of letters, digits, plus, period, or hyphen.
|
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/helpers/isAxiosError.js":
|
|
/*!********************************************************!*\
|
|
!*** ./node_modules/axios/lib/helpers/isAxiosError.js ***!
|
|
\********************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* binding */ isAxiosError)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Determines whether the payload is an error thrown by Axios
|
|
*
|
|
* @param {*} payload The value to test
|
|
*
|
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
*/
|
|
function isAxiosError(payload) {
|
|
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(payload) && (payload.isAxiosError === true);
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/helpers/isURLSameOrigin.js":
|
|
/*!***********************************************************!*\
|
|
!*** ./node_modules/axios/lib/helpers/isURLSameOrigin.js ***!
|
|
\***********************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/browser/index.js");
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].isStandardBrowserEnv ?
|
|
|
|
// Standard browser envs have full support of the APIs needed to test
|
|
// whether the request URL is of the same origin as current location.
|
|
(function standardBrowserEnv() {
|
|
const msie = /(msie|trident)/i.test(navigator.userAgent);
|
|
const urlParsingNode = document.createElement('a');
|
|
let originURL;
|
|
|
|
/**
|
|
* Parse a URL to discover it's components
|
|
*
|
|
* @param {String} url The URL to be parsed
|
|
* @returns {Object}
|
|
*/
|
|
function resolveURL(url) {
|
|
let href = url;
|
|
|
|
if (msie) {
|
|
// IE needs attribute set twice to normalize properties
|
|
urlParsingNode.setAttribute('href', href);
|
|
href = urlParsingNode.href;
|
|
}
|
|
|
|
urlParsingNode.setAttribute('href', href);
|
|
|
|
// urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
|
|
return {
|
|
href: urlParsingNode.href,
|
|
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
|
|
host: urlParsingNode.host,
|
|
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
|
|
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
|
|
hostname: urlParsingNode.hostname,
|
|
port: urlParsingNode.port,
|
|
pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
|
|
urlParsingNode.pathname :
|
|
'/' + urlParsingNode.pathname
|
|
};
|
|
}
|
|
|
|
originURL = resolveURL(window.location.href);
|
|
|
|
/**
|
|
* Determine if a URL shares the same origin as the current location
|
|
*
|
|
* @param {String} requestURL The URL to test
|
|
* @returns {boolean} True if URL shares the same origin, otherwise false
|
|
*/
|
|
return function isURLSameOrigin(requestURL) {
|
|
const parsed = (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
|
return (parsed.protocol === originURL.protocol &&
|
|
parsed.host === originURL.host);
|
|
};
|
|
})() :
|
|
|
|
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
(function nonStandardBrowserEnv() {
|
|
return function isURLSameOrigin() {
|
|
return true;
|
|
};
|
|
})());
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/helpers/null.js":
|
|
/*!************************************************!*\
|
|
!*** ./node_modules/axios/lib/helpers/null.js ***!
|
|
\************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
// eslint-disable-next-line strict
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (null);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/helpers/parseHeaders.js":
|
|
/*!********************************************************!*\
|
|
!*** ./node_modules/axios/lib/helpers/parseHeaders.js ***!
|
|
\********************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
|
|
|
|
|
|
|
|
// RawAxiosHeaders whose duplicates are ignored by node
|
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
const ignoreDuplicateOf = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toObjectSet([
|
|
'age', 'authorization', 'content-length', 'content-type', 'etag',
|
|
'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
|
|
'last-modified', 'location', 'max-forwards', 'proxy-authorization',
|
|
'referer', 'retry-after', 'user-agent'
|
|
]);
|
|
|
|
/**
|
|
* Parse headers into an object
|
|
*
|
|
* ```
|
|
* Date: Wed, 27 Aug 2014 08:58:49 GMT
|
|
* Content-Type: application/json
|
|
* Connection: keep-alive
|
|
* Transfer-Encoding: chunked
|
|
* ```
|
|
*
|
|
* @param {String} rawHeaders Headers needing to be parsed
|
|
*
|
|
* @returns {Object} Headers parsed into an object
|
|
*/
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (rawHeaders => {
|
|
const parsed = {};
|
|
let key;
|
|
let val;
|
|
let i;
|
|
|
|
rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
|
|
i = line.indexOf(':');
|
|
key = line.substring(0, i).trim().toLowerCase();
|
|
val = line.substring(i + 1).trim();
|
|
|
|
if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
|
|
return;
|
|
}
|
|
|
|
if (key === 'set-cookie') {
|
|
if (parsed[key]) {
|
|
parsed[key].push(val);
|
|
} else {
|
|
parsed[key] = [val];
|
|
}
|
|
} else {
|
|
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
}
|
|
});
|
|
|
|
return parsed;
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/helpers/parseProtocol.js":
|
|
/*!*********************************************************!*\
|
|
!*** ./node_modules/axios/lib/helpers/parseProtocol.js ***!
|
|
\*********************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* binding */ parseProtocol)
|
|
/* harmony export */ });
|
|
|
|
|
|
function parseProtocol(url) {
|
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
return match && match[1] || '';
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/helpers/speedometer.js":
|
|
/*!*******************************************************!*\
|
|
!*** ./node_modules/axios/lib/helpers/speedometer.js ***!
|
|
\*******************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
|
|
|
|
/**
|
|
* Calculate data maxRate
|
|
* @param {Number} [samplesCount= 10]
|
|
* @param {Number} [min= 1000]
|
|
* @returns {Function}
|
|
*/
|
|
function speedometer(samplesCount, min) {
|
|
samplesCount = samplesCount || 10;
|
|
const bytes = new Array(samplesCount);
|
|
const timestamps = new Array(samplesCount);
|
|
let head = 0;
|
|
let tail = 0;
|
|
let firstSampleTS;
|
|
|
|
min = min !== undefined ? min : 1000;
|
|
|
|
return function push(chunkLength) {
|
|
const now = Date.now();
|
|
|
|
const startedAt = timestamps[tail];
|
|
|
|
if (!firstSampleTS) {
|
|
firstSampleTS = now;
|
|
}
|
|
|
|
bytes[head] = chunkLength;
|
|
timestamps[head] = now;
|
|
|
|
let i = tail;
|
|
let bytesCount = 0;
|
|
|
|
while (i !== head) {
|
|
bytesCount += bytes[i++];
|
|
i = i % samplesCount;
|
|
}
|
|
|
|
head = (head + 1) % samplesCount;
|
|
|
|
if (head === tail) {
|
|
tail = (tail + 1) % samplesCount;
|
|
}
|
|
|
|
if (now - firstSampleTS < min) {
|
|
return;
|
|
}
|
|
|
|
const passed = startedAt && now - startedAt;
|
|
|
|
return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
|
|
};
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (speedometer);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/helpers/spread.js":
|
|
/*!**************************************************!*\
|
|
!*** ./node_modules/axios/lib/helpers/spread.js ***!
|
|
\**************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* binding */ spread)
|
|
/* harmony export */ });
|
|
|
|
|
|
/**
|
|
* Syntactic sugar for invoking a function and expanding an array for arguments.
|
|
*
|
|
* Common use case would be to use `Function.prototype.apply`.
|
|
*
|
|
* ```js
|
|
* function f(x, y, z) {}
|
|
* var args = [1, 2, 3];
|
|
* f.apply(null, args);
|
|
* ```
|
|
*
|
|
* With `spread` this example can be re-written.
|
|
*
|
|
* ```js
|
|
* spread(function(x, y, z) {})([1, 2, 3]);
|
|
* ```
|
|
*
|
|
* @param {Function} callback
|
|
*
|
|
* @returns {Function}
|
|
*/
|
|
function spread(callback) {
|
|
return function wrap(arr) {
|
|
return callback.apply(null, arr);
|
|
};
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/helpers/toFormData.js":
|
|
/*!******************************************************!*\
|
|
!*** ./node_modules/axios/lib/helpers/toFormData.js ***!
|
|
\******************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js");
|
|
/* harmony import */ var _platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/node/classes/FormData.js */ "./node_modules/axios/lib/helpers/null.js");
|
|
/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js")["Buffer"];
|
|
|
|
|
|
|
|
|
|
// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored
|
|
|
|
|
|
/**
|
|
* Determines if the given thing is a array or js object.
|
|
*
|
|
* @param {string} thing - The object or array to be visited.
|
|
*
|
|
* @returns {boolean}
|
|
*/
|
|
function isVisitable(thing) {
|
|
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(thing) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(thing);
|
|
}
|
|
|
|
/**
|
|
* It removes the brackets from the end of a string
|
|
*
|
|
* @param {string} key - The key of the parameter.
|
|
*
|
|
* @returns {string} the key without the brackets.
|
|
*/
|
|
function removeBrackets(key) {
|
|
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]') ? key.slice(0, -2) : key;
|
|
}
|
|
|
|
/**
|
|
* It takes a path, a key, and a boolean, and returns a string
|
|
*
|
|
* @param {string} path - The path to the current key.
|
|
* @param {string} key - The key of the current object being iterated over.
|
|
* @param {string} dots - If true, the key will be rendered with dots instead of brackets.
|
|
*
|
|
* @returns {string} The path to the current key.
|
|
*/
|
|
function renderKey(path, key, dots) {
|
|
if (!path) return key;
|
|
return path.concat(key).map(function each(token, i) {
|
|
// eslint-disable-next-line no-param-reassign
|
|
token = removeBrackets(token);
|
|
return !dots && i ? '[' + token + ']' : token;
|
|
}).join(dots ? '.' : '');
|
|
}
|
|
|
|
/**
|
|
* If the array is an array and none of its elements are visitable, then it's a flat array.
|
|
*
|
|
* @param {Array<any>} arr - The array to check
|
|
*
|
|
* @returns {boolean}
|
|
*/
|
|
function isFlatArray(arr) {
|
|
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(arr) && !arr.some(isVisitable);
|
|
}
|
|
|
|
const predicates = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"], {}, null, function filter(prop) {
|
|
return /^is[A-Z]/.test(prop);
|
|
});
|
|
|
|
/**
|
|
* Convert a data object to FormData
|
|
*
|
|
* @param {Object} obj
|
|
* @param {?Object} [formData]
|
|
* @param {?Object} [options]
|
|
* @param {Function} [options.visitor]
|
|
* @param {Boolean} [options.metaTokens = true]
|
|
* @param {Boolean} [options.dots = false]
|
|
* @param {?Boolean} [options.indexes = false]
|
|
*
|
|
* @returns {Object}
|
|
**/
|
|
|
|
/**
|
|
* It converts an object into a FormData object
|
|
*
|
|
* @param {Object<any, any>} obj - The object to convert to form data.
|
|
* @param {string} formData - The FormData object to append to.
|
|
* @param {Object<string, any>} options
|
|
*
|
|
* @returns
|
|
*/
|
|
function toFormData(obj, formData, options) {
|
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(obj)) {
|
|
throw new TypeError('target must be an object');
|
|
}
|
|
|
|
// eslint-disable-next-line no-param-reassign
|
|
formData = formData || new (_platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"] || FormData)();
|
|
|
|
// eslint-disable-next-line no-param-reassign
|
|
options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(options, {
|
|
metaTokens: true,
|
|
dots: false,
|
|
indexes: false
|
|
}, false, function defined(option, source) {
|
|
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
return !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(source[option]);
|
|
});
|
|
|
|
const metaTokens = options.metaTokens;
|
|
// eslint-disable-next-line no-use-before-define
|
|
const visitor = options.visitor || defaultVisitor;
|
|
const dots = options.dots;
|
|
const indexes = options.indexes;
|
|
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
|
const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isSpecCompliantForm(formData);
|
|
|
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(visitor)) {
|
|
throw new TypeError('visitor must be a function');
|
|
}
|
|
|
|
function convertValue(value) {
|
|
if (value === null) return '';
|
|
|
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isDate(value)) {
|
|
return value.toISOString();
|
|
}
|
|
|
|
if (!useBlob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(value)) {
|
|
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]('Blob is not supported. Use a Buffer instead.');
|
|
}
|
|
|
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBuffer(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isTypedArray(value)) {
|
|
return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
|
|
}
|
|
|
|
return value;
|
|
}
|
|
|
|
/**
|
|
* Default visitor.
|
|
*
|
|
* @param {*} value
|
|
* @param {String|Number} key
|
|
* @param {Array<String|Number>} path
|
|
* @this {FormData}
|
|
*
|
|
* @returns {boolean} return true to visit the each prop of the value recursively
|
|
*/
|
|
function defaultVisitor(value, key, path) {
|
|
let arr = value;
|
|
|
|
if (value && !path && typeof value === 'object') {
|
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '{}')) {
|
|
// eslint-disable-next-line no-param-reassign
|
|
key = metaTokens ? key : key.slice(0, -2);
|
|
// eslint-disable-next-line no-param-reassign
|
|
value = JSON.stringify(value);
|
|
} else if (
|
|
(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) && isFlatArray(value)) ||
|
|
((_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]')) && (arr = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toArray(value))
|
|
)) {
|
|
// eslint-disable-next-line no-param-reassign
|
|
key = removeBrackets(key);
|
|
|
|
arr.forEach(function each(el, index) {
|
|
!(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) && formData.append(
|
|
// eslint-disable-next-line no-nested-ternary
|
|
indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
|
|
convertValue(el)
|
|
);
|
|
});
|
|
return false;
|
|
}
|
|
}
|
|
|
|
if (isVisitable(value)) {
|
|
return true;
|
|
}
|
|
|
|
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
|
|
return false;
|
|
}
|
|
|
|
const stack = [];
|
|
|
|
const exposedHelpers = Object.assign(predicates, {
|
|
defaultVisitor,
|
|
convertValue,
|
|
isVisitable
|
|
});
|
|
|
|
function build(value, path) {
|
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(value)) return;
|
|
|
|
if (stack.indexOf(value) !== -1) {
|
|
throw Error('Circular reference detected in ' + path.join('.'));
|
|
}
|
|
|
|
stack.push(value);
|
|
|
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(value, function each(el, key) {
|
|
const result = !(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) && visitor.call(
|
|
formData, el, _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(key) ? key.trim() : key, path, exposedHelpers
|
|
);
|
|
|
|
if (result === true) {
|
|
build(el, path ? path.concat(key) : [key]);
|
|
}
|
|
});
|
|
|
|
stack.pop();
|
|
}
|
|
|
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(obj)) {
|
|
throw new TypeError('data must be an object');
|
|
}
|
|
|
|
build(obj);
|
|
|
|
return formData;
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toFormData);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/helpers/toURLEncodedForm.js":
|
|
/*!************************************************************!*\
|
|
!*** ./node_modules/axios/lib/helpers/toURLEncodedForm.js ***!
|
|
\************************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* binding */ toURLEncodedForm)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js");
|
|
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/browser/index.js");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function toURLEncodedForm(data, options) {
|
|
return (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__["default"])(data, new _platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].classes.URLSearchParams(), Object.assign({
|
|
visitor: function(value, key, path, helpers) {
|
|
if (_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNode && _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isBuffer(value)) {
|
|
this.append(key, value.toString('base64'));
|
|
return false;
|
|
}
|
|
|
|
return helpers.defaultVisitor.apply(this, arguments);
|
|
}
|
|
}, options));
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/helpers/validator.js":
|
|
/*!*****************************************************!*\
|
|
!*** ./node_modules/axios/lib/helpers/validator.js ***!
|
|
\*****************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../env/data.js */ "./node_modules/axios/lib/env/data.js");
|
|
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js");
|
|
|
|
|
|
|
|
|
|
|
|
const validators = {};
|
|
|
|
// eslint-disable-next-line func-names
|
|
['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {
|
|
validators[type] = function validator(thing) {
|
|
return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
|
|
};
|
|
});
|
|
|
|
const deprecatedWarnings = {};
|
|
|
|
/**
|
|
* Transitional option validator
|
|
*
|
|
* @param {function|boolean?} validator - set to false if the transitional option has been removed
|
|
* @param {string?} version - deprecated version / removed since version
|
|
* @param {string?} message - some message with additional info
|
|
*
|
|
* @returns {function}
|
|
*/
|
|
validators.transitional = function transitional(validator, version, message) {
|
|
function formatMessage(opt, desc) {
|
|
return '[Axios v' + _env_data_js__WEBPACK_IMPORTED_MODULE_0__.VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
|
|
}
|
|
|
|
// eslint-disable-next-line func-names
|
|
return (value, opt, opts) => {
|
|
if (validator === false) {
|
|
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](
|
|
formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
|
|
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_DEPRECATED
|
|
);
|
|
}
|
|
|
|
if (version && !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
|
|
*
|
|
* @returns {object}
|
|
*/
|
|
|
|
function assertOptions(options, schema, allowUnknown) {
|
|
if (typeof options !== 'object') {
|
|
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('options must be an object', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION_VALUE);
|
|
}
|
|
const keys = Object.keys(options);
|
|
let i = keys.length;
|
|
while (i-- > 0) {
|
|
const opt = keys[i];
|
|
const validator = schema[opt];
|
|
if (validator) {
|
|
const value = options[opt];
|
|
const result = value === undefined || validator(value, opt, options);
|
|
if (result !== true) {
|
|
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('option ' + opt + ' must be ' + result, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION_VALUE);
|
|
}
|
|
continue;
|
|
}
|
|
if (allowUnknown !== true) {
|
|
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('Unknown option ' + opt, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION);
|
|
}
|
|
}
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
assertOptions,
|
|
validators
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/platform/browser/classes/Blob.js":
|
|
/*!*****************************************************************!*\
|
|
!*** ./node_modules/axios/lib/platform/browser/classes/Blob.js ***!
|
|
\*****************************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof Blob !== 'undefined' ? Blob : null);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/platform/browser/classes/FormData.js":
|
|
/*!*********************************************************************!*\
|
|
!*** ./node_modules/axios/lib/platform/browser/classes/FormData.js ***!
|
|
\*********************************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof FormData !== 'undefined' ? FormData : null);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js":
|
|
/*!****************************************************************************!*\
|
|
!*** ./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js ***!
|
|
\****************************************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../helpers/AxiosURLSearchParams.js */ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js");
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof URLSearchParams !== 'undefined' ? URLSearchParams : _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/platform/browser/index.js":
|
|
/*!**********************************************************!*\
|
|
!*** ./node_modules/axios/lib/platform/browser/index.js ***!
|
|
\**********************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./classes/URLSearchParams.js */ "./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js");
|
|
/* harmony import */ var _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./classes/FormData.js */ "./node_modules/axios/lib/platform/browser/classes/FormData.js");
|
|
/* harmony import */ var _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./classes/Blob.js */ "./node_modules/axios/lib/platform/browser/classes/Blob.js");
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Determine if we're running in a standard browser environment
|
|
*
|
|
* This allows axios to run in a web worker, and react-native.
|
|
* Both environments support XMLHttpRequest, but not fully standard globals.
|
|
*
|
|
* web workers:
|
|
* typeof window -> undefined
|
|
* typeof document -> undefined
|
|
*
|
|
* react-native:
|
|
* navigator.product -> 'ReactNative'
|
|
* nativescript
|
|
* navigator.product -> 'NativeScript' or 'NS'
|
|
*
|
|
* @returns {boolean}
|
|
*/
|
|
const isStandardBrowserEnv = (() => {
|
|
let product;
|
|
if (typeof navigator !== 'undefined' && (
|
|
(product = navigator.product) === 'ReactNative' ||
|
|
product === 'NativeScript' ||
|
|
product === 'NS')
|
|
) {
|
|
return false;
|
|
}
|
|
|
|
return typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
})();
|
|
|
|
/**
|
|
* Determine if we're running in a standard browser webWorker environment
|
|
*
|
|
* Although the `isStandardBrowserEnv` method indicates that
|
|
* `allows axios to run in a web worker`, the WebWorker will still be
|
|
* filtered out due to its judgment standard
|
|
* `typeof window !== 'undefined' && typeof document !== 'undefined'`.
|
|
* This leads to a problem when axios post `FormData` in webWorker
|
|
*/
|
|
const isStandardBrowserWebWorkerEnv = (() => {
|
|
return (
|
|
typeof WorkerGlobalScope !== 'undefined' &&
|
|
// eslint-disable-next-line no-undef
|
|
self instanceof WorkerGlobalScope &&
|
|
typeof self.importScripts === 'function'
|
|
);
|
|
})();
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
isBrowser: true,
|
|
classes: {
|
|
URLSearchParams: _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
FormData: _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
Blob: _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__["default"]
|
|
},
|
|
isStandardBrowserEnv,
|
|
isStandardBrowserWebWorkerEnv,
|
|
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/axios/lib/utils.js":
|
|
/*!*****************************************!*\
|
|
!*** ./node_modules/axios/lib/utils.js ***!
|
|
\*****************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers/bind.js */ "./node_modules/axios/lib/helpers/bind.js");
|
|
|
|
|
|
|
|
|
|
// utils is a library of generic helper functions non-specific to axios
|
|
|
|
const {toString} = Object.prototype;
|
|
const {getPrototypeOf} = Object;
|
|
|
|
const kindOf = (cache => thing => {
|
|
const str = toString.call(thing);
|
|
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
})(Object.create(null));
|
|
|
|
const kindOfTest = (type) => {
|
|
type = type.toLowerCase();
|
|
return (thing) => kindOf(thing) === type
|
|
}
|
|
|
|
const typeOfTest = type => thing => typeof thing === type;
|
|
|
|
/**
|
|
* Determine if a value is an Array
|
|
*
|
|
* @param {Object} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is an Array, otherwise false
|
|
*/
|
|
const {isArray} = Array;
|
|
|
|
/**
|
|
* Determine if a value is undefined
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if the value is undefined, otherwise false
|
|
*/
|
|
const isUndefined = typeOfTest('undefined');
|
|
|
|
/**
|
|
* Determine if a value is a Buffer
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a Buffer, otherwise false
|
|
*/
|
|
function isBuffer(val) {
|
|
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
|
|
&& isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
|
|
}
|
|
|
|
/**
|
|
* Determine if a value is an ArrayBuffer
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
|
*/
|
|
const isArrayBuffer = kindOfTest('ArrayBuffer');
|
|
|
|
|
|
/**
|
|
* Determine if a value is a view on an ArrayBuffer
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
|
|
*/
|
|
function isArrayBufferView(val) {
|
|
let result;
|
|
if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
|
|
result = ArrayBuffer.isView(val);
|
|
} else {
|
|
result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Determine if a value is a String
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a String, otherwise false
|
|
*/
|
|
const isString = typeOfTest('string');
|
|
|
|
/**
|
|
* Determine if a value is a Function
|
|
*
|
|
* @param {*} val The value to test
|
|
* @returns {boolean} True if value is a Function, otherwise false
|
|
*/
|
|
const isFunction = typeOfTest('function');
|
|
|
|
/**
|
|
* Determine if a value is a Number
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a Number, otherwise false
|
|
*/
|
|
const isNumber = typeOfTest('number');
|
|
|
|
/**
|
|
* Determine if a value is an Object
|
|
*
|
|
* @param {*} thing The value to test
|
|
*
|
|
* @returns {boolean} True if value is an Object, otherwise false
|
|
*/
|
|
const isObject = (thing) => thing !== null && typeof thing === 'object';
|
|
|
|
/**
|
|
* Determine if a value is a Boolean
|
|
*
|
|
* @param {*} thing The value to test
|
|
* @returns {boolean} True if value is a Boolean, otherwise false
|
|
*/
|
|
const isBoolean = thing => thing === true || thing === false;
|
|
|
|
/**
|
|
* Determine if a value is a plain Object
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a plain Object, otherwise false
|
|
*/
|
|
const isPlainObject = (val) => {
|
|
if (kindOf(val) !== 'object') {
|
|
return false;
|
|
}
|
|
|
|
const prototype = getPrototypeOf(val);
|
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
|
|
}
|
|
|
|
/**
|
|
* Determine if a value is a Date
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a Date, otherwise false
|
|
*/
|
|
const isDate = kindOfTest('Date');
|
|
|
|
/**
|
|
* Determine if a value is a File
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a File, otherwise false
|
|
*/
|
|
const isFile = kindOfTest('File');
|
|
|
|
/**
|
|
* Determine if a value is a Blob
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a Blob, otherwise false
|
|
*/
|
|
const isBlob = kindOfTest('Blob');
|
|
|
|
/**
|
|
* Determine if a value is a FileList
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a File, otherwise false
|
|
*/
|
|
const isFileList = kindOfTest('FileList');
|
|
|
|
/**
|
|
* Determine if a value is a Stream
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a Stream, otherwise false
|
|
*/
|
|
const isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
|
|
/**
|
|
* Determine if a value is a FormData
|
|
*
|
|
* @param {*} thing The value to test
|
|
*
|
|
* @returns {boolean} True if value is an FormData, otherwise false
|
|
*/
|
|
const isFormData = (thing) => {
|
|
let kind;
|
|
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]')
|
|
)
|
|
)
|
|
)
|
|
}
|
|
|
|
/**
|
|
* Determine if a value is a URLSearchParams object
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
|
*/
|
|
const isURLSearchParams = kindOfTest('URLSearchParams');
|
|
|
|
/**
|
|
* Trim excess whitespace off the beginning and end of a string
|
|
*
|
|
* @param {String} str The String to trim
|
|
*
|
|
* @returns {String} The String freed of excess whitespace
|
|
*/
|
|
const trim = (str) => str.trim ?
|
|
str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
|
|
|
/**
|
|
* Iterate over an Array or an Object invoking a function for each item.
|
|
*
|
|
* If `obj` is an Array callback will be called passing
|
|
* the value, index, and complete array for each item.
|
|
*
|
|
* If 'obj' is an Object callback will be called passing
|
|
* the value, key, and complete object for each property.
|
|
*
|
|
* @param {Object|Array} obj The object to iterate
|
|
* @param {Function} fn The callback to invoke for each item
|
|
*
|
|
* @param {Boolean} [allOwnKeys = false]
|
|
* @returns {any}
|
|
*/
|
|
function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
// Don't bother if no value provided
|
|
if (obj === null || typeof obj === 'undefined') {
|
|
return;
|
|
}
|
|
|
|
let i;
|
|
let l;
|
|
|
|
// Force an array if not already something iterable
|
|
if (typeof obj !== 'object') {
|
|
/*eslint no-param-reassign:0*/
|
|
obj = [obj];
|
|
}
|
|
|
|
if (isArray(obj)) {
|
|
// Iterate over array values
|
|
for (i = 0, l = obj.length; i < l; i++) {
|
|
fn.call(null, obj[i], i, obj);
|
|
}
|
|
} else {
|
|
// Iterate over object keys
|
|
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
|
const len = keys.length;
|
|
let key;
|
|
|
|
for (i = 0; i < len; i++) {
|
|
key = keys[i];
|
|
fn.call(null, obj[key], key, obj);
|
|
}
|
|
}
|
|
}
|
|
|
|
function findKey(obj, key) {
|
|
key = key.toLowerCase();
|
|
const keys = Object.keys(obj);
|
|
let i = keys.length;
|
|
let _key;
|
|
while (i-- > 0) {
|
|
_key = keys[i];
|
|
if (key === _key.toLowerCase()) {
|
|
return _key;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
const _global = (() => {
|
|
/*eslint no-undef:0*/
|
|
if (typeof globalThis !== "undefined") return globalThis;
|
|
return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
|
|
})();
|
|
|
|
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
|
|
|
/**
|
|
* Accepts varargs expecting each argument to be an object, then
|
|
* immutably merges the properties of each object and returns result.
|
|
*
|
|
* When multiple objects contain the same key the later object in
|
|
* the arguments list will take precedence.
|
|
*
|
|
* Example:
|
|
*
|
|
* ```js
|
|
* var result = merge({foo: 123}, {foo: 456});
|
|
* console.log(result.foo); // outputs 456
|
|
* ```
|
|
*
|
|
* @param {Object} obj1 Object to merge
|
|
*
|
|
* @returns {Object} Result of all merge properties
|
|
*/
|
|
function merge(/* obj1, obj2, obj3, ... */) {
|
|
const {caseless} = isContextDefined(this) && this || {};
|
|
const result = {};
|
|
const assignValue = (val, key) => {
|
|
const targetKey = caseless && findKey(result, key) || key;
|
|
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
|
|
result[targetKey] = merge(result[targetKey], val);
|
|
} else if (isPlainObject(val)) {
|
|
result[targetKey] = merge({}, val);
|
|
} else if (isArray(val)) {
|
|
result[targetKey] = val.slice();
|
|
} else {
|
|
result[targetKey] = val;
|
|
}
|
|
}
|
|
|
|
for (let i = 0, l = arguments.length; i < l; i++) {
|
|
arguments[i] && forEach(arguments[i], assignValue);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Extends object a by mutably adding to it the properties of object b.
|
|
*
|
|
* @param {Object} a The object to be extended
|
|
* @param {Object} b The object to copy properties from
|
|
* @param {Object} thisArg The object to bind function to
|
|
*
|
|
* @param {Boolean} [allOwnKeys]
|
|
* @returns {Object} The resulting value of object a
|
|
*/
|
|
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
|
|
forEach(b, (val, key) => {
|
|
if (thisArg && isFunction(val)) {
|
|
a[key] = (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__["default"])(val, thisArg);
|
|
} else {
|
|
a[key] = val;
|
|
}
|
|
}, {allOwnKeys});
|
|
return a;
|
|
}
|
|
|
|
/**
|
|
* Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
|
|
*
|
|
* @param {string} content with BOM
|
|
*
|
|
* @returns {string} content value without BOM
|
|
*/
|
|
const stripBOM = (content) => {
|
|
if (content.charCodeAt(0) === 0xFEFF) {
|
|
content = content.slice(1);
|
|
}
|
|
return content;
|
|
}
|
|
|
|
/**
|
|
* Inherit the prototype methods from one constructor into another
|
|
* @param {function} constructor
|
|
* @param {function} superConstructor
|
|
* @param {object} [props]
|
|
* @param {object} [descriptors]
|
|
*
|
|
* @returns {void}
|
|
*/
|
|
const inherits = (constructor, superConstructor, props, descriptors) => {
|
|
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
constructor.prototype.constructor = constructor;
|
|
Object.defineProperty(constructor, 'super', {
|
|
value: superConstructor.prototype
|
|
});
|
|
props && Object.assign(constructor.prototype, props);
|
|
}
|
|
|
|
/**
|
|
* Resolve object with deep prototype chain to a flat object
|
|
* @param {Object} sourceObj source object
|
|
* @param {Object} [destObj]
|
|
* @param {Function|Boolean} [filter]
|
|
* @param {Function} [propFilter]
|
|
*
|
|
* @returns {Object}
|
|
*/
|
|
const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
|
|
let props;
|
|
let i;
|
|
let prop;
|
|
const merged = {};
|
|
|
|
destObj = destObj || {};
|
|
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
if (sourceObj == null) return destObj;
|
|
|
|
do {
|
|
props = Object.getOwnPropertyNames(sourceObj);
|
|
i = props.length;
|
|
while (i-- > 0) {
|
|
prop = props[i];
|
|
if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
|
|
destObj[prop] = sourceObj[prop];
|
|
merged[prop] = true;
|
|
}
|
|
}
|
|
sourceObj = filter !== false && getPrototypeOf(sourceObj);
|
|
} while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
|
|
|
|
return destObj;
|
|
}
|
|
|
|
/**
|
|
* Determines whether a string ends with the characters of a specified string
|
|
*
|
|
* @param {String} str
|
|
* @param {String} searchString
|
|
* @param {Number} [position= 0]
|
|
*
|
|
* @returns {boolean}
|
|
*/
|
|
const endsWith = (str, searchString, position) => {
|
|
str = String(str);
|
|
if (position === undefined || position > str.length) {
|
|
position = str.length;
|
|
}
|
|
position -= searchString.length;
|
|
const lastIndex = str.indexOf(searchString, position);
|
|
return lastIndex !== -1 && lastIndex === position;
|
|
}
|
|
|
|
|
|
/**
|
|
* Returns new array from array like object or null if failed
|
|
*
|
|
* @param {*} [thing]
|
|
*
|
|
* @returns {?Array}
|
|
*/
|
|
const toArray = (thing) => {
|
|
if (!thing) return null;
|
|
if (isArray(thing)) return thing;
|
|
let i = thing.length;
|
|
if (!isNumber(i)) return null;
|
|
const arr = new Array(i);
|
|
while (i-- > 0) {
|
|
arr[i] = thing[i];
|
|
}
|
|
return arr;
|
|
}
|
|
|
|
/**
|
|
* Checking if the Uint8Array exists and if it does, it returns a function that checks if the
|
|
* thing passed in is an instance of Uint8Array
|
|
*
|
|
* @param {TypedArray}
|
|
*
|
|
* @returns {Array}
|
|
*/
|
|
// eslint-disable-next-line func-names
|
|
const isTypedArray = (TypedArray => {
|
|
// eslint-disable-next-line func-names
|
|
return thing => {
|
|
return TypedArray && thing instanceof TypedArray;
|
|
};
|
|
})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
|
|
|
|
/**
|
|
* For each entry in the object, call the function with the key and value.
|
|
*
|
|
* @param {Object<any, any>} obj - The object to iterate over.
|
|
* @param {Function} fn - The function to call for each entry.
|
|
*
|
|
* @returns {void}
|
|
*/
|
|
const forEachEntry = (obj, fn) => {
|
|
const generator = obj && obj[Symbol.iterator];
|
|
|
|
const iterator = generator.call(obj);
|
|
|
|
let result;
|
|
|
|
while ((result = iterator.next()) && !result.done) {
|
|
const pair = result.value;
|
|
fn.call(obj, pair[0], pair[1]);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* It takes a regular expression and a string, and returns an array of all the matches
|
|
*
|
|
* @param {string} regExp - The regular expression to match against.
|
|
* @param {string} str - The string to search.
|
|
*
|
|
* @returns {Array<boolean>}
|
|
*/
|
|
const matchAll = (regExp, str) => {
|
|
let matches;
|
|
const arr = [];
|
|
|
|
while ((matches = regExp.exec(str)) !== null) {
|
|
arr.push(matches);
|
|
}
|
|
|
|
return arr;
|
|
}
|
|
|
|
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
|
|
const isHTMLForm = kindOfTest('HTMLFormElement');
|
|
|
|
const toCamelCase = str => {
|
|
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
|
|
function replacer(m, p1, p2) {
|
|
return p1.toUpperCase() + p2;
|
|
}
|
|
);
|
|
};
|
|
|
|
/* Creating a function that will check if an object has a property. */
|
|
const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
|
|
|
|
/**
|
|
* Determine if a value is a RegExp object
|
|
*
|
|
* @param {*} val The value to test
|
|
*
|
|
* @returns {boolean} True if value is a RegExp object, otherwise false
|
|
*/
|
|
const isRegExp = kindOfTest('RegExp');
|
|
|
|
const reduceDescriptors = (obj, reducer) => {
|
|
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
const reducedDescriptors = {};
|
|
|
|
forEach(descriptors, (descriptor, name) => {
|
|
if (reducer(descriptor, name, obj) !== false) {
|
|
reducedDescriptors[name] = descriptor;
|
|
}
|
|
});
|
|
|
|
Object.defineProperties(obj, reducedDescriptors);
|
|
}
|
|
|
|
/**
|
|
* Makes all methods read-only
|
|
* @param {Object} obj
|
|
*/
|
|
|
|
const freezeMethods = (obj) => {
|
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
// skip restricted props in strict mode
|
|
if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
|
|
return false;
|
|
}
|
|
|
|
const value = obj[name];
|
|
|
|
if (!isFunction(value)) return;
|
|
|
|
descriptor.enumerable = false;
|
|
|
|
if ('writable' in descriptor) {
|
|
descriptor.writable = false;
|
|
return;
|
|
}
|
|
|
|
if (!descriptor.set) {
|
|
descriptor.set = () => {
|
|
throw Error('Can not rewrite read-only method \'' + name + '\'');
|
|
};
|
|
}
|
|
});
|
|
}
|
|
|
|
const toObjectSet = (arrayOrString, delimiter) => {
|
|
const obj = {};
|
|
|
|
const define = (arr) => {
|
|
arr.forEach(value => {
|
|
obj[value] = true;
|
|
});
|
|
}
|
|
|
|
isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
|
|
|
|
return obj;
|
|
}
|
|
|
|
const noop = () => {}
|
|
|
|
const toFiniteNumber = (value, defaultValue) => {
|
|
value = +value;
|
|
return Number.isFinite(value) ? value : defaultValue;
|
|
}
|
|
|
|
const ALPHA = 'abcdefghijklmnopqrstuvwxyz'
|
|
|
|
const DIGIT = '0123456789';
|
|
|
|
const ALPHABET = {
|
|
DIGIT,
|
|
ALPHA,
|
|
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
}
|
|
|
|
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
let str = '';
|
|
const {length} = alphabet;
|
|
while (size--) {
|
|
str += alphabet[Math.random() * length|0]
|
|
}
|
|
|
|
return str;
|
|
}
|
|
|
|
/**
|
|
* If the thing is a FormData object, return true, otherwise return false.
|
|
*
|
|
* @param {unknown} thing - The thing to check.
|
|
*
|
|
* @returns {boolean}
|
|
*/
|
|
function isSpecCompliantForm(thing) {
|
|
return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
|
|
}
|
|
|
|
const toJSONObject = (obj) => {
|
|
const stack = new Array(10);
|
|
|
|
const visit = (source, i) => {
|
|
|
|
if (isObject(source)) {
|
|
if (stack.indexOf(source) >= 0) {
|
|
return;
|
|
}
|
|
|
|
if(!('toJSON' in source)) {
|
|
stack[i] = source;
|
|
const target = isArray(source) ? [] : {};
|
|
|
|
forEach(source, (value, key) => {
|
|
const reducedValue = visit(value, i + 1);
|
|
!isUndefined(reducedValue) && (target[key] = reducedValue);
|
|
});
|
|
|
|
stack[i] = undefined;
|
|
|
|
return target;
|
|
}
|
|
}
|
|
|
|
return source;
|
|
}
|
|
|
|
return visit(obj, 0);
|
|
}
|
|
|
|
const isAsyncFn = kindOfTest('AsyncFunction');
|
|
|
|
const isThenable = (thing) =>
|
|
thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
isArray,
|
|
isArrayBuffer,
|
|
isBuffer,
|
|
isFormData,
|
|
isArrayBufferView,
|
|
isString,
|
|
isNumber,
|
|
isBoolean,
|
|
isObject,
|
|
isPlainObject,
|
|
isUndefined,
|
|
isDate,
|
|
isFile,
|
|
isBlob,
|
|
isRegExp,
|
|
isFunction,
|
|
isStream,
|
|
isURLSearchParams,
|
|
isTypedArray,
|
|
isFileList,
|
|
forEach,
|
|
merge,
|
|
extend,
|
|
trim,
|
|
stripBOM,
|
|
inherits,
|
|
toFlatObject,
|
|
kindOf,
|
|
kindOfTest,
|
|
endsWith,
|
|
toArray,
|
|
forEachEntry,
|
|
matchAll,
|
|
isHTMLForm,
|
|
hasOwnProperty,
|
|
hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
|
|
reduceDescriptors,
|
|
freezeMethods,
|
|
toObjectSet,
|
|
toCamelCase,
|
|
noop,
|
|
toFiniteNumber,
|
|
findKey,
|
|
global: _global,
|
|
isContextDefined,
|
|
ALPHABET,
|
|
generateString,
|
|
isSpecCompliantForm,
|
|
toJSONObject,
|
|
isAsyncFn,
|
|
isThenable
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/js-cookie/dist/js.cookie.mjs":
|
|
/*!***************************************************!*\
|
|
!*** ./node_modules/js-cookie/dist/js.cookie.mjs ***!
|
|
\***************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* binding */ api)
|
|
/* harmony export */ });
|
|
/*! js-cookie v3.0.5 | MIT */
|
|
/* eslint-disable no-var */
|
|
function assign (target) {
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
var source = arguments[i];
|
|
for (var key in source) {
|
|
target[key] = source[key];
|
|
}
|
|
}
|
|
return target
|
|
}
|
|
/* eslint-enable no-var */
|
|
|
|
/* eslint-disable no-var */
|
|
var defaultConverter = {
|
|
read: function (value) {
|
|
if (value[0] === '"') {
|
|
value = value.slice(1, -1);
|
|
}
|
|
return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent)
|
|
},
|
|
write: function (value) {
|
|
return encodeURIComponent(value).replace(
|
|
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
decodeURIComponent
|
|
)
|
|
}
|
|
};
|
|
/* eslint-enable no-var */
|
|
|
|
/* eslint-disable no-var */
|
|
|
|
function init (converter, defaultAttributes) {
|
|
function set (name, value, attributes) {
|
|
if (typeof document === 'undefined') {
|
|
return
|
|
}
|
|
|
|
attributes = assign({}, defaultAttributes, attributes);
|
|
|
|
if (typeof attributes.expires === 'number') {
|
|
attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
|
|
}
|
|
if (attributes.expires) {
|
|
attributes.expires = attributes.expires.toUTCString();
|
|
}
|
|
|
|
name = encodeURIComponent(name)
|
|
.replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
|
|
.replace(/[()]/g, escape);
|
|
|
|
var stringifiedAttributes = '';
|
|
for (var attributeName in attributes) {
|
|
if (!attributes[attributeName]) {
|
|
continue
|
|
}
|
|
|
|
stringifiedAttributes += '; ' + attributeName;
|
|
|
|
if (attributes[attributeName] === true) {
|
|
continue
|
|
}
|
|
|
|
// Considers RFC 6265 section 5.2:
|
|
// ...
|
|
// 3. If the remaining unparsed-attributes contains a %x3B (";")
|
|
// character:
|
|
// Consume the characters of the unparsed-attributes up to,
|
|
// not including, the first %x3B (";") character.
|
|
// ...
|
|
stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
|
|
}
|
|
|
|
return (document.cookie =
|
|
name + '=' + converter.write(value, name) + stringifiedAttributes)
|
|
}
|
|
|
|
function get (name) {
|
|
if (typeof document === 'undefined' || (arguments.length && !name)) {
|
|
return
|
|
}
|
|
|
|
// To prevent the for loop in the first place assign an empty array
|
|
// in case there are no cookies at all.
|
|
var cookies = document.cookie ? document.cookie.split('; ') : [];
|
|
var jar = {};
|
|
for (var i = 0; i < cookies.length; i++) {
|
|
var parts = cookies[i].split('=');
|
|
var value = parts.slice(1).join('=');
|
|
|
|
try {
|
|
var found = decodeURIComponent(parts[0]);
|
|
jar[found] = converter.read(value, found);
|
|
|
|
if (name === found) {
|
|
break
|
|
}
|
|
} catch (e) {}
|
|
}
|
|
|
|
return name ? jar[name] : jar
|
|
}
|
|
|
|
return Object.create(
|
|
{
|
|
set,
|
|
get,
|
|
remove: function (name, attributes) {
|
|
set(
|
|
name,
|
|
'',
|
|
assign({}, attributes, {
|
|
expires: -1
|
|
})
|
|
);
|
|
},
|
|
withAttributes: function (attributes) {
|
|
return init(this.converter, assign({}, this.attributes, attributes))
|
|
},
|
|
withConverter: function (converter) {
|
|
return init(assign({}, this.converter, converter), this.attributes)
|
|
}
|
|
},
|
|
{
|
|
attributes: { value: Object.freeze(defaultAttributes) },
|
|
converter: { value: Object.freeze(converter) }
|
|
}
|
|
)
|
|
}
|
|
|
|
var api = init(defaultConverter, { path: '/' });
|
|
/* eslint-enable no-var */
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/vue-recaptcha/node_modules/vue-demi/lib/index.mjs":
|
|
/*!************************************************************************!*\
|
|
!*** ./node_modules/vue-recaptcha/node_modules/vue-demi/lib/index.mjs ***!
|
|
\************************************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ BaseTransition: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.BaseTransition),
|
|
/* harmony export */ BaseTransitionPropsValidators: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.BaseTransitionPropsValidators),
|
|
/* harmony export */ Comment: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Comment),
|
|
/* harmony export */ EffectScope: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.EffectScope),
|
|
/* harmony export */ Fragment: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Fragment),
|
|
/* harmony export */ KeepAlive: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.KeepAlive),
|
|
/* harmony export */ ReactiveEffect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ReactiveEffect),
|
|
/* harmony export */ Static: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Static),
|
|
/* harmony export */ Suspense: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Suspense),
|
|
/* harmony export */ Teleport: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Teleport),
|
|
/* harmony export */ Text: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Text),
|
|
/* harmony export */ Transition: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.Transition),
|
|
/* harmony export */ TransitionGroup: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.TransitionGroup),
|
|
/* harmony export */ Vue: () => (/* reexport module object */ vue__WEBPACK_IMPORTED_MODULE_0__),
|
|
/* harmony export */ Vue2: () => (/* binding */ Vue2),
|
|
/* harmony export */ VueElement: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.VueElement),
|
|
/* harmony export */ assertNumber: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.assertNumber),
|
|
/* harmony export */ callWithAsyncErrorHandling: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.callWithAsyncErrorHandling),
|
|
/* harmony export */ callWithErrorHandling: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.callWithErrorHandling),
|
|
/* harmony export */ camelize: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.camelize),
|
|
/* harmony export */ capitalize: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.capitalize),
|
|
/* harmony export */ cloneVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.cloneVNode),
|
|
/* harmony export */ compatUtils: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.compatUtils),
|
|
/* harmony export */ compile: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.compile),
|
|
/* harmony export */ computed: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.computed),
|
|
/* harmony export */ createApp: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createApp),
|
|
/* harmony export */ createBlock: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createBlock),
|
|
/* harmony export */ createCommentVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode),
|
|
/* harmony export */ createElementBlock: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock),
|
|
/* harmony export */ createElementVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode),
|
|
/* harmony export */ createHydrationRenderer: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createHydrationRenderer),
|
|
/* harmony export */ createPropsRestProxy: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createPropsRestProxy),
|
|
/* harmony export */ createRenderer: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createRenderer),
|
|
/* harmony export */ createSSRApp: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createSSRApp),
|
|
/* harmony export */ createSlots: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createSlots),
|
|
/* harmony export */ createStaticVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createStaticVNode),
|
|
/* harmony export */ createTextVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode),
|
|
/* harmony export */ createVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.createVNode),
|
|
/* harmony export */ customRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.customRef),
|
|
/* harmony export */ defineAsyncComponent: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineAsyncComponent),
|
|
/* harmony export */ defineComponent: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent),
|
|
/* harmony export */ defineCustomElement: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineCustomElement),
|
|
/* harmony export */ defineEmits: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineEmits),
|
|
/* harmony export */ defineExpose: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineExpose),
|
|
/* harmony export */ defineModel: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineModel),
|
|
/* harmony export */ defineOptions: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineOptions),
|
|
/* harmony export */ defineProps: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineProps),
|
|
/* harmony export */ defineSSRCustomElement: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineSSRCustomElement),
|
|
/* harmony export */ defineSlots: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.defineSlots),
|
|
/* harmony export */ del: () => (/* binding */ del),
|
|
/* harmony export */ devtools: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.devtools),
|
|
/* harmony export */ effect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.effect),
|
|
/* harmony export */ effectScope: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.effectScope),
|
|
/* harmony export */ getCurrentInstance: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance),
|
|
/* harmony export */ getCurrentScope: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.getCurrentScope),
|
|
/* harmony export */ getTransitionRawChildren: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.getTransitionRawChildren),
|
|
/* harmony export */ guardReactiveProps: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps),
|
|
/* harmony export */ h: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.h),
|
|
/* harmony export */ handleError: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.handleError),
|
|
/* harmony export */ hasInjectionContext: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.hasInjectionContext),
|
|
/* harmony export */ hydrate: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.hydrate),
|
|
/* harmony export */ initCustomFormatter: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.initCustomFormatter),
|
|
/* harmony export */ initDirectivesForSSR: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.initDirectivesForSSR),
|
|
/* harmony export */ inject: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.inject),
|
|
/* harmony export */ install: () => (/* binding */ install),
|
|
/* harmony export */ isMemoSame: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isMemoSame),
|
|
/* harmony export */ isProxy: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isProxy),
|
|
/* harmony export */ isReactive: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isReactive),
|
|
/* harmony export */ isReadonly: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isReadonly),
|
|
/* harmony export */ isRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isRef),
|
|
/* harmony export */ isRuntimeOnly: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isRuntimeOnly),
|
|
/* harmony export */ isShallow: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isShallow),
|
|
/* harmony export */ isVNode: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.isVNode),
|
|
/* harmony export */ isVue2: () => (/* binding */ isVue2),
|
|
/* harmony export */ isVue3: () => (/* binding */ isVue3),
|
|
/* harmony export */ markRaw: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.markRaw),
|
|
/* harmony export */ mergeDefaults: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.mergeDefaults),
|
|
/* harmony export */ mergeModels: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.mergeModels),
|
|
/* harmony export */ mergeProps: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps),
|
|
/* harmony export */ nextTick: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.nextTick),
|
|
/* harmony export */ normalizeClass: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass),
|
|
/* harmony export */ normalizeProps: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.normalizeProps),
|
|
/* harmony export */ normalizeStyle: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle),
|
|
/* harmony export */ onActivated: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onActivated),
|
|
/* harmony export */ onBeforeMount: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onBeforeMount),
|
|
/* harmony export */ onBeforeUnmount: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onBeforeUnmount),
|
|
/* harmony export */ onBeforeUpdate: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onBeforeUpdate),
|
|
/* harmony export */ onDeactivated: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onDeactivated),
|
|
/* harmony export */ onErrorCaptured: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onErrorCaptured),
|
|
/* harmony export */ onMounted: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onMounted),
|
|
/* harmony export */ onRenderTracked: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onRenderTracked),
|
|
/* harmony export */ onRenderTriggered: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onRenderTriggered),
|
|
/* harmony export */ onScopeDispose: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onScopeDispose),
|
|
/* harmony export */ onServerPrefetch: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onServerPrefetch),
|
|
/* harmony export */ onUnmounted: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onUnmounted),
|
|
/* harmony export */ onUpdated: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.onUpdated),
|
|
/* harmony export */ openBlock: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.openBlock),
|
|
/* harmony export */ popScopeId: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId),
|
|
/* harmony export */ provide: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.provide),
|
|
/* harmony export */ proxyRefs: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.proxyRefs),
|
|
/* harmony export */ pushScopeId: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId),
|
|
/* harmony export */ queuePostFlushCb: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.queuePostFlushCb),
|
|
/* harmony export */ reactive: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.reactive),
|
|
/* harmony export */ readonly: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.readonly),
|
|
/* harmony export */ ref: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ref),
|
|
/* harmony export */ registerRuntimeCompiler: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.registerRuntimeCompiler),
|
|
/* harmony export */ render: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.render),
|
|
/* harmony export */ renderList: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.renderList),
|
|
/* harmony export */ renderSlot: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot),
|
|
/* harmony export */ resolveComponent: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent),
|
|
/* harmony export */ resolveDirective: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveDirective),
|
|
/* harmony export */ resolveDynamicComponent: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveDynamicComponent),
|
|
/* harmony export */ resolveFilter: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveFilter),
|
|
/* harmony export */ resolveTransitionHooks: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.resolveTransitionHooks),
|
|
/* harmony export */ set: () => (/* binding */ set),
|
|
/* harmony export */ setBlockTracking: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.setBlockTracking),
|
|
/* harmony export */ setDevtoolsHook: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.setDevtoolsHook),
|
|
/* harmony export */ setTransitionHooks: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.setTransitionHooks),
|
|
/* harmony export */ shallowReactive: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.shallowReactive),
|
|
/* harmony export */ shallowReadonly: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly),
|
|
/* harmony export */ shallowRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.shallowRef),
|
|
/* harmony export */ ssrContextKey: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ssrContextKey),
|
|
/* harmony export */ ssrUtils: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.ssrUtils),
|
|
/* harmony export */ stop: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.stop),
|
|
/* harmony export */ toDisplayString: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString),
|
|
/* harmony export */ toHandlerKey: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toHandlerKey),
|
|
/* harmony export */ toHandlers: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toHandlers),
|
|
/* harmony export */ toRaw: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toRaw),
|
|
/* harmony export */ toRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toRef),
|
|
/* harmony export */ toRefs: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toRefs),
|
|
/* harmony export */ toValue: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.toValue),
|
|
/* harmony export */ transformVNodeArgs: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.transformVNodeArgs),
|
|
/* harmony export */ triggerRef: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.triggerRef),
|
|
/* harmony export */ unref: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.unref),
|
|
/* harmony export */ useAttrs: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useAttrs),
|
|
/* harmony export */ useCssModule: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useCssModule),
|
|
/* harmony export */ useCssVars: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useCssVars),
|
|
/* harmony export */ useModel: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useModel),
|
|
/* harmony export */ useSSRContext: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useSSRContext),
|
|
/* harmony export */ useSlots: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useSlots),
|
|
/* harmony export */ useTransitionState: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.useTransitionState),
|
|
/* harmony export */ vModelCheckbox: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelCheckbox),
|
|
/* harmony export */ vModelDynamic: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelDynamic),
|
|
/* harmony export */ vModelRadio: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelRadio),
|
|
/* harmony export */ vModelSelect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelSelect),
|
|
/* harmony export */ vModelText: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vModelText),
|
|
/* harmony export */ vShow: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.vShow),
|
|
/* harmony export */ version: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.version),
|
|
/* harmony export */ warn: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.warn),
|
|
/* harmony export */ watch: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.watch),
|
|
/* harmony export */ watchEffect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.watchEffect),
|
|
/* harmony export */ watchPostEffect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.watchPostEffect),
|
|
/* harmony export */ watchSyncEffect: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.watchSyncEffect),
|
|
/* harmony export */ withAsyncContext: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withAsyncContext),
|
|
/* harmony export */ withCtx: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withCtx),
|
|
/* harmony export */ withDefaults: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withDefaults),
|
|
/* harmony export */ withDirectives: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives),
|
|
/* harmony export */ withKeys: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withKeys),
|
|
/* harmony export */ withMemo: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withMemo),
|
|
/* harmony export */ withModifiers: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers),
|
|
/* harmony export */ withScopeId: () => (/* reexport safe */ vue__WEBPACK_IMPORTED_MODULE_0__.withScopeId)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
|
|
|
|
var isVue2 = false
|
|
var isVue3 = true
|
|
var Vue2 = undefined
|
|
|
|
function install() {}
|
|
|
|
function set(target, key, val) {
|
|
if (Array.isArray(target)) {
|
|
target.length = Math.max(target.length, key)
|
|
target.splice(key, 1, val)
|
|
return val
|
|
}
|
|
target[key] = val
|
|
return val
|
|
}
|
|
|
|
function del(target, key) {
|
|
if (Array.isArray(target)) {
|
|
target.splice(key, 1)
|
|
return
|
|
}
|
|
delete target[key]
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/vue-router/dist/vue-router.mjs":
|
|
/*!*****************************************************!*\
|
|
!*** ./node_modules/vue-router/dist/vue-router.mjs ***!
|
|
\*****************************************************/
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ NavigationFailureType: () => (/* binding */ NavigationFailureType),
|
|
/* harmony export */ RouterLink: () => (/* binding */ RouterLink),
|
|
/* harmony export */ RouterView: () => (/* binding */ RouterView),
|
|
/* harmony export */ START_LOCATION: () => (/* binding */ START_LOCATION_NORMALIZED),
|
|
/* harmony export */ createMemoryHistory: () => (/* binding */ createMemoryHistory),
|
|
/* harmony export */ createRouter: () => (/* binding */ createRouter),
|
|
/* harmony export */ createRouterMatcher: () => (/* binding */ createRouterMatcher),
|
|
/* harmony export */ createWebHashHistory: () => (/* binding */ createWebHashHistory),
|
|
/* harmony export */ createWebHistory: () => (/* binding */ createWebHistory),
|
|
/* harmony export */ isNavigationFailure: () => (/* binding */ isNavigationFailure),
|
|
/* harmony export */ loadRouteLocation: () => (/* binding */ loadRouteLocation),
|
|
/* harmony export */ matchedRouteKey: () => (/* binding */ matchedRouteKey),
|
|
/* harmony export */ onBeforeRouteLeave: () => (/* binding */ onBeforeRouteLeave),
|
|
/* harmony export */ onBeforeRouteUpdate: () => (/* binding */ onBeforeRouteUpdate),
|
|
/* harmony export */ parseQuery: () => (/* binding */ parseQuery),
|
|
/* harmony export */ routeLocationKey: () => (/* binding */ routeLocationKey),
|
|
/* harmony export */ routerKey: () => (/* binding */ routerKey),
|
|
/* harmony export */ routerViewLocationKey: () => (/* binding */ routerViewLocationKey),
|
|
/* harmony export */ stringifyQuery: () => (/* binding */ stringifyQuery),
|
|
/* harmony export */ useLink: () => (/* binding */ useLink),
|
|
/* harmony export */ useRoute: () => (/* binding */ useRoute),
|
|
/* harmony export */ useRouter: () => (/* binding */ useRouter),
|
|
/* harmony export */ viewDepthKey: () => (/* binding */ viewDepthKey)
|
|
/* harmony export */ });
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
/* harmony import */ var _vue_devtools_api__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/devtools-api */ "./node_modules/@vue/devtools-api/lib/esm/index.js");
|
|
/*!
|
|
* vue-router v4.2.4
|
|
* (c) 2023 Eduardo San Martin Morote
|
|
* @license MIT
|
|
*/
|
|
|
|
|
|
|
|
const isBrowser = typeof window !== 'undefined';
|
|
|
|
function isESModule(obj) {
|
|
return obj.__esModule || obj[Symbol.toStringTag] === 'Module';
|
|
}
|
|
const assign = Object.assign;
|
|
function applyToParams(fn, params) {
|
|
const newParams = {};
|
|
for (const key in params) {
|
|
const value = params[key];
|
|
newParams[key] = isArray(value)
|
|
? value.map(fn)
|
|
: fn(value);
|
|
}
|
|
return newParams;
|
|
}
|
|
const noop = () => { };
|
|
/**
|
|
* Typesafe alternative to Array.isArray
|
|
* https://github.com/microsoft/TypeScript/pull/48228
|
|
*/
|
|
const isArray = Array.isArray;
|
|
|
|
function warn(msg) {
|
|
// avoid using ...args as it breaks in older Edge builds
|
|
const args = Array.from(arguments).slice(1);
|
|
console.warn.apply(console, ['[Vue Router warn]: ' + msg].concat(args));
|
|
}
|
|
|
|
const TRAILING_SLASH_RE = /\/$/;
|
|
const removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, '');
|
|
/**
|
|
* Transforms a URI into a normalized history location
|
|
*
|
|
* @param parseQuery
|
|
* @param location - URI to normalize
|
|
* @param currentLocation - current absolute location. Allows resolving relative
|
|
* paths. Must start with `/`. Defaults to `/`
|
|
* @returns a normalized history location
|
|
*/
|
|
function parseURL(parseQuery, location, currentLocation = '/') {
|
|
let path, query = {}, searchString = '', hash = '';
|
|
// Could use URL and URLSearchParams but IE 11 doesn't support it
|
|
// TODO: move to new URL()
|
|
const hashPos = location.indexOf('#');
|
|
let searchPos = location.indexOf('?');
|
|
// the hash appears before the search, so it's not part of the search string
|
|
if (hashPos < searchPos && hashPos >= 0) {
|
|
searchPos = -1;
|
|
}
|
|
if (searchPos > -1) {
|
|
path = location.slice(0, searchPos);
|
|
searchString = location.slice(searchPos + 1, hashPos > -1 ? hashPos : location.length);
|
|
query = parseQuery(searchString);
|
|
}
|
|
if (hashPos > -1) {
|
|
path = path || location.slice(0, hashPos);
|
|
// keep the # character
|
|
hash = location.slice(hashPos, location.length);
|
|
}
|
|
// no search and no query
|
|
path = resolveRelativePath(path != null ? path : location, currentLocation);
|
|
// empty path means a relative query or hash `?foo=f`, `#thing`
|
|
return {
|
|
fullPath: path + (searchString && '?') + searchString + hash,
|
|
path,
|
|
query,
|
|
hash,
|
|
};
|
|
}
|
|
/**
|
|
* Stringifies a URL object
|
|
*
|
|
* @param stringifyQuery
|
|
* @param location
|
|
*/
|
|
function stringifyURL(stringifyQuery, location) {
|
|
const query = location.query ? stringifyQuery(location.query) : '';
|
|
return location.path + (query && '?') + query + (location.hash || '');
|
|
}
|
|
/**
|
|
* Strips off the base from the beginning of a location.pathname in a non-case-sensitive way.
|
|
*
|
|
* @param pathname - location.pathname
|
|
* @param base - base to strip off
|
|
*/
|
|
function stripBase(pathname, base) {
|
|
// no base or base is not found at the beginning
|
|
if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase()))
|
|
return pathname;
|
|
return pathname.slice(base.length) || '/';
|
|
}
|
|
/**
|
|
* Checks if two RouteLocation are equal. This means that both locations are
|
|
* pointing towards the same {@link RouteRecord} and that all `params`, `query`
|
|
* parameters and `hash` are the same
|
|
*
|
|
* @param stringifyQuery - A function that takes a query object of type LocationQueryRaw and returns a string representation of it.
|
|
* @param a - first {@link RouteLocation}
|
|
* @param b - second {@link RouteLocation}
|
|
*/
|
|
function isSameRouteLocation(stringifyQuery, a, b) {
|
|
const aLastIndex = a.matched.length - 1;
|
|
const bLastIndex = b.matched.length - 1;
|
|
return (aLastIndex > -1 &&
|
|
aLastIndex === bLastIndex &&
|
|
isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) &&
|
|
isSameRouteLocationParams(a.params, b.params) &&
|
|
stringifyQuery(a.query) === stringifyQuery(b.query) &&
|
|
a.hash === b.hash);
|
|
}
|
|
/**
|
|
* Check if two `RouteRecords` are equal. Takes into account aliases: they are
|
|
* considered equal to the `RouteRecord` they are aliasing.
|
|
*
|
|
* @param a - first {@link RouteRecord}
|
|
* @param b - second {@link RouteRecord}
|
|
*/
|
|
function isSameRouteRecord(a, b) {
|
|
// since the original record has an undefined value for aliasOf
|
|
// but all aliases point to the original record, this will always compare
|
|
// the original record
|
|
return (a.aliasOf || a) === (b.aliasOf || b);
|
|
}
|
|
function isSameRouteLocationParams(a, b) {
|
|
if (Object.keys(a).length !== Object.keys(b).length)
|
|
return false;
|
|
for (const key in a) {
|
|
if (!isSameRouteLocationParamsValue(a[key], b[key]))
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
function isSameRouteLocationParamsValue(a, b) {
|
|
return isArray(a)
|
|
? isEquivalentArray(a, b)
|
|
: isArray(b)
|
|
? isEquivalentArray(b, a)
|
|
: a === b;
|
|
}
|
|
/**
|
|
* Check if two arrays are the same or if an array with one single entry is the
|
|
* same as another primitive value. Used to check query and parameters
|
|
*
|
|
* @param a - array of values
|
|
* @param b - array of values or a single value
|
|
*/
|
|
function isEquivalentArray(a, b) {
|
|
return isArray(b)
|
|
? a.length === b.length && a.every((value, i) => value === b[i])
|
|
: a.length === 1 && a[0] === b;
|
|
}
|
|
/**
|
|
* Resolves a relative path that starts with `.`.
|
|
*
|
|
* @param to - path location we are resolving
|
|
* @param from - currentLocation.path, should start with `/`
|
|
*/
|
|
function resolveRelativePath(to, from) {
|
|
if (to.startsWith('/'))
|
|
return to;
|
|
if (( true) && !from.startsWith('/')) {
|
|
warn(`Cannot resolve a relative location without an absolute path. Trying to resolve "${to}" from "${from}". It should look like "/${from}".`);
|
|
return to;
|
|
}
|
|
if (!to)
|
|
return from;
|
|
const fromSegments = from.split('/');
|
|
const toSegments = to.split('/');
|
|
const lastToSegment = toSegments[toSegments.length - 1];
|
|
// make . and ./ the same (../ === .., ../../ === ../..)
|
|
// this is the same behavior as new URL()
|
|
if (lastToSegment === '..' || lastToSegment === '.') {
|
|
toSegments.push('');
|
|
}
|
|
let position = fromSegments.length - 1;
|
|
let toPosition;
|
|
let segment;
|
|
for (toPosition = 0; toPosition < toSegments.length; toPosition++) {
|
|
segment = toSegments[toPosition];
|
|
// we stay on the same position
|
|
if (segment === '.')
|
|
continue;
|
|
// go up in the from array
|
|
if (segment === '..') {
|
|
// we can't go below zero, but we still need to increment toPosition
|
|
if (position > 1)
|
|
position--;
|
|
// continue
|
|
}
|
|
// we reached a non-relative path, we stop here
|
|
else
|
|
break;
|
|
}
|
|
return (fromSegments.slice(0, position).join('/') +
|
|
'/' +
|
|
toSegments
|
|
// ensure we use at least the last element in the toSegments
|
|
.slice(toPosition - (toPosition === toSegments.length ? 1 : 0))
|
|
.join('/'));
|
|
}
|
|
|
|
var NavigationType;
|
|
(function (NavigationType) {
|
|
NavigationType["pop"] = "pop";
|
|
NavigationType["push"] = "push";
|
|
})(NavigationType || (NavigationType = {}));
|
|
var NavigationDirection;
|
|
(function (NavigationDirection) {
|
|
NavigationDirection["back"] = "back";
|
|
NavigationDirection["forward"] = "forward";
|
|
NavigationDirection["unknown"] = "";
|
|
})(NavigationDirection || (NavigationDirection = {}));
|
|
/**
|
|
* Starting location for Histories
|
|
*/
|
|
const START = '';
|
|
// Generic utils
|
|
/**
|
|
* Normalizes a base by removing any trailing slash and reading the base tag if
|
|
* present.
|
|
*
|
|
* @param base - base to normalize
|
|
*/
|
|
function normalizeBase(base) {
|
|
if (!base) {
|
|
if (isBrowser) {
|
|
// respect <base> tag
|
|
const baseEl = document.querySelector('base');
|
|
base = (baseEl && baseEl.getAttribute('href')) || '/';
|
|
// strip full URL origin
|
|
base = base.replace(/^\w+:\/\/[^\/]+/, '');
|
|
}
|
|
else {
|
|
base = '/';
|
|
}
|
|
}
|
|
// ensure leading slash when it was removed by the regex above avoid leading
|
|
// slash with hash because the file could be read from the disk like file://
|
|
// and the leading slash would cause problems
|
|
if (base[0] !== '/' && base[0] !== '#')
|
|
base = '/' + base;
|
|
// remove the trailing slash so all other method can just do `base + fullPath`
|
|
// to build an href
|
|
return removeTrailingSlash(base);
|
|
}
|
|
// remove any character before the hash
|
|
const BEFORE_HASH_RE = /^[^#]+#/;
|
|
function createHref(base, location) {
|
|
return base.replace(BEFORE_HASH_RE, '#') + location;
|
|
}
|
|
|
|
function getElementPosition(el, offset) {
|
|
const docRect = document.documentElement.getBoundingClientRect();
|
|
const elRect = el.getBoundingClientRect();
|
|
return {
|
|
behavior: offset.behavior,
|
|
left: elRect.left - docRect.left - (offset.left || 0),
|
|
top: elRect.top - docRect.top - (offset.top || 0),
|
|
};
|
|
}
|
|
const computeScrollPosition = () => ({
|
|
left: window.pageXOffset,
|
|
top: window.pageYOffset,
|
|
});
|
|
function scrollToPosition(position) {
|
|
let scrollToOptions;
|
|
if ('el' in position) {
|
|
const positionEl = position.el;
|
|
const isIdSelector = typeof positionEl === 'string' && positionEl.startsWith('#');
|
|
/**
|
|
* `id`s can accept pretty much any characters, including CSS combinators
|
|
* like `>` or `~`. It's still possible to retrieve elements using
|
|
* `document.getElementById('~')` but it needs to be escaped when using
|
|
* `document.querySelector('#\\~')` for it to be valid. The only
|
|
* requirements for `id`s are them to be unique on the page and to not be
|
|
* empty (`id=""`). Because of that, when passing an id selector, it should
|
|
* be properly escaped for it to work with `querySelector`. We could check
|
|
* for the id selector to be simple (no CSS combinators `+ >~`) but that
|
|
* would make things inconsistent since they are valid characters for an
|
|
* `id` but would need to be escaped when using `querySelector`, breaking
|
|
* their usage and ending up in no selector returned. Selectors need to be
|
|
* escaped:
|
|
*
|
|
* - `#1-thing` becomes `#\31 -thing`
|
|
* - `#with~symbols` becomes `#with\\~symbols`
|
|
*
|
|
* - More information about the topic can be found at
|
|
* https://mathiasbynens.be/notes/html5-id-class.
|
|
* - Practical example: https://mathiasbynens.be/demo/html5-id
|
|
*/
|
|
if (( true) && typeof position.el === 'string') {
|
|
if (!isIdSelector || !document.getElementById(position.el.slice(1))) {
|
|
try {
|
|
const foundEl = document.querySelector(position.el);
|
|
if (isIdSelector && foundEl) {
|
|
warn(`The selector "${position.el}" should be passed as "el: document.querySelector('${position.el}')" because it starts with "#".`);
|
|
// return to avoid other warnings
|
|
return;
|
|
}
|
|
}
|
|
catch (err) {
|
|
warn(`The selector "${position.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);
|
|
// return to avoid other warnings
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
const el = typeof positionEl === 'string'
|
|
? isIdSelector
|
|
? document.getElementById(positionEl.slice(1))
|
|
: document.querySelector(positionEl)
|
|
: positionEl;
|
|
if (!el) {
|
|
( true) &&
|
|
warn(`Couldn't find element using selector "${position.el}" returned by scrollBehavior.`);
|
|
return;
|
|
}
|
|
scrollToOptions = getElementPosition(el, position);
|
|
}
|
|
else {
|
|
scrollToOptions = position;
|
|
}
|
|
if ('scrollBehavior' in document.documentElement.style)
|
|
window.scrollTo(scrollToOptions);
|
|
else {
|
|
window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.pageXOffset, scrollToOptions.top != null ? scrollToOptions.top : window.pageYOffset);
|
|
}
|
|
}
|
|
function getScrollKey(path, delta) {
|
|
const position = history.state ? history.state.position - delta : -1;
|
|
return position + path;
|
|
}
|
|
const scrollPositions = new Map();
|
|
function saveScrollPosition(key, scrollPosition) {
|
|
scrollPositions.set(key, scrollPosition);
|
|
}
|
|
function getSavedScrollPosition(key) {
|
|
const scroll = scrollPositions.get(key);
|
|
// consume it so it's not used again
|
|
scrollPositions.delete(key);
|
|
return scroll;
|
|
}
|
|
// TODO: RFC about how to save scroll position
|
|
/**
|
|
* ScrollBehavior instance used by the router to compute and restore the scroll
|
|
* position when navigating.
|
|
*/
|
|
// export interface ScrollHandler<ScrollPositionEntry extends HistoryStateValue, ScrollPosition extends ScrollPositionEntry> {
|
|
// // returns a scroll position that can be saved in history
|
|
// compute(): ScrollPositionEntry
|
|
// // can take an extended ScrollPositionEntry
|
|
// scroll(position: ScrollPosition): void
|
|
// }
|
|
// export const scrollHandler: ScrollHandler<ScrollPosition> = {
|
|
// compute: computeScroll,
|
|
// scroll: scrollToPosition,
|
|
// }
|
|
|
|
let createBaseLocation = () => location.protocol + '//' + location.host;
|
|
/**
|
|
* Creates a normalized history location from a window.location object
|
|
* @param base - The base path
|
|
* @param location - The window.location object
|
|
*/
|
|
function createCurrentLocation(base, location) {
|
|
const { pathname, search, hash } = location;
|
|
// allows hash bases like #, /#, #/, #!, #!/, /#!/, or even /folder#end
|
|
const hashPos = base.indexOf('#');
|
|
if (hashPos > -1) {
|
|
let slicePos = hash.includes(base.slice(hashPos))
|
|
? base.slice(hashPos).length
|
|
: 1;
|
|
let pathFromHash = hash.slice(slicePos);
|
|
// prepend the starting slash to hash so the url starts with /#
|
|
if (pathFromHash[0] !== '/')
|
|
pathFromHash = '/' + pathFromHash;
|
|
return stripBase(pathFromHash, '');
|
|
}
|
|
const path = stripBase(pathname, base);
|
|
return path + search + hash;
|
|
}
|
|
function useHistoryListeners(base, historyState, currentLocation, replace) {
|
|
let listeners = [];
|
|
let teardowns = [];
|
|
// TODO: should it be a stack? a Dict. Check if the popstate listener
|
|
// can trigger twice
|
|
let pauseState = null;
|
|
const popStateHandler = ({ state, }) => {
|
|
const to = createCurrentLocation(base, location);
|
|
const from = currentLocation.value;
|
|
const fromState = historyState.value;
|
|
let delta = 0;
|
|
if (state) {
|
|
currentLocation.value = to;
|
|
historyState.value = state;
|
|
// ignore the popstate and reset the pauseState
|
|
if (pauseState && pauseState === from) {
|
|
pauseState = null;
|
|
return;
|
|
}
|
|
delta = fromState ? state.position - fromState.position : 0;
|
|
}
|
|
else {
|
|
replace(to);
|
|
}
|
|
// console.log({ deltaFromCurrent })
|
|
// Here we could also revert the navigation by calling history.go(-delta)
|
|
// this listener will have to be adapted to not trigger again and to wait for the url
|
|
// to be updated before triggering the listeners. Some kind of validation function would also
|
|
// need to be passed to the listeners so the navigation can be accepted
|
|
// call all listeners
|
|
listeners.forEach(listener => {
|
|
listener(currentLocation.value, from, {
|
|
delta,
|
|
type: NavigationType.pop,
|
|
direction: delta
|
|
? delta > 0
|
|
? NavigationDirection.forward
|
|
: NavigationDirection.back
|
|
: NavigationDirection.unknown,
|
|
});
|
|
});
|
|
};
|
|
function pauseListeners() {
|
|
pauseState = currentLocation.value;
|
|
}
|
|
function listen(callback) {
|
|
// set up the listener and prepare teardown callbacks
|
|
listeners.push(callback);
|
|
const teardown = () => {
|
|
const index = listeners.indexOf(callback);
|
|
if (index > -1)
|
|
listeners.splice(index, 1);
|
|
};
|
|
teardowns.push(teardown);
|
|
return teardown;
|
|
}
|
|
function beforeUnloadListener() {
|
|
const { history } = window;
|
|
if (!history.state)
|
|
return;
|
|
history.replaceState(assign({}, history.state, { scroll: computeScrollPosition() }), '');
|
|
}
|
|
function destroy() {
|
|
for (const teardown of teardowns)
|
|
teardown();
|
|
teardowns = [];
|
|
window.removeEventListener('popstate', popStateHandler);
|
|
window.removeEventListener('beforeunload', beforeUnloadListener);
|
|
}
|
|
// set up the listeners and prepare teardown callbacks
|
|
window.addEventListener('popstate', popStateHandler);
|
|
// TODO: could we use 'pagehide' or 'visibilitychange' instead?
|
|
// https://developer.chrome.com/blog/page-lifecycle-api/
|
|
window.addEventListener('beforeunload', beforeUnloadListener, {
|
|
passive: true,
|
|
});
|
|
return {
|
|
pauseListeners,
|
|
listen,
|
|
destroy,
|
|
};
|
|
}
|
|
/**
|
|
* Creates a state object
|
|
*/
|
|
function buildState(back, current, forward, replaced = false, computeScroll = false) {
|
|
return {
|
|
back,
|
|
current,
|
|
forward,
|
|
replaced,
|
|
position: window.history.length,
|
|
scroll: computeScroll ? computeScrollPosition() : null,
|
|
};
|
|
}
|
|
function useHistoryStateNavigation(base) {
|
|
const { history, location } = window;
|
|
// private variables
|
|
const currentLocation = {
|
|
value: createCurrentLocation(base, location),
|
|
};
|
|
const historyState = { value: history.state };
|
|
// build current history entry as this is a fresh navigation
|
|
if (!historyState.value) {
|
|
changeLocation(currentLocation.value, {
|
|
back: null,
|
|
current: currentLocation.value,
|
|
forward: null,
|
|
// the length is off by one, we need to decrease it
|
|
position: history.length - 1,
|
|
replaced: true,
|
|
// don't add a scroll as the user may have an anchor, and we want
|
|
// scrollBehavior to be triggered without a saved position
|
|
scroll: null,
|
|
}, true);
|
|
}
|
|
function changeLocation(to, state, replace) {
|
|
/**
|
|
* if a base tag is provided, and we are on a normal domain, we have to
|
|
* respect the provided `base` attribute because pushState() will use it and
|
|
* potentially erase anything before the `#` like at
|
|
* https://github.com/vuejs/router/issues/685 where a base of
|
|
* `/folder/#` but a base of `/` would erase the `/folder/` section. If
|
|
* there is no host, the `<base>` tag makes no sense and if there isn't a
|
|
* base tag we can just use everything after the `#`.
|
|
*/
|
|
const hashIndex = base.indexOf('#');
|
|
const url = hashIndex > -1
|
|
? (location.host && document.querySelector('base')
|
|
? base
|
|
: base.slice(hashIndex)) + to
|
|
: createBaseLocation() + base + to;
|
|
try {
|
|
// BROWSER QUIRK
|
|
// NOTE: Safari throws a SecurityError when calling this function 100 times in 30 seconds
|
|
history[replace ? 'replaceState' : 'pushState'](state, '', url);
|
|
historyState.value = state;
|
|
}
|
|
catch (err) {
|
|
if ((true)) {
|
|
warn('Error with push/replace State', err);
|
|
}
|
|
else {}
|
|
// Force the navigation, this also resets the call count
|
|
location[replace ? 'replace' : 'assign'](url);
|
|
}
|
|
}
|
|
function replace(to, data) {
|
|
const state = assign({}, history.state, buildState(historyState.value.back,
|
|
// keep back and forward entries but override current position
|
|
to, historyState.value.forward, true), data, { position: historyState.value.position });
|
|
changeLocation(to, state, true);
|
|
currentLocation.value = to;
|
|
}
|
|
function push(to, data) {
|
|
// Add to current entry the information of where we are going
|
|
// as well as saving the current position
|
|
const currentState = assign({},
|
|
// use current history state to gracefully handle a wrong call to
|
|
// history.replaceState
|
|
// https://github.com/vuejs/router/issues/366
|
|
historyState.value, history.state, {
|
|
forward: to,
|
|
scroll: computeScrollPosition(),
|
|
});
|
|
if (( true) && !history.state) {
|
|
warn(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\n\n` +
|
|
`history.replaceState(history.state, '', url)\n\n` +
|
|
`You can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`);
|
|
}
|
|
changeLocation(currentState.current, currentState, true);
|
|
const state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data);
|
|
changeLocation(to, state, false);
|
|
currentLocation.value = to;
|
|
}
|
|
return {
|
|
location: currentLocation,
|
|
state: historyState,
|
|
push,
|
|
replace,
|
|
};
|
|
}
|
|
/**
|
|
* Creates an HTML5 history. Most common history for single page applications.
|
|
*
|
|
* @param base -
|
|
*/
|
|
function createWebHistory(base) {
|
|
base = normalizeBase(base);
|
|
const historyNavigation = useHistoryStateNavigation(base);
|
|
const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);
|
|
function go(delta, triggerListeners = true) {
|
|
if (!triggerListeners)
|
|
historyListeners.pauseListeners();
|
|
history.go(delta);
|
|
}
|
|
const routerHistory = assign({
|
|
// it's overridden right after
|
|
location: '',
|
|
base,
|
|
go,
|
|
createHref: createHref.bind(null, base),
|
|
}, historyNavigation, historyListeners);
|
|
Object.defineProperty(routerHistory, 'location', {
|
|
enumerable: true,
|
|
get: () => historyNavigation.location.value,
|
|
});
|
|
Object.defineProperty(routerHistory, 'state', {
|
|
enumerable: true,
|
|
get: () => historyNavigation.state.value,
|
|
});
|
|
return routerHistory;
|
|
}
|
|
|
|
/**
|
|
* Creates an in-memory based history. The main purpose of this history is to handle SSR. It starts in a special location that is nowhere.
|
|
* It's up to the user to replace that location with the starter location by either calling `router.push` or `router.replace`.
|
|
*
|
|
* @param base - Base applied to all urls, defaults to '/'
|
|
* @returns a history object that can be passed to the router constructor
|
|
*/
|
|
function createMemoryHistory(base = '') {
|
|
let listeners = [];
|
|
let queue = [START];
|
|
let position = 0;
|
|
base = normalizeBase(base);
|
|
function setLocation(location) {
|
|
position++;
|
|
if (position === queue.length) {
|
|
// we are at the end, we can simply append a new entry
|
|
queue.push(location);
|
|
}
|
|
else {
|
|
// we are in the middle, we remove everything from here in the queue
|
|
queue.splice(position);
|
|
queue.push(location);
|
|
}
|
|
}
|
|
function triggerListeners(to, from, { direction, delta }) {
|
|
const info = {
|
|
direction,
|
|
delta,
|
|
type: NavigationType.pop,
|
|
};
|
|
for (const callback of listeners) {
|
|
callback(to, from, info);
|
|
}
|
|
}
|
|
const routerHistory = {
|
|
// rewritten by Object.defineProperty
|
|
location: START,
|
|
// TODO: should be kept in queue
|
|
state: {},
|
|
base,
|
|
createHref: createHref.bind(null, base),
|
|
replace(to) {
|
|
// remove current entry and decrement position
|
|
queue.splice(position--, 1);
|
|
setLocation(to);
|
|
},
|
|
push(to, data) {
|
|
setLocation(to);
|
|
},
|
|
listen(callback) {
|
|
listeners.push(callback);
|
|
return () => {
|
|
const index = listeners.indexOf(callback);
|
|
if (index > -1)
|
|
listeners.splice(index, 1);
|
|
};
|
|
},
|
|
destroy() {
|
|
listeners = [];
|
|
queue = [START];
|
|
position = 0;
|
|
},
|
|
go(delta, shouldTrigger = true) {
|
|
const from = this.location;
|
|
const direction =
|
|
// we are considering delta === 0 going forward, but in abstract mode
|
|
// using 0 for the delta doesn't make sense like it does in html5 where
|
|
// it reloads the page
|
|
delta < 0 ? NavigationDirection.back : NavigationDirection.forward;
|
|
position = Math.max(0, Math.min(position + delta, queue.length - 1));
|
|
if (shouldTrigger) {
|
|
triggerListeners(this.location, from, {
|
|
direction,
|
|
delta,
|
|
});
|
|
}
|
|
},
|
|
};
|
|
Object.defineProperty(routerHistory, 'location', {
|
|
enumerable: true,
|
|
get: () => queue[position],
|
|
});
|
|
return routerHistory;
|
|
}
|
|
|
|
/**
|
|
* Creates a hash history. Useful for web applications with no host (e.g. `file://`) or when configuring a server to
|
|
* handle any URL is not possible.
|
|
*
|
|
* @param base - optional base to provide. Defaults to `location.pathname + location.search` If there is a `<base>` tag
|
|
* in the `head`, its value will be ignored in favor of this parameter **but note it affects all the history.pushState()
|
|
* calls**, meaning that if you use a `<base>` tag, it's `href` value **has to match this parameter** (ignoring anything
|
|
* after the `#`).
|
|
*
|
|
* @example
|
|
* ```js
|
|
* // at https://example.com/folder
|
|
* createWebHashHistory() // gives a url of `https://example.com/folder#`
|
|
* createWebHashHistory('/folder/') // gives a url of `https://example.com/folder/#`
|
|
* // if the `#` is provided in the base, it won't be added by `createWebHashHistory`
|
|
* createWebHashHistory('/folder/#/app/') // gives a url of `https://example.com/folder/#/app/`
|
|
* // you should avoid doing this because it changes the original url and breaks copying urls
|
|
* createWebHashHistory('/other-folder/') // gives a url of `https://example.com/other-folder/#`
|
|
*
|
|
* // at file:///usr/etc/folder/index.html
|
|
* // for locations with no `host`, the base is ignored
|
|
* createWebHashHistory('/iAmIgnored') // gives a url of `file:///usr/etc/folder/index.html#`
|
|
* ```
|
|
*/
|
|
function createWebHashHistory(base) {
|
|
// Make sure this implementation is fine in terms of encoding, specially for IE11
|
|
// for `file://`, directly use the pathname and ignore the base
|
|
// location.pathname contains an initial `/` even at the root: `https://example.com`
|
|
base = location.host ? base || location.pathname + location.search : '';
|
|
// allow the user to provide a `#` in the middle: `/base/#/app`
|
|
if (!base.includes('#'))
|
|
base += '#';
|
|
if (( true) && !base.endsWith('#/') && !base.endsWith('#')) {
|
|
warn(`A hash base must end with a "#":\n"${base}" should be "${base.replace(/#.*$/, '#')}".`);
|
|
}
|
|
return createWebHistory(base);
|
|
}
|
|
|
|
function isRouteLocation(route) {
|
|
return typeof route === 'string' || (route && typeof route === 'object');
|
|
}
|
|
function isRouteName(name) {
|
|
return typeof name === 'string' || typeof name === 'symbol';
|
|
}
|
|
|
|
/**
|
|
* Initial route location where the router is. Can be used in navigation guards
|
|
* to differentiate the initial navigation.
|
|
*
|
|
* @example
|
|
* ```js
|
|
* import { START_LOCATION } from 'vue-router'
|
|
*
|
|
* router.beforeEach((to, from) => {
|
|
* if (from === START_LOCATION) {
|
|
* // initial navigation
|
|
* }
|
|
* })
|
|
* ```
|
|
*/
|
|
const START_LOCATION_NORMALIZED = {
|
|
path: '/',
|
|
name: undefined,
|
|
params: {},
|
|
query: {},
|
|
hash: '',
|
|
fullPath: '/',
|
|
matched: [],
|
|
meta: {},
|
|
redirectedFrom: undefined,
|
|
};
|
|
|
|
const NavigationFailureSymbol = Symbol(( true) ? 'navigation failure' : 0);
|
|
/**
|
|
* Enumeration with all possible types for navigation failures. Can be passed to
|
|
* {@link isNavigationFailure} to check for specific failures.
|
|
*/
|
|
var NavigationFailureType;
|
|
(function (NavigationFailureType) {
|
|
/**
|
|
* An aborted navigation is a navigation that failed because a navigation
|
|
* guard returned `false` or called `next(false)`
|
|
*/
|
|
NavigationFailureType[NavigationFailureType["aborted"] = 4] = "aborted";
|
|
/**
|
|
* A cancelled navigation is a navigation that failed because a more recent
|
|
* navigation finished started (not necessarily finished).
|
|
*/
|
|
NavigationFailureType[NavigationFailureType["cancelled"] = 8] = "cancelled";
|
|
/**
|
|
* A duplicated navigation is a navigation that failed because it was
|
|
* initiated while already being at the exact same location.
|
|
*/
|
|
NavigationFailureType[NavigationFailureType["duplicated"] = 16] = "duplicated";
|
|
})(NavigationFailureType || (NavigationFailureType = {}));
|
|
// DEV only debug messages
|
|
const ErrorTypeMessages = {
|
|
[1 /* ErrorTypes.MATCHER_NOT_FOUND */]({ location, currentLocation }) {
|
|
return `No match for\n ${JSON.stringify(location)}${currentLocation
|
|
? '\nwhile being at\n' + JSON.stringify(currentLocation)
|
|
: ''}`;
|
|
},
|
|
[2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */]({ from, to, }) {
|
|
return `Redirected from "${from.fullPath}" to "${stringifyRoute(to)}" via a navigation guard.`;
|
|
},
|
|
[4 /* ErrorTypes.NAVIGATION_ABORTED */]({ from, to }) {
|
|
return `Navigation aborted from "${from.fullPath}" to "${to.fullPath}" via a navigation guard.`;
|
|
},
|
|
[8 /* ErrorTypes.NAVIGATION_CANCELLED */]({ from, to }) {
|
|
return `Navigation cancelled from "${from.fullPath}" to "${to.fullPath}" with a new navigation.`;
|
|
},
|
|
[16 /* ErrorTypes.NAVIGATION_DUPLICATED */]({ from, to }) {
|
|
return `Avoided redundant navigation to current location: "${from.fullPath}".`;
|
|
},
|
|
};
|
|
function createRouterError(type, params) {
|
|
// keep full error messages in cjs versions
|
|
if (true) {
|
|
return assign(new Error(ErrorTypeMessages[type](params)), {
|
|
type,
|
|
[NavigationFailureSymbol]: true,
|
|
}, params);
|
|
}
|
|
else {}
|
|
}
|
|
function isNavigationFailure(error, type) {
|
|
return (error instanceof Error &&
|
|
NavigationFailureSymbol in error &&
|
|
(type == null || !!(error.type & type)));
|
|
}
|
|
const propertiesToLog = ['params', 'query', 'hash'];
|
|
function stringifyRoute(to) {
|
|
if (typeof to === 'string')
|
|
return to;
|
|
if ('path' in to)
|
|
return to.path;
|
|
const location = {};
|
|
for (const key of propertiesToLog) {
|
|
if (key in to)
|
|
location[key] = to[key];
|
|
}
|
|
return JSON.stringify(location, null, 2);
|
|
}
|
|
|
|
// default pattern for a param: non-greedy everything but /
|
|
const BASE_PARAM_PATTERN = '[^/]+?';
|
|
const BASE_PATH_PARSER_OPTIONS = {
|
|
sensitive: false,
|
|
strict: false,
|
|
start: true,
|
|
end: true,
|
|
};
|
|
// Special Regex characters that must be escaped in static tokens
|
|
const REGEX_CHARS_RE = /[.+*?^${}()[\]/\\]/g;
|
|
/**
|
|
* Creates a path parser from an array of Segments (a segment is an array of Tokens)
|
|
*
|
|
* @param segments - array of segments returned by tokenizePath
|
|
* @param extraOptions - optional options for the regexp
|
|
* @returns a PathParser
|
|
*/
|
|
function tokensToParser(segments, extraOptions) {
|
|
const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);
|
|
// the amount of scores is the same as the length of segments except for the root segment "/"
|
|
const score = [];
|
|
// the regexp as a string
|
|
let pattern = options.start ? '^' : '';
|
|
// extracted keys
|
|
const keys = [];
|
|
for (const segment of segments) {
|
|
// the root segment needs special treatment
|
|
const segmentScores = segment.length ? [] : [90 /* PathScore.Root */];
|
|
// allow trailing slash
|
|
if (options.strict && !segment.length)
|
|
pattern += '/';
|
|
for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {
|
|
const token = segment[tokenIndex];
|
|
// resets the score if we are inside a sub-segment /:a-other-:b
|
|
let subSegmentScore = 40 /* PathScore.Segment */ +
|
|
(options.sensitive ? 0.25 /* PathScore.BonusCaseSensitive */ : 0);
|
|
if (token.type === 0 /* TokenType.Static */) {
|
|
// prepend the slash if we are starting a new segment
|
|
if (!tokenIndex)
|
|
pattern += '/';
|
|
pattern += token.value.replace(REGEX_CHARS_RE, '\\$&');
|
|
subSegmentScore += 40 /* PathScore.Static */;
|
|
}
|
|
else if (token.type === 1 /* TokenType.Param */) {
|
|
const { value, repeatable, optional, regexp } = token;
|
|
keys.push({
|
|
name: value,
|
|
repeatable,
|
|
optional,
|
|
});
|
|
const re = regexp ? regexp : BASE_PARAM_PATTERN;
|
|
// the user provided a custom regexp /:id(\\d+)
|
|
if (re !== BASE_PARAM_PATTERN) {
|
|
subSegmentScore += 10 /* PathScore.BonusCustomRegExp */;
|
|
// make sure the regexp is valid before using it
|
|
try {
|
|
new RegExp(`(${re})`);
|
|
}
|
|
catch (err) {
|
|
throw new Error(`Invalid custom RegExp for param "${value}" (${re}): ` +
|
|
err.message);
|
|
}
|
|
}
|
|
// when we repeat we must take care of the repeating leading slash
|
|
let subPattern = repeatable ? `((?:${re})(?:/(?:${re}))*)` : `(${re})`;
|
|
// prepend the slash if we are starting a new segment
|
|
if (!tokenIndex)
|
|
subPattern =
|
|
// avoid an optional / if there are more segments e.g. /:p?-static
|
|
// or /:p?-:p2
|
|
optional && segment.length < 2
|
|
? `(?:/${subPattern})`
|
|
: '/' + subPattern;
|
|
if (optional)
|
|
subPattern += '?';
|
|
pattern += subPattern;
|
|
subSegmentScore += 20 /* PathScore.Dynamic */;
|
|
if (optional)
|
|
subSegmentScore += -8 /* PathScore.BonusOptional */;
|
|
if (repeatable)
|
|
subSegmentScore += -20 /* PathScore.BonusRepeatable */;
|
|
if (re === '.*')
|
|
subSegmentScore += -50 /* PathScore.BonusWildcard */;
|
|
}
|
|
segmentScores.push(subSegmentScore);
|
|
}
|
|
// an empty array like /home/ -> [[{home}], []]
|
|
// if (!segment.length) pattern += '/'
|
|
score.push(segmentScores);
|
|
}
|
|
// only apply the strict bonus to the last score
|
|
if (options.strict && options.end) {
|
|
const i = score.length - 1;
|
|
score[i][score[i].length - 1] += 0.7000000000000001 /* PathScore.BonusStrict */;
|
|
}
|
|
// TODO: dev only warn double trailing slash
|
|
if (!options.strict)
|
|
pattern += '/?';
|
|
if (options.end)
|
|
pattern += '$';
|
|
// allow paths like /dynamic to only match dynamic or dynamic/... but not dynamic_something_else
|
|
else if (options.strict)
|
|
pattern += '(?:/|$)';
|
|
const re = new RegExp(pattern, options.sensitive ? '' : 'i');
|
|
function parse(path) {
|
|
const match = path.match(re);
|
|
const params = {};
|
|
if (!match)
|
|
return null;
|
|
for (let i = 1; i < match.length; i++) {
|
|
const value = match[i] || '';
|
|
const key = keys[i - 1];
|
|
params[key.name] = value && key.repeatable ? value.split('/') : value;
|
|
}
|
|
return params;
|
|
}
|
|
function stringify(params) {
|
|
let path = '';
|
|
// for optional parameters to allow to be empty
|
|
let avoidDuplicatedSlash = false;
|
|
for (const segment of segments) {
|
|
if (!avoidDuplicatedSlash || !path.endsWith('/'))
|
|
path += '/';
|
|
avoidDuplicatedSlash = false;
|
|
for (const token of segment) {
|
|
if (token.type === 0 /* TokenType.Static */) {
|
|
path += token.value;
|
|
}
|
|
else if (token.type === 1 /* TokenType.Param */) {
|
|
const { value, repeatable, optional } = token;
|
|
const param = value in params ? params[value] : '';
|
|
if (isArray(param) && !repeatable) {
|
|
throw new Error(`Provided param "${value}" is an array but it is not repeatable (* or + modifiers)`);
|
|
}
|
|
const text = isArray(param)
|
|
? param.join('/')
|
|
: param;
|
|
if (!text) {
|
|
if (optional) {
|
|
// if we have more than one optional param like /:a?-static we don't need to care about the optional param
|
|
if (segment.length < 2) {
|
|
// remove the last slash as we could be at the end
|
|
if (path.endsWith('/'))
|
|
path = path.slice(0, -1);
|
|
// do not append a slash on the next iteration
|
|
else
|
|
avoidDuplicatedSlash = true;
|
|
}
|
|
}
|
|
else
|
|
throw new Error(`Missing required param "${value}"`);
|
|
}
|
|
path += text;
|
|
}
|
|
}
|
|
}
|
|
// avoid empty path when we have multiple optional params
|
|
return path || '/';
|
|
}
|
|
return {
|
|
re,
|
|
score,
|
|
keys,
|
|
parse,
|
|
stringify,
|
|
};
|
|
}
|
|
/**
|
|
* Compares an array of numbers as used in PathParser.score and returns a
|
|
* number. This function can be used to `sort` an array
|
|
*
|
|
* @param a - first array of numbers
|
|
* @param b - second array of numbers
|
|
* @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b
|
|
* should be sorted first
|
|
*/
|
|
function compareScoreArray(a, b) {
|
|
let i = 0;
|
|
while (i < a.length && i < b.length) {
|
|
const diff = b[i] - a[i];
|
|
// only keep going if diff === 0
|
|
if (diff)
|
|
return diff;
|
|
i++;
|
|
}
|
|
// if the last subsegment was Static, the shorter segments should be sorted first
|
|
// otherwise sort the longest segment first
|
|
if (a.length < b.length) {
|
|
return a.length === 1 && a[0] === 40 /* PathScore.Static */ + 40 /* PathScore.Segment */
|
|
? -1
|
|
: 1;
|
|
}
|
|
else if (a.length > b.length) {
|
|
return b.length === 1 && b[0] === 40 /* PathScore.Static */ + 40 /* PathScore.Segment */
|
|
? 1
|
|
: -1;
|
|
}
|
|
return 0;
|
|
}
|
|
/**
|
|
* Compare function that can be used with `sort` to sort an array of PathParser
|
|
*
|
|
* @param a - first PathParser
|
|
* @param b - second PathParser
|
|
* @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b
|
|
*/
|
|
function comparePathParserScore(a, b) {
|
|
let i = 0;
|
|
const aScore = a.score;
|
|
const bScore = b.score;
|
|
while (i < aScore.length && i < bScore.length) {
|
|
const comp = compareScoreArray(aScore[i], bScore[i]);
|
|
// do not return if both are equal
|
|
if (comp)
|
|
return comp;
|
|
i++;
|
|
}
|
|
if (Math.abs(bScore.length - aScore.length) === 1) {
|
|
if (isLastScoreNegative(aScore))
|
|
return 1;
|
|
if (isLastScoreNegative(bScore))
|
|
return -1;
|
|
}
|
|
// if a and b share the same score entries but b has more, sort b first
|
|
return bScore.length - aScore.length;
|
|
// this is the ternary version
|
|
// return aScore.length < bScore.length
|
|
// ? 1
|
|
// : aScore.length > bScore.length
|
|
// ? -1
|
|
// : 0
|
|
}
|
|
/**
|
|
* This allows detecting splats at the end of a path: /home/:id(.*)*
|
|
*
|
|
* @param score - score to check
|
|
* @returns true if the last entry is negative
|
|
*/
|
|
function isLastScoreNegative(score) {
|
|
const last = score[score.length - 1];
|
|
return score.length > 0 && last[last.length - 1] < 0;
|
|
}
|
|
|
|
const ROOT_TOKEN = {
|
|
type: 0 /* TokenType.Static */,
|
|
value: '',
|
|
};
|
|
const VALID_PARAM_RE = /[a-zA-Z0-9_]/;
|
|
// After some profiling, the cache seems to be unnecessary because tokenizePath
|
|
// (the slowest part of adding a route) is very fast
|
|
// const tokenCache = new Map<string, Token[][]>()
|
|
function tokenizePath(path) {
|
|
if (!path)
|
|
return [[]];
|
|
if (path === '/')
|
|
return [[ROOT_TOKEN]];
|
|
if (!path.startsWith('/')) {
|
|
throw new Error(( true)
|
|
? `Route paths should start with a "/": "${path}" should be "/${path}".`
|
|
: 0);
|
|
}
|
|
// if (tokenCache.has(path)) return tokenCache.get(path)!
|
|
function crash(message) {
|
|
throw new Error(`ERR (${state})/"${buffer}": ${message}`);
|
|
}
|
|
let state = 0 /* TokenizerState.Static */;
|
|
let previousState = state;
|
|
const tokens = [];
|
|
// the segment will always be valid because we get into the initial state
|
|
// with the leading /
|
|
let segment;
|
|
function finalizeSegment() {
|
|
if (segment)
|
|
tokens.push(segment);
|
|
segment = [];
|
|
}
|
|
// index on the path
|
|
let i = 0;
|
|
// char at index
|
|
let char;
|
|
// buffer of the value read
|
|
let buffer = '';
|
|
// custom regexp for a param
|
|
let customRe = '';
|
|
function consumeBuffer() {
|
|
if (!buffer)
|
|
return;
|
|
if (state === 0 /* TokenizerState.Static */) {
|
|
segment.push({
|
|
type: 0 /* TokenType.Static */,
|
|
value: buffer,
|
|
});
|
|
}
|
|
else if (state === 1 /* TokenizerState.Param */ ||
|
|
state === 2 /* TokenizerState.ParamRegExp */ ||
|
|
state === 3 /* TokenizerState.ParamRegExpEnd */) {
|
|
if (segment.length > 1 && (char === '*' || char === '+'))
|
|
crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);
|
|
segment.push({
|
|
type: 1 /* TokenType.Param */,
|
|
value: buffer,
|
|
regexp: customRe,
|
|
repeatable: char === '*' || char === '+',
|
|
optional: char === '*' || char === '?',
|
|
});
|
|
}
|
|
else {
|
|
crash('Invalid state to consume buffer');
|
|
}
|
|
buffer = '';
|
|
}
|
|
function addCharToBuffer() {
|
|
buffer += char;
|
|
}
|
|
while (i < path.length) {
|
|
char = path[i++];
|
|
if (char === '\\' && state !== 2 /* TokenizerState.ParamRegExp */) {
|
|
previousState = state;
|
|
state = 4 /* TokenizerState.EscapeNext */;
|
|
continue;
|
|
}
|
|
switch (state) {
|
|
case 0 /* TokenizerState.Static */:
|
|
if (char === '/') {
|
|
if (buffer) {
|
|
consumeBuffer();
|
|
}
|
|
finalizeSegment();
|
|
}
|
|
else if (char === ':') {
|
|
consumeBuffer();
|
|
state = 1 /* TokenizerState.Param */;
|
|
}
|
|
else {
|
|
addCharToBuffer();
|
|
}
|
|
break;
|
|
case 4 /* TokenizerState.EscapeNext */:
|
|
addCharToBuffer();
|
|
state = previousState;
|
|
break;
|
|
case 1 /* TokenizerState.Param */:
|
|
if (char === '(') {
|
|
state = 2 /* TokenizerState.ParamRegExp */;
|
|
}
|
|
else if (VALID_PARAM_RE.test(char)) {
|
|
addCharToBuffer();
|
|
}
|
|
else {
|
|
consumeBuffer();
|
|
state = 0 /* TokenizerState.Static */;
|
|
// go back one character if we were not modifying
|
|
if (char !== '*' && char !== '?' && char !== '+')
|
|
i--;
|
|
}
|
|
break;
|
|
case 2 /* TokenizerState.ParamRegExp */:
|
|
// TODO: is it worth handling nested regexp? like :p(?:prefix_([^/]+)_suffix)
|
|
// it already works by escaping the closing )
|
|
// https://paths.esm.dev/?p=AAMeJbiAwQEcDKbAoAAkP60PG2R6QAvgNaA6AFACM2ABuQBB#
|
|
// is this really something people need since you can also write
|
|
// /prefix_:p()_suffix
|
|
if (char === ')') {
|
|
// handle the escaped )
|
|
if (customRe[customRe.length - 1] == '\\')
|
|
customRe = customRe.slice(0, -1) + char;
|
|
else
|
|
state = 3 /* TokenizerState.ParamRegExpEnd */;
|
|
}
|
|
else {
|
|
customRe += char;
|
|
}
|
|
break;
|
|
case 3 /* TokenizerState.ParamRegExpEnd */:
|
|
// same as finalizing a param
|
|
consumeBuffer();
|
|
state = 0 /* TokenizerState.Static */;
|
|
// go back one character if we were not modifying
|
|
if (char !== '*' && char !== '?' && char !== '+')
|
|
i--;
|
|
customRe = '';
|
|
break;
|
|
default:
|
|
crash('Unknown state');
|
|
break;
|
|
}
|
|
}
|
|
if (state === 2 /* TokenizerState.ParamRegExp */)
|
|
crash(`Unfinished custom RegExp for param "${buffer}"`);
|
|
consumeBuffer();
|
|
finalizeSegment();
|
|
// tokenCache.set(path, tokens)
|
|
return tokens;
|
|
}
|
|
|
|
function createRouteRecordMatcher(record, parent, options) {
|
|
const parser = tokensToParser(tokenizePath(record.path), options);
|
|
// warn against params with the same name
|
|
if ((true)) {
|
|
const existingKeys = new Set();
|
|
for (const key of parser.keys) {
|
|
if (existingKeys.has(key.name))
|
|
warn(`Found duplicated params with name "${key.name}" for path "${record.path}". Only the last one will be available on "$route.params".`);
|
|
existingKeys.add(key.name);
|
|
}
|
|
}
|
|
const matcher = assign(parser, {
|
|
record,
|
|
parent,
|
|
// these needs to be populated by the parent
|
|
children: [],
|
|
alias: [],
|
|
});
|
|
if (parent) {
|
|
// both are aliases or both are not aliases
|
|
// we don't want to mix them because the order is used when
|
|
// passing originalRecord in Matcher.addRoute
|
|
if (!matcher.record.aliasOf === !parent.record.aliasOf)
|
|
parent.children.push(matcher);
|
|
}
|
|
return matcher;
|
|
}
|
|
|
|
/**
|
|
* Creates a Router Matcher.
|
|
*
|
|
* @internal
|
|
* @param routes - array of initial routes
|
|
* @param globalOptions - global route options
|
|
*/
|
|
function createRouterMatcher(routes, globalOptions) {
|
|
// normalized ordered array of matchers
|
|
const matchers = [];
|
|
const matcherMap = new Map();
|
|
globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions);
|
|
function getRecordMatcher(name) {
|
|
return matcherMap.get(name);
|
|
}
|
|
function addRoute(record, parent, originalRecord) {
|
|
// used later on to remove by name
|
|
const isRootAdd = !originalRecord;
|
|
const mainNormalizedRecord = normalizeRouteRecord(record);
|
|
if ((true)) {
|
|
checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);
|
|
}
|
|
// we might be the child of an alias
|
|
mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;
|
|
const options = mergeOptions(globalOptions, record);
|
|
// generate an array of records to correctly handle aliases
|
|
const normalizedRecords = [
|
|
mainNormalizedRecord,
|
|
];
|
|
if ('alias' in record) {
|
|
const aliases = typeof record.alias === 'string' ? [record.alias] : record.alias;
|
|
for (const alias of aliases) {
|
|
normalizedRecords.push(assign({}, mainNormalizedRecord, {
|
|
// this allows us to hold a copy of the `components` option
|
|
// so that async components cache is hold on the original record
|
|
components: originalRecord
|
|
? originalRecord.record.components
|
|
: mainNormalizedRecord.components,
|
|
path: alias,
|
|
// we might be the child of an alias
|
|
aliasOf: originalRecord
|
|
? originalRecord.record
|
|
: mainNormalizedRecord,
|
|
// the aliases are always of the same kind as the original since they
|
|
// are defined on the same record
|
|
}));
|
|
}
|
|
}
|
|
let matcher;
|
|
let originalMatcher;
|
|
for (const normalizedRecord of normalizedRecords) {
|
|
const { path } = normalizedRecord;
|
|
// Build up the path for nested routes if the child isn't an absolute
|
|
// route. Only add the / delimiter if the child path isn't empty and if the
|
|
// parent path doesn't have a trailing slash
|
|
if (parent && path[0] !== '/') {
|
|
const parentPath = parent.record.path;
|
|
const connectingSlash = parentPath[parentPath.length - 1] === '/' ? '' : '/';
|
|
normalizedRecord.path =
|
|
parent.record.path + (path && connectingSlash + path);
|
|
}
|
|
if (( true) && normalizedRecord.path === '*') {
|
|
throw new Error('Catch all routes ("*") must now be defined using a param with a custom regexp.\n' +
|
|
'See more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes.');
|
|
}
|
|
// create the object beforehand, so it can be passed to children
|
|
matcher = createRouteRecordMatcher(normalizedRecord, parent, options);
|
|
if (( true) && parent && path[0] === '/')
|
|
checkMissingParamsInAbsolutePath(matcher, parent);
|
|
// if we are an alias we must tell the original record that we exist,
|
|
// so we can be removed
|
|
if (originalRecord) {
|
|
originalRecord.alias.push(matcher);
|
|
if ((true)) {
|
|
checkSameParams(originalRecord, matcher);
|
|
}
|
|
}
|
|
else {
|
|
// otherwise, the first record is the original and others are aliases
|
|
originalMatcher = originalMatcher || matcher;
|
|
if (originalMatcher !== matcher)
|
|
originalMatcher.alias.push(matcher);
|
|
// remove the route if named and only for the top record (avoid in nested calls)
|
|
// this works because the original record is the first one
|
|
if (isRootAdd && record.name && !isAliasRecord(matcher))
|
|
removeRoute(record.name);
|
|
}
|
|
if (mainNormalizedRecord.children) {
|
|
const children = mainNormalizedRecord.children;
|
|
for (let i = 0; i < children.length; i++) {
|
|
addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);
|
|
}
|
|
}
|
|
// if there was no original record, then the first one was not an alias and all
|
|
// other aliases (if any) need to reference this record when adding children
|
|
originalRecord = originalRecord || matcher;
|
|
// TODO: add normalized records for more flexibility
|
|
// if (parent && isAliasRecord(originalRecord)) {
|
|
// parent.children.push(originalRecord)
|
|
// }
|
|
// Avoid adding a record that doesn't display anything. This allows passing through records without a component to
|
|
// not be reached and pass through the catch all route
|
|
if ((matcher.record.components &&
|
|
Object.keys(matcher.record.components).length) ||
|
|
matcher.record.name ||
|
|
matcher.record.redirect) {
|
|
insertMatcher(matcher);
|
|
}
|
|
}
|
|
return originalMatcher
|
|
? () => {
|
|
// since other matchers are aliases, they should be removed by the original matcher
|
|
removeRoute(originalMatcher);
|
|
}
|
|
: noop;
|
|
}
|
|
function removeRoute(matcherRef) {
|
|
if (isRouteName(matcherRef)) {
|
|
const matcher = matcherMap.get(matcherRef);
|
|
if (matcher) {
|
|
matcherMap.delete(matcherRef);
|
|
matchers.splice(matchers.indexOf(matcher), 1);
|
|
matcher.children.forEach(removeRoute);
|
|
matcher.alias.forEach(removeRoute);
|
|
}
|
|
}
|
|
else {
|
|
const index = matchers.indexOf(matcherRef);
|
|
if (index > -1) {
|
|
matchers.splice(index, 1);
|
|
if (matcherRef.record.name)
|
|
matcherMap.delete(matcherRef.record.name);
|
|
matcherRef.children.forEach(removeRoute);
|
|
matcherRef.alias.forEach(removeRoute);
|
|
}
|
|
}
|
|
}
|
|
function getRoutes() {
|
|
return matchers;
|
|
}
|
|
function insertMatcher(matcher) {
|
|
let i = 0;
|
|
while (i < matchers.length &&
|
|
comparePathParserScore(matcher, matchers[i]) >= 0 &&
|
|
// Adding children with empty path should still appear before the parent
|
|
// https://github.com/vuejs/router/issues/1124
|
|
(matcher.record.path !== matchers[i].record.path ||
|
|
!isRecordChildOf(matcher, matchers[i])))
|
|
i++;
|
|
matchers.splice(i, 0, matcher);
|
|
// only add the original record to the name map
|
|
if (matcher.record.name && !isAliasRecord(matcher))
|
|
matcherMap.set(matcher.record.name, matcher);
|
|
}
|
|
function resolve(location, currentLocation) {
|
|
let matcher;
|
|
let params = {};
|
|
let path;
|
|
let name;
|
|
if ('name' in location && location.name) {
|
|
matcher = matcherMap.get(location.name);
|
|
if (!matcher)
|
|
throw createRouterError(1 /* ErrorTypes.MATCHER_NOT_FOUND */, {
|
|
location,
|
|
});
|
|
// warn if the user is passing invalid params so they can debug it better when they get removed
|
|
if ((true)) {
|
|
const invalidParams = Object.keys(location.params || {}).filter(paramName => !matcher.keys.find(k => k.name === paramName));
|
|
if (invalidParams.length) {
|
|
warn(`Discarded invalid param(s) "${invalidParams.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);
|
|
}
|
|
}
|
|
name = matcher.record.name;
|
|
params = assign(
|
|
// paramsFromLocation is a new object
|
|
paramsFromLocation(currentLocation.params,
|
|
// only keep params that exist in the resolved location
|
|
// TODO: only keep optional params coming from a parent record
|
|
matcher.keys.filter(k => !k.optional).map(k => k.name)),
|
|
// discard any existing params in the current location that do not exist here
|
|
// #1497 this ensures better active/exact matching
|
|
location.params &&
|
|
paramsFromLocation(location.params, matcher.keys.map(k => k.name)));
|
|
// throws if cannot be stringified
|
|
path = matcher.stringify(params);
|
|
}
|
|
else if ('path' in location) {
|
|
// no need to resolve the path with the matcher as it was provided
|
|
// this also allows the user to control the encoding
|
|
path = location.path;
|
|
if (( true) && !path.startsWith('/')) {
|
|
warn(`The Matcher cannot resolve relative paths but received "${path}". Unless you directly called \`matcher.resolve("${path}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`);
|
|
}
|
|
matcher = matchers.find(m => m.re.test(path));
|
|
// matcher should have a value after the loop
|
|
if (matcher) {
|
|
// we know the matcher works because we tested the regexp
|
|
params = matcher.parse(path);
|
|
name = matcher.record.name;
|
|
}
|
|
// location is a relative path
|
|
}
|
|
else {
|
|
// match by name or path of current route
|
|
matcher = currentLocation.name
|
|
? matcherMap.get(currentLocation.name)
|
|
: matchers.find(m => m.re.test(currentLocation.path));
|
|
if (!matcher)
|
|
throw createRouterError(1 /* ErrorTypes.MATCHER_NOT_FOUND */, {
|
|
location,
|
|
currentLocation,
|
|
});
|
|
name = matcher.record.name;
|
|
// since we are navigating to the same location, we don't need to pick the
|
|
// params like when `name` is provided
|
|
params = assign({}, currentLocation.params, location.params);
|
|
path = matcher.stringify(params);
|
|
}
|
|
const matched = [];
|
|
let parentMatcher = matcher;
|
|
while (parentMatcher) {
|
|
// reversed order so parents are at the beginning
|
|
matched.unshift(parentMatcher.record);
|
|
parentMatcher = parentMatcher.parent;
|
|
}
|
|
return {
|
|
name,
|
|
path,
|
|
params,
|
|
matched,
|
|
meta: mergeMetaFields(matched),
|
|
};
|
|
}
|
|
// add initial routes
|
|
routes.forEach(route => addRoute(route));
|
|
return { addRoute, resolve, removeRoute, getRoutes, getRecordMatcher };
|
|
}
|
|
function paramsFromLocation(params, keys) {
|
|
const newParams = {};
|
|
for (const key of keys) {
|
|
if (key in params)
|
|
newParams[key] = params[key];
|
|
}
|
|
return newParams;
|
|
}
|
|
/**
|
|
* Normalizes a RouteRecordRaw. Creates a copy
|
|
*
|
|
* @param record
|
|
* @returns the normalized version
|
|
*/
|
|
function normalizeRouteRecord(record) {
|
|
return {
|
|
path: record.path,
|
|
redirect: record.redirect,
|
|
name: record.name,
|
|
meta: record.meta || {},
|
|
aliasOf: undefined,
|
|
beforeEnter: record.beforeEnter,
|
|
props: normalizeRecordProps(record),
|
|
children: record.children || [],
|
|
instances: {},
|
|
leaveGuards: new Set(),
|
|
updateGuards: new Set(),
|
|
enterCallbacks: {},
|
|
components: 'components' in record
|
|
? record.components || null
|
|
: record.component && { default: record.component },
|
|
};
|
|
}
|
|
/**
|
|
* Normalize the optional `props` in a record to always be an object similar to
|
|
* components. Also accept a boolean for components.
|
|
* @param record
|
|
*/
|
|
function normalizeRecordProps(record) {
|
|
const propsObject = {};
|
|
// props does not exist on redirect records, but we can set false directly
|
|
const props = record.props || false;
|
|
if ('component' in record) {
|
|
propsObject.default = props;
|
|
}
|
|
else {
|
|
// NOTE: we could also allow a function to be applied to every component.
|
|
// Would need user feedback for use cases
|
|
for (const name in record.components)
|
|
propsObject[name] = typeof props === 'object' ? props[name] : props;
|
|
}
|
|
return propsObject;
|
|
}
|
|
/**
|
|
* Checks if a record or any of its parent is an alias
|
|
* @param record
|
|
*/
|
|
function isAliasRecord(record) {
|
|
while (record) {
|
|
if (record.record.aliasOf)
|
|
return true;
|
|
record = record.parent;
|
|
}
|
|
return false;
|
|
}
|
|
/**
|
|
* Merge meta fields of an array of records
|
|
*
|
|
* @param matched - array of matched records
|
|
*/
|
|
function mergeMetaFields(matched) {
|
|
return matched.reduce((meta, record) => assign(meta, record.meta), {});
|
|
}
|
|
function mergeOptions(defaults, partialOptions) {
|
|
const options = {};
|
|
for (const key in defaults) {
|
|
options[key] = key in partialOptions ? partialOptions[key] : defaults[key];
|
|
}
|
|
return options;
|
|
}
|
|
function isSameParam(a, b) {
|
|
return (a.name === b.name &&
|
|
a.optional === b.optional &&
|
|
a.repeatable === b.repeatable);
|
|
}
|
|
/**
|
|
* Check if a path and its alias have the same required params
|
|
*
|
|
* @param a - original record
|
|
* @param b - alias record
|
|
*/
|
|
function checkSameParams(a, b) {
|
|
for (const key of a.keys) {
|
|
if (!key.optional && !b.keys.find(isSameParam.bind(null, key)))
|
|
return warn(`Alias "${b.record.path}" and the original record: "${a.record.path}" must have the exact same param named "${key.name}"`);
|
|
}
|
|
for (const key of b.keys) {
|
|
if (!key.optional && !a.keys.find(isSameParam.bind(null, key)))
|
|
return warn(`Alias "${b.record.path}" and the original record: "${a.record.path}" must have the exact same param named "${key.name}"`);
|
|
}
|
|
}
|
|
/**
|
|
* A route with a name and a child with an empty path without a name should warn when adding the route
|
|
*
|
|
* @param mainNormalizedRecord - RouteRecordNormalized
|
|
* @param parent - RouteRecordMatcher
|
|
*/
|
|
function checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {
|
|
if (parent &&
|
|
parent.record.name &&
|
|
!mainNormalizedRecord.name &&
|
|
!mainNormalizedRecord.path) {
|
|
warn(`The route named "${String(parent.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);
|
|
}
|
|
}
|
|
function checkMissingParamsInAbsolutePath(record, parent) {
|
|
for (const key of parent.keys) {
|
|
if (!record.keys.find(isSameParam.bind(null, key)))
|
|
return warn(`Absolute path "${record.record.path}" must have the exact same param named "${key.name}" as its parent "${parent.record.path}".`);
|
|
}
|
|
}
|
|
function isRecordChildOf(record, parent) {
|
|
return parent.children.some(child => child === record || isRecordChildOf(record, child));
|
|
}
|
|
|
|
/**
|
|
* Encoding Rules ␣ = Space Path: ␣ " < > # ? { } Query: ␣ " < > # & = Hash: ␣ "
|
|
* < > `
|
|
*
|
|
* On top of that, the RFC3986 (https://tools.ietf.org/html/rfc3986#section-2.2)
|
|
* defines some extra characters to be encoded. Most browsers do not encode them
|
|
* in encodeURI https://github.com/whatwg/url/issues/369, so it may be safer to
|
|
* also encode `!'()*`. Leaving un-encoded only ASCII alphanumeric(`a-zA-Z0-9`)
|
|
* plus `-._~`. This extra safety should be applied to query by patching the
|
|
* string returned by encodeURIComponent encodeURI also encodes `[\]^`. `\`
|
|
* should be encoded to avoid ambiguity. Browsers (IE, FF, C) transform a `\`
|
|
* into a `/` if directly typed in. The _backtick_ (`````) should also be
|
|
* encoded everywhere because some browsers like FF encode it when directly
|
|
* written while others don't. Safari and IE don't encode ``"<>{}``` in hash.
|
|
*/
|
|
// const EXTRA_RESERVED_RE = /[!'()*]/g
|
|
// const encodeReservedReplacer = (c: string) => '%' + c.charCodeAt(0).toString(16)
|
|
const HASH_RE = /#/g; // %23
|
|
const AMPERSAND_RE = /&/g; // %26
|
|
const SLASH_RE = /\//g; // %2F
|
|
const EQUAL_RE = /=/g; // %3D
|
|
const IM_RE = /\?/g; // %3F
|
|
const PLUS_RE = /\+/g; // %2B
|
|
/**
|
|
* NOTE: It's not clear to me if we should encode the + symbol in queries, it
|
|
* seems to be less flexible than not doing so and I can't find out the legacy
|
|
* systems requiring this for regular requests like text/html. In the standard,
|
|
* the encoding of the plus character is only mentioned for
|
|
* application/x-www-form-urlencoded
|
|
* (https://url.spec.whatwg.org/#urlencoded-parsing) and most browsers seems lo
|
|
* leave the plus character as is in queries. To be more flexible, we allow the
|
|
* plus character on the query, but it can also be manually encoded by the user.
|
|
*
|
|
* Resources:
|
|
* - https://url.spec.whatwg.org/#urlencoded-parsing
|
|
* - https://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20
|
|
*/
|
|
const ENC_BRACKET_OPEN_RE = /%5B/g; // [
|
|
const ENC_BRACKET_CLOSE_RE = /%5D/g; // ]
|
|
const ENC_CARET_RE = /%5E/g; // ^
|
|
const ENC_BACKTICK_RE = /%60/g; // `
|
|
const ENC_CURLY_OPEN_RE = /%7B/g; // {
|
|
const ENC_PIPE_RE = /%7C/g; // |
|
|
const ENC_CURLY_CLOSE_RE = /%7D/g; // }
|
|
const ENC_SPACE_RE = /%20/g; // }
|
|
/**
|
|
* Encode characters that need to be encoded on the path, search and hash
|
|
* sections of the URL.
|
|
*
|
|
* @internal
|
|
* @param text - string to encode
|
|
* @returns encoded string
|
|
*/
|
|
function commonEncode(text) {
|
|
return encodeURI('' + text)
|
|
.replace(ENC_PIPE_RE, '|')
|
|
.replace(ENC_BRACKET_OPEN_RE, '[')
|
|
.replace(ENC_BRACKET_CLOSE_RE, ']');
|
|
}
|
|
/**
|
|
* Encode characters that need to be encoded on the hash section of the URL.
|
|
*
|
|
* @param text - string to encode
|
|
* @returns encoded string
|
|
*/
|
|
function encodeHash(text) {
|
|
return commonEncode(text)
|
|
.replace(ENC_CURLY_OPEN_RE, '{')
|
|
.replace(ENC_CURLY_CLOSE_RE, '}')
|
|
.replace(ENC_CARET_RE, '^');
|
|
}
|
|
/**
|
|
* Encode characters that need to be encoded query values on the query
|
|
* section of the URL.
|
|
*
|
|
* @param text - string to encode
|
|
* @returns encoded string
|
|
*/
|
|
function encodeQueryValue(text) {
|
|
return (commonEncode(text)
|
|
// Encode the space as +, encode the + to differentiate it from the space
|
|
.replace(PLUS_RE, '%2B')
|
|
.replace(ENC_SPACE_RE, '+')
|
|
.replace(HASH_RE, '%23')
|
|
.replace(AMPERSAND_RE, '%26')
|
|
.replace(ENC_BACKTICK_RE, '`')
|
|
.replace(ENC_CURLY_OPEN_RE, '{')
|
|
.replace(ENC_CURLY_CLOSE_RE, '}')
|
|
.replace(ENC_CARET_RE, '^'));
|
|
}
|
|
/**
|
|
* Like `encodeQueryValue` but also encodes the `=` character.
|
|
*
|
|
* @param text - string to encode
|
|
*/
|
|
function encodeQueryKey(text) {
|
|
return encodeQueryValue(text).replace(EQUAL_RE, '%3D');
|
|
}
|
|
/**
|
|
* Encode characters that need to be encoded on the path section of the URL.
|
|
*
|
|
* @param text - string to encode
|
|
* @returns encoded string
|
|
*/
|
|
function encodePath(text) {
|
|
return commonEncode(text).replace(HASH_RE, '%23').replace(IM_RE, '%3F');
|
|
}
|
|
/**
|
|
* Encode characters that need to be encoded on the path section of the URL as a
|
|
* param. This function encodes everything {@link encodePath} does plus the
|
|
* slash (`/`) character. If `text` is `null` or `undefined`, returns an empty
|
|
* string instead.
|
|
*
|
|
* @param text - string to encode
|
|
* @returns encoded string
|
|
*/
|
|
function encodeParam(text) {
|
|
return text == null ? '' : encodePath(text).replace(SLASH_RE, '%2F');
|
|
}
|
|
/**
|
|
* Decode text using `decodeURIComponent`. Returns the original text if it
|
|
* fails.
|
|
*
|
|
* @param text - string to decode
|
|
* @returns decoded string
|
|
*/
|
|
function decode(text) {
|
|
try {
|
|
return decodeURIComponent('' + text);
|
|
}
|
|
catch (err) {
|
|
( true) && warn(`Error decoding "${text}". Using original value`);
|
|
}
|
|
return '' + text;
|
|
}
|
|
|
|
/**
|
|
* Transforms a queryString into a {@link LocationQuery} object. Accept both, a
|
|
* version with the leading `?` and without Should work as URLSearchParams
|
|
|
|
* @internal
|
|
*
|
|
* @param search - search string to parse
|
|
* @returns a query object
|
|
*/
|
|
function parseQuery(search) {
|
|
const query = {};
|
|
// avoid creating an object with an empty key and empty value
|
|
// because of split('&')
|
|
if (search === '' || search === '?')
|
|
return query;
|
|
const hasLeadingIM = search[0] === '?';
|
|
const searchParams = (hasLeadingIM ? search.slice(1) : search).split('&');
|
|
for (let i = 0; i < searchParams.length; ++i) {
|
|
// pre decode the + into space
|
|
const searchParam = searchParams[i].replace(PLUS_RE, ' ');
|
|
// allow the = character
|
|
const eqPos = searchParam.indexOf('=');
|
|
const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));
|
|
const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));
|
|
if (key in query) {
|
|
// an extra variable for ts types
|
|
let currentValue = query[key];
|
|
if (!isArray(currentValue)) {
|
|
currentValue = query[key] = [currentValue];
|
|
}
|
|
currentValue.push(value);
|
|
}
|
|
else {
|
|
query[key] = value;
|
|
}
|
|
}
|
|
return query;
|
|
}
|
|
/**
|
|
* Stringifies a {@link LocationQueryRaw} object. Like `URLSearchParams`, it
|
|
* doesn't prepend a `?`
|
|
*
|
|
* @internal
|
|
*
|
|
* @param query - query object to stringify
|
|
* @returns string version of the query without the leading `?`
|
|
*/
|
|
function stringifyQuery(query) {
|
|
let search = '';
|
|
for (let key in query) {
|
|
const value = query[key];
|
|
key = encodeQueryKey(key);
|
|
if (value == null) {
|
|
// only null adds the value
|
|
if (value !== undefined) {
|
|
search += (search.length ? '&' : '') + key;
|
|
}
|
|
continue;
|
|
}
|
|
// keep null values
|
|
const values = isArray(value)
|
|
? value.map(v => v && encodeQueryValue(v))
|
|
: [value && encodeQueryValue(value)];
|
|
values.forEach(value => {
|
|
// skip undefined values in arrays as if they were not present
|
|
// smaller code than using filter
|
|
if (value !== undefined) {
|
|
// only append & with non-empty search
|
|
search += (search.length ? '&' : '') + key;
|
|
if (value != null)
|
|
search += '=' + value;
|
|
}
|
|
});
|
|
}
|
|
return search;
|
|
}
|
|
/**
|
|
* Transforms a {@link LocationQueryRaw} into a {@link LocationQuery} by casting
|
|
* numbers into strings, removing keys with an undefined value and replacing
|
|
* undefined with null in arrays
|
|
*
|
|
* @param query - query object to normalize
|
|
* @returns a normalized query object
|
|
*/
|
|
function normalizeQuery(query) {
|
|
const normalizedQuery = {};
|
|
for (const key in query) {
|
|
const value = query[key];
|
|
if (value !== undefined) {
|
|
normalizedQuery[key] = isArray(value)
|
|
? value.map(v => (v == null ? null : '' + v))
|
|
: value == null
|
|
? value
|
|
: '' + value;
|
|
}
|
|
}
|
|
return normalizedQuery;
|
|
}
|
|
|
|
/**
|
|
* RouteRecord being rendered by the closest ancestor Router View. Used for
|
|
* `onBeforeRouteUpdate` and `onBeforeRouteLeave`. rvlm stands for Router View
|
|
* Location Matched
|
|
*
|
|
* @internal
|
|
*/
|
|
const matchedRouteKey = Symbol(( true) ? 'router view location matched' : 0);
|
|
/**
|
|
* Allows overriding the router view depth to control which component in
|
|
* `matched` is rendered. rvd stands for Router View Depth
|
|
*
|
|
* @internal
|
|
*/
|
|
const viewDepthKey = Symbol(( true) ? 'router view depth' : 0);
|
|
/**
|
|
* Allows overriding the router instance returned by `useRouter` in tests. r
|
|
* stands for router
|
|
*
|
|
* @internal
|
|
*/
|
|
const routerKey = Symbol(( true) ? 'router' : 0);
|
|
/**
|
|
* Allows overriding the current route returned by `useRoute` in tests. rl
|
|
* stands for route location
|
|
*
|
|
* @internal
|
|
*/
|
|
const routeLocationKey = Symbol(( true) ? 'route location' : 0);
|
|
/**
|
|
* Allows overriding the current route used by router-view. Internally this is
|
|
* used when the `route` prop is passed.
|
|
*
|
|
* @internal
|
|
*/
|
|
const routerViewLocationKey = Symbol(( true) ? 'router view location' : 0);
|
|
|
|
/**
|
|
* Create a list of callbacks that can be reset. Used to create before and after navigation guards list
|
|
*/
|
|
function useCallbacks() {
|
|
let handlers = [];
|
|
function add(handler) {
|
|
handlers.push(handler);
|
|
return () => {
|
|
const i = handlers.indexOf(handler);
|
|
if (i > -1)
|
|
handlers.splice(i, 1);
|
|
};
|
|
}
|
|
function reset() {
|
|
handlers = [];
|
|
}
|
|
return {
|
|
add,
|
|
list: () => handlers.slice(),
|
|
reset,
|
|
};
|
|
}
|
|
|
|
function registerGuard(record, name, guard) {
|
|
const removeFromList = () => {
|
|
record[name].delete(guard);
|
|
};
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.onUnmounted)(removeFromList);
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.onDeactivated)(removeFromList);
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.onActivated)(() => {
|
|
record[name].add(guard);
|
|
});
|
|
record[name].add(guard);
|
|
}
|
|
/**
|
|
* Add a navigation guard that triggers whenever the component for the current
|
|
* location is about to be left. Similar to {@link beforeRouteLeave} but can be
|
|
* used in any component. The guard is removed when the component is unmounted.
|
|
*
|
|
* @param leaveGuard - {@link NavigationGuard}
|
|
*/
|
|
function onBeforeRouteLeave(leaveGuard) {
|
|
if (( true) && !(0,vue__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance)()) {
|
|
warn('getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function');
|
|
return;
|
|
}
|
|
const activeRecord = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)(matchedRouteKey,
|
|
// to avoid warning
|
|
{}).value;
|
|
if (!activeRecord) {
|
|
( true) &&
|
|
warn('No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?');
|
|
return;
|
|
}
|
|
registerGuard(activeRecord, 'leaveGuards', leaveGuard);
|
|
}
|
|
/**
|
|
* Add a navigation guard that triggers whenever the current location is about
|
|
* to be updated. Similar to {@link beforeRouteUpdate} but can be used in any
|
|
* component. The guard is removed when the component is unmounted.
|
|
*
|
|
* @param updateGuard - {@link NavigationGuard}
|
|
*/
|
|
function onBeforeRouteUpdate(updateGuard) {
|
|
if (( true) && !(0,vue__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance)()) {
|
|
warn('getCurrentInstance() returned null. onBeforeRouteUpdate() must be called at the top of a setup function');
|
|
return;
|
|
}
|
|
const activeRecord = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)(matchedRouteKey,
|
|
// to avoid warning
|
|
{}).value;
|
|
if (!activeRecord) {
|
|
( true) &&
|
|
warn('No active route record was found when calling `onBeforeRouteUpdate()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?');
|
|
return;
|
|
}
|
|
registerGuard(activeRecord, 'updateGuards', updateGuard);
|
|
}
|
|
function guardToPromiseFn(guard, to, from, record, name) {
|
|
// keep a reference to the enterCallbackArray to prevent pushing callbacks if a new navigation took place
|
|
const enterCallbackArray = record &&
|
|
// name is defined if record is because of the function overload
|
|
(record.enterCallbacks[name] = record.enterCallbacks[name] || []);
|
|
return () => new Promise((resolve, reject) => {
|
|
const next = (valid) => {
|
|
if (valid === false) {
|
|
reject(createRouterError(4 /* ErrorTypes.NAVIGATION_ABORTED */, {
|
|
from,
|
|
to,
|
|
}));
|
|
}
|
|
else if (valid instanceof Error) {
|
|
reject(valid);
|
|
}
|
|
else if (isRouteLocation(valid)) {
|
|
reject(createRouterError(2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */, {
|
|
from: to,
|
|
to: valid,
|
|
}));
|
|
}
|
|
else {
|
|
if (enterCallbackArray &&
|
|
// since enterCallbackArray is truthy, both record and name also are
|
|
record.enterCallbacks[name] === enterCallbackArray &&
|
|
typeof valid === 'function') {
|
|
enterCallbackArray.push(valid);
|
|
}
|
|
resolve();
|
|
}
|
|
};
|
|
// wrapping with Promise.resolve allows it to work with both async and sync guards
|
|
const guardReturn = guard.call(record && record.instances[name], to, from, ( true) ? canOnlyBeCalledOnce(next, to, from) : 0);
|
|
let guardCall = Promise.resolve(guardReturn);
|
|
if (guard.length < 3)
|
|
guardCall = guardCall.then(next);
|
|
if (( true) && guard.length > 2) {
|
|
const message = `The "next" callback was never called inside of ${guard.name ? '"' + guard.name + '"' : ''}:\n${guard.toString()}\n. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;
|
|
if (typeof guardReturn === 'object' && 'then' in guardReturn) {
|
|
guardCall = guardCall.then(resolvedValue => {
|
|
// @ts-expect-error: _called is added at canOnlyBeCalledOnce
|
|
if (!next._called) {
|
|
warn(message);
|
|
return Promise.reject(new Error('Invalid navigation guard'));
|
|
}
|
|
return resolvedValue;
|
|
});
|
|
}
|
|
else if (guardReturn !== undefined) {
|
|
// @ts-expect-error: _called is added at canOnlyBeCalledOnce
|
|
if (!next._called) {
|
|
warn(message);
|
|
reject(new Error('Invalid navigation guard'));
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
guardCall.catch(err => reject(err));
|
|
});
|
|
}
|
|
function canOnlyBeCalledOnce(next, to, from) {
|
|
let called = 0;
|
|
return function () {
|
|
if (called++ === 1)
|
|
warn(`The "next" callback was called more than once in one navigation guard when going from "${from.fullPath}" to "${to.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`);
|
|
// @ts-expect-error: we put it in the original one because it's easier to check
|
|
next._called = true;
|
|
if (called === 1)
|
|
next.apply(null, arguments);
|
|
};
|
|
}
|
|
function extractComponentsGuards(matched, guardType, to, from) {
|
|
const guards = [];
|
|
for (const record of matched) {
|
|
if (( true) && !record.components && !record.children.length) {
|
|
warn(`Record with path "${record.path}" is either missing a "component(s)"` +
|
|
` or "children" property.`);
|
|
}
|
|
for (const name in record.components) {
|
|
let rawComponent = record.components[name];
|
|
if ((true)) {
|
|
if (!rawComponent ||
|
|
(typeof rawComponent !== 'object' &&
|
|
typeof rawComponent !== 'function')) {
|
|
warn(`Component "${name}" in record with path "${record.path}" is not` +
|
|
` a valid component. Received "${String(rawComponent)}".`);
|
|
// throw to ensure we stop here but warn to ensure the message isn't
|
|
// missed by the user
|
|
throw new Error('Invalid route component');
|
|
}
|
|
else if ('then' in rawComponent) {
|
|
// warn if user wrote import('/component.vue') instead of () =>
|
|
// import('./component.vue')
|
|
warn(`Component "${name}" in record with path "${record.path}" is a ` +
|
|
`Promise instead of a function that returns a Promise. Did you ` +
|
|
`write "import('./MyPage.vue')" instead of ` +
|
|
`"() => import('./MyPage.vue')" ? This will break in ` +
|
|
`production if not fixed.`);
|
|
const promise = rawComponent;
|
|
rawComponent = () => promise;
|
|
}
|
|
else if (rawComponent.__asyncLoader &&
|
|
// warn only once per component
|
|
!rawComponent.__warnedDefineAsync) {
|
|
rawComponent.__warnedDefineAsync = true;
|
|
warn(`Component "${name}" in record with path "${record.path}" is defined ` +
|
|
`using "defineAsyncComponent()". ` +
|
|
`Write "() => import('./MyPage.vue')" instead of ` +
|
|
`"defineAsyncComponent(() => import('./MyPage.vue'))".`);
|
|
}
|
|
}
|
|
// skip update and leave guards if the route component is not mounted
|
|
if (guardType !== 'beforeRouteEnter' && !record.instances[name])
|
|
continue;
|
|
if (isRouteComponent(rawComponent)) {
|
|
// __vccOpts is added by vue-class-component and contain the regular options
|
|
const options = rawComponent.__vccOpts || rawComponent;
|
|
const guard = options[guardType];
|
|
guard && guards.push(guardToPromiseFn(guard, to, from, record, name));
|
|
}
|
|
else {
|
|
// start requesting the chunk already
|
|
let componentPromise = rawComponent();
|
|
if (( true) && !('catch' in componentPromise)) {
|
|
warn(`Component "${name}" in record with path "${record.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`);
|
|
componentPromise = Promise.resolve(componentPromise);
|
|
}
|
|
guards.push(() => componentPromise.then(resolved => {
|
|
if (!resolved)
|
|
return Promise.reject(new Error(`Couldn't resolve component "${name}" at "${record.path}"`));
|
|
const resolvedComponent = isESModule(resolved)
|
|
? resolved.default
|
|
: resolved;
|
|
// replace the function with the resolved component
|
|
// cannot be null or undefined because we went into the for loop
|
|
record.components[name] = resolvedComponent;
|
|
// __vccOpts is added by vue-class-component and contain the regular options
|
|
const options = resolvedComponent.__vccOpts || resolvedComponent;
|
|
const guard = options[guardType];
|
|
return guard && guardToPromiseFn(guard, to, from, record, name)();
|
|
}));
|
|
}
|
|
}
|
|
}
|
|
return guards;
|
|
}
|
|
/**
|
|
* Allows differentiating lazy components from functional components and vue-class-component
|
|
* @internal
|
|
*
|
|
* @param component
|
|
*/
|
|
function isRouteComponent(component) {
|
|
return (typeof component === 'object' ||
|
|
'displayName' in component ||
|
|
'props' in component ||
|
|
'__vccOpts' in component);
|
|
}
|
|
/**
|
|
* Ensures a route is loaded, so it can be passed as o prop to `<RouterView>`.
|
|
*
|
|
* @param route - resolved route to load
|
|
*/
|
|
function loadRouteLocation(route) {
|
|
return route.matched.every(record => record.redirect)
|
|
? Promise.reject(new Error('Cannot load a route that redirects.'))
|
|
: Promise.all(route.matched.map(record => record.components &&
|
|
Promise.all(Object.keys(record.components).reduce((promises, name) => {
|
|
const rawComponent = record.components[name];
|
|
if (typeof rawComponent === 'function' &&
|
|
!('displayName' in rawComponent)) {
|
|
promises.push(rawComponent().then(resolved => {
|
|
if (!resolved)
|
|
return Promise.reject(new Error(`Couldn't resolve component "${name}" at "${record.path}". Ensure you passed a function that returns a promise.`));
|
|
const resolvedComponent = isESModule(resolved)
|
|
? resolved.default
|
|
: resolved;
|
|
// replace the function with the resolved component
|
|
// cannot be null or undefined because we went into the for loop
|
|
record.components[name] = resolvedComponent;
|
|
return;
|
|
}));
|
|
}
|
|
return promises;
|
|
}, [])))).then(() => route);
|
|
}
|
|
|
|
// TODO: we could allow currentRoute as a prop to expose `isActive` and
|
|
// `isExactActive` behavior should go through an RFC
|
|
function useLink(props) {
|
|
const router = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)(routerKey);
|
|
const currentRoute = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)(routeLocationKey);
|
|
const route = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => router.resolve((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(props.to)));
|
|
const activeRecordIndex = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => {
|
|
const { matched } = route.value;
|
|
const { length } = matched;
|
|
const routeMatched = matched[length - 1];
|
|
const currentMatched = currentRoute.matched;
|
|
if (!routeMatched || !currentMatched.length)
|
|
return -1;
|
|
const index = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));
|
|
if (index > -1)
|
|
return index;
|
|
// possible parent record
|
|
const parentRecordPath = getOriginalPath(matched[length - 2]);
|
|
return (
|
|
// we are dealing with nested routes
|
|
length > 1 &&
|
|
// if the parent and matched route have the same path, this link is
|
|
// referring to the empty child. Or we currently are on a different
|
|
// child of the same parent
|
|
getOriginalPath(routeMatched) === parentRecordPath &&
|
|
// avoid comparing the child with its parent
|
|
currentMatched[currentMatched.length - 1].path !== parentRecordPath
|
|
? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2]))
|
|
: index);
|
|
});
|
|
const isActive = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => activeRecordIndex.value > -1 &&
|
|
includesParams(currentRoute.params, route.value.params));
|
|
const isExactActive = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => activeRecordIndex.value > -1 &&
|
|
activeRecordIndex.value === currentRoute.matched.length - 1 &&
|
|
isSameRouteLocationParams(currentRoute.params, route.value.params));
|
|
function navigate(e = {}) {
|
|
if (guardEvent(e)) {
|
|
return router[(0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(props.replace) ? 'replace' : 'push']((0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(props.to)
|
|
// avoid uncaught errors are they are logged anyway
|
|
).catch(noop);
|
|
}
|
|
return Promise.resolve();
|
|
}
|
|
// devtools only
|
|
if (( true) && isBrowser) {
|
|
const instance = (0,vue__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance)();
|
|
if (instance) {
|
|
const linkContextDevtools = {
|
|
route: route.value,
|
|
isActive: isActive.value,
|
|
isExactActive: isExactActive.value,
|
|
};
|
|
// @ts-expect-error: this is internal
|
|
instance.__vrl_devtools = instance.__vrl_devtools || [];
|
|
// @ts-expect-error: this is internal
|
|
instance.__vrl_devtools.push(linkContextDevtools);
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.watchEffect)(() => {
|
|
linkContextDevtools.route = route.value;
|
|
linkContextDevtools.isActive = isActive.value;
|
|
linkContextDevtools.isExactActive = isExactActive.value;
|
|
}, { flush: 'post' });
|
|
}
|
|
}
|
|
/**
|
|
* NOTE: update {@link _RouterLinkI}'s `$slots` type when updating this
|
|
*/
|
|
return {
|
|
route,
|
|
href: (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => route.value.href),
|
|
isActive,
|
|
isExactActive,
|
|
navigate,
|
|
};
|
|
}
|
|
const RouterLinkImpl = /*#__PURE__*/ (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
|
|
name: 'RouterLink',
|
|
compatConfig: { MODE: 3 },
|
|
props: {
|
|
to: {
|
|
type: [String, Object],
|
|
required: true,
|
|
},
|
|
replace: Boolean,
|
|
activeClass: String,
|
|
// inactiveClass: String,
|
|
exactActiveClass: String,
|
|
custom: Boolean,
|
|
ariaCurrentValue: {
|
|
type: String,
|
|
default: 'page',
|
|
},
|
|
},
|
|
useLink,
|
|
setup(props, { slots }) {
|
|
const link = (0,vue__WEBPACK_IMPORTED_MODULE_0__.reactive)(useLink(props));
|
|
const { options } = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)(routerKey);
|
|
const elClass = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => ({
|
|
[getLinkClass(props.activeClass, options.linkActiveClass, 'router-link-active')]: link.isActive,
|
|
// [getLinkClass(
|
|
// props.inactiveClass,
|
|
// options.linkInactiveClass,
|
|
// 'router-link-inactive'
|
|
// )]: !link.isExactActive,
|
|
[getLinkClass(props.exactActiveClass, options.linkExactActiveClass, 'router-link-exact-active')]: link.isExactActive,
|
|
}));
|
|
return () => {
|
|
const children = slots.default && slots.default(link);
|
|
return props.custom
|
|
? children
|
|
: (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('a', {
|
|
'aria-current': link.isExactActive
|
|
? props.ariaCurrentValue
|
|
: null,
|
|
href: link.href,
|
|
// this would override user added attrs but Vue will still add
|
|
// the listener, so we end up triggering both
|
|
onClick: link.navigate,
|
|
class: elClass.value,
|
|
}, children);
|
|
};
|
|
},
|
|
});
|
|
// export the public type for h/tsx inference
|
|
// also to avoid inline import() in generated d.ts files
|
|
/**
|
|
* Component to render a link that triggers a navigation on click.
|
|
*/
|
|
const RouterLink = RouterLinkImpl;
|
|
function guardEvent(e) {
|
|
// don't redirect with control keys
|
|
if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)
|
|
return;
|
|
// don't redirect when preventDefault called
|
|
if (e.defaultPrevented)
|
|
return;
|
|
// don't redirect on right click
|
|
if (e.button !== undefined && e.button !== 0)
|
|
return;
|
|
// don't redirect if `target="_blank"`
|
|
// @ts-expect-error getAttribute does exist
|
|
if (e.currentTarget && e.currentTarget.getAttribute) {
|
|
// @ts-expect-error getAttribute exists
|
|
const target = e.currentTarget.getAttribute('target');
|
|
if (/\b_blank\b/i.test(target))
|
|
return;
|
|
}
|
|
// this may be a Weex event which doesn't have this method
|
|
if (e.preventDefault)
|
|
e.preventDefault();
|
|
return true;
|
|
}
|
|
function includesParams(outer, inner) {
|
|
for (const key in inner) {
|
|
const innerValue = inner[key];
|
|
const outerValue = outer[key];
|
|
if (typeof innerValue === 'string') {
|
|
if (innerValue !== outerValue)
|
|
return false;
|
|
}
|
|
else {
|
|
if (!isArray(outerValue) ||
|
|
outerValue.length !== innerValue.length ||
|
|
innerValue.some((value, i) => value !== outerValue[i]))
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
/**
|
|
* Get the original path value of a record by following its aliasOf
|
|
* @param record
|
|
*/
|
|
function getOriginalPath(record) {
|
|
return record ? (record.aliasOf ? record.aliasOf.path : record.path) : '';
|
|
}
|
|
/**
|
|
* Utility class to get the active class based on defaults.
|
|
* @param propClass
|
|
* @param globalClass
|
|
* @param defaultClass
|
|
*/
|
|
const getLinkClass = (propClass, globalClass, defaultClass) => propClass != null
|
|
? propClass
|
|
: globalClass != null
|
|
? globalClass
|
|
: defaultClass;
|
|
|
|
const RouterViewImpl = /*#__PURE__*/ (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
|
|
name: 'RouterView',
|
|
// #674 we manually inherit them
|
|
inheritAttrs: false,
|
|
props: {
|
|
name: {
|
|
type: String,
|
|
default: 'default',
|
|
},
|
|
route: Object,
|
|
},
|
|
// Better compat for @vue/compat users
|
|
// https://github.com/vuejs/router/issues/1315
|
|
compatConfig: { MODE: 3 },
|
|
setup(props, { attrs, slots }) {
|
|
( true) && warnDeprecatedUsage();
|
|
const injectedRoute = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)(routerViewLocationKey);
|
|
const routeToDisplay = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => props.route || injectedRoute.value);
|
|
const injectedDepth = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)(viewDepthKey, 0);
|
|
// The depth changes based on empty components option, which allows passthrough routes e.g. routes with children
|
|
// that are used to reuse the `path` property
|
|
const depth = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => {
|
|
let initialDepth = (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(injectedDepth);
|
|
const { matched } = routeToDisplay.value;
|
|
let matchedRoute;
|
|
while ((matchedRoute = matched[initialDepth]) &&
|
|
!matchedRoute.components) {
|
|
initialDepth++;
|
|
}
|
|
return initialDepth;
|
|
});
|
|
const matchedRouteRef = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => routeToDisplay.value.matched[depth.value]);
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.provide)(viewDepthKey, (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => depth.value + 1));
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.provide)(matchedRouteKey, matchedRouteRef);
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.provide)(routerViewLocationKey, routeToDisplay);
|
|
const viewRef = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
|
|
// watch at the same time the component instance, the route record we are
|
|
// rendering, and the name
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => {
|
|
// copy reused instances
|
|
if (to) {
|
|
// this will update the instance for new instances as well as reused
|
|
// instances when navigating to a new route
|
|
to.instances[name] = instance;
|
|
// the component instance is reused for a different route or name, so
|
|
// we copy any saved update or leave guards. With async setup, the
|
|
// mounting component will mount before the matchedRoute changes,
|
|
// making instance === oldInstance, so we check if guards have been
|
|
// added before. This works because we remove guards when
|
|
// unmounting/deactivating components
|
|
if (from && from !== to && instance && instance === oldInstance) {
|
|
if (!to.leaveGuards.size) {
|
|
to.leaveGuards = from.leaveGuards;
|
|
}
|
|
if (!to.updateGuards.size) {
|
|
to.updateGuards = from.updateGuards;
|
|
}
|
|
}
|
|
}
|
|
// trigger beforeRouteEnter next callbacks
|
|
if (instance &&
|
|
to &&
|
|
// if there is no instance but to and from are the same this might be
|
|
// the first visit
|
|
(!from || !isSameRouteRecord(to, from) || !oldInstance)) {
|
|
(to.enterCallbacks[name] || []).forEach(callback => callback(instance));
|
|
}
|
|
}, { flush: 'post' });
|
|
return () => {
|
|
const route = routeToDisplay.value;
|
|
// we need the value at the time we render because when we unmount, we
|
|
// navigated to a different location so the value is different
|
|
const currentName = props.name;
|
|
const matchedRoute = matchedRouteRef.value;
|
|
const ViewComponent = matchedRoute && matchedRoute.components[currentName];
|
|
if (!ViewComponent) {
|
|
return normalizeSlot(slots.default, { Component: ViewComponent, route });
|
|
}
|
|
// props from route configuration
|
|
const routePropsOption = matchedRoute.props[currentName];
|
|
const routeProps = routePropsOption
|
|
? routePropsOption === true
|
|
? route.params
|
|
: typeof routePropsOption === 'function'
|
|
? routePropsOption(route)
|
|
: routePropsOption
|
|
: null;
|
|
const onVnodeUnmounted = vnode => {
|
|
// remove the instance reference to prevent leak
|
|
if (vnode.component.isUnmounted) {
|
|
matchedRoute.instances[currentName] = null;
|
|
}
|
|
};
|
|
const component = (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(ViewComponent, assign({}, routeProps, attrs, {
|
|
onVnodeUnmounted,
|
|
ref: viewRef,
|
|
}));
|
|
if (( true) &&
|
|
isBrowser &&
|
|
component.ref) {
|
|
// TODO: can display if it's an alias, its props
|
|
const info = {
|
|
depth: depth.value,
|
|
name: matchedRoute.name,
|
|
path: matchedRoute.path,
|
|
meta: matchedRoute.meta,
|
|
};
|
|
const internalInstances = isArray(component.ref)
|
|
? component.ref.map(r => r.i)
|
|
: [component.ref.i];
|
|
internalInstances.forEach(instance => {
|
|
// @ts-expect-error
|
|
instance.__vrv_devtools = info;
|
|
});
|
|
}
|
|
return (
|
|
// pass the vnode to the slot as a prop.
|
|
// h and <component :is="..."> both accept vnodes
|
|
normalizeSlot(slots.default, { Component: component, route }) ||
|
|
component);
|
|
};
|
|
},
|
|
});
|
|
function normalizeSlot(slot, data) {
|
|
if (!slot)
|
|
return null;
|
|
const slotContent = slot(data);
|
|
return slotContent.length === 1 ? slotContent[0] : slotContent;
|
|
}
|
|
// export the public type for h/tsx inference
|
|
// also to avoid inline import() in generated d.ts files
|
|
/**
|
|
* Component to display the current route the user is at.
|
|
*/
|
|
const RouterView = RouterViewImpl;
|
|
// warn against deprecated usage with <transition> & <keep-alive>
|
|
// due to functional component being no longer eager in Vue 3
|
|
function warnDeprecatedUsage() {
|
|
const instance = (0,vue__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance)();
|
|
const parentName = instance.parent && instance.parent.type.name;
|
|
const parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type;
|
|
if (parentName &&
|
|
(parentName === 'KeepAlive' || parentName.includes('Transition')) &&
|
|
typeof parentSubTreeType === 'object' &&
|
|
parentSubTreeType.name === 'RouterView') {
|
|
const comp = parentName === 'KeepAlive' ? 'keep-alive' : 'transition';
|
|
warn(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.\n` +
|
|
`Use slot props instead:\n\n` +
|
|
`<router-view v-slot="{ Component }">\n` +
|
|
` <${comp}>\n` +
|
|
` <component :is="Component" />\n` +
|
|
` </${comp}>\n` +
|
|
`</router-view>`);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Copies a route location and removes any problematic properties that cannot be shown in devtools (e.g. Vue instances).
|
|
*
|
|
* @param routeLocation - routeLocation to format
|
|
* @param tooltip - optional tooltip
|
|
* @returns a copy of the routeLocation
|
|
*/
|
|
function formatRouteLocation(routeLocation, tooltip) {
|
|
const copy = assign({}, routeLocation, {
|
|
// remove variables that can contain vue instances
|
|
matched: routeLocation.matched.map(matched => omit(matched, ['instances', 'children', 'aliasOf'])),
|
|
});
|
|
return {
|
|
_custom: {
|
|
type: null,
|
|
readOnly: true,
|
|
display: routeLocation.fullPath,
|
|
tooltip,
|
|
value: copy,
|
|
},
|
|
};
|
|
}
|
|
function formatDisplay(display) {
|
|
return {
|
|
_custom: {
|
|
display,
|
|
},
|
|
};
|
|
}
|
|
// to support multiple router instances
|
|
let routerId = 0;
|
|
function addDevtools(app, router, matcher) {
|
|
// Take over router.beforeEach and afterEach
|
|
// make sure we are not registering the devtool twice
|
|
if (router.__hasDevtools)
|
|
return;
|
|
router.__hasDevtools = true;
|
|
// increment to support multiple router instances
|
|
const id = routerId++;
|
|
(0,_vue_devtools_api__WEBPACK_IMPORTED_MODULE_1__.setupDevtoolsPlugin)({
|
|
id: 'org.vuejs.router' + (id ? '.' + id : ''),
|
|
label: 'Vue Router',
|
|
packageName: 'vue-router',
|
|
homepage: 'https://router.vuejs.org',
|
|
logo: 'https://router.vuejs.org/logo.png',
|
|
componentStateTypes: ['Routing'],
|
|
app,
|
|
}, api => {
|
|
if (typeof api.now !== 'function') {
|
|
console.warn('[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.');
|
|
}
|
|
// display state added by the router
|
|
api.on.inspectComponent((payload, ctx) => {
|
|
if (payload.instanceData) {
|
|
payload.instanceData.state.push({
|
|
type: 'Routing',
|
|
key: '$route',
|
|
editable: false,
|
|
value: formatRouteLocation(router.currentRoute.value, 'Current Route'),
|
|
});
|
|
}
|
|
});
|
|
// mark router-link as active and display tags on router views
|
|
api.on.visitComponentTree(({ treeNode: node, componentInstance }) => {
|
|
if (componentInstance.__vrv_devtools) {
|
|
const info = componentInstance.__vrv_devtools;
|
|
node.tags.push({
|
|
label: (info.name ? `${info.name.toString()}: ` : '') + info.path,
|
|
textColor: 0,
|
|
tooltip: 'This component is rendered by <router-view>',
|
|
backgroundColor: PINK_500,
|
|
});
|
|
}
|
|
// if multiple useLink are used
|
|
if (isArray(componentInstance.__vrl_devtools)) {
|
|
componentInstance.__devtoolsApi = api;
|
|
componentInstance.__vrl_devtools.forEach(devtoolsData => {
|
|
let backgroundColor = ORANGE_400;
|
|
let tooltip = '';
|
|
if (devtoolsData.isExactActive) {
|
|
backgroundColor = LIME_500;
|
|
tooltip = 'This is exactly active';
|
|
}
|
|
else if (devtoolsData.isActive) {
|
|
backgroundColor = BLUE_600;
|
|
tooltip = 'This link is active';
|
|
}
|
|
node.tags.push({
|
|
label: devtoolsData.route.path,
|
|
textColor: 0,
|
|
tooltip,
|
|
backgroundColor,
|
|
});
|
|
});
|
|
}
|
|
});
|
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(router.currentRoute, () => {
|
|
// refresh active state
|
|
refreshRoutesView();
|
|
api.notifyComponentUpdate();
|
|
api.sendInspectorTree(routerInspectorId);
|
|
api.sendInspectorState(routerInspectorId);
|
|
});
|
|
const navigationsLayerId = 'router:navigations:' + id;
|
|
api.addTimelineLayer({
|
|
id: navigationsLayerId,
|
|
label: `Router${id ? ' ' + id : ''} Navigations`,
|
|
color: 0x40a8c4,
|
|
});
|
|
// const errorsLayerId = 'router:errors'
|
|
// api.addTimelineLayer({
|
|
// id: errorsLayerId,
|
|
// label: 'Router Errors',
|
|
// color: 0xea5455,
|
|
// })
|
|
router.onError((error, to) => {
|
|
api.addTimelineEvent({
|
|
layerId: navigationsLayerId,
|
|
event: {
|
|
title: 'Error during Navigation',
|
|
subtitle: to.fullPath,
|
|
logType: 'error',
|
|
time: api.now(),
|
|
data: { error },
|
|
groupId: to.meta.__navigationId,
|
|
},
|
|
});
|
|
});
|
|
// attached to `meta` and used to group events
|
|
let navigationId = 0;
|
|
router.beforeEach((to, from) => {
|
|
const data = {
|
|
guard: formatDisplay('beforeEach'),
|
|
from: formatRouteLocation(from, 'Current Location during this navigation'),
|
|
to: formatRouteLocation(to, 'Target location'),
|
|
};
|
|
// Used to group navigations together, hide from devtools
|
|
Object.defineProperty(to.meta, '__navigationId', {
|
|
value: navigationId++,
|
|
});
|
|
api.addTimelineEvent({
|
|
layerId: navigationsLayerId,
|
|
event: {
|
|
time: api.now(),
|
|
title: 'Start of navigation',
|
|
subtitle: to.fullPath,
|
|
data,
|
|
groupId: to.meta.__navigationId,
|
|
},
|
|
});
|
|
});
|
|
router.afterEach((to, from, failure) => {
|
|
const data = {
|
|
guard: formatDisplay('afterEach'),
|
|
};
|
|
if (failure) {
|
|
data.failure = {
|
|
_custom: {
|
|
type: Error,
|
|
readOnly: true,
|
|
display: failure ? failure.message : '',
|
|
tooltip: 'Navigation Failure',
|
|
value: failure,
|
|
},
|
|
};
|
|
data.status = formatDisplay('❌');
|
|
}
|
|
else {
|
|
data.status = formatDisplay('✅');
|
|
}
|
|
// we set here to have the right order
|
|
data.from = formatRouteLocation(from, 'Current Location during this navigation');
|
|
data.to = formatRouteLocation(to, 'Target location');
|
|
api.addTimelineEvent({
|
|
layerId: navigationsLayerId,
|
|
event: {
|
|
title: 'End of navigation',
|
|
subtitle: to.fullPath,
|
|
time: api.now(),
|
|
data,
|
|
logType: failure ? 'warning' : 'default',
|
|
groupId: to.meta.__navigationId,
|
|
},
|
|
});
|
|
});
|
|
/**
|
|
* Inspector of Existing routes
|
|
*/
|
|
const routerInspectorId = 'router-inspector:' + id;
|
|
api.addInspector({
|
|
id: routerInspectorId,
|
|
label: 'Routes' + (id ? ' ' + id : ''),
|
|
icon: 'book',
|
|
treeFilterPlaceholder: 'Search routes',
|
|
});
|
|
function refreshRoutesView() {
|
|
// the routes view isn't active
|
|
if (!activeRoutesPayload)
|
|
return;
|
|
const payload = activeRoutesPayload;
|
|
// children routes will appear as nested
|
|
let routes = matcher.getRoutes().filter(route => !route.parent);
|
|
// reset match state to false
|
|
routes.forEach(resetMatchStateOnRouteRecord);
|
|
// apply a match state if there is a payload
|
|
if (payload.filter) {
|
|
routes = routes.filter(route =>
|
|
// save matches state based on the payload
|
|
isRouteMatching(route, payload.filter.toLowerCase()));
|
|
}
|
|
// mark active routes
|
|
routes.forEach(route => markRouteRecordActive(route, router.currentRoute.value));
|
|
payload.rootNodes = routes.map(formatRouteRecordForInspector);
|
|
}
|
|
let activeRoutesPayload;
|
|
api.on.getInspectorTree(payload => {
|
|
activeRoutesPayload = payload;
|
|
if (payload.app === app && payload.inspectorId === routerInspectorId) {
|
|
refreshRoutesView();
|
|
}
|
|
});
|
|
/**
|
|
* Display information about the currently selected route record
|
|
*/
|
|
api.on.getInspectorState(payload => {
|
|
if (payload.app === app && payload.inspectorId === routerInspectorId) {
|
|
const routes = matcher.getRoutes();
|
|
const route = routes.find(route => route.record.__vd_id === payload.nodeId);
|
|
if (route) {
|
|
payload.state = {
|
|
options: formatRouteRecordMatcherForStateInspector(route),
|
|
};
|
|
}
|
|
}
|
|
});
|
|
api.sendInspectorTree(routerInspectorId);
|
|
api.sendInspectorState(routerInspectorId);
|
|
});
|
|
}
|
|
function modifierForKey(key) {
|
|
if (key.optional) {
|
|
return key.repeatable ? '*' : '?';
|
|
}
|
|
else {
|
|
return key.repeatable ? '+' : '';
|
|
}
|
|
}
|
|
function formatRouteRecordMatcherForStateInspector(route) {
|
|
const { record } = route;
|
|
const fields = [
|
|
{ editable: false, key: 'path', value: record.path },
|
|
];
|
|
if (record.name != null) {
|
|
fields.push({
|
|
editable: false,
|
|
key: 'name',
|
|
value: record.name,
|
|
});
|
|
}
|
|
fields.push({ editable: false, key: 'regexp', value: route.re });
|
|
if (route.keys.length) {
|
|
fields.push({
|
|
editable: false,
|
|
key: 'keys',
|
|
value: {
|
|
_custom: {
|
|
type: null,
|
|
readOnly: true,
|
|
display: route.keys
|
|
.map(key => `${key.name}${modifierForKey(key)}`)
|
|
.join(' '),
|
|
tooltip: 'Param keys',
|
|
value: route.keys,
|
|
},
|
|
},
|
|
});
|
|
}
|
|
if (record.redirect != null) {
|
|
fields.push({
|
|
editable: false,
|
|
key: 'redirect',
|
|
value: record.redirect,
|
|
});
|
|
}
|
|
if (route.alias.length) {
|
|
fields.push({
|
|
editable: false,
|
|
key: 'aliases',
|
|
value: route.alias.map(alias => alias.record.path),
|
|
});
|
|
}
|
|
if (Object.keys(route.record.meta).length) {
|
|
fields.push({
|
|
editable: false,
|
|
key: 'meta',
|
|
value: route.record.meta,
|
|
});
|
|
}
|
|
fields.push({
|
|
key: 'score',
|
|
editable: false,
|
|
value: {
|
|
_custom: {
|
|
type: null,
|
|
readOnly: true,
|
|
display: route.score.map(score => score.join(', ')).join(' | '),
|
|
tooltip: 'Score used to sort routes',
|
|
value: route.score,
|
|
},
|
|
},
|
|
});
|
|
return fields;
|
|
}
|
|
/**
|
|
* Extracted from tailwind palette
|
|
*/
|
|
const PINK_500 = 0xec4899;
|
|
const BLUE_600 = 0x2563eb;
|
|
const LIME_500 = 0x84cc16;
|
|
const CYAN_400 = 0x22d3ee;
|
|
const ORANGE_400 = 0xfb923c;
|
|
// const GRAY_100 = 0xf4f4f5
|
|
const DARK = 0x666666;
|
|
function formatRouteRecordForInspector(route) {
|
|
const tags = [];
|
|
const { record } = route;
|
|
if (record.name != null) {
|
|
tags.push({
|
|
label: String(record.name),
|
|
textColor: 0,
|
|
backgroundColor: CYAN_400,
|
|
});
|
|
}
|
|
if (record.aliasOf) {
|
|
tags.push({
|
|
label: 'alias',
|
|
textColor: 0,
|
|
backgroundColor: ORANGE_400,
|
|
});
|
|
}
|
|
if (route.__vd_match) {
|
|
tags.push({
|
|
label: 'matches',
|
|
textColor: 0,
|
|
backgroundColor: PINK_500,
|
|
});
|
|
}
|
|
if (route.__vd_exactActive) {
|
|
tags.push({
|
|
label: 'exact',
|
|
textColor: 0,
|
|
backgroundColor: LIME_500,
|
|
});
|
|
}
|
|
if (route.__vd_active) {
|
|
tags.push({
|
|
label: 'active',
|
|
textColor: 0,
|
|
backgroundColor: BLUE_600,
|
|
});
|
|
}
|
|
if (record.redirect) {
|
|
tags.push({
|
|
label: typeof record.redirect === 'string'
|
|
? `redirect: ${record.redirect}`
|
|
: 'redirects',
|
|
textColor: 0xffffff,
|
|
backgroundColor: DARK,
|
|
});
|
|
}
|
|
// add an id to be able to select it. Using the `path` is not possible because
|
|
// empty path children would collide with their parents
|
|
let id = record.__vd_id;
|
|
if (id == null) {
|
|
id = String(routeRecordId++);
|
|
record.__vd_id = id;
|
|
}
|
|
return {
|
|
id,
|
|
label: record.path,
|
|
tags,
|
|
children: route.children.map(formatRouteRecordForInspector),
|
|
};
|
|
}
|
|
// incremental id for route records and inspector state
|
|
let routeRecordId = 0;
|
|
const EXTRACT_REGEXP_RE = /^\/(.*)\/([a-z]*)$/;
|
|
function markRouteRecordActive(route, currentRoute) {
|
|
// no route will be active if matched is empty
|
|
// reset the matching state
|
|
const isExactActive = currentRoute.matched.length &&
|
|
isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);
|
|
route.__vd_exactActive = route.__vd_active = isExactActive;
|
|
if (!isExactActive) {
|
|
route.__vd_active = currentRoute.matched.some(match => isSameRouteRecord(match, route.record));
|
|
}
|
|
route.children.forEach(childRoute => markRouteRecordActive(childRoute, currentRoute));
|
|
}
|
|
function resetMatchStateOnRouteRecord(route) {
|
|
route.__vd_match = false;
|
|
route.children.forEach(resetMatchStateOnRouteRecord);
|
|
}
|
|
function isRouteMatching(route, filter) {
|
|
const found = String(route.re).match(EXTRACT_REGEXP_RE);
|
|
route.__vd_match = false;
|
|
if (!found || found.length < 3) {
|
|
return false;
|
|
}
|
|
// use a regexp without $ at the end to match nested routes better
|
|
const nonEndingRE = new RegExp(found[1].replace(/\$$/, ''), found[2]);
|
|
if (nonEndingRE.test(filter)) {
|
|
// mark children as matches
|
|
route.children.forEach(child => isRouteMatching(child, filter));
|
|
// exception case: `/`
|
|
if (route.record.path !== '/' || filter === '/') {
|
|
route.__vd_match = route.re.test(filter);
|
|
return true;
|
|
}
|
|
// hide the / route
|
|
return false;
|
|
}
|
|
const path = route.record.path.toLowerCase();
|
|
const decodedPath = decode(path);
|
|
// also allow partial matching on the path
|
|
if (!filter.startsWith('/') &&
|
|
(decodedPath.includes(filter) || path.includes(filter)))
|
|
return true;
|
|
if (decodedPath.startsWith(filter) || path.startsWith(filter))
|
|
return true;
|
|
if (route.record.name && String(route.record.name).includes(filter))
|
|
return true;
|
|
return route.children.some(child => isRouteMatching(child, filter));
|
|
}
|
|
function omit(obj, keys) {
|
|
const ret = {};
|
|
for (const key in obj) {
|
|
if (!keys.includes(key)) {
|
|
// @ts-expect-error
|
|
ret[key] = obj[key];
|
|
}
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
/**
|
|
* Creates a Router instance that can be used by a Vue app.
|
|
*
|
|
* @param options - {@link RouterOptions}
|
|
*/
|
|
function createRouter(options) {
|
|
const matcher = createRouterMatcher(options.routes, options);
|
|
const parseQuery$1 = options.parseQuery || parseQuery;
|
|
const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;
|
|
const routerHistory = options.history;
|
|
if (( true) && !routerHistory)
|
|
throw new Error('Provide the "history" option when calling "createRouter()":' +
|
|
' https://next.router.vuejs.org/api/#history.');
|
|
const beforeGuards = useCallbacks();
|
|
const beforeResolveGuards = useCallbacks();
|
|
const afterGuards = useCallbacks();
|
|
const currentRoute = (0,vue__WEBPACK_IMPORTED_MODULE_0__.shallowRef)(START_LOCATION_NORMALIZED);
|
|
let pendingLocation = START_LOCATION_NORMALIZED;
|
|
// leave the scrollRestoration if no scrollBehavior is provided
|
|
if (isBrowser && options.scrollBehavior && 'scrollRestoration' in history) {
|
|
history.scrollRestoration = 'manual';
|
|
}
|
|
const normalizeParams = applyToParams.bind(null, paramValue => '' + paramValue);
|
|
const encodeParams = applyToParams.bind(null, encodeParam);
|
|
const decodeParams =
|
|
// @ts-expect-error: intentionally avoid the type check
|
|
applyToParams.bind(null, decode);
|
|
function addRoute(parentOrRoute, route) {
|
|
let parent;
|
|
let record;
|
|
if (isRouteName(parentOrRoute)) {
|
|
parent = matcher.getRecordMatcher(parentOrRoute);
|
|
record = route;
|
|
}
|
|
else {
|
|
record = parentOrRoute;
|
|
}
|
|
return matcher.addRoute(record, parent);
|
|
}
|
|
function removeRoute(name) {
|
|
const recordMatcher = matcher.getRecordMatcher(name);
|
|
if (recordMatcher) {
|
|
matcher.removeRoute(recordMatcher);
|
|
}
|
|
else if ((true)) {
|
|
warn(`Cannot remove non-existent route "${String(name)}"`);
|
|
}
|
|
}
|
|
function getRoutes() {
|
|
return matcher.getRoutes().map(routeMatcher => routeMatcher.record);
|
|
}
|
|
function hasRoute(name) {
|
|
return !!matcher.getRecordMatcher(name);
|
|
}
|
|
function resolve(rawLocation, currentLocation) {
|
|
// const objectLocation = routerLocationAsObject(rawLocation)
|
|
// we create a copy to modify it later
|
|
currentLocation = assign({}, currentLocation || currentRoute.value);
|
|
if (typeof rawLocation === 'string') {
|
|
const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);
|
|
const matchedRoute = matcher.resolve({ path: locationNormalized.path }, currentLocation);
|
|
const href = routerHistory.createHref(locationNormalized.fullPath);
|
|
if ((true)) {
|
|
if (href.startsWith('//'))
|
|
warn(`Location "${rawLocation}" resolved to "${href}". A resolved location cannot start with multiple slashes.`);
|
|
else if (!matchedRoute.matched.length) {
|
|
warn(`No match found for location with path "${rawLocation}"`);
|
|
}
|
|
}
|
|
// locationNormalized is always a new object
|
|
return assign(locationNormalized, matchedRoute, {
|
|
params: decodeParams(matchedRoute.params),
|
|
hash: decode(locationNormalized.hash),
|
|
redirectedFrom: undefined,
|
|
href,
|
|
});
|
|
}
|
|
let matcherLocation;
|
|
// path could be relative in object as well
|
|
if ('path' in rawLocation) {
|
|
if (( true) &&
|
|
'params' in rawLocation &&
|
|
!('name' in rawLocation) &&
|
|
// @ts-expect-error: the type is never
|
|
Object.keys(rawLocation.params).length) {
|
|
warn(`Path "${rawLocation.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`);
|
|
}
|
|
matcherLocation = assign({}, rawLocation, {
|
|
path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path,
|
|
});
|
|
}
|
|
else {
|
|
// remove any nullish param
|
|
const targetParams = assign({}, rawLocation.params);
|
|
for (const key in targetParams) {
|
|
if (targetParams[key] == null) {
|
|
delete targetParams[key];
|
|
}
|
|
}
|
|
// pass encoded values to the matcher, so it can produce encoded path and fullPath
|
|
matcherLocation = assign({}, rawLocation, {
|
|
params: encodeParams(targetParams),
|
|
});
|
|
// current location params are decoded, we need to encode them in case the
|
|
// matcher merges the params
|
|
currentLocation.params = encodeParams(currentLocation.params);
|
|
}
|
|
const matchedRoute = matcher.resolve(matcherLocation, currentLocation);
|
|
const hash = rawLocation.hash || '';
|
|
if (( true) && hash && !hash.startsWith('#')) {
|
|
warn(`A \`hash\` should always start with the character "#". Replace "${hash}" with "#${hash}".`);
|
|
}
|
|
// the matcher might have merged current location params, so
|
|
// we need to run the decoding again
|
|
matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));
|
|
const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {
|
|
hash: encodeHash(hash),
|
|
path: matchedRoute.path,
|
|
}));
|
|
const href = routerHistory.createHref(fullPath);
|
|
if ((true)) {
|
|
if (href.startsWith('//')) {
|
|
warn(`Location "${rawLocation}" resolved to "${href}". A resolved location cannot start with multiple slashes.`);
|
|
}
|
|
else if (!matchedRoute.matched.length) {
|
|
warn(`No match found for location with path "${'path' in rawLocation ? rawLocation.path : rawLocation}"`);
|
|
}
|
|
}
|
|
return assign({
|
|
fullPath,
|
|
// keep the hash encoded so fullPath is effectively path + encodedQuery +
|
|
// hash
|
|
hash,
|
|
query:
|
|
// if the user is using a custom query lib like qs, we might have
|
|
// nested objects, so we keep the query as is, meaning it can contain
|
|
// numbers at `$route.query`, but at the point, the user will have to
|
|
// use their own type anyway.
|
|
// https://github.com/vuejs/router/issues/328#issuecomment-649481567
|
|
stringifyQuery$1 === stringifyQuery
|
|
? normalizeQuery(rawLocation.query)
|
|
: (rawLocation.query || {}),
|
|
}, matchedRoute, {
|
|
redirectedFrom: undefined,
|
|
href,
|
|
});
|
|
}
|
|
function locationAsObject(to) {
|
|
return typeof to === 'string'
|
|
? parseURL(parseQuery$1, to, currentRoute.value.path)
|
|
: assign({}, to);
|
|
}
|
|
function checkCanceledNavigation(to, from) {
|
|
if (pendingLocation !== to) {
|
|
return createRouterError(8 /* ErrorTypes.NAVIGATION_CANCELLED */, {
|
|
from,
|
|
to,
|
|
});
|
|
}
|
|
}
|
|
function push(to) {
|
|
return pushWithRedirect(to);
|
|
}
|
|
function replace(to) {
|
|
return push(assign(locationAsObject(to), { replace: true }));
|
|
}
|
|
function handleRedirectRecord(to) {
|
|
const lastMatched = to.matched[to.matched.length - 1];
|
|
if (lastMatched && lastMatched.redirect) {
|
|
const { redirect } = lastMatched;
|
|
let newTargetLocation = typeof redirect === 'function' ? redirect(to) : redirect;
|
|
if (typeof newTargetLocation === 'string') {
|
|
newTargetLocation =
|
|
newTargetLocation.includes('?') || newTargetLocation.includes('#')
|
|
? (newTargetLocation = locationAsObject(newTargetLocation))
|
|
: // force empty params
|
|
{ path: newTargetLocation };
|
|
// @ts-expect-error: force empty params when a string is passed to let
|
|
// the router parse them again
|
|
newTargetLocation.params = {};
|
|
}
|
|
if (( true) &&
|
|
!('path' in newTargetLocation) &&
|
|
!('name' in newTargetLocation)) {
|
|
warn(`Invalid redirect found:\n${JSON.stringify(newTargetLocation, null, 2)}\n when navigating to "${to.fullPath}". A redirect must contain a name or path. This will break in production.`);
|
|
throw new Error('Invalid redirect');
|
|
}
|
|
return assign({
|
|
query: to.query,
|
|
hash: to.hash,
|
|
// avoid transferring params if the redirect has a path
|
|
params: 'path' in newTargetLocation ? {} : to.params,
|
|
}, newTargetLocation);
|
|
}
|
|
}
|
|
function pushWithRedirect(to, redirectedFrom) {
|
|
const targetLocation = (pendingLocation = resolve(to));
|
|
const from = currentRoute.value;
|
|
const data = to.state;
|
|
const force = to.force;
|
|
// to could be a string where `replace` is a function
|
|
const replace = to.replace === true;
|
|
const shouldRedirect = handleRedirectRecord(targetLocation);
|
|
if (shouldRedirect)
|
|
return pushWithRedirect(assign(locationAsObject(shouldRedirect), {
|
|
state: typeof shouldRedirect === 'object'
|
|
? assign({}, data, shouldRedirect.state)
|
|
: data,
|
|
force,
|
|
replace,
|
|
}),
|
|
// keep original redirectedFrom if it exists
|
|
redirectedFrom || targetLocation);
|
|
// if it was a redirect we already called `pushWithRedirect` above
|
|
const toLocation = targetLocation;
|
|
toLocation.redirectedFrom = redirectedFrom;
|
|
let failure;
|
|
if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {
|
|
failure = createRouterError(16 /* ErrorTypes.NAVIGATION_DUPLICATED */, { to: toLocation, from });
|
|
// trigger scroll to allow scrolling to the same anchor
|
|
handleScroll(from, from,
|
|
// this is a push, the only way for it to be triggered from a
|
|
// history.listen is with a redirect, which makes it become a push
|
|
true,
|
|
// This cannot be the first navigation because the initial location
|
|
// cannot be manually navigated to
|
|
false);
|
|
}
|
|
return (failure ? Promise.resolve(failure) : navigate(toLocation, from))
|
|
.catch((error) => isNavigationFailure(error)
|
|
? // navigation redirects still mark the router as ready
|
|
isNavigationFailure(error, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)
|
|
? error
|
|
: markAsReady(error) // also returns the error
|
|
: // reject any unknown error
|
|
triggerError(error, toLocation, from))
|
|
.then((failure) => {
|
|
if (failure) {
|
|
if (isNavigationFailure(failure, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)) {
|
|
if (( true) &&
|
|
// we are redirecting to the same location we were already at
|
|
isSameRouteLocation(stringifyQuery$1, resolve(failure.to), toLocation) &&
|
|
// and we have done it a couple of times
|
|
redirectedFrom &&
|
|
// @ts-expect-error: added only in dev
|
|
(redirectedFrom._count = redirectedFrom._count
|
|
? // @ts-expect-error
|
|
redirectedFrom._count + 1
|
|
: 1) > 30) {
|
|
warn(`Detected a possibly infinite redirection in a navigation guard when going from "${from.fullPath}" to "${toLocation.fullPath}". Aborting to avoid a Stack Overflow.\n Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`);
|
|
return Promise.reject(new Error('Infinite redirect in navigation guard'));
|
|
}
|
|
return pushWithRedirect(
|
|
// keep options
|
|
assign({
|
|
// preserve an existing replacement but allow the redirect to override it
|
|
replace,
|
|
}, locationAsObject(failure.to), {
|
|
state: typeof failure.to === 'object'
|
|
? assign({}, data, failure.to.state)
|
|
: data,
|
|
force,
|
|
}),
|
|
// preserve the original redirectedFrom if any
|
|
redirectedFrom || toLocation);
|
|
}
|
|
}
|
|
else {
|
|
// if we fail we don't finalize the navigation
|
|
failure = finalizeNavigation(toLocation, from, true, replace, data);
|
|
}
|
|
triggerAfterEach(toLocation, from, failure);
|
|
return failure;
|
|
});
|
|
}
|
|
/**
|
|
* Helper to reject and skip all navigation guards if a new navigation happened
|
|
* @param to
|
|
* @param from
|
|
*/
|
|
function checkCanceledNavigationAndReject(to, from) {
|
|
const error = checkCanceledNavigation(to, from);
|
|
return error ? Promise.reject(error) : Promise.resolve();
|
|
}
|
|
function runWithContext(fn) {
|
|
const app = installedApps.values().next().value;
|
|
// support Vue < 3.3
|
|
return app && typeof app.runWithContext === 'function'
|
|
? app.runWithContext(fn)
|
|
: fn();
|
|
}
|
|
// TODO: refactor the whole before guards by internally using router.beforeEach
|
|
function navigate(to, from) {
|
|
let guards;
|
|
const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);
|
|
// all components here have been resolved once because we are leaving
|
|
guards = extractComponentsGuards(leavingRecords.reverse(), 'beforeRouteLeave', to, from);
|
|
// leavingRecords is already reversed
|
|
for (const record of leavingRecords) {
|
|
record.leaveGuards.forEach(guard => {
|
|
guards.push(guardToPromiseFn(guard, to, from));
|
|
});
|
|
}
|
|
const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);
|
|
guards.push(canceledNavigationCheck);
|
|
// run the queue of per route beforeRouteLeave guards
|
|
return (runGuardQueue(guards)
|
|
.then(() => {
|
|
// check global guards beforeEach
|
|
guards = [];
|
|
for (const guard of beforeGuards.list()) {
|
|
guards.push(guardToPromiseFn(guard, to, from));
|
|
}
|
|
guards.push(canceledNavigationCheck);
|
|
return runGuardQueue(guards);
|
|
})
|
|
.then(() => {
|
|
// check in components beforeRouteUpdate
|
|
guards = extractComponentsGuards(updatingRecords, 'beforeRouteUpdate', to, from);
|
|
for (const record of updatingRecords) {
|
|
record.updateGuards.forEach(guard => {
|
|
guards.push(guardToPromiseFn(guard, to, from));
|
|
});
|
|
}
|
|
guards.push(canceledNavigationCheck);
|
|
// run the queue of per route beforeEnter guards
|
|
return runGuardQueue(guards);
|
|
})
|
|
.then(() => {
|
|
// check the route beforeEnter
|
|
guards = [];
|
|
for (const record of enteringRecords) {
|
|
// do not trigger beforeEnter on reused views
|
|
if (record.beforeEnter) {
|
|
if (isArray(record.beforeEnter)) {
|
|
for (const beforeEnter of record.beforeEnter)
|
|
guards.push(guardToPromiseFn(beforeEnter, to, from));
|
|
}
|
|
else {
|
|
guards.push(guardToPromiseFn(record.beforeEnter, to, from));
|
|
}
|
|
}
|
|
}
|
|
guards.push(canceledNavigationCheck);
|
|
// run the queue of per route beforeEnter guards
|
|
return runGuardQueue(guards);
|
|
})
|
|
.then(() => {
|
|
// NOTE: at this point to.matched is normalized and does not contain any () => Promise<Component>
|
|
// clear existing enterCallbacks, these are added by extractComponentsGuards
|
|
to.matched.forEach(record => (record.enterCallbacks = {}));
|
|
// check in-component beforeRouteEnter
|
|
guards = extractComponentsGuards(enteringRecords, 'beforeRouteEnter', to, from);
|
|
guards.push(canceledNavigationCheck);
|
|
// run the queue of per route beforeEnter guards
|
|
return runGuardQueue(guards);
|
|
})
|
|
.then(() => {
|
|
// check global guards beforeResolve
|
|
guards = [];
|
|
for (const guard of beforeResolveGuards.list()) {
|
|
guards.push(guardToPromiseFn(guard, to, from));
|
|
}
|
|
guards.push(canceledNavigationCheck);
|
|
return runGuardQueue(guards);
|
|
})
|
|
// catch any navigation canceled
|
|
.catch(err => isNavigationFailure(err, 8 /* ErrorTypes.NAVIGATION_CANCELLED */)
|
|
? err
|
|
: Promise.reject(err)));
|
|
}
|
|
function triggerAfterEach(to, from, failure) {
|
|
// navigation is confirmed, call afterGuards
|
|
// TODO: wrap with error handlers
|
|
afterGuards
|
|
.list()
|
|
.forEach(guard => runWithContext(() => guard(to, from, failure)));
|
|
}
|
|
/**
|
|
* - Cleans up any navigation guards
|
|
* - Changes the url if necessary
|
|
* - Calls the scrollBehavior
|
|
*/
|
|
function finalizeNavigation(toLocation, from, isPush, replace, data) {
|
|
// a more recent navigation took place
|
|
const error = checkCanceledNavigation(toLocation, from);
|
|
if (error)
|
|
return error;
|
|
// only consider as push if it's not the first navigation
|
|
const isFirstNavigation = from === START_LOCATION_NORMALIZED;
|
|
const state = !isBrowser ? {} : history.state;
|
|
// change URL only if the user did a push/replace and if it's not the initial navigation because
|
|
// it's just reflecting the url
|
|
if (isPush) {
|
|
// on the initial navigation, we want to reuse the scroll position from
|
|
// history state if it exists
|
|
if (replace || isFirstNavigation)
|
|
routerHistory.replace(toLocation.fullPath, assign({
|
|
scroll: isFirstNavigation && state && state.scroll,
|
|
}, data));
|
|
else
|
|
routerHistory.push(toLocation.fullPath, data);
|
|
}
|
|
// accept current navigation
|
|
currentRoute.value = toLocation;
|
|
handleScroll(toLocation, from, isPush, isFirstNavigation);
|
|
markAsReady();
|
|
}
|
|
let removeHistoryListener;
|
|
// attach listener to history to trigger navigations
|
|
function setupListeners() {
|
|
// avoid setting up listeners twice due to an invalid first navigation
|
|
if (removeHistoryListener)
|
|
return;
|
|
removeHistoryListener = routerHistory.listen((to, _from, info) => {
|
|
if (!router.listening)
|
|
return;
|
|
// cannot be a redirect route because it was in history
|
|
const toLocation = resolve(to);
|
|
// due to dynamic routing, and to hash history with manual navigation
|
|
// (manually changing the url or calling history.hash = '#/somewhere'),
|
|
// there could be a redirect record in history
|
|
const shouldRedirect = handleRedirectRecord(toLocation);
|
|
if (shouldRedirect) {
|
|
pushWithRedirect(assign(shouldRedirect, { replace: true }), toLocation).catch(noop);
|
|
return;
|
|
}
|
|
pendingLocation = toLocation;
|
|
const from = currentRoute.value;
|
|
// TODO: should be moved to web history?
|
|
if (isBrowser) {
|
|
saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());
|
|
}
|
|
navigate(toLocation, from)
|
|
.catch((error) => {
|
|
if (isNavigationFailure(error, 4 /* ErrorTypes.NAVIGATION_ABORTED */ | 8 /* ErrorTypes.NAVIGATION_CANCELLED */)) {
|
|
return error;
|
|
}
|
|
if (isNavigationFailure(error, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)) {
|
|
// Here we could call if (info.delta) routerHistory.go(-info.delta,
|
|
// false) but this is bug prone as we have no way to wait the
|
|
// navigation to be finished before calling pushWithRedirect. Using
|
|
// a setTimeout of 16ms seems to work but there is no guarantee for
|
|
// it to work on every browser. So instead we do not restore the
|
|
// history entry and trigger a new navigation as requested by the
|
|
// navigation guard.
|
|
// the error is already handled by router.push we just want to avoid
|
|
// logging the error
|
|
pushWithRedirect(error.to, toLocation
|
|
// avoid an uncaught rejection, let push call triggerError
|
|
)
|
|
.then(failure => {
|
|
// manual change in hash history #916 ending up in the URL not
|
|
// changing, but it was changed by the manual url change, so we
|
|
// need to manually change it ourselves
|
|
if (isNavigationFailure(failure, 4 /* ErrorTypes.NAVIGATION_ABORTED */ |
|
|
16 /* ErrorTypes.NAVIGATION_DUPLICATED */) &&
|
|
!info.delta &&
|
|
info.type === NavigationType.pop) {
|
|
routerHistory.go(-1, false);
|
|
}
|
|
})
|
|
.catch(noop);
|
|
// avoid the then branch
|
|
return Promise.reject();
|
|
}
|
|
// do not restore history on unknown direction
|
|
if (info.delta) {
|
|
routerHistory.go(-info.delta, false);
|
|
}
|
|
// unrecognized error, transfer to the global handler
|
|
return triggerError(error, toLocation, from);
|
|
})
|
|
.then((failure) => {
|
|
failure =
|
|
failure ||
|
|
finalizeNavigation(
|
|
// after navigation, all matched components are resolved
|
|
toLocation, from, false);
|
|
// revert the navigation
|
|
if (failure) {
|
|
if (info.delta &&
|
|
// a new navigation has been triggered, so we do not want to revert, that will change the current history
|
|
// entry while a different route is displayed
|
|
!isNavigationFailure(failure, 8 /* ErrorTypes.NAVIGATION_CANCELLED */)) {
|
|
routerHistory.go(-info.delta, false);
|
|
}
|
|
else if (info.type === NavigationType.pop &&
|
|
isNavigationFailure(failure, 4 /* ErrorTypes.NAVIGATION_ABORTED */ | 16 /* ErrorTypes.NAVIGATION_DUPLICATED */)) {
|
|
// manual change in hash history #916
|
|
// it's like a push but lacks the information of the direction
|
|
routerHistory.go(-1, false);
|
|
}
|
|
}
|
|
triggerAfterEach(toLocation, from, failure);
|
|
})
|
|
.catch(noop);
|
|
});
|
|
}
|
|
// Initialization and Errors
|
|
let readyHandlers = useCallbacks();
|
|
let errorHandlers = useCallbacks();
|
|
let ready;
|
|
/**
|
|
* Trigger errorHandlers added via onError and throws the error as well
|
|
*
|
|
* @param error - error to throw
|
|
* @param to - location we were navigating to when the error happened
|
|
* @param from - location we were navigating from when the error happened
|
|
* @returns the error as a rejected promise
|
|
*/
|
|
function triggerError(error, to, from) {
|
|
markAsReady(error);
|
|
const list = errorHandlers.list();
|
|
if (list.length) {
|
|
list.forEach(handler => handler(error, to, from));
|
|
}
|
|
else {
|
|
if ((true)) {
|
|
warn('uncaught error during route navigation:');
|
|
}
|
|
console.error(error);
|
|
}
|
|
return Promise.reject(error);
|
|
}
|
|
function isReady() {
|
|
if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)
|
|
return Promise.resolve();
|
|
return new Promise((resolve, reject) => {
|
|
readyHandlers.add([resolve, reject]);
|
|
});
|
|
}
|
|
function markAsReady(err) {
|
|
if (!ready) {
|
|
// still not ready if an error happened
|
|
ready = !err;
|
|
setupListeners();
|
|
readyHandlers
|
|
.list()
|
|
.forEach(([resolve, reject]) => (err ? reject(err) : resolve()));
|
|
readyHandlers.reset();
|
|
}
|
|
return err;
|
|
}
|
|
// Scroll behavior
|
|
function handleScroll(to, from, isPush, isFirstNavigation) {
|
|
const { scrollBehavior } = options;
|
|
if (!isBrowser || !scrollBehavior)
|
|
return Promise.resolve();
|
|
const scrollPosition = (!isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0))) ||
|
|
((isFirstNavigation || !isPush) &&
|
|
history.state &&
|
|
history.state.scroll) ||
|
|
null;
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.nextTick)()
|
|
.then(() => scrollBehavior(to, from, scrollPosition))
|
|
.then(position => position && scrollToPosition(position))
|
|
.catch(err => triggerError(err, to, from));
|
|
}
|
|
const go = (delta) => routerHistory.go(delta);
|
|
let started;
|
|
const installedApps = new Set();
|
|
const router = {
|
|
currentRoute,
|
|
listening: true,
|
|
addRoute,
|
|
removeRoute,
|
|
hasRoute,
|
|
getRoutes,
|
|
resolve,
|
|
options,
|
|
push,
|
|
replace,
|
|
go,
|
|
back: () => go(-1),
|
|
forward: () => go(1),
|
|
beforeEach: beforeGuards.add,
|
|
beforeResolve: beforeResolveGuards.add,
|
|
afterEach: afterGuards.add,
|
|
onError: errorHandlers.add,
|
|
isReady,
|
|
install(app) {
|
|
const router = this;
|
|
app.component('RouterLink', RouterLink);
|
|
app.component('RouterView', RouterView);
|
|
app.config.globalProperties.$router = router;
|
|
Object.defineProperty(app.config.globalProperties, '$route', {
|
|
enumerable: true,
|
|
get: () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.unref)(currentRoute),
|
|
});
|
|
// this initial navigation is only necessary on client, on server it doesn't
|
|
// make sense because it will create an extra unnecessary navigation and could
|
|
// lead to problems
|
|
if (isBrowser &&
|
|
// used for the initial navigation client side to avoid pushing
|
|
// multiple times when the router is used in multiple apps
|
|
!started &&
|
|
currentRoute.value === START_LOCATION_NORMALIZED) {
|
|
// see above
|
|
started = true;
|
|
push(routerHistory.location).catch(err => {
|
|
if ((true))
|
|
warn('Unexpected error when starting the router:', err);
|
|
});
|
|
}
|
|
const reactiveRoute = {};
|
|
for (const key in START_LOCATION_NORMALIZED) {
|
|
Object.defineProperty(reactiveRoute, key, {
|
|
get: () => currentRoute.value[key],
|
|
enumerable: true,
|
|
});
|
|
}
|
|
app.provide(routerKey, router);
|
|
app.provide(routeLocationKey, (0,vue__WEBPACK_IMPORTED_MODULE_0__.shallowReactive)(reactiveRoute));
|
|
app.provide(routerViewLocationKey, currentRoute);
|
|
const unmountApp = app.unmount;
|
|
installedApps.add(app);
|
|
app.unmount = function () {
|
|
installedApps.delete(app);
|
|
// the router is not attached to an app anymore
|
|
if (installedApps.size < 1) {
|
|
// invalidate the current navigation
|
|
pendingLocation = START_LOCATION_NORMALIZED;
|
|
removeHistoryListener && removeHistoryListener();
|
|
removeHistoryListener = null;
|
|
currentRoute.value = START_LOCATION_NORMALIZED;
|
|
started = false;
|
|
ready = false;
|
|
}
|
|
unmountApp();
|
|
};
|
|
// TODO: this probably needs to be updated so it can be used by vue-termui
|
|
if (( true) && isBrowser) {
|
|
addDevtools(app, router, matcher);
|
|
}
|
|
},
|
|
};
|
|
// TODO: type this as NavigationGuardReturn or similar instead of any
|
|
function runGuardQueue(guards) {
|
|
return guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());
|
|
}
|
|
return router;
|
|
}
|
|
function extractChangingRecords(to, from) {
|
|
const leavingRecords = [];
|
|
const updatingRecords = [];
|
|
const enteringRecords = [];
|
|
const len = Math.max(from.matched.length, to.matched.length);
|
|
for (let i = 0; i < len; i++) {
|
|
const recordFrom = from.matched[i];
|
|
if (recordFrom) {
|
|
if (to.matched.find(record => isSameRouteRecord(record, recordFrom)))
|
|
updatingRecords.push(recordFrom);
|
|
else
|
|
leavingRecords.push(recordFrom);
|
|
}
|
|
const recordTo = to.matched[i];
|
|
if (recordTo) {
|
|
// the type doesn't matter because we are comparing per reference
|
|
if (!from.matched.find(record => isSameRouteRecord(record, recordTo))) {
|
|
enteringRecords.push(recordTo);
|
|
}
|
|
}
|
|
}
|
|
return [leavingRecords, updatingRecords, enteringRecords];
|
|
}
|
|
|
|
/**
|
|
* Returns the router instance. Equivalent to using `$router` inside
|
|
* templates.
|
|
*/
|
|
function useRouter() {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)(routerKey);
|
|
}
|
|
/**
|
|
* Returns the current route location. Equivalent to using `$route` inside
|
|
* templates.
|
|
*/
|
|
function useRoute() {
|
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)(routeLocationKey);
|
|
}
|
|
|
|
|
|
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|
|
/************************************************************************/
|
|
/******/ // The module cache
|
|
/******/ var __webpack_module_cache__ = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/ // Check if module is in cache
|
|
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
/******/ if (cachedModule !== undefined) {
|
|
/******/ return cachedModule.exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
/******/ id: moduleId,
|
|
/******/ loaded: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.loaded = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/************************************************************************/
|
|
/******/ /* webpack/runtime/compat get default export */
|
|
/******/ (() => {
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = (module) => {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ () => (module['default']) :
|
|
/******/ () => (module);
|
|
/******/ __webpack_require__.d(getter, { a: getter });
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/ })();
|
|
/******/
|
|
/******/ /* webpack/runtime/define property getters */
|
|
/******/ (() => {
|
|
/******/ // define getter functions for harmony exports
|
|
/******/ __webpack_require__.d = (exports, definition) => {
|
|
/******/ for(var key in definition) {
|
|
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
/******/ }
|
|
/******/ }
|
|
/******/ };
|
|
/******/ })();
|
|
/******/
|
|
/******/ /* webpack/runtime/global */
|
|
/******/ (() => {
|
|
/******/ __webpack_require__.g = (function() {
|
|
/******/ if (typeof globalThis === 'object') return globalThis;
|
|
/******/ try {
|
|
/******/ return this || new Function('return this')();
|
|
/******/ } catch (e) {
|
|
/******/ if (typeof window === 'object') return window;
|
|
/******/ }
|
|
/******/ })();
|
|
/******/ })();
|
|
/******/
|
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
/******/ (() => {
|
|
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
/******/ })();
|
|
/******/
|
|
/******/ /* webpack/runtime/make namespace object */
|
|
/******/ (() => {
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = (exports) => {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/ })();
|
|
/******/
|
|
/******/ /* webpack/runtime/node module decorator */
|
|
/******/ (() => {
|
|
/******/ __webpack_require__.nmd = (module) => {
|
|
/******/ module.paths = [];
|
|
/******/ if (!module.children) module.children = [];
|
|
/******/ return module;
|
|
/******/ };
|
|
/******/ })();
|
|
/******/
|
|
/******/ /* webpack/runtime/nonce */
|
|
/******/ (() => {
|
|
/******/ __webpack_require__.nc = undefined;
|
|
/******/ })();
|
|
/******/
|
|
/************************************************************************/
|
|
var __webpack_exports__ = {};
|
|
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
(() => {
|
|
"use strict";
|
|
/*!*****************************!*\
|
|
!*** ./resources/js/app.js ***!
|
|
\*****************************/
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
|
|
/* harmony import */ var _components_App__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/App */ "./resources/js/components/App.vue");
|
|
/* harmony import */ var _css_loader_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../css/loader.css */ "./resources/css/loader.css");
|
|
/* harmony import */ var _css_spinner_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../css/spinner.css */ "./resources/css/spinner.css");
|
|
/* harmony import */ var _css_register_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../css/register.css */ "./resources/css/register.css");
|
|
/* harmony import */ var _css_payment_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../css/payment.css */ "./resources/css/payment.css");
|
|
/* harmony import */ var vue_sweetalert2__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vue-sweetalert2 */ "./node_modules/vue-sweetalert2/dist/vue-sweetalert.umd.js");
|
|
/* harmony import */ var vue_sweetalert2__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(vue_sweetalert2__WEBPACK_IMPORTED_MODULE_6__);
|
|
/* harmony import */ var sweetalert2_dist_sweetalert2_min_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! sweetalert2/dist/sweetalert2.min.css */ "./node_modules/sweetalert2/dist/sweetalert2.min.css");
|
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./store */ "./resources/js/store/index.js");
|
|
/* harmony import */ var _router__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./router */ "./resources/js/router/index.js");
|
|
/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./helper */ "./resources/js/helper/index.js");
|
|
/* harmony import */ var _components_partials_AddProfile__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./components/partials/AddProfile */ "./resources/js/components/partials/AddProfile.vue");
|
|
/* harmony import */ var _components_partials_step__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./components/partials/step */ "./resources/js/components/partials/step.vue");
|
|
/* harmony import */ var _components_partials_CreateAccount__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./components/partials/CreateAccount */ "./resources/js/components/partials/CreateAccount.vue");
|
|
/* harmony import */ var _components_partials_ChoosePackage__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./components/partials/ChoosePackage */ "./resources/js/components/partials/ChoosePackage.vue");
|
|
/* harmony import */ var _components_partials_ValidationError__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./components/partials/ValidationError */ "./resources/js/components/partials/ValidationError.vue");
|
|
/* harmony import */ var _components_Form_TextInput__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./components/Form/TextInput */ "./resources/js/components/Form/TextInput.vue");
|
|
/* harmony import */ var _components_Form_SelectInput__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./components/Form/SelectInput */ "./resources/js/components/Form/SelectInput.vue");
|
|
/* harmony import */ var _components_partials_TopArea__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./components/partials/TopArea */ "./resources/js/components/partials/TopArea.vue");
|
|
__webpack_require__(/*! ./bootstrap */ "./resources/js/bootstrap.js");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// routes
|
|
|
|
|
|
|
|
// Global component
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var app = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createApp)(_components_App__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
|
app.use(_store__WEBPACK_IMPORTED_MODULE_8__["default"]);
|
|
app.use(_router__WEBPACK_IMPORTED_MODULE_9__["default"]);
|
|
app.use((vue_sweetalert2__WEBPACK_IMPORTED_MODULE_6___default()));
|
|
//app.use(DisableAutocomplete);
|
|
|
|
var base_url = API_BASE_URL;
|
|
app.config.globalProperties.$base_url = base_url;
|
|
app.config.globalProperties.success_code = 100;
|
|
//app.config.globalProperties.$loader = `${base_url}/img/ajax-loader.gif`;
|
|
app.config.globalProperties.$loader = "https://i.stack.imgur.com/FhHRx.gif";
|
|
app.component('AddProfile', _components_partials_AddProfile__WEBPACK_IMPORTED_MODULE_11__["default"]);
|
|
app.component('Step', _components_partials_step__WEBPACK_IMPORTED_MODULE_12__["default"]);
|
|
app.component('CreateAccount', _components_partials_CreateAccount__WEBPACK_IMPORTED_MODULE_13__["default"]);
|
|
app.component('ChoosePackage', _components_partials_ChoosePackage__WEBPACK_IMPORTED_MODULE_14__["default"]);
|
|
app.component('ValidationError', _components_partials_ValidationError__WEBPACK_IMPORTED_MODULE_15__["default"]);
|
|
app.component('TextInput', _components_Form_TextInput__WEBPACK_IMPORTED_MODULE_16__["default"]);
|
|
app.component('SelectInput', _components_Form_SelectInput__WEBPACK_IMPORTED_MODULE_17__["default"]);
|
|
app.component('TopArea', _components_partials_TopArea__WEBPACK_IMPORTED_MODULE_18__["default"]);
|
|
app.mount('#app');
|
|
(0,_helper__WEBPACK_IMPORTED_MODULE_10__.setSecurityKey)(SECURITY_KEY);
|
|
})();
|
|
|
|
/******/ })()
|
|
; |