|
|
module.exports = /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {}; /******/ /******/ // The require function
/******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded
/******/ module.l = true; /******/ /******/ // Return the exports of the module
/******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache
/******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/dist/"; /******/ /******/ /******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 277); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(1);
exports.__esModule = true; exports.noop = noop; exports.isDef = isDef; exports.isFunction = isFunction; exports.isObject = isObject; exports.isPromise = isPromise; exports.get = get; exports.isServer = exports.inBrowser = exports.addUnit = exports.createNamespace = void 0;
var _vue = _interopRequireDefault(__webpack_require__(4));
var _create = __webpack_require__(24);
exports.createNamespace = _create.createNamespace;
var _unit = __webpack_require__(20);
exports.addUnit = _unit.addUnit; var inBrowser = typeof window !== 'undefined'; exports.inBrowser = inBrowser; var isServer = _vue.default.prototype.$isServer; // eslint-disable-next-line @typescript-eslint/no-empty-function
exports.isServer = isServer;
function noop() {}
function isDef(val) { return val !== undefined && val !== null; }
function isFunction(val) { return typeof val === 'function'; }
function isObject(val) { return val !== null && typeof val === 'object'; }
function isPromise(val) { return isObject(val) && isFunction(val.then) && isFunction(val.catch); }
function get(object, path) { var keys = path.split('.'); var result = object; keys.forEach(function (key) { var _result$key;
result = (_result$key = result[key]) != null ? _result$key : ''; }); return result; }
/***/ }), /* 1 */ /***/ (function(module, exports) {
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
module.exports = _interopRequireDefault;
/***/ }), /* 2 */, /* 3 */, /* 4 */ /***/ (function(module, exports) {
module.exports = require("vue");
/***/ }), /* 5 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
/* MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra */ // css base code, injected by the css-loader
module.exports = function (useSourceMap) { var list = []; // return the list of modules as css string
list.toString = function toString() { return this.map(function (item) { var content = cssWithMappingToString(item, useSourceMap);
if (item[2]) { return '@media ' + item[2] + '{' + content + '}'; } else { return content; } }).join(''); }; // import a list of modules into the list
list.i = function (modules, mediaQuery) { if (typeof modules === 'string') { modules = [[null, modules, '']]; }
var alreadyImportedModules = {};
for (var i = 0; i < this.length; i++) { var id = this[i][0];
if (id != null) { alreadyImportedModules[id] = true; } }
for (i = 0; i < modules.length; i++) { var item = modules[i]; // skip already imported module
// this implementation is not 100% perfect for weird media query combinations
// when a module is imported multiple times with different media queries.
// I hope this will never occur (Hey this way we have smaller bundles)
if (item[0] == null || !alreadyImportedModules[item[0]]) { if (mediaQuery && !item[2]) { item[2] = mediaQuery; } else if (mediaQuery) { item[2] = '(' + item[2] + ') and (' + mediaQuery + ')'; }
list.push(item); } } };
return list; };
function cssWithMappingToString(item, useSourceMap) { var content = item[1] || ''; var cssMapping = item[3];
if (!cssMapping) { return content; }
if (useSourceMap && typeof btoa === 'function') { var sourceMapping = toComment(cssMapping); var sourceURLs = cssMapping.sources.map(function (source) { return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'; }); return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); }
return [content].join('\n'); } // Adapted from convert-source-map (MIT)
function toComment(sourceMap) { // eslint-disable-next-line no-undef
var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; return '/*# ' + data + ' */'; }
/***/ }), /* 6 */ /***/ (function(module, exports, __webpack_require__) {
/* MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra */
var stylesInDom = {};
var memoize = function (fn) { var memo;
return function () { if (typeof memo === "undefined") memo = fn.apply(this, arguments); return memo; }; };
var isOldIE = memoize(function () { // 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
return window && document && document.all && !window.atob; });
var getTarget = function (target, parent) { if (parent){ return parent.querySelector(target); } return document.querySelector(target); };
var getElement = (function (fn) { var memo = {};
return function(target, parent) { // If passing function in options, then use it for resolve "head" element.
// Useful for Shadow Root style i.e
// {
// insertInto: function () { return document.querySelector("#foo").shadowRoot }
// }
if (typeof target === 'function') { return target(); } if (typeof memo[target] === "undefined") { var styleTarget = getTarget.call(this, target, parent); // 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) { styleTarget = null; } } memo[target] = styleTarget; } return memo[target] }; })();
var singleton = null; var singletonCounter = 0; var stylesInsertedAtTop = [];
var fixUrls = __webpack_require__(12);
module.exports = function(list, options) { if (typeof DEBUG !== "undefined" && DEBUG) { if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment"); }
options = options || {};
options.attrs = typeof options.attrs === "object" ? options.attrs : {};
// 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();
// By default, add <style> tags to the <head> element
if (!options.insertInto) options.insertInto = "head";
// By default, add <style> tags to the bottom of the target
if (!options.insertAt) options.insertAt = "bottom";
var styles = listToStyles(list, options);
addStylesToDom(styles, options);
return function update (newList) { var mayRemove = [];
for (var i = 0; i < styles.length; i++) { var item = styles[i]; var domStyle = stylesInDom[item.id];
domStyle.refs--; mayRemove.push(domStyle); }
if(newList) { var newStyles = listToStyles(newList, options); addStylesToDom(newStyles, options); }
for (var i = 0; i < mayRemove.length; i++) { var domStyle = mayRemove[i];
if(domStyle.refs === 0) { for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();
delete stylesInDom[domStyle.id]; } } }; };
function addStylesToDom (styles, options) { for (var i = 0; i < styles.length; i++) { var item = styles[i]; var domStyle = stylesInDom[item.id];
if(domStyle) { domStyle.refs++;
for(var j = 0; j < domStyle.parts.length; j++) { domStyle.parts[j](item.parts[j]); }
for(; j < item.parts.length; j++) { domStyle.parts.push(addStyle(item.parts[j], options)); } } else { var parts = [];
for(var j = 0; j < item.parts.length; j++) { parts.push(addStyle(item.parts[j], options)); }
stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts}; } } }
function listToStyles (list, options) { var styles = []; var newStyles = {};
for (var i = 0; i < list.length; i++) { var item = list[i]; var id = options.base ? item[0] + options.base : item[0]; var css = item[1]; var media = item[2]; var sourceMap = item[3]; var part = {css: css, media: media, sourceMap: sourceMap};
if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]}); else newStyles[id].parts.push(part); }
return styles; }
function insertStyleElement (options, style) { var target = getElement(options.insertInto)
if (!target) { throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid."); }
var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];
if (options.insertAt === "top") { if (!lastStyleElementInsertedAtTop) { target.insertBefore(style, target.firstChild); } else if (lastStyleElementInsertedAtTop.nextSibling) { target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling); } else { target.appendChild(style); } stylesInsertedAtTop.push(style); } else if (options.insertAt === "bottom") { target.appendChild(style); } else if (typeof options.insertAt === "object" && options.insertAt.before) { var nextSibling = getElement(options.insertAt.before, target); target.insertBefore(style, nextSibling); } else { throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n"); } }
function removeStyleElement (style) { if (style.parentNode === null) return false; style.parentNode.removeChild(style);
var idx = stylesInsertedAtTop.indexOf(style); if(idx >= 0) { stylesInsertedAtTop.splice(idx, 1); } }
function createStyleElement (options) { var style = document.createElement("style");
if(options.attrs.type === undefined) { options.attrs.type = "text/css"; }
if(options.attrs.nonce === undefined) { var nonce = getNonce(); if (nonce) { options.attrs.nonce = nonce; } }
addAttrs(style, options.attrs); insertStyleElement(options, style);
return style; }
function createLinkElement (options) { var link = document.createElement("link");
if(options.attrs.type === undefined) { options.attrs.type = "text/css"; } options.attrs.rel = "stylesheet";
addAttrs(link, options.attrs); insertStyleElement(options, link);
return link; }
function addAttrs (el, attrs) { Object.keys(attrs).forEach(function (key) { el.setAttribute(key, attrs[key]); }); }
function getNonce() { if (false) {}
return __webpack_require__.nc; }
function addStyle (obj, options) { var style, update, remove, result;
// If a transform function was defined, run it on the css
if (options.transform && obj.css) { result = typeof options.transform === 'function' ? options.transform(obj.css) : options.transform.default(obj.css);
if (result) { // If transform returns a value, use that instead of the original css.
// This allows running runtime transformations on the css.
obj.css = result; } else { // If the transform function returns a falsy value, don't add this css.
// This allows conditional loading of css
return function() { // noop
}; } }
if (options.singleton) { var styleIndex = singletonCounter++;
style = singleton || (singleton = createStyleElement(options));
update = applyToSingletonTag.bind(null, style, styleIndex, false); remove = applyToSingletonTag.bind(null, style, styleIndex, true);
} else if ( obj.sourceMap && typeof URL === "function" && typeof URL.createObjectURL === "function" && typeof URL.revokeObjectURL === "function" && typeof Blob === "function" && typeof btoa === "function" ) { style = createLinkElement(options); update = updateLink.bind(null, style, options); remove = function () { removeStyleElement(style);
if(style.href) URL.revokeObjectURL(style.href); }; } else { style = createStyleElement(options); update = applyToTag.bind(null, style); remove = function () { 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(); } }; }
var replaceText = (function () { var textStore = [];
return function (index, replacement) { textStore[index] = replacement;
return textStore.filter(Boolean).join('\n'); }; })();
function applyToSingletonTag (style, index, remove, obj) { var css = remove ? "" : obj.css;
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, obj) { var css = obj.css; var media = obj.media;
if(media) { style.setAttribute("media", media) }
if(style.styleSheet) { style.styleSheet.cssText = css; } else { while(style.firstChild) { style.removeChild(style.firstChild); }
style.appendChild(document.createTextNode(css)); } }
function updateLink (link, options, obj) { var css = obj.css; var sourceMap = obj.sourceMap;
/* If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled and there is no publicPath defined then lets turn convertToAbsoluteUrls on by default. Otherwise default to the convertToAbsoluteUrls option directly */ var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;
if (options.convertToAbsoluteUrls || autoFixUrls) { css = fixUrls(css); }
if (sourceMap) { // http://stackoverflow.com/a/26603875
css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */"; }
var blob = new Blob([css], { type: "text/css" });
var oldSrc = link.href;
link.href = URL.createObjectURL(blob);
if(oldSrc) URL.revokeObjectURL(oldSrc); }
/***/ }), /* 7 */, /* 8 */, /* 9 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.camelize = camelize; exports.padZero = padZero; var camelizeRE = /-(\w)/g;
function camelize(str) { return str.replace(camelizeRE, function (_, c) { return c.toUpperCase(); }); }
function padZero(num, targetLength) { if (targetLength === void 0) { targetLength = 2; }
var str = num + '';
while (str.length < targetLength) { str = '0' + str; }
return str; }
/***/ }), /* 10 */, /* 11 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(1);
exports.__esModule = true; exports.default = void 0;
var _vue = _interopRequireDefault(__webpack_require__(4));
var _deepAssign = __webpack_require__(21);
var _zhCN = _interopRequireDefault(__webpack_require__(27));
var proto = _vue.default.prototype; var defineReactive = _vue.default.util.defineReactive; defineReactive(proto, '$vantLang', 'zh-CN'); defineReactive(proto, '$vantMessages', { 'zh-CN': _zhCN.default }); var _default = { messages: function messages() { return proto.$vantMessages[proto.$vantLang]; }, use: function use(lang, messages) { var _this$add;
proto.$vantLang = lang; this.add((_this$add = {}, _this$add[lang] = messages, _this$add)); }, add: function add(messages) { if (messages === void 0) { messages = {}; }
(0, _deepAssign.deepAssign)(proto.$vantMessages, messages); } }; exports.default = _default;
/***/ }), /* 12 */ /***/ (function(module, exports) {
/** * When source maps are enabled, `style-loader` uses a link element with a data-uri to * embed the css on the page. This breaks all relative urls because now they are relative to a * bundle instead of the current page. * * One solution is to only use full urls, but that may be impossible. * * Instead, this function "fixes" the relative urls to be absolute according to the current page location. * * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command. * */
module.exports = function (css) { // get current location
var location = typeof window !== "undefined" && window.location;
if (!location) { throw new Error("fixUrls requires window.location"); }
// blank or null?
if (!css || typeof css !== "string") { return css; }
var baseUrl = location.protocol + "//" + location.host; var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");
// convert each url(...)
/* This regular expression is just a way to recursively match brackets within a string.
/url\s*\( = Match on the word "url" with any whitespace after it and then a parens ( = Start a capturing group (?: = Start a non-capturing group [^)(] = Match anything that isn't a parentheses | = OR \( = Match a start parentheses (?: = Start another non-capturing groups [^)(]+ = Match anything that isn't a parentheses | = OR \( = Match a start parentheses [^)(]* = Match anything that isn't a parentheses \) = Match a end parentheses ) = End Group *\) = Match anything and then a close parens ) = Close non-capturing group * = Match anything ) = Close capturing group \) = Match a close parens
/gi = Get all matches, not the first. Be case insensitive. */ var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) { // strip quotes (if they exist)
var unquotedOrigUrl = origUrl .trim() .replace(/^"(.*)"$/, function(o, $1){ return $1; }) .replace(/^'(.*)'$/, function(o, $1){ return $1; });
// already a full url? no change
if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(unquotedOrigUrl)) { return fullMatch; }
// convert the url to a full url
var newUrl;
if (unquotedOrigUrl.indexOf("//") === 0) { //TODO: should we add protocol?
newUrl = unquotedOrigUrl; } else if (unquotedOrigUrl.indexOf("/") === 0) { // path should be relative to the base url
newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
} else { // path should be relative to current directory
newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
}
// send back the fixed url(...)
return "url(" + JSON.stringify(newUrl) + ")"; });
// send back the fixed css
return fixedCss; };
/***/ }), /* 13 */, /* 14 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(1);
exports.__esModule = true; exports.inherit = inherit; exports.emit = emit; exports.mount = mount;
var _extends2 = _interopRequireDefault(__webpack_require__(18));
var _vue = _interopRequireDefault(__webpack_require__(4));
var inheritKey = ['ref', 'style', 'class', 'attrs', 'refInFor', 'nativeOn', 'directives', 'staticClass', 'staticStyle']; var mapInheritKey = { nativeOn: 'on' }; // inherit partial context, map nativeOn to on
function inherit(context, inheritListeners) { var result = inheritKey.reduce(function (obj, key) { if (context.data[key]) { obj[mapInheritKey[key] || key] = context.data[key]; }
return obj; }, {});
if (inheritListeners) { result.on = result.on || {}; (0, _extends2.default)(result.on, context.data.on); }
return result; } // emit event
function emit(context, eventName) { for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { args[_key - 2] = arguments[_key]; }
var listeners = context.listeners[eventName];
if (listeners) { if (Array.isArray(listeners)) { listeners.forEach(function (listener) { listener.apply(void 0, args); }); } else { listeners.apply(void 0, args); } } } // mount functional component
function mount(Component, data) { var instance = new _vue.default({ el: document.createElement('div'), props: Component.props, render: function render(h) { return h(Component, (0, _extends2.default)({ props: this.$props }, data)); } }); document.body.appendChild(instance.$el); return instance; }
/***/ }), /* 15 */, /* 16 */ /***/ (function(module, exports, __webpack_require__) {
"use strict"; function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}var normalMerge=["attrs","props","domProps"],toArrayMerge=["class","style","directives"],functionalMerge=["on","nativeOn"],mergeJsxProps=function(a){return a.reduce(function(c,a){for(var b in a)if(!c[b])c[b]=a[b];else if(-1!==normalMerge.indexOf(b))c[b]=_extends({},c[b],a[b]);else if(-1!==toArrayMerge.indexOf(b)){var d=c[b]instanceof Array?c[b]:[c[b]],e=a[b]instanceof Array?a[b]:[a[b]];c[b]=d.concat(e)}else if(-1!==functionalMerge.indexOf(b)){for(var f in a[b])if(c[b][f]){var g=c[b][f]instanceof Array?c[b][f]:[c[b][f]],h=a[b][f]instanceof Array?a[b][f]:[a[b][f]];c[b][f]=g.concat(h)}else c[b][f]=a[b][f];}else if("hook"==b)for(var i in a[b])c[b][i]=c[b][i]?mergeFn(c[b][i],a[b][i]):a[b][i];else c[b]=a[b];return c},{})},mergeFn=function(a,b){return function(){a&&a.apply(this,arguments),b&&b.apply(this,arguments)}};module.exports=mergeJsxProps;
/***/ }), /* 17 */, /* 18 */ /***/ (function(module, exports) {
function _extends() { module.exports = _extends = Object.assign || 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); }
module.exports = _extends;
/***/ }), /* 19 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.isNumeric = isNumeric; exports.isNaN = isNaN;
function isNumeric(val) { return /^\d+(\.\d+)?$/.test(val); }
function isNaN(val) { if (Number.isNaN) { return Number.isNaN(val); } // eslint-disable-next-line no-self-compare
return val !== val; }
/***/ }), /* 20 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.addUnit = addUnit; exports.unitToPx = unitToPx;
var _ = __webpack_require__(0);
var _number = __webpack_require__(19);
function addUnit(value) { if (!(0, _.isDef)(value)) { return undefined; }
value = String(value); return (0, _number.isNumeric)(value) ? value + "px" : value; } // cache
var rootFontSize;
function getRootFontSize() { if (!rootFontSize) { var doc = document.documentElement; var fontSize = doc.style.fontSize || window.getComputedStyle(doc).fontSize; rootFontSize = parseFloat(fontSize); }
return rootFontSize; }
function convertRem(value) { value = value.replace(/rem/g, ''); return +value * getRootFontSize(); }
function convertVw(value) { value = value.replace(/vw/g, ''); return +value * window.innerWidth / 100; }
function convertVh(value) { value = value.replace(/vh/g, ''); return +value * window.innerHeight / 100; }
function unitToPx(value) { if (typeof value === 'number') { return value; }
if (_.inBrowser) { if (value.indexOf('rem') !== -1) { return convertRem(value); }
if (value.indexOf('vw') !== -1) { return convertVw(value); }
if (value.indexOf('vh') !== -1) { return convertVh(value); } }
return parseFloat(value); }
/***/ }), /* 21 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.deepAssign = deepAssign;
var _ = __webpack_require__(0);
var hasOwnProperty = Object.prototype.hasOwnProperty;
function assignKey(to, from, key) { var val = from[key];
if (!(0, _.isDef)(val)) { return; }
if (!hasOwnProperty.call(to, key) || !(0, _.isObject)(val)) { to[key] = val; } else { // eslint-disable-next-line @typescript-eslint/no-use-before-define
to[key] = deepAssign(Object(to[key]), from[key]); } }
function deepAssign(to, from) { Object.keys(from).forEach(function (key) { assignKey(to, from, key); }); return to; }
/***/ }), /* 22 */ /***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(23);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform; var insertInto;
var options = {"hmr":true}
options.transform = transform options.insertInto = undefined;
var update = __webpack_require__(6)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }), /* 23 */ /***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(5)(false); // Module
exports.push([module.i, "html{-webkit-tap-highlight-color:transparent}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue',Helvetica,Segoe UI,Arial,Roboto,'PingFang SC',miui,'Hiragino Sans GB','Microsoft Yahei',sans-serif}a{text-decoration:none}button,input,textarea{color:inherit;font:inherit}[class*=van-]:focus,a:focus,button:focus,input:focus,textarea:focus{outline:0}ol,ul{margin:0;padding:0;list-style:none}.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;-webkit-box-orient:vertical}.van-clearfix::after{display:table;clear:both;content:''}[class*=van-hairline]::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #ebedf0;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--top::after{border-top-width:1px}.van-hairline--left::after{border-left-width:1px}.van-hairline--right::after{border-right-width:1px}.van-hairline--bottom::after{border-bottom-width:1px}.van-hairline--top-bottom::after,.van-hairline-unset--top-bottom::after{border-width:1px 0}.van-hairline--surround::after{border-width:1px}@-webkit-keyframes van-slide-up-enter{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes van-slide-up-enter{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes van-slide-up-leave{to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes van-slide-up-leave{to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes van-slide-down-enter{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes van-slide-down-enter{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@-webkit-keyframes van-slide-down-leave{to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes van-slide-down-leave{to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@-webkit-keyframes van-slide-left-enter{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes van-slide-left-enter{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-webkit-keyframes van-slide-left-leave{to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes van-slide-left-leave{to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-webkit-keyframes van-slide-right-enter{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes van-slide-right-enter{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-webkit-keyframes van-slide-right-leave{to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes van-slide-right-leave{to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-webkit-keyframes van-fade-in{from{opacity:0}to{opacity:1}}@keyframes van-fade-in{from{opacity:0}to{opacity:1}}@-webkit-keyframes van-fade-out{from{opacity:1}to{opacity:0}}@keyframes van-fade-out{from{opacity:1}to{opacity:0}}@-webkit-keyframes van-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes van-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.van-fade-enter-active{-webkit-animation:.3s van-fade-in both ease-out;animation:.3s van-fade-in both ease-out}.van-fade-leave-active{-webkit-animation:.3s van-fade-out both ease-in;animation:.3s van-fade-out both ease-in
/***/ }), /* 24 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.createNamespace = createNamespace;
var _bem = __webpack_require__(25);
var _component = __webpack_require__(26);
var _i18n = __webpack_require__(29);
function createNamespace(name) { name = 'van-' + name; return [(0, _component.createComponent)(name), (0, _bem.createBEM)(name), (0, _i18n.createI18N)(name)]; }
/***/ }), /* 25 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.createBEM = createBEM;
/** * bem helper * b() // 'button'
* b('text') // 'button__text'
* b({ disabled }) // 'button button--disabled'
* b('text', { disabled }) // 'button__text button__text--disabled'
* b(['disabled', 'primary']) // 'button button--disabled button--primary'
*/ function gen(name, mods) { if (!mods) { return ''; }
if (typeof mods === 'string') { return " " + name + "--" + mods; }
if (Array.isArray(mods)) { return mods.reduce(function (ret, item) { return ret + gen(name, item); }, ''); }
return Object.keys(mods).reduce(function (ret, key) { return ret + (mods[key] ? gen(name, key) : ''); }, ''); }
function createBEM(name) { return function (el, mods) { if (el && typeof el !== 'string') { mods = el; el = ''; }
el = el ? name + "__" + el : name; return "" + el + gen(el, mods); }; }
/***/ }), /* 26 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(1);
exports.__esModule = true; exports.unifySlots = unifySlots; exports.createComponent = createComponent;
__webpack_require__(11);
var _ = __webpack_require__(0);
var _string = __webpack_require__(9);
var _slots = __webpack_require__(28);
var _vue = _interopRequireDefault(__webpack_require__(4));
/** * Create a basic component with common options */ function install(Vue) { var name = this.name; Vue.component(name, this); Vue.component((0, _string.camelize)("-" + name), this); } // unify slots & scopedSlots
function unifySlots(context) { // use data.scopedSlots in lower Vue version
var scopedSlots = context.scopedSlots || context.data.scopedSlots || {}; var slots = context.slots(); Object.keys(slots).forEach(function (key) { if (!scopedSlots[key]) { scopedSlots[key] = function () { return slots[key]; }; } }); return scopedSlots; } // should be removed after Vue 3
function transformFunctionComponent(pure) { return { functional: true, props: pure.props, model: pure.model, render: function render(h, context) { return pure(h, context.props, unifySlots(context), context); } }; }
function createComponent(name) { return function (sfc) { if ((0, _.isFunction)(sfc)) { sfc = transformFunctionComponent(sfc); }
if (!sfc.functional) { sfc.mixins = sfc.mixins || []; sfc.mixins.push(_slots.SlotsMixin); }
sfc.name = name; sfc.install = install; return sfc; }; }
/***/ }), /* 27 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.default = void 0; var _default = { name: '姓名', tel: '电话', save: '保存', confirm: '确认', cancel: '取消', delete: '删除', complete: '完成', loading: '加载中...', telEmpty: '请填写电话', nameEmpty: '请填写姓名', nameInvalid: '请输入正确的姓名', confirmDelete: '确定要删除吗', telInvalid: '请输入正确的手机号', vanCalendar: { end: '结束', start: '开始', title: '日期选择', confirm: '确定', startEnd: '开始/结束', weekdays: ['日', '一', '二', '三', '四', '五', '六'], monthTitle: function monthTitle(year, month) { return year + "\u5E74" + month + "\u6708"; }, rangePrompt: function rangePrompt(maxRange) { return "\u9009\u62E9\u5929\u6570\u4E0D\u80FD\u8D85\u8FC7 " + maxRange + " \u5929"; } }, vanCascader: { select: '请选择' }, vanContactCard: { addText: '添加联系人' }, vanContactList: { addText: '新建联系人' }, vanPagination: { prev: '上一页', next: '下一页' }, vanPullRefresh: { pulling: '下拉即可刷新...', loosing: '释放即可刷新...' }, vanSubmitBar: { label: '合计:' }, vanCoupon: { unlimited: '无使用门槛', discount: function discount(_discount) { return _discount + "\u6298"; }, condition: function condition(_condition) { return "\u6EE1" + _condition + "\u5143\u53EF\u7528"; } }, vanCouponCell: { title: '优惠券', tips: '暂无可用', count: function count(_count) { return _count + "\u5F20\u53EF\u7528"; } }, vanCouponList: { empty: '暂无优惠券', exchange: '兑换', close: '不使用优惠券', enable: '可用', disabled: '不可用', placeholder: '请输入优惠码' }, vanAddressEdit: { area: '地区', postal: '邮政编码', areaEmpty: '请选择地区', addressEmpty: '请填写详细地址', postalEmpty: '邮政编码格式不正确', defaultAddress: '设为默认收货地址', telPlaceholder: '收货人手机号', namePlaceholder: '收货人姓名', areaPlaceholder: '选择省 / 市 / 区' }, vanAddressEditDetail: { label: '详细地址', placeholder: '街道门牌、楼层房间号等信息' }, vanAddressList: { add: '新增地址' } }; exports.default = _default;
/***/ }), /* 28 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.SlotsMixin = void 0;
/** * Use scopedSlots in Vue 2.6+ * downgrade to slots in lower version */ var SlotsMixin = { methods: { slots: function slots(name, props) { if (name === void 0) { name = 'default'; }
var $slots = this.$slots, $scopedSlots = this.$scopedSlots; var scopedSlot = $scopedSlots[name];
if (scopedSlot) { return scopedSlot(props); }
return $slots[name]; } } }; exports.SlotsMixin = SlotsMixin;
/***/ }), /* 29 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(1);
exports.__esModule = true; exports.createI18N = createI18N;
var _ = __webpack_require__(0);
var _string = __webpack_require__(9);
var _locale = _interopRequireDefault(__webpack_require__(11));
function createI18N(name) { var prefix = (0, _string.camelize)(name) + '.'; return function (path) { var messages = _locale.default.messages();
var message = (0, _.get)(messages, prefix + path) || (0, _.get)(messages, path);
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; }
return (0, _.isFunction)(message) ? message.apply(void 0, args) : message; }; }
/***/ }), /* 30 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.on = on; exports.off = off; exports.stopPropagation = stopPropagation; exports.preventDefault = preventDefault; exports.supportsPassive = void 0;
var _ = __webpack_require__(0);
// eslint-disable-next-line import/no-mutable-exports
var supportsPassive = false; exports.supportsPassive = supportsPassive;
if (!_.isServer) { try { var opts = {}; Object.defineProperty(opts, 'passive', { // eslint-disable-next-line getter-return
get: function get() { /* istanbul ignore next */ exports.supportsPassive = supportsPassive = true; } }); window.addEventListener('test-passive', null, opts); // eslint-disable-next-line no-empty
} catch (e) {} }
function on(target, event, handler, passive) { if (passive === void 0) { passive = false; }
if (!_.isServer) { target.addEventListener(event, handler, supportsPassive ? { capture: false, passive: passive } : false); } }
function off(target, event, handler) { if (!_.isServer) { target.removeEventListener(event, handler); } }
function stopPropagation(event) { event.stopPropagation(); }
function preventDefault(event, isStopPropagation) { /* istanbul ignore else */ if (typeof event.cancelable !== 'boolean' || event.cancelable) { event.preventDefault(); }
if (isStopPropagation) { stopPropagation(event); } }
/***/ }), /* 31 */, /* 32 */, /* 33 */, /* 34 */, /* 35 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(1);
exports.__esModule = true; exports.default = void 0;
var _babelHelperVueJsxMergeProps = _interopRequireDefault(__webpack_require__(16));
var _utils = __webpack_require__(0);
var _functional = __webpack_require__(14);
var _info = _interopRequireDefault(__webpack_require__(37));
// Utils
// Components
var _createNamespace = (0, _utils.createNamespace)('icon'), createComponent = _createNamespace[0], bem = _createNamespace[1];
function isImage(name) { return name ? name.indexOf('/') !== -1 : false; } // compatible with legacy usage, should be removed in next major version
var LEGACY_MAP = { medel: 'medal', 'medel-o': 'medal-o', 'calender-o': 'calendar-o' };
function correctName(name) { return name && LEGACY_MAP[name] || name; }
function Icon(h, props, slots, ctx) { var _props$badge;
var name = correctName(props.name); var imageIcon = isImage(name);
if (false) {}
return h(props.tag, (0, _babelHelperVueJsxMergeProps.default)([{ "class": [props.classPrefix, imageIcon ? '' : props.classPrefix + "-" + name], "style": { color: props.color, fontSize: (0, _utils.addUnit)(props.size) } }, (0, _functional.inherit)(ctx, true)]), [slots.default && slots.default(), imageIcon && h("img", { "class": bem('image'), "attrs": { "src": name } }), h(_info.default, { "attrs": { "dot": props.dot, "info": (_props$badge = props.badge) != null ? _props$badge : props.info } })]); }
Icon.props = { dot: Boolean, name: String, size: [Number, String], // @deprecated
// should be removed in next major version
info: [Number, String], badge: [Number, String], color: String, tag: { type: String, default: 'i' }, classPrefix: { type: String, default: bem() } };
var _default = createComponent(Icon);
exports.default = _default;
/***/ }), /* 36 */, /* 37 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(1);
exports.__esModule = true; exports.default = void 0;
var _babelHelperVueJsxMergeProps = _interopRequireDefault(__webpack_require__(16));
var _utils = __webpack_require__(0);
var _functional = __webpack_require__(14);
// Utils
var _createNamespace = (0, _utils.createNamespace)('info'), createComponent = _createNamespace[0], bem = _createNamespace[1];
function Info(h, props, slots, ctx) { var dot = props.dot, info = props.info; var showInfo = (0, _utils.isDef)(info) && info !== '';
if (!dot && !showInfo) { return; }
return h("div", (0, _babelHelperVueJsxMergeProps.default)([{ "class": bem({ dot: dot }) }, (0, _functional.inherit)(ctx, true)]), [dot ? '' : props.info]); }
Info.props = { dot: Boolean, info: [Number, String] };
var _default = createComponent(Info);
exports.default = _default;
/***/ }), /* 38 */, /* 39 */, /* 40 */, /* 41 */ /***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(42);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform; var insertInto;
var options = {"hmr":true}
options.transform = transform options.insertInto = undefined;
var update = __webpack_require__(6)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }), /* 42 */ /***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(5)(false); // Module
exports.push([module.i, ".van-info{position:absolute;top:0;right:0;box-sizing:border-box;min-width:16px;padding:0 3px;color:#fff;font-weight:500;font-size:12px;font-family:-apple-system-font,Helvetica Neue,Arial,sans-serif;line-height:1.2;text-align:center;background-color:#ffce6d;border:1px solid #fff;border-radius:16px;-webkit-transform:translate(50%,-50%);transform:translate(50%,-50%);-webkit-transform-origin:100%;transform-origin:100%}.van-info--dot{width:8px;min-width:0;height:8px;background-color:#ffce6d;border-radius:100%}", ""]);
/***/ }), /* 43 */, /* 44 */, /* 45 */ /***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(46);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform; var insertInto;
var options = {"hmr":true}
options.transform = transform options.insertInto = undefined;
var update = __webpack_require__(6)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }), /* 46 */ /***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(5)(false); // Module
exports.push([module.i, "@font-face{font-weight:400;font-family:vant-icon;font-style:normal;font-display:auto;src:url(data:font/ttf;base64,d09GMgABAAAAAF7YAAsAAAAA4igAAF6FAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGVgCcZgqC/nCCuSwBNgIkA4c8C4NgAAQgBYR2B5RVG7y8J2ReK87drapqKAwhI4qSQGuzAy1sHMCgrWnZ//+flHSM4QAYWFrlrf9gVtv23tF2JUvlQFfKUKAgDpGWBE95ZSjamzhpK//bfiU6h8gMMx2m+jEdKqNwiSVpeTSCpKFcn7CTL/i2VRubdqOXMtE0guHu73pP+XNbjJG+1C+njuHxj3Jq8qJR1OXh/w/1vqwtmM2x7QnHVksBKtAUqFC4pwRrWP7xDq1mS26z3z1tGYTBY3AMUW42ISSEJLBJSLIBQiAJbx7IRza8hoSEJw8IBH6F8HyagAoB34ogiP71I2p9CVZbRatYBVsFq23VVvF5oY/aaj0xivaqtu6E3YKmbm+bXkYSZDDnfQrspiWinHCYjoXasLX3oXIz19ubOTK3tvYpUI+S/ta+aJ8rAoLIUT1akSImAN4apvHTAPDN9WkmCC0g+X2HX3jSlsuybOvG9nNkea/HSREsguF54Jg9wCkNZIoTPLHrRdZVfghkbVdCezVg6hMbMR4E4LZumFe/QbolQz96VC/Z815gNXWwBua5EHnIMDFVFzSOAWSQEmRqxXMlkTv2r49ne5gzbMaKCzOynRR2C0xPJEGg3dBCkf3RfKVvHJcAjmFhvnfqfzNp39vdmaRZGGkMzUU7hpQo7QUAQaCUuLQvj/N2e97xj/Qr/Wo0tlx8tSyy45YThwqXCmxYBI3fT0+VEtuXX000QofCTSMpADCqQg7Jz9WIEagNzgt5xEFEwLaW/5usdpt3ued6SCHVjEj4Ae30z7+pli2GFO+oi9TFrPcoV7m/kCufi85N99MA+PNnBpwZANJgAC4HkLgEQEocQOQiUPuQxAUGXC1JhSeS2gsxYgBqDyQlH0BeoDaKDiFVF1LqzpX72IVYrjsXrUsX3W7nunTporyiNEbsSB70bACWRpgGRqFitklozgzKAIZ3qk3SDL7763UmuAZ/PToWxTRNU0SkY6mHU4cx99/Dxhv7CHFmphgouhFRMXv9cXf3slm/dP3Ee/TeslVEq0gSIjOTBL7eHAEqfpJ5LA6Msjge6NwtTjzZpQHD6XHQPFwcHjQK7Aklh+eC2ffYkEHm4nIEt84Sz6pD8IJ5lv0AVudosgCSv9mngHX2mQKBmXmQBf14/NmhN5ZpY/u079j0GZ7xE24uhPT7/590OFonCIMRf5jwJXmptGnZjsvthcYPHQMTjMVfgEBsQTiCheDi4QsVJlyESFEEhETEosWQkJKRU4ilhFCJEy9BoiTJZlADQWAIFI5AotAYLA5PIJIoVBqdwWSxOVweXyCWSGVyhVKl1mh1eoPRZHZ2cXVz9/D08vbx9fPvH8/X+/P9URVESVZUTTdMy3Zczw/CKE7SLC/Kqm7arh/GaV7WbT+ut7f3D06ub27v7h8r1Vq90Wy1O91efzgaT6az+WK5Wm+2u/3heDpfnp5fXt/ePz6/vn9+/0rHhYdy8dkciTbHgIK9o0HUCM7/hUATAYxARhAjmBHCCGWEMcIZEYxIRhQjmhHDiGXEERIEIVEIkoQhWQRSRCFVDKSJhXRxkCEeMiVAlkTIlgQ5kiFXCuRJhXxpUCAdCmVAkUwolgUlsqFUDpTJhXJ5UCEfKhVAlUKoVgQ1iqFWCdQphXpl0KAcGlVAk0poVgUtqqFVDbSphXZ10KEeOjVAl0bo1gQ9mqFXC/RphX7aYIB2GKQDhuiEYbpghG4YpQfG6IVx+mCCfphkAKYYhGmGYIZhmGUE5hiFecZggXFYZAKWmIRlpmCFaVhlBtaYhXXmYIN52GQBtliEbZZgh2XYZQX2WIV91uCAdThkA47YhGO24IRtOGUHztiFc/bggn245ACuOIRrjuCGY7jlBO44hXvO4IFzeOQCnriEZ67ghWt4xQ285hbecAdvuYd3PMB7HuGDJ/joGT55gc9e4Ys3+OodvvmA7z7hhy/46Rt++YE/fuGvP/jnH5ZogAKEKEKEZ4hRggRlSFGBDFXIUYMCdSjRgApNqNGCBm1o0YEOXejRgwF9GGEAYwxhghFMMYYZJjDHFBaYwRJzWGEBa7zABkvYYgU7rGGPDRywhSN2cMIezjjABUe44gQ3nOGOCzxwhSdu8MId3njAB6/wxRv88BX+vqECFWFRFQ414VEXAQ0R0RQJLZHRFgUdUdEVgJ5A9AVhKBgjIRiLhonomIqBmZiYi4WFUCzFxkocrMXFRjxsxcdOAuwlxEEiHCXGSRKcJcVFMjxJjmcp8CIlXqXCm9R4lwYf0uJTOnxJj28Z8CMjfmVav1X3DCiBLLiSFQXZ8CA7ynKgCHJiILX/xtYi/WBjkX5fHMEJEI9A9gEY37G8t1O8tBL1rFExd5FCYPr/S/wTQ4p/l0YYfZaoO7lHF2n0hsbRMGmkQoTNrNlDTRgIpGARpanbIhFHf2IaMtBQZJL1iSAjgXilipC5JjHI+FoluUz+hh7cIj4KsdYhaiQ+hMaxhyhAqgJ9n/jMfJKNRSi5xnTN02GEyMc8Isl4JH63GGmYaD4PuA26JwVwaxBBVv/4WeSFUN2pweHmXs167W2/R/LF7vjtRUgrWtp+467ezCCZL00apkXMO5Fxli71vZtpxWbs6fn5TqeYzATSBXEcn6m2/NZYwHkcYjTbTBBxwX5LXGyVtA7qi5K6RnkuzpmtCBhQwFsrXgzAENWFIRIBmo40H49A9Eqmjz3mwobakodsgDfwYG/2Zx5AtP6n4WuoW8zqB2eR2SksiJj9ROTJZn9lLoo5s86gfQupSurF9NzV68YP8S3Kg/6M0HnJx9acVEzz51rIT7uFLK/k2CV3egg+Np1jbKEQlX5c1yuRL92RIvKcUx2//W3y98cSWGBkVTo1axaZPRDKFpMhsu6qZ7gIdg4JpaTbl5etNgLhj8qydJPSaF2Nh46W7um5LN/WgJ9nV9XkmidB98wuV5pbClecOu1jr04qaCFVYlpxDsxhyNskvc64Kut6rlIJat+6yDxAqFCaAcrNenNqYcuO1DSIWeYRrGW8tCUXblXleZqSne+KIVqqoCZJRqSroPNWpGm4cJzKCvOfMCRiBjj8DPz+aBDt9svVrl/25//TBAbEKURbEaVEVfu3ZU/2XidZtm+H+bxycEhTERN0UYxQ0cnOzty5Y7bEmP23L946swxTJE7cSFSpDjTntwZ36cPpzPG2zvitDRwbc09AduH60JhSyiIrO8Cg1IVK+jA+jW614seMH/RuQQT7Sa9yPovcpJhTqONabGLerB6T+2Zs0NuE0NKKc4f+oN6codw5FE+DMr5SarOw3HQ/JWiGEApovnZvHS42z/ugcIypDIacj9IsROZRhg2RJusVPEhqjwOSdgcC3N4jSEcw/IIMFRQQBPj12EfR0hhmCMzkEDlx3UaEYhsW2FdpGaRhCZVxBeayOosgVI1aCpyTwyie6QJSn1ea+CzI1so/+azd1Ea2YIPM5YDu2yrUiLkba5O8HXbfYV3r2rfQslnhykkrj8mrijRsyqTkPUwAzJWCweKO46gmoPFpuGWFwtYVZOxbr1jwgsrIJSD4Rghx+xlSHAg0n+1wkAslMgOAY985KIZ6hHk3UTcz5rK2ZKzoq0Xz4TnQSd8oytmWyEhIkVgANK40Ll7b0sXfaW2aF3DC75MOAeHmEyrjowuYy51Xb/DnwWvyzYGfUNwbdkt5xisaD87E+bN6vZQXL77ZMULrwFrp3ApgdJwaAN6Oji2IsjoehJ+KqANu5R6LU9wCt8TNWaLjtnjMLoYpHD3eFi1OjljV41XCe+JHG803zkZOMsFRjiyKCc8d8mYtYofLXxpj5aJ0pKucVqjBYmvrTXuyqDFB185cZLdqUvBGgcJ8/udh7qZT
/***/ }), /* 47 */, /* 48 */, /* 49 */, /* 50 */, /* 51 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.TouchMixin = void 0;
var _event = __webpack_require__(30);
var MIN_DISTANCE = 10;
function getDirection(x, y) { if (x > y && x > MIN_DISTANCE) { return 'horizontal'; }
if (y > x && y > MIN_DISTANCE) { return 'vertical'; }
return ''; }
var TouchMixin = { data: function data() { return { direction: '' }; }, methods: { touchStart: function touchStart(event) { this.resetTouchStatus(); this.startX = event.touches[0].clientX; this.startY = event.touches[0].clientY; }, touchMove: function touchMove(event) { var touch = event.touches[0]; this.deltaX = touch.clientX - this.startX; this.deltaY = touch.clientY - this.startY; this.offsetX = Math.abs(this.deltaX); this.offsetY = Math.abs(this.deltaY); this.direction = this.direction || getDirection(this.offsetX, this.offsetY); }, resetTouchStatus: function resetTouchStatus() { this.direction = ''; this.deltaX = 0; this.deltaY = 0; this.offsetX = 0; this.offsetY = 0; }, // avoid Vue 2.6 event bubble issues by manually binding events
// https://github.com/youzan/vant/issues/3015
bindTouchEvent: function bindTouchEvent(el) { var onTouchStart = this.onTouchStart, onTouchMove = this.onTouchMove, onTouchEnd = this.onTouchEnd; (0, _event.on)(el, 'touchstart', onTouchStart); (0, _event.on)(el, 'touchmove', onTouchMove);
if (onTouchEnd) { (0, _event.on)(el, 'touchend', onTouchEnd); (0, _event.on)(el, 'touchcancel', onTouchEnd); } } } }; exports.TouchMixin = TouchMixin;
/***/ }), /* 52 */, /* 53 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.getScroller = getScroller; exports.getScrollTop = getScrollTop; exports.setScrollTop = setScrollTop; exports.getRootScrollTop = getRootScrollTop; exports.setRootScrollTop = setRootScrollTop; exports.getElementTop = getElementTop; exports.getVisibleHeight = getVisibleHeight; exports.getVisibleTop = getVisibleTop;
function isWindow(val) { return val === window; } // get nearest scroll element
// https://github.com/youzan/vant/issues/3823
var overflowScrollReg = /scroll|auto/i;
function getScroller(el, root) { if (root === void 0) { root = window; }
var node = el;
while (node && node.tagName !== 'HTML' && node.tagName !== 'BODY' && node.nodeType === 1 && node !== root) { var _window$getComputedSt = window.getComputedStyle(node), overflowY = _window$getComputedSt.overflowY;
if (overflowScrollReg.test(overflowY)) { return node; }
node = node.parentNode; }
return root; }
function getScrollTop(el) { var top = 'scrollTop' in el ? el.scrollTop : el.pageYOffset; // iOS scroll bounce cause minus scrollTop
return Math.max(top, 0); }
function setScrollTop(el, value) { if ('scrollTop' in el) { el.scrollTop = value; } else { el.scrollTo(el.scrollX, value); } }
function getRootScrollTop() { return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; }
function setRootScrollTop(value) { setScrollTop(window, value); setScrollTop(document.body, value); } // get distance from element top to page top or scroller top
function getElementTop(el, scroller) { if (isWindow(el)) { return 0; }
var scrollTop = scroller ? getScrollTop(scroller) : getRootScrollTop(); return el.getBoundingClientRect().top + scrollTop; }
function getVisibleHeight(el) { if (isWindow(el)) { return el.innerHeight; }
return el.getBoundingClientRect().height; }
function getVisibleTop(el) { if (isWindow(el)) { return 0; }
return el.getBoundingClientRect().top; }
/***/ }), /* 54 */, /* 55 */, /* 56 */, /* 57 */, /* 58 */, /* 59 */, /* 60 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.BindEventMixin = BindEventMixin;
var _event = __webpack_require__(30);
/** * Bind event when mounted or activated */ var uid = 0;
function BindEventMixin(handler) { var key = "binded_" + uid++;
function bind() { if (!this[key]) { handler.call(this, _event.on, true); this[key] = true; } }
function unbind() { if (this[key]) { handler.call(this, _event.off, false); this[key] = false; } }
return { mounted: bind, activated: bind, deactivated: unbind, beforeDestroy: unbind }; }
/***/ }), /* 61 */, /* 62 */, /* 63 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.BORDER_UNSET_TOP_BOTTOM = exports.BORDER_TOP_BOTTOM = exports.BORDER_SURROUND = exports.BORDER_BOTTOM = exports.BORDER_LEFT = exports.BORDER_TOP = exports.BORDER = exports.RED = void 0; // color
var RED = '#ee0a24'; // border
exports.RED = RED; var BORDER = 'van-hairline'; exports.BORDER = BORDER; var BORDER_TOP = BORDER + "--top"; exports.BORDER_TOP = BORDER_TOP; var BORDER_LEFT = BORDER + "--left"; exports.BORDER_LEFT = BORDER_LEFT; var BORDER_BOTTOM = BORDER + "--bottom"; exports.BORDER_BOTTOM = BORDER_BOTTOM; var BORDER_SURROUND = BORDER + "--surround"; exports.BORDER_SURROUND = BORDER_SURROUND; var BORDER_TOP_BOTTOM = BORDER + "--top-bottom"; exports.BORDER_TOP_BOTTOM = BORDER_TOP_BOTTOM; var BORDER_UNSET_TOP_BOTTOM = BORDER + "-unset--top-bottom"; exports.BORDER_UNSET_TOP_BOTTOM = BORDER_UNSET_TOP_BOTTOM;
/***/ }), /* 64 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.removeNode = removeNode;
function removeNode(el) { var parent = el.parentNode;
if (parent) { parent.removeChild(el); } }
/***/ }), /* 65 */, /* 66 */, /* 67 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.context = void 0; var context = { zIndex: 2000, lockCount: 0, stack: [], find: function find(vm) { return this.stack.filter(function (item) { return item.vm === vm; })[0]; } }; exports.context = context;
/***/ }), /* 68 */, /* 69 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.route = route; exports.functionalRoute = functionalRoute; exports.routeProps = void 0;
/** * Vue Router support */ function isRedundantNavigation(err) { return err.name === 'NavigationDuplicated' || // compatible with vue-router@3.3
err.message && err.message.indexOf('redundant navigation') !== -1; }
function route(router, config) { var to = config.to, url = config.url, replace = config.replace;
if (to && router) { var promise = router[replace ? 'replace' : 'push'](to); /* istanbul ignore else */
if (promise && promise.catch) { promise.catch(function (err) { if (err && !isRedundantNavigation(err)) { throw err; } }); } } else if (url) { replace ? location.replace(url) : location.href = url; } }
function functionalRoute(context) { route(context.parent && context.parent.$router, context.props); }
var routeProps = { url: String, replace: Boolean, to: [String, Object] }; exports.routeProps = routeProps;
/***/ }), /* 70 */, /* 71 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(1);
exports.__esModule = true; exports.default = void 0;
var _babelHelperVueJsxMergeProps = _interopRequireDefault(__webpack_require__(16));
var _utils = __webpack_require__(0);
var _functional = __webpack_require__(14);
// Utils
var _createNamespace = (0, _utils.createNamespace)('loading'), createComponent = _createNamespace[0], bem = _createNamespace[1];
function LoadingIcon(h, props) { if (props.type === 'spinner') { var Spin = [];
for (var i = 0; i < 12; i++) { Spin.push(h("i")); }
return Spin; }
return h("svg", { "class": bem('circular'), "attrs": { "viewBox": "25 25 50 50" } }, [h("circle", { "attrs": { "cx": "50", "cy": "50", "r": "20", "fill": "none" } })]); }
function LoadingText(h, props, slots) { if (slots.default) { var _props$textColor;
var style = { fontSize: (0, _utils.addUnit)(props.textSize), color: (_props$textColor = props.textColor) != null ? _props$textColor : props.color }; return h("span", { "class": bem('text'), "style": style }, [slots.default()]); } }
function Loading(h, props, slots, ctx) { var color = props.color, size = props.size, type = props.type; var style = { color: color };
if (size) { var iconSize = (0, _utils.addUnit)(size); style.width = iconSize; style.height = iconSize; }
return h("div", (0, _babelHelperVueJsxMergeProps.default)([{ "class": bem([type, { vertical: props.vertical }]) }, (0, _functional.inherit)(ctx, true)]), [h("span", { "class": bem('spinner', type), "style": style }, [LoadingIcon(h, props)]), LoadingText(h, props, slots)]); }
Loading.props = { color: String, size: [Number, String], vertical: Boolean, textSize: [Number, String], textColor: String, type: { type: String, default: 'circular' } };
var _default = createComponent(Loading);
exports.default = _default;
/***/ }), /* 72 */, /* 73 */ /***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(74);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform; var insertInto;
var options = {"hmr":true}
options.transform = transform options.insertInto = undefined;
var update = __webpack_require__(6)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }), /* 74 */ /***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(5)(false); // Module
exports.push([module.i, ".van-loading{position:relative;color:#c8c9cc;font-size:0;vertical-align:middle}.van-loading__spinner{position:relative;display:inline-block;width:30px;max-width:100%;height:30px;max-height:100%;vertical-align:middle;-webkit-animation:van-rotate .8s linear infinite;animation:van-rotate .8s linear infinite}.van-loading__spinner--spinner{-webkit-animation-timing-function:steps(12);animation-timing-function:steps(12)}.van-loading__spinner--spinner i{position:absolute;top:0;left:0;width:100%;height:100%}.van-loading__spinner--spinner i::before{display:block;width:2px;height:25%;margin:0 auto;background-color:currentColor;border-radius:40%;content:' '}.van-loading__spinner--circular{-webkit-animation-duration:2s;animation-duration:2s}.van-loading__circular{display:block;width:100%;height:100%}.van-loading__circular circle{-webkit-animation:van-circular 1.5s ease-in-out infinite;animation:van-circular 1.5s ease-in-out infinite;stroke:currentColor;stroke-width:3;stroke-linecap:round}.van-loading__text{display:inline-block;margin-left:8px;color:#969799;font-size:14px;vertical-align:middle}.van-loading--vertical{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.van-loading--vertical .van-loading__text{margin:8px 0 0}@-webkit-keyframes van-circular{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40}100%{stroke-dasharray:90,150;stroke-dashoffset:-120}}@keyframes van-circular{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40}100%{stroke-dasharray:90,150;stroke-dashoffset:-120}}.van-loading__spinner--spinner i:nth-of-type(1){-webkit-transform:rotate(30deg);transform:rotate(30deg);opacity:1}.van-loading__spinner--spinner i:nth-of-type(2){-webkit-transform:rotate(60deg);transform:rotate(60deg);opacity:.9375}.van-loading__spinner--spinner i:nth-of-type(3){-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:.875}.van-loading__spinner--spinner i:nth-of-type(4){-webkit-transform:rotate(120deg);transform:rotate(120deg);opacity:.8125}.van-loading__spinner--spinner i:nth-of-type(5){-webkit-transform:rotate(150deg);transform:rotate(150deg);opacity:.75}.van-loading__spinner--spinner i:nth-of-type(6){-webkit-transform:rotate(180deg);transform:rotate(180deg);opacity:.6875}.van-loading__spinner--spinner i:nth-of-type(7){-webkit-transform:rotate(210deg);transform:rotate(210deg);opacity:.625}.van-loading__spinner--spinner i:nth-of-type(8){-webkit-transform:rotate(240deg);transform:rotate(240deg);opacity:.5625}.van-loading__spinner--spinner i:nth-of-type(9){-webkit-transform:rotate(270deg);transform:rotate(270deg);opacity:.5}.van-loading__spinner--spinner i:nth-of-type(10){-webkit-transform:rotate(300deg);transform:rotate(300deg);opacity:.4375}.van-loading__spinner--spinner i:nth-of-type(11){-webkit-transform:rotate(330deg);transform:rotate(330deg);opacity:.375}.van-loading__spinner--spinner i:nth-of-type(12){-webkit-transform:rotate(360deg);transform:rotate(360deg);opacity:.3125}", ""]);
/***/ }), /* 75 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.PopupMixin = PopupMixin; exports.popupMixinProps = void 0;
var _context = __webpack_require__(67);
var _overlay = __webpack_require__(84);
var _event = __webpack_require__(30);
var _node = __webpack_require__(64);
var _scroll = __webpack_require__(53);
var _touch = __webpack_require__(51);
var _portal = __webpack_require__(78);
var _closeOnPopstate = __webpack_require__(85);
// Context
// Utils
// Mixins
var popupMixinProps = { // Initial rendering animation
transitionAppear: Boolean, // whether to show popup
value: Boolean, // whether to show overlay
overlay: Boolean, // overlay custom style
overlayStyle: Object, // overlay custom class name
overlayClass: String, // whether to close popup when overlay is clicked
closeOnClickOverlay: Boolean, // z-index
zIndex: [Number, String], // prevent body scroll
lockScroll: { type: Boolean, default: true }, // whether to lazy render
lazyRender: { type: Boolean, default: true } }; exports.popupMixinProps = popupMixinProps;
function PopupMixin(options) { if (options === void 0) { options = {}; }
return { mixins: [_touch.TouchMixin, _closeOnPopstate.CloseOnPopstateMixin, (0, _portal.PortalMixin)({ afterPortal: function afterPortal() { if (this.overlay) { (0, _overlay.updateOverlay)(); } } })], props: popupMixinProps, data: function data() { return { inited: this.value }; }, computed: { shouldRender: function shouldRender() { return this.inited || !this.lazyRender; } }, watch: { value: function value(val) { var type = val ? 'open' : 'close'; this.inited = this.inited || this.value; this[type]();
if (!options.skipToggleEvent) { this.$emit(type); } }, overlay: 'renderOverlay' }, mounted: function mounted() { if (this.value) { this.open(); } },
/* istanbul ignore next */ activated: function activated() { if (this.shouldReopen) { this.$emit('input', true); this.shouldReopen = false; } }, beforeDestroy: function beforeDestroy() { (0, _overlay.removeOverlay)(this);
if (this.opened) { this.removeLock(); }
if (this.getContainer) { (0, _node.removeNode)(this.$el); } },
/* istanbul ignore next */ deactivated: function deactivated() { if (this.value) { this.close(); this.shouldReopen = true; } }, methods: { open: function open() { /* istanbul ignore next */ if (this.$isServer || this.opened) { return; } // cover default zIndex
if (this.zIndex !== undefined) { _context.context.zIndex = this.zIndex; }
this.opened = true; this.renderOverlay(); this.addLock(); }, addLock: function addLock() { if (this.lockScroll) { (0, _event.on)(document, 'touchstart', this.touchStart); (0, _event.on)(document, 'touchmove', this.onTouchMove);
if (!_context.context.lockCount) { document.body.classList.add('van-overflow-hidden'); }
_context.context.lockCount++; } }, removeLock: function removeLock() { if (this.lockScroll && _context.context.lockCount) { _context.context.lockCount--; (0, _event.off)(document, 'touchstart', this.touchStart); (0, _event.off)(document, 'touchmove', this.onTouchMove);
if (!_context.context.lockCount) { document.body.classList.remove('van-overflow-hidden'); } } }, close: function close() { if (!this.opened) { return; }
(0, _overlay.closeOverlay)(this); this.opened = false; this.removeLock(); this.$emit('input', false); }, onTouchMove: function onTouchMove(event) { this.touchMove(event); var direction = this.deltaY > 0 ? '10' : '01'; var el = (0, _scroll.getScroller)(event.target, this.$el); var scrollHeight = el.scrollHeight, offsetHeight = el.offsetHeight, scrollTop = el.scrollTop; var status = '11'; /* istanbul ignore next */
if (scrollTop === 0) { status = offsetHeight >= scrollHeight ? '00' : '01'; } else if (scrollTop + offsetHeight >= scrollHeight) { status = '10'; } /* istanbul ignore next */
if (status !== '11' && this.direction === 'vertical' && !(parseInt(status, 2) & parseInt(direction, 2))) { (0, _event.preventDefault)(event, true); } }, renderOverlay: function renderOverlay() { var _this = this;
if (this.$isServer || !this.value) { return; }
this.$nextTick(function () { _this.updateZIndex(_this.overlay ? 1 : 0);
if (_this.overlay) { (0, _overlay.openOverlay)(_this, { zIndex: _context.context.zIndex++, duration: _this.duration, className: _this.overlayClass, customStyle: _this.overlayStyle }); } else { (0, _overlay.closeOverlay)(_this); } }); }, updateZIndex: function updateZIndex(value) { if (value === void 0) { value = 0; }
this.$el.style.zIndex = ++_context.context.zIndex + value; } } }; }
/***/ }), /* 76 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(1);
exports.__esModule = true; exports.default = void 0;
var _babelHelperVueJsxMergeProps = _interopRequireDefault(__webpack_require__(16));
var _extends2 = _interopRequireDefault(__webpack_require__(18));
var _utils = __webpack_require__(0);
var _functional = __webpack_require__(14);
var _event = __webpack_require__(30);
// Utils
var _createNamespace = (0, _utils.createNamespace)('overlay'), createComponent = _createNamespace[0], bem = _createNamespace[1];
function preventTouchMove(event) { (0, _event.preventDefault)(event, true); }
function Overlay(h, props, slots, ctx) { var style = (0, _extends2.default)({ zIndex: props.zIndex }, props.customStyle);
if ((0, _utils.isDef)(props.duration)) { style.animationDuration = props.duration + "s"; }
return h("transition", { "attrs": { "name": "van-fade" } }, [h("div", (0, _babelHelperVueJsxMergeProps.default)([{ "directives": [{ name: "show", value: props.show }], "style": style, "class": [bem(), props.className], "on": { "touchmove": props.lockScroll ? preventTouchMove : _utils.noop } }, (0, _functional.inherit)(ctx, true)]), [slots.default == null ? void 0 : slots.default()])]); }
Overlay.props = { show: Boolean, zIndex: [Number, String], duration: [Number, String], className: null, customStyle: Object, lockScroll: { type: Boolean, default: true } };
var _default = createComponent(Overlay);
exports.default = _default;
/***/ }), /* 77 */, /* 78 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.PortalMixin = PortalMixin;
function getElement(selector) { if (typeof selector === 'string') { return document.querySelector(selector); }
return selector(); }
function PortalMixin(_temp) { var _ref = _temp === void 0 ? {} : _temp, ref = _ref.ref, afterPortal = _ref.afterPortal;
return { props: { getContainer: [String, Function] }, watch: { getContainer: 'portal' }, mounted: function mounted() { if (this.getContainer) { this.portal(); } }, methods: { portal: function portal() { var getContainer = this.getContainer; var el = ref ? this.$refs[ref] : this.$el; var container;
if (getContainer) { container = getElement(getContainer); } else if (this.$parent) { container = this.$parent.$el; }
if (container && container !== el.parentNode) { container.appendChild(el); }
if (afterPortal) { afterPortal.call(this); } } } }; }
/***/ }), /* 79 */ /***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(80);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform; var insertInto;
var options = {"hmr":true}
options.transform = transform options.insertInto = undefined;
var update = __webpack_require__(6)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }), /* 80 */ /***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(5)(false); // Module
exports.push([module.i, ".van-overlay{position:fixed;top:0;left:0;z-index:1;width:100%;height:100%;background-color:rgba(0,0,0,.7)}", ""]);
/***/ }), /* 81 */, /* 82 */ /***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(83);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform; var insertInto;
var options = {"hmr":true}
options.transform = transform options.insertInto = undefined;
var update = __webpack_require__(6)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }), /* 83 */ /***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(5)(false); // Module
exports.push([module.i, ".van-overflow-hidden{overflow:hidden!important}.van-popup{position:fixed;max-height:100%;overflow-y:auto;background-color:#fff;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;-webkit-overflow-scrolling:touch}.van-popup--center{top:50%;left:50%;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-popup--center.van-popup--round{border-radius:16px}.van-popup--top{top:0;left:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 16px 16px}.van-popup--right{top:50%;right:0;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.van-popup--right.van-popup--round{border-radius:16px 0 0 16px}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:16px 16px 0 0}.van-popup--left{top:50%;left:0;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.van-popup--left.van-popup--round{border-radius:0 16px 16px 0}.van-popup--safe-area-inset-bottom{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.van-popup-slide-bottom-enter-active,.van-popup-slide-left-enter-active,.van-popup-slide-right-enter-active,.van-popup-slide-top-enter-active{-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.van-popup-slide-bottom-leave-active,.van-popup-slide-left-leave-active,.van-popup-slide-right-leave-active,.van-popup-slide-top-leave-active{-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}.van-popup-slide-top-enter,.van-popup-slide-top-leave-active{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.van-popup-slide-right-enter,.van-popup-slide-right-leave-active{-webkit-transform:translate3d(100%,-50%,0);transform:translate3d(100%,-50%,0)}.van-popup-slide-bottom-enter,.van-popup-slide-bottom-leave-active{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.van-popup-slide-left-enter,.van-popup-slide-left-leave-active{-webkit-transform:translate3d(-100%,-50%,0);transform:translate3d(-100%,-50%,0)}.van-popup__close-icon{position:absolute;z-index:1;color:#c8c9cc;font-size:22px;cursor:pointer}.van-popup__close-icon:active{color:#969799}.van-popup__close-icon--top-left{top:16px;left:16px}.van-popup__close-icon--top-right{top:16px;right:16px}.van-popup__close-icon--bottom-left{bottom:16px;left:16px}.van-popup__close-icon--bottom-right{right:16px;bottom:16px}", ""]);
/***/ }), /* 84 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(1);
exports.__esModule = true; exports.updateOverlay = updateOverlay; exports.openOverlay = openOverlay; exports.closeOverlay = closeOverlay; exports.removeOverlay = removeOverlay;
var _extends2 = _interopRequireDefault(__webpack_require__(18));
var _overlay = _interopRequireDefault(__webpack_require__(76));
var _context = __webpack_require__(67);
var _functional = __webpack_require__(14);
var _node = __webpack_require__(64);
var defaultConfig = { className: '', customStyle: {} };
function mountOverlay(vm) { return (0, _functional.mount)(_overlay.default, { on: { // close popup when overlay clicked & closeOnClickOverlay is true
click: function click() { vm.$emit('click-overlay');
if (vm.closeOnClickOverlay) { if (vm.onClickOverlay) { vm.onClickOverlay(); } else { vm.close(); } } } } }); }
function updateOverlay(vm) { var item = _context.context.find(vm);
if (item) { var el = vm.$el; var config = item.config, overlay = item.overlay;
if (el && el.parentNode) { el.parentNode.insertBefore(overlay.$el, el); }
(0, _extends2.default)(overlay, defaultConfig, config, { show: true }); } }
function openOverlay(vm, config) { var item = _context.context.find(vm);
if (item) { item.config = config; } else { var overlay = mountOverlay(vm);
_context.context.stack.push({ vm: vm, config: config, overlay: overlay }); }
updateOverlay(vm); }
function closeOverlay(vm) { var item = _context.context.find(vm);
if (item) { item.overlay.show = false; } }
function removeOverlay(vm) { var item = _context.context.find(vm);
if (item) { (0, _node.removeNode)(item.overlay.$el); } }
/***/ }), /* 85 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.CloseOnPopstateMixin = void 0;
var _event = __webpack_require__(30);
var _bindEvent = __webpack_require__(60);
var CloseOnPopstateMixin = { mixins: [(0, _bindEvent.BindEventMixin)(function (bind, isBind) { this.handlePopstate(isBind && this.closeOnPopstate); })], props: { closeOnPopstate: Boolean }, data: function data() { return { bindStatus: false }; }, watch: { closeOnPopstate: function closeOnPopstate(val) { this.handlePopstate(val); } }, methods: { onPopstate: function onPopstate() { this.close(); this.shouldReopen = false; }, handlePopstate: function handlePopstate(bind) { /* istanbul ignore if */ if (this.$isServer) { return; }
if (this.bindStatus !== bind) { this.bindStatus = bind; var action = bind ? _event.on : _event.off; action(window, 'popstate', this.onPopstate); } } } }; exports.CloseOnPopstateMixin = CloseOnPopstateMixin;
/***/ }), /* 86 */ /***/ (function(module, exports, __webpack_require__) {
"use strict"; /* WEBPACK VAR INJECTION */(function(global) {
exports.__esModule = true; exports.raf = raf; exports.doubleRaf = doubleRaf; exports.cancelRaf = cancelRaf;
var _ = __webpack_require__(0);
/** * requestAnimationFrame polyfill */ var prev = Date.now(); /* istanbul ignore next */
function fallback(fn) { var curr = Date.now(); var ms = Math.max(0, 16 - (curr - prev)); var id = setTimeout(fn, ms); prev = curr + ms; return id; } /* istanbul ignore next */
var root = _.isServer ? global : window; /* istanbul ignore next */
var iRaf = root.requestAnimationFrame || fallback; /* istanbul ignore next */
var iCancel = root.cancelAnimationFrame || root.clearTimeout;
function raf(fn) { return iRaf.call(root, fn); } // double raf for animation
function doubleRaf(fn) { raf(function () { raf(fn); }); }
function cancelRaf(id) { iCancel.call(root, id); } /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(87)))
/***/ }), /* 87 */ /***/ (function(module, exports) {
var g;
// This works in non-strict mode
g = (function() { return this; })();
try { // This works if eval is allowed (see CSP)
g = g || new Function("return this")(); } catch (e) { // This works if the window reference is available
if (typeof window === "object") g = window; }
// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}
module.exports = g;
/***/ }), /* 88 */, /* 89 */, /* 90 */, /* 91 */, /* 92 */, /* 93 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(1);
exports.__esModule = true; exports.default = void 0;
var _utils = __webpack_require__(0);
var _popup = __webpack_require__(75);
var _icon = _interopRequireDefault(__webpack_require__(35));
var _createNamespace = (0, _utils.createNamespace)('popup'), createComponent = _createNamespace[0], bem = _createNamespace[1];
var _default = createComponent({ mixins: [(0, _popup.PopupMixin)()], props: { round: Boolean, duration: [Number, String], closeable: Boolean, transition: String, safeAreaInsetBottom: Boolean, closeIcon: { type: String, default: 'cross' }, closeIconPosition: { type: String, default: 'top-right' }, position: { type: String, default: 'center' }, overlay: { type: Boolean, default: true }, closeOnClickOverlay: { type: Boolean, default: true } }, beforeCreate: function beforeCreate() { var _this = this;
var createEmitter = function createEmitter(eventName) { return function (event) { return _this.$emit(eventName, event); }; };
this.onClick = createEmitter('click'); this.onOpened = createEmitter('opened'); this.onClosed = createEmitter('closed'); }, methods: { onClickCloseIcon: function onClickCloseIcon(event) { this.$emit('click-close-icon', event); this.close(); } }, render: function render() { var _bem;
var h = arguments[0];
if (!this.shouldRender) { return; }
var round = this.round, position = this.position, duration = this.duration; var isCenter = position === 'center'; var transitionName = this.transition || (isCenter ? 'van-fade' : "van-popup-slide-" + position); var style = {};
if ((0, _utils.isDef)(duration)) { var key = isCenter ? 'animationDuration' : 'transitionDuration'; style[key] = duration + "s"; }
return h("transition", { "attrs": { "appear": this.transitionAppear, "name": transitionName }, "on": { "afterEnter": this.onOpened, "afterLeave": this.onClosed } }, [h("div", { "directives": [{ name: "show", value: this.value }], "style": style, "class": bem((_bem = { round: round }, _bem[position] = position, _bem['safe-area-inset-bottom'] = this.safeAreaInsetBottom, _bem)), "on": { "click": this.onClick } }, [this.slots(), this.closeable && h(_icon.default, { "attrs": { "role": "button", "tabindex": "0", "name": this.closeIcon }, "class": bem('close-icon', this.closeIconPosition), "on": { "click": this.onClickCloseIcon } })])]); } });
exports.default = _default;
/***/ }), /* 94 */, /* 95 */, /* 96 */, /* 97 */, /* 98 */, /* 99 */, /* 100 */, /* 101 */, /* 102 */, /* 103 */, /* 104 */, /* 105 */, /* 106 */, /* 107 */, /* 108 */, /* 109 */, /* 110 */, /* 111 */, /* 112 */, /* 113 */, /* 114 */, /* 115 */, /* 116 */, /* 117 */, /* 118 */, /* 119 */, /* 120 */, /* 121 */, /* 122 */, /* 123 */, /* 124 */, /* 125 */, /* 126 */, /* 127 */, /* 128 */, /* 129 */, /* 130 */, /* 131 */, /* 132 */, /* 133 */, /* 134 */, /* 135 */, /* 136 */, /* 137 */, /* 138 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(1);
exports.__esModule = true; exports.default = void 0;
var _extends2 = _interopRequireDefault(__webpack_require__(18));
var _babelHelperVueJsxMergeProps = _interopRequireDefault(__webpack_require__(16));
var _utils = __webpack_require__(0);
var _functional = __webpack_require__(14);
var _constant = __webpack_require__(63);
var _router = __webpack_require__(69);
var _icon = _interopRequireDefault(__webpack_require__(35));
var _loading = _interopRequireDefault(__webpack_require__(71));
// Utils
// Components
var _createNamespace = (0, _utils.createNamespace)('button'), createComponent = _createNamespace[0], bem = _createNamespace[1];
function Button(h, props, slots, ctx) { var _ref;
var tag = props.tag, icon = props.icon, type = props.type, color = props.color, plain = props.plain, disabled = props.disabled, loading = props.loading, hairline = props.hairline, loadingText = props.loadingText, iconPosition = props.iconPosition; var style = {};
if (color) { style.color = plain ? color : 'white';
if (!plain) { // Use background instead of backgroundColor to make linear-gradient work
style.background = color; } // hide border when color is linear-gradient
if (color.indexOf('gradient') !== -1) { style.border = 0; } else { style.borderColor = color; } }
function onClick(event) { if (!loading && !disabled) { (0, _functional.emit)(ctx, 'click', event); (0, _router.functionalRoute)(ctx); } }
function onTouchstart(event) { (0, _functional.emit)(ctx, 'touchstart', event); }
var classes = [bem([type, props.size, { plain: plain, loading: loading, disabled: disabled, hairline: hairline, block: props.block, round: props.round, square: props.square }]), (_ref = {}, _ref[_constant.BORDER_SURROUND] = hairline, _ref)];
function renderIcon() { if (loading) { return slots.loading ? slots.loading() : h(_loading.default, { "class": bem('loading'), "attrs": { "size": props.loadingSize, "type": props.loadingType, "color": "currentColor" } }); }
if (icon) { return h(_icon.default, { "attrs": { "name": icon, "classPrefix": props.iconPrefix }, "class": bem('icon') }); } }
function renderContent() { var content = [];
if (iconPosition === 'left') { content.push(renderIcon()); }
var text;
if (loading) { text = loadingText; } else { text = slots.default ? slots.default() : props.text; }
if (text) { content.push(h("span", { "class": bem('text') }, [text])); }
if (iconPosition === 'right') { content.push(renderIcon()); }
return content; }
return h(tag, (0, _babelHelperVueJsxMergeProps.default)([{ "style": style, "class": classes, "attrs": { "type": props.nativeType, "disabled": disabled }, "on": { "click": onClick, "touchstart": onTouchstart } }, (0, _functional.inherit)(ctx)]), [h("div", { "class": bem('content') }, [renderContent()])]); }
Button.props = (0, _extends2.default)({}, _router.routeProps, { text: String, icon: String, color: String, block: Boolean, plain: Boolean, round: Boolean, square: Boolean, loading: Boolean, hairline: Boolean, disabled: Boolean, iconPrefix: String, nativeType: String, loadingText: String, loadingType: String, tag: { type: String, default: 'button' }, type: { type: String, default: 'default' }, size: { type: String, default: 'normal' }, loadingSize: { type: String, default: '20px' }, iconPosition: { type: String, default: 'left' } });
var _default = createComponent(Button);
exports.default = _default;
/***/ }), /* 139 */, /* 140 */, /* 141 */, /* 142 */, /* 143 */, /* 144 */, /* 145 */, /* 146 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.times = times; exports.getTrueValue = getTrueValue; exports.getMonthEndDay = getMonthEndDay;
var _number = __webpack_require__(19);
function times(n, iteratee) { var index = -1; var result = Array(n);
while (++index < n) { result[index] = iteratee(index); }
return result; }
function getTrueValue(value) { if (!value) { return 0; }
while ((0, _number.isNaN)(parseInt(value, 10))) { if (value.length > 1) { value = value.slice(1); } else { return 0; } }
return parseInt(value, 10); }
function getMonthEndDay(year, month) { return 32 - new Date(year, month - 1, 32).getDate(); }
/***/ }), /* 147 */, /* 148 */, /* 149 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(1);
exports.__esModule = true; exports.default = void 0;
var _extends2 = _interopRequireDefault(__webpack_require__(18));
var _vue = _interopRequireDefault(__webpack_require__(4));
var _Toast = _interopRequireDefault(__webpack_require__(170));
var _utils = __webpack_require__(0);
var _node = __webpack_require__(64);
var defaultOptions = { icon: '', type: 'text', // @deprecated
mask: false, value: true, message: '', className: '', overlay: false, onClose: null, onOpened: null, duration: 2000, iconPrefix: undefined, position: 'middle', transition: 'van-fade', forbidClick: false, loadingType: undefined, getContainer: 'body', overlayStyle: null, closeOnClick: false, closeOnClickOverlay: false }; // default options of specific type
var defaultOptionsMap = {}; var queue = []; var multiple = false; var currentOptions = (0, _extends2.default)({}, defaultOptions);
function parseOptions(message) { if ((0, _utils.isObject)(message)) { return message; }
return { message: message }; }
function isInDocument(element) { return document.body.contains(element); }
function createInstance() { /* istanbul ignore if */ if (_utils.isServer) { return {}; }
queue = queue.filter(function (item) { return !item.$el.parentNode || isInDocument(item.$el); });
if (!queue.length || multiple) { var toast = new (_vue.default.extend(_Toast.default))({ el: document.createElement('div') }); toast.$on('input', function (value) { toast.value = value; }); queue.push(toast); }
return queue[queue.length - 1]; } // transform toast options to popup props
function transformOptions(options) { return (0, _extends2.default)({}, options, { overlay: options.mask || options.overlay, mask: undefined, duration: undefined }); }
function Toast(options) { if (options === void 0) { options = {}; }
var toast = createInstance(); // should add z-index if previous toast has not disappeared
if (toast.value) { toast.updateZIndex(); }
options = parseOptions(options); options = (0, _extends2.default)({}, currentOptions, defaultOptionsMap[options.type || currentOptions.type], options);
if (false) {}
options.clear = function () { toast.value = false;
if (options.onClose) { options.onClose(); options.onClose = null; }
if (multiple && !_utils.isServer) { toast.$on('closed', function () { clearTimeout(toast.timer); queue = queue.filter(function (item) { return item !== toast; }); (0, _node.removeNode)(toast.$el); toast.$destroy(); }); } };
(0, _extends2.default)(toast, transformOptions(options)); clearTimeout(toast.timer);
if (options.duration > 0) { toast.timer = setTimeout(function () { toast.clear(); }, options.duration); }
return toast; }
var createMethod = function createMethod(type) { return function (options) { return Toast((0, _extends2.default)({ type: type }, parseOptions(options))); }; };
['loading', 'success', 'fail'].forEach(function (method) { Toast[method] = createMethod(method); });
Toast.clear = function (all) { if (queue.length) { if (all) { queue.forEach(function (toast) { toast.clear(); }); queue = []; } else if (!multiple) { queue[0].clear(); } else { queue.shift().clear(); } } };
Toast.setDefaultOptions = function (type, options) { if (typeof type === 'string') { defaultOptionsMap[type] = options; } else { (0, _extends2.default)(currentOptions, type); } };
Toast.resetDefaultOptions = function (type) { if (typeof type === 'string') { defaultOptionsMap[type] = null; } else { currentOptions = (0, _extends2.default)({}, defaultOptions); defaultOptionsMap = {}; } };
Toast.allowMultiple = function (value) { if (value === void 0) { value = true; }
multiple = value; };
Toast.install = function () { _vue.default.use(_Toast.default); };
_vue.default.prototype.$toast = Toast; var _default = Toast; exports.default = _default;
/***/ }), /* 150 */, /* 151 */, /* 152 */, /* 153 */, /* 154 */, /* 155 */, /* 156 */, /* 157 */, /* 158 */, /* 159 */, /* 160 */, /* 161 */, /* 162 */, /* 163 */, /* 164 */ /***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(165);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform; var insertInto;
var options = {"hmr":true}
options.transform = transform options.insertInto = undefined;
var update = __webpack_require__(6)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }), /* 165 */ /***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(5)(false); // Module
exports.push([module.i, ".van-button{position:relative;display:inline-block;box-sizing:border-box;height:44px;margin:0;padding:0;font-size:16px;line-height:1.2;text-align:center;border-radius:2px;cursor:pointer;-webkit-transition:opacity .2s;transition:opacity .2s;-webkit-appearance:none}.van-button::before{position:absolute;top:50%;left:50%;width:100%;height:100%;background-color:#000;border:inherit;border-color:#000;border-radius:inherit;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);opacity:0;content:' '}.van-button:active::before{opacity:.1}.van-button--disabled::before,.van-button--loading::before{display:none}.van-button--default{color:#323233;background-color:#fff;border:1px solid #ebedf0}.van-button--primary{color:#fff;background-color:#000;border:1px solid #000}.van-button--info{color:#fff;background-color:#2cb8b8;border:1px solid #2cb8b8}.van-button--danger{color:#fff;background-color:#ffce6d;border:1px solid #ffce6d}.van-button--warning{color:#fff;background-color:#ff976a;border:1px solid #ff976a}.van-button--plain{background-color:#fff}.van-button--plain.van-button--primary{color:#000}.van-button--plain.van-button--info{color:#2cb8b8}.van-button--plain.van-button--danger{color:#ffce6d}.van-button--plain.van-button--warning{color:#ff976a}.van-button--large{width:100%;height:50px}.van-button--normal{padding:0 15px;font-size:14px}.van-button--small{height:32px;padding:0 8px;font-size:12px}.van-button__loading{color:inherit;font-size:inherit}.van-button--mini{height:24px;padding:0 4px;font-size:10px}.van-button--mini+.van-button--mini{margin-left:4px}.van-button--block{display:block;width:100%}.van-button--disabled{cursor:not-allowed;opacity:.5}.van-button--loading{cursor:default}.van-button--round{border-radius:999px}.van-button--square{border-radius:0}.van-button__content{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;height:100%}.van-button__content::before{content:' '}.van-button__icon{font-size:1.2em;line-height:inherit}.van-button__icon+.van-button__text,.van-button__loading+.van-button__text,.van-button__text+.van-button__icon,.van-button__text+.van-button__loading{margin-left:4px}.van-button--hairline{border-width:0}.van-button--hairline::after{border-color:inherit;border-radius:4px}.van-button--hairline.van-button--round::after{border-radius:999px}.van-button--hairline.van-button--square::after{border-radius:0}", ""]);
/***/ }), /* 166 */ /***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(167);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform; var insertInto;
var options = {"hmr":true}
options.transform = transform options.insertInto = undefined;
var update = __webpack_require__(6)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }), /* 167 */ /***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(5)(false); // Module
exports.push([module.i, ".van-toast{position:fixed;top:50%;left:50%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;box-sizing:content-box;width:88px;max-width:70%;min-height:88px;padding:16px;color:#fff;font-size:14px;line-height:20px;white-space:pre-wrap;text-align:center;word-wrap:break-word;background-color:rgba(0,0,0,.7);border-radius:8px;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-toast--unclickable{overflow:hidden}.van-toast--unclickable *{pointer-events:none}.van-toast--html,.van-toast--text{width:-webkit-fit-content;width:fit-content;min-width:96px;min-height:0;padding:8px 12px}.van-toast--html .van-toast__text,.van-toast--text .van-toast__text{margin-top:0}.van-toast--top{top:20%}.van-toast--bottom{top:auto;bottom:20%}.van-toast__icon{font-size:36px}.van-toast__loading{padding:4px;color:#fff}.van-toast__text{margin-top:8px}", ""]);
/***/ }), /* 168 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.isDate = isDate;
var _number = __webpack_require__(19);
function isDate(val) { return Object.prototype.toString.call(val) === '[object Date]' && !(0, _number.isNaN)(val.getTime()); }
/***/ }), /* 169 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.formatMonthTitle = formatMonthTitle; exports.compareMonth = compareMonth; exports.compareDay = compareDay; exports.getDayByOffset = getDayByOffset; exports.getPrevDay = getPrevDay; exports.getNextDay = getNextDay; exports.calcDateNum = calcDateNum; exports.copyDate = copyDate; exports.copyDates = copyDates; exports.t = exports.bem = exports.createComponent = void 0;
var _utils = __webpack_require__(0);
var _createNamespace = (0, _utils.createNamespace)('calendar'), createComponent = _createNamespace[0], bem = _createNamespace[1], t = _createNamespace[2];
exports.t = t; exports.bem = bem; exports.createComponent = createComponent;
function formatMonthTitle(date) { return t('monthTitle', date.getFullYear(), date.getMonth() + 1); }
function compareMonth(date1, date2) { var year1 = date1.getFullYear(); var year2 = date2.getFullYear(); var month1 = date1.getMonth(); var month2 = date2.getMonth();
if (year1 === year2) { return month1 === month2 ? 0 : month1 > month2 ? 1 : -1; }
return year1 > year2 ? 1 : -1; }
function compareDay(day1, day2) { var compareMonthResult = compareMonth(day1, day2);
if (compareMonthResult === 0) { var date1 = day1.getDate(); var date2 = day2.getDate(); return date1 === date2 ? 0 : date1 > date2 ? 1 : -1; }
return compareMonthResult; }
function getDayByOffset(date, offset) { date = new Date(date); date.setDate(date.getDate() + offset); return date; }
function getPrevDay(date) { return getDayByOffset(date, -1); }
function getNextDay(date) { return getDayByOffset(date, 1); }
function calcDateNum(date) { var day1 = date[0].getTime(); var day2 = date[1].getTime(); return (day2 - day1) / (1000 * 60 * 60 * 24) + 1; }
function copyDate(dates) { return new Date(dates); }
function copyDates(dates) { if (Array.isArray(dates)) { return dates.map(function (date) { if (date === null) { return date; }
return copyDate(date); }); }
return copyDate(dates); }
/***/ }), /* 170 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(1);
exports.__esModule = true; exports.default = void 0;
var _utils = __webpack_require__(0);
var _lockClick = __webpack_require__(171);
var _popup = __webpack_require__(75);
var _icon = _interopRequireDefault(__webpack_require__(35));
var _loading = _interopRequireDefault(__webpack_require__(71));
// Utils
// Mixins
// Components
var _createNamespace = (0, _utils.createNamespace)('toast'), createComponent = _createNamespace[0], bem = _createNamespace[1];
var _default = createComponent({ mixins: [(0, _popup.PopupMixin)()], props: { icon: String, className: null, iconPrefix: String, loadingType: String, forbidClick: Boolean, closeOnClick: Boolean, message: [Number, String], type: { type: String, default: 'text' }, position: { type: String, default: 'middle' }, transition: { type: String, default: 'van-fade' }, lockScroll: { type: Boolean, default: false } }, data: function data() { return { clickable: false }; }, mounted: function mounted() { this.toggleClickable(); }, destroyed: function destroyed() { this.toggleClickable(); }, watch: { value: 'toggleClickable', forbidClick: 'toggleClickable' }, methods: { onClick: function onClick() { if (this.closeOnClick) { this.close(); } }, toggleClickable: function toggleClickable() { var clickable = this.value && this.forbidClick;
if (this.clickable !== clickable) { this.clickable = clickable; (0, _lockClick.lockClick)(clickable); } },
/* istanbul ignore next */ onAfterEnter: function onAfterEnter() { this.$emit('opened');
if (this.onOpened) { this.onOpened(); } }, onAfterLeave: function onAfterLeave() { this.$emit('closed'); }, genIcon: function genIcon() { var h = this.$createElement; var icon = this.icon, type = this.type, iconPrefix = this.iconPrefix, loadingType = this.loadingType; var hasIcon = icon || type === 'success' || type === 'fail';
if (hasIcon) { return h(_icon.default, { "class": bem('icon'), "attrs": { "classPrefix": iconPrefix, "name": icon || type } }); }
if (type === 'loading') { return h(_loading.default, { "class": bem('loading'), "attrs": { "type": loadingType } }); } }, genMessage: function genMessage() { var h = this.$createElement; var type = this.type, message = this.message;
if (!(0, _utils.isDef)(message) || message === '') { return; }
if (type === 'html') { return h("div", { "class": bem('text'), "domProps": { "innerHTML": message } }); }
return h("div", { "class": bem('text') }, [message]); } }, render: function render() { var _ref;
var h = arguments[0]; return h("transition", { "attrs": { "name": this.transition }, "on": { "afterEnter": this.onAfterEnter, "afterLeave": this.onAfterLeave } }, [h("div", { "directives": [{ name: "show", value: this.value }], "class": [bem([this.position, (_ref = {}, _ref[this.type] = !this.icon, _ref)]), this.className], "on": { "click": this.onClick } }, [this.genIcon(), this.genMessage()])]); } });
exports.default = _default;
/***/ }), /* 171 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.lockClick = lockClick; var lockCount = 0;
function lockClick(lock) { if (lock) { if (!lockCount) { document.body.classList.add('van-toast--unclickable'); }
lockCount++; } else { lockCount--;
if (!lockCount) { document.body.classList.remove('van-toast--unclickable'); } } }
/***/ }), /* 172 */, /* 173 */, /* 174 */, /* 175 */, /* 176 */, /* 177 */, /* 178 */, /* 179 */, /* 180 */, /* 181 */, /* 182 */, /* 183 */, /* 184 */, /* 185 */, /* 186 */, /* 187 */, /* 188 */, /* 189 */, /* 190 */, /* 191 */, /* 192 */, /* 193 */, /* 194 */, /* 195 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(1);
exports.__esModule = true; exports.default = void 0;
var _raf = __webpack_require__(86);
var _date = __webpack_require__(168);
var _scroll = __webpack_require__(53);
var _utils = __webpack_require__(169);
var _popup = _interopRequireDefault(__webpack_require__(93));
var _button = _interopRequireDefault(__webpack_require__(138));
var _toast = _interopRequireDefault(__webpack_require__(149));
var _Month = _interopRequireDefault(__webpack_require__(281));
var _Header = _interopRequireDefault(__webpack_require__(282));
// Utils
// Components
var _default2 = (0, _utils.createComponent)({ props: { title: String, color: String, value: Boolean, readonly: Boolean, formatter: Function, rowHeight: [Number, String], confirmText: String, rangePrompt: String, defaultDate: [Date, Array], getContainer: [String, Function], allowSameDay: Boolean, confirmDisabledText: String, type: { type: String, default: 'single' }, round: { type: Boolean, default: true }, position: { type: String, default: 'bottom' }, poppable: { type: Boolean, default: true }, maxRange: { type: [Number, String], default: null }, lazyRender: { type: Boolean, default: true }, showMark: { type: Boolean, default: true }, showTitle: { type: Boolean, default: true }, showConfirm: { type: Boolean, default: true }, showSubtitle: { type: Boolean, default: true }, closeOnPopstate: { type: Boolean, default: true }, closeOnClickOverlay: { type: Boolean, default: true }, safeAreaInsetBottom: { type: Boolean, default: true }, minDate: { type: Date, validator: _date.isDate, default: function _default() { return new Date(); } }, maxDate: { type: Date, validator: _date.isDate, default: function _default() { var now = new Date(); return new Date(now.getFullYear(), now.getMonth() + 6, now.getDate()); } }, firstDayOfWeek: { type: [Number, String], default: 0, validator: function validator(val) { return val >= 0 && val <= 6; } } }, data: function data() { return { subtitle: '', currentDate: this.getInitialDate() }; }, computed: { months: function months() { var months = []; var cursor = new Date(this.minDate); cursor.setDate(1);
do { months.push(new Date(cursor)); cursor.setMonth(cursor.getMonth() + 1); } while ((0, _utils.compareMonth)(cursor, this.maxDate) !== 1);
return months; }, buttonDisabled: function buttonDisabled() { var type = this.type, currentDate = this.currentDate;
if (currentDate) { if (type === 'range') { return !currentDate[0] || !currentDate[1]; }
if (type === 'multiple') { return !currentDate.length; } }
return !currentDate; }, dayOffset: function dayOffset() { return this.firstDayOfWeek ? this.firstDayOfWeek % 7 : 0; } }, watch: { type: 'reset', value: 'init', defaultDate: function defaultDate(val) { this.currentDate = val; this.scrollIntoView(); } }, mounted: function mounted() { this.init(); },
/* istanbul ignore next */ activated: function activated() { this.init(); }, methods: { // @exposed-api
reset: function reset() { this.currentDate = this.getInitialDate(); this.scrollIntoView(); }, init: function init() { var _this = this;
if (this.poppable && !this.value) { return; }
this.$nextTick(function () { // add Math.floor to avoid decimal height issues
// https://github.com/youzan/vant/issues/5640
_this.bodyHeight = Math.floor(_this.$refs.body.getBoundingClientRect().height);
_this.onScroll();
_this.scrollIntoView(); }); }, // @exposed-api
scrollToDate: function scrollToDate(targetDate) { var _this2 = this;
(0, _raf.raf)(function () { var displayed = _this2.value || !_this2.poppable; /* istanbul ignore if */
if (!targetDate || !displayed) { return; }
_this2.months.some(function (month, index) { if ((0, _utils.compareMonth)(month, targetDate) === 0) { var _this2$$refs = _this2.$refs, body = _this2$$refs.body, months = _this2$$refs.months; months[index].scrollIntoView(body); return true; }
return false; }); }); }, // scroll to current month
scrollIntoView: function scrollIntoView() { var currentDate = this.currentDate;
if (currentDate) { var targetDate = this.type === 'single' ? currentDate : currentDate[0]; this.scrollToDate(targetDate); } }, getInitialDate: function getInitialDate() { var type = this.type, minDate = this.minDate, maxDate = this.maxDate, defaultDate = this.defaultDate;
if (defaultDate === null) { return defaultDate; }
var defaultVal = new Date();
if ((0, _utils.compareDay)(defaultVal, minDate) === -1) { defaultVal = minDate; } else if ((0, _utils.compareDay)(defaultVal, maxDate) === 1) { defaultVal = maxDate; }
if (type === 'range') { var _ref = defaultDate || [], startDay = _ref[0], endDay = _ref[1];
return [startDay || defaultVal, endDay || (0, _utils.getNextDay)(defaultVal)]; }
if (type === 'multiple') { return defaultDate || [defaultVal]; }
return defaultDate || defaultVal; }, // calculate the position of the elements
// and find the elements that needs to be rendered
onScroll: function onScroll() { var _this$$refs = this.$refs, body = _this$$refs.body, months = _this$$refs.months; var top = (0, _scroll.getScrollTop)(body); var bottom = top + this.bodyHeight; var heights = months.map(function (item) { return item.getHeight(); }); var heightSum = heights.reduce(function (a, b) { return a + b; }, 0); // iOS scroll bounce may exceed the range
if (bottom > heightSum && top > 0) { return; }
var height = 0; var currentMonth; var visibleRange = [-1, -1];
for (var i = 0; i < months.length; i++) { var visible = height <= bottom && height + heights[i] >= top;
if (visible) { visibleRange[1] = i;
if (!currentMonth) { currentMonth = months[i]; visibleRange[0] = i; }
if (!months[i].showed) { months[i].showed = true; this.$emit('month-show', { date: months[i].date, title: months[i].title }); } }
height += heights[i]; }
months.forEach(function (month, index) { month.visible = index >= visibleRange[0] - 1 && index <= visibleRange[1] + 1; }); /* istanbul ignore else */
if (currentMonth) { this.subtitle = currentMonth.title; } }, onClickDay: function onClickDay(item) { if (this.readonly) { return; }
var date = item.date; var type = this.type, currentDate = this.currentDate;
if (type === 'range') { if (!currentDate) { this.select([date, null]); return; }
var startDay = currentDate[0], endDay = currentDate[1];
if (startDay && !endDay) { var compareToStart = (0, _utils.compareDay)(date, startDay);
if (compareToStart === 1) { this.select([startDay, date], true); } else if (compareToStart === -1) { this.select([date, null]); } else if (this.allowSameDay) { this.select([date, date], true); } } else { this.select([date, null]); } } else if (type === 'multiple') { if (!currentDate) { this.select([date]); return; }
var selectedIndex; var selected = this.currentDate.some(function (dateItem, index) { var equal = (0, _utils.compareDay)(dateItem, date) === 0;
if (equal) { selectedIndex = index; }
return equal; });
if (selected) { var _currentDate$splice = currentDate.splice(selectedIndex, 1), unselectedDate = _currentDate$splice[0];
this.$emit('unselect', (0, _utils.copyDate)(unselectedDate)); } else if (this.maxRange && currentDate.length >= this.maxRange) { (0, _toast.default)(this.rangePrompt || (0, _utils.t)('rangePrompt', this.maxRange)); } else { this.select([].concat(currentDate, [date])); } } else { this.select(date, true); } }, togglePopup: function togglePopup(val) { this.$emit('input', val); }, select: function select(date, complete) { var _this3 = this;
var emit = function emit(date) { _this3.currentDate = date;
_this3.$emit('select', (0, _utils.copyDates)(_this3.currentDate)); };
if (complete && this.type === 'range') { var valid = this.checkRange(date);
if (!valid) { // auto selected to max range if showConfirm
if (this.showConfirm) { emit([date[0], (0, _utils.getDayByOffset)(date[0], this.maxRange - 1)]); } else { emit(date); }
return; } }
emit(date);
if (complete && !this.showConfirm) { this.onConfirm(); } }, checkRange: function checkRange(date) { var maxRange = this.maxRange, rangePrompt = this.rangePrompt;
if (maxRange && (0, _utils.calcDateNum)(date) > maxRange) { (0, _toast.default)(rangePrompt || (0, _utils.t)('rangePrompt', maxRange)); return false; }
return true; }, onConfirm: function onConfirm() { this.$emit('confirm', (0, _utils.copyDates)(this.currentDate)); }, genMonth: function genMonth(date, index) { var h = this.$createElement; var showMonthTitle = index !== 0 || !this.showSubtitle; return h(_Month.default, { "ref": "months", "refInFor": true, "attrs": { "date": date, "type": this.type, "color": this.color, "minDate": this.minDate, "maxDate": this.maxDate, "showMark": this.showMark, "formatter": this.formatter, "rowHeight": this.rowHeight, "lazyRender": this.lazyRender, "currentDate": this.currentDate, "showSubtitle": this.showSubtitle, "allowSameDay": this.allowSameDay, "showMonthTitle": showMonthTitle, "firstDayOfWeek": this.dayOffset }, "on": { "click": this.onClickDay } }); }, genFooterContent: function genFooterContent() { var h = this.$createElement; var slot = this.slots('footer');
if (slot) { return slot; }
if (this.showConfirm) { var text = this.buttonDisabled ? this.confirmDisabledText : this.confirmText; return h(_button.default, { "attrs": { "round": true, "block": true, "type": "danger", "color": this.color, "disabled": this.buttonDisabled, "nativeType": "button" }, "class": (0, _utils.bem)('confirm'), "on": { "click": this.onConfirm } }, [text || (0, _utils.t)('confirm')]); } }, genFooter: function genFooter() { var h = this.$createElement; return h("div", { "class": (0, _utils.bem)('footer', { unfit: !this.safeAreaInsetBottom }) }, [this.genFooterContent()]); }, genCalendar: function genCalendar() { var _this4 = this;
var h = this.$createElement; return h("div", { "class": (0, _utils.bem)() }, [h(_Header.default, { "attrs": { "title": this.title, "showTitle": this.showTitle, "subtitle": this.subtitle, "showSubtitle": this.showSubtitle, "firstDayOfWeek": this.dayOffset }, "scopedSlots": { title: function title() { return _this4.slots('title'); } } }), h("div", { "ref": "body", "class": (0, _utils.bem)('body'), "on": { "scroll": this.onScroll } }, [this.months.map(this.genMonth)]), this.genFooter()]); } }, render: function render() { var _this5 = this;
var h = arguments[0];
if (this.poppable) { var _attrs;
var createListener = function createListener(name) { return function () { return _this5.$emit(name); }; };
return h(_popup.default, { "attrs": (_attrs = { "round": true, "value": this.value }, _attrs["round"] = this.round, _attrs["position"] = this.position, _attrs["closeable"] = this.showTitle || this.showSubtitle, _attrs["getContainer"] = this.getContainer, _attrs["closeOnPopstate"] = this.closeOnPopstate, _attrs["closeOnClickOverlay"] = this.closeOnClickOverlay, _attrs), "class": (0, _utils.bem)('popup'), "on": { "input": this.togglePopup, "open": createListener('open'), "opened": createListener('opened'), "close": createListener('close'), "closed": createListener('closed') } }, [this.genCalendar()]); }
return this.genCalendar(); } });
exports.default = _default2;
/***/ }), /* 196 */, /* 197 */, /* 198 */, /* 199 */, /* 200 */, /* 201 */, /* 202 */, /* 203 */, /* 204 */, /* 205 */, /* 206 */, /* 207 */, /* 208 */, /* 209 */, /* 210 */, /* 211 */, /* 212 */, /* 213 */, /* 214 */, /* 215 */, /* 216 */, /* 217 */, /* 218 */, /* 219 */, /* 220 */, /* 221 */, /* 222 */, /* 223 */, /* 224 */, /* 225 */, /* 226 */, /* 227 */, /* 228 */, /* 229 */, /* 230 */, /* 231 */, /* 232 */, /* 233 */, /* 234 */, /* 235 */, /* 236 */, /* 237 */, /* 238 */, /* 239 */, /* 240 */, /* 241 */, /* 242 */, /* 243 */, /* 244 */, /* 245 */, /* 246 */, /* 247 */, /* 248 */, /* 249 */, /* 250 */, /* 251 */, /* 252 */, /* 253 */, /* 254 */, /* 255 */, /* 256 */, /* 257 */, /* 258 */, /* 259 */, /* 260 */, /* 261 */, /* 262 */, /* 263 */, /* 264 */, /* 265 */, /* 266 */, /* 267 */, /* 268 */, /* 269 */, /* 270 */, /* 271 */, /* 272 */, /* 273 */, /* 274 */, /* 275 */, /* 276 */, /* 277 */ /***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _tisdesign_m_lib_calendar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(195); /* harmony import */ var _tisdesign_m_lib_calendar__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tisdesign_m_lib_calendar__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _tisdesign_m_lib_calendar_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(278); /* harmony import */ var _tisdesign_m_lib_calendar_style__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_tisdesign_m_lib_calendar_style__WEBPACK_IMPORTED_MODULE_1__);
_tisdesign_m_lib_calendar__WEBPACK_IMPORTED_MODULE_0___default.a.name = 'm-calendar';
/* harmony default export */ __webpack_exports__["default"] = (_tisdesign_m_lib_calendar__WEBPACK_IMPORTED_MODULE_0___default.a);
/***/ }), /* 278 */ /***/ (function(module, exports, __webpack_require__) {
__webpack_require__(22); __webpack_require__(79); __webpack_require__(41); __webpack_require__(45); __webpack_require__(82); __webpack_require__(73); __webpack_require__(164); __webpack_require__(166); __webpack_require__(279);
/***/ }), /* 279 */ /***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(280);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform; var insertInto;
var options = {"hmr":true}
options.transform = transform options.insertInto = undefined;
var update = __webpack_require__(6)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }), /* 280 */ /***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(5)(false); // Module
exports.push([module.i, ".van-calendar{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;height:100%;background-color:#fff}.van-calendar__popup.van-popup--bottom,.van-calendar__popup.van-popup--top{height:80%}.van-calendar__popup.van-popup--left,.van-calendar__popup.van-popup--right{height:100%}.van-calendar__popup .van-popup__close-icon{top:11px}.van-calendar__header{-webkit-flex-shrink:0;flex-shrink:0;box-shadow:0 2px 10px rgba(125,126,128,.16)}.van-calendar__header-subtitle,.van-calendar__header-title,.van-calendar__month-title{height:44px;font-weight:500;line-height:44px;text-align:center}.van-calendar__header-title{font-size:16px}.van-calendar__header-subtitle{font-size:14px}.van-calendar__month-title{font-size:14px}.van-calendar__weekdays{display:-webkit-box;display:-webkit-flex;display:flex}.van-calendar__weekday{-webkit-box-flex:1;-webkit-flex:1;flex:1;font-size:12px;line-height:30px;text-align:center}.van-calendar__body{-webkit-box-flex:1;-webkit-flex:1;flex:1;overflow:auto;-webkit-overflow-scrolling:touch}.van-calendar__days{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-user-select:none;user-select:none}.van-calendar__month-mark{position:absolute;top:50%;left:50%;z-index:0;color:rgba(242,243,245,.8);font-size:160px;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);pointer-events:none}.van-calendar__day,.van-calendar__selected-day{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;text-align:center}.van-calendar__day{position:relative;width:14.285%;height:64px;font-size:16px;cursor:pointer}.van-calendar__day--end,.van-calendar__day--multiple-middle,.van-calendar__day--multiple-selected,.van-calendar__day--start,.van-calendar__day--start-end{color:#fff;background-color:#ffce6d}.van-calendar__day--start{border-radius:4px 0 0 4px}.van-calendar__day--end{border-radius:0 4px 4px 0}.van-calendar__day--multiple-selected,.van-calendar__day--start-end{border-radius:4px}.van-calendar__day--middle{color:#ffce6d}.van-calendar__day--middle::after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:currentColor;opacity:.1;content:''}.van-calendar__day--disabled{color:#c8c9cc;cursor:default}.van-calendar__bottom-info,.van-calendar__top-info{position:absolute;right:0;left:0;font-size:10px;line-height:14px}@media (max-width:350px){.van-calendar__bottom-info,.van-calendar__top-info{font-size:9px}}.van-calendar__top-info{top:6px}.van-calendar__bottom-info{bottom:6px}.van-calendar__selected-day{width:54px;height:54px;color:#fff;background-color:#ffce6d;border-radius:4px}.van-calendar__footer{-webkit-flex-shrink:0;flex-shrink:0;padding:0 16px;padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.van-calendar__footer--unfit{padding-bottom:0}.van-calendar__confirm{height:36px;margin:7px 0}", ""]);
/***/ }), /* 281 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.default = void 0;
var _utils = __webpack_require__(0);
var _scroll = __webpack_require__(53);
var _utils2 = __webpack_require__(169);
var _utils3 = __webpack_require__(146);
var _createNamespace = (0, _utils.createNamespace)('calendar-month'), createComponent = _createNamespace[0];
var _default = createComponent({ props: { date: Date, type: String, color: String, minDate: Date, maxDate: Date, showMark: Boolean, rowHeight: [Number, String], formatter: Function, lazyRender: Boolean, currentDate: [Date, Array], allowSameDay: Boolean, showSubtitle: Boolean, showMonthTitle: Boolean, firstDayOfWeek: Number }, data: function data() { return { visible: false }; }, computed: { title: function title() { return (0, _utils2.formatMonthTitle)(this.date); }, rowHeightWithUnit: function rowHeightWithUnit() { return (0, _utils.addUnit)(this.rowHeight); }, offset: function offset() { var firstDayOfWeek = this.firstDayOfWeek; var realDay = this.date.getDay();
if (!firstDayOfWeek) { return realDay; }
return (realDay + 7 - this.firstDayOfWeek) % 7; }, totalDay: function totalDay() { return (0, _utils3.getMonthEndDay)(this.date.getFullYear(), this.date.getMonth() + 1); }, shouldRender: function shouldRender() { return this.visible || !this.lazyRender; }, placeholders: function placeholders() { var rows = []; var count = Math.ceil((this.totalDay + this.offset) / 7);
for (var day = 1; day <= count; day++) { rows.push({ type: 'placeholder' }); }
return rows; }, days: function days() { var days = []; var year = this.date.getFullYear(); var month = this.date.getMonth();
for (var day = 1; day <= this.totalDay; day++) { var date = new Date(year, month, day); var type = this.getDayType(date); var config = { date: date, type: type, text: day, bottomInfo: this.getBottomInfo(type) };
if (this.formatter) { config = this.formatter(config); }
days.push(config); }
return days; } }, methods: { getHeight: function getHeight() { if (!this.height) { this.height = this.$el.getBoundingClientRect().height; }
return this.height; }, scrollIntoView: function scrollIntoView(body) { var _this$$refs = this.$refs, days = _this$$refs.days, month = _this$$refs.month; var el = this.showSubtitle ? days : month; var scrollTop = el.getBoundingClientRect().top - body.getBoundingClientRect().top + body.scrollTop; (0, _scroll.setScrollTop)(body, scrollTop); }, getMultipleDayType: function getMultipleDayType(day) { var _this = this;
var isSelected = function isSelected(date) { return _this.currentDate.some(function (item) { return (0, _utils2.compareDay)(item, date) === 0; }); };
if (isSelected(day)) { var prevDay = (0, _utils2.getPrevDay)(day); var nextDay = (0, _utils2.getNextDay)(day); var prevSelected = isSelected(prevDay); var nextSelected = isSelected(nextDay);
if (prevSelected && nextSelected) { return 'multiple-middle'; }
if (prevSelected) { return 'end'; }
return nextSelected ? 'start' : 'multiple-selected'; }
return ''; }, getRangeDayType: function getRangeDayType(day) { var _this$currentDate = this.currentDate, startDay = _this$currentDate[0], endDay = _this$currentDate[1];
if (!startDay) { return ''; }
var compareToStart = (0, _utils2.compareDay)(day, startDay);
if (!endDay) { return compareToStart === 0 ? 'start' : ''; }
var compareToEnd = (0, _utils2.compareDay)(day, endDay);
if (compareToStart === 0 && compareToEnd === 0 && this.allowSameDay) { return 'start-end'; }
if (compareToStart === 0) { return 'start'; }
if (compareToEnd === 0) { return 'end'; }
if (compareToStart > 0 && compareToEnd < 0) { return 'middle'; } }, getDayType: function getDayType(day) { var type = this.type, minDate = this.minDate, maxDate = this.maxDate, currentDate = this.currentDate;
if ((0, _utils2.compareDay)(day, minDate) < 0 || (0, _utils2.compareDay)(day, maxDate) > 0) { return 'disabled'; }
if (currentDate === null) { return; }
if (type === 'single') { return (0, _utils2.compareDay)(day, currentDate) === 0 ? 'selected' : ''; }
if (type === 'multiple') { return this.getMultipleDayType(day); } /* istanbul ignore else */
if (type === 'range') { return this.getRangeDayType(day); } }, getBottomInfo: function getBottomInfo(type) { if (this.type === 'range') { if (type === 'start' || type === 'end') { return (0, _utils2.t)(type); }
if (type === 'start-end') { return (0, _utils2.t)('startEnd'); } } }, getDayStyle: function getDayStyle(type, index) { var style = { height: this.rowHeightWithUnit };
if (type === 'placeholder') { style.width = '100%'; return style; }
if (index === 0) { style.marginLeft = 100 * this.offset / 7 + "%"; }
if (this.color) { if (type === 'start' || type === 'end' || type === 'start-end' || type === 'multiple-selected' || type === 'multiple-middle') { style.background = this.color; } else if (type === 'middle') { style.color = this.color; } }
return style; }, genTitle: function genTitle() { var h = this.$createElement;
if (this.showMonthTitle) { return h("div", { "class": (0, _utils2.bem)('month-title') }, [this.title]); } }, genMark: function genMark() { var h = this.$createElement;
if (this.showMark && this.shouldRender) { return h("div", { "class": (0, _utils2.bem)('month-mark') }, [this.date.getMonth() + 1]); } }, genDays: function genDays() { var h = this.$createElement; var days = this.shouldRender ? this.days : this.placeholders; return h("div", { "ref": "days", "attrs": { "role": "grid" }, "class": (0, _utils2.bem)('days') }, [this.genMark(), days.map(this.genDay)]); }, genDay: function genDay(item, index) { var _this2 = this;
var h = this.$createElement; var type = item.type, topInfo = item.topInfo, bottomInfo = item.bottomInfo; var style = this.getDayStyle(type, index); var disabled = type === 'disabled';
var onClick = function onClick() { if (!disabled) { _this2.$emit('click', item); } };
var TopInfo = topInfo && h("div", { "class": (0, _utils2.bem)('top-info') }, [topInfo]); var BottomInfo = bottomInfo && h("div", { "class": (0, _utils2.bem)('bottom-info') }, [bottomInfo]);
if (type === 'selected') { return h("div", { "attrs": { "role": "gridcell", "tabindex": -1 }, "style": style, "class": [(0, _utils2.bem)('day'), item.className], "on": { "click": onClick } }, [h("div", { "class": (0, _utils2.bem)('selected-day'), "style": { width: this.rowHeightWithUnit, height: this.rowHeightWithUnit, background: this.color } }, [TopInfo, item.text, BottomInfo])]); }
return h("div", { "attrs": { "role": "gridcell", "tabindex": disabled ? null : -1 }, "style": style, "class": [(0, _utils2.bem)('day', type), item.className], "on": { "click": onClick } }, [TopInfo, item.text, BottomInfo]); } }, render: function render() { var h = arguments[0]; return h("div", { "class": (0, _utils2.bem)('month'), "ref": "month" }, [this.genTitle(), this.genDays()]); } });
exports.default = _default;
/***/ }), /* 282 */ /***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true; exports.default = void 0;
var _utils = __webpack_require__(0);
var _utils2 = __webpack_require__(169);
var _createNamespace = (0, _utils.createNamespace)('calendar-header'), createComponent = _createNamespace[0];
var _default = createComponent({ props: { title: String, subtitle: String, showTitle: Boolean, showSubtitle: Boolean, firstDayOfWeek: Number }, methods: { genTitle: function genTitle() { var h = this.$createElement;
if (this.showTitle) { var title = this.slots('title') || this.title || (0, _utils2.t)('title'); return h("div", { "class": (0, _utils2.bem)('header-title') }, [title]); } }, genSubtitle: function genSubtitle() { var h = this.$createElement;
if (this.showSubtitle) { return h("div", { "class": (0, _utils2.bem)('header-subtitle') }, [this.subtitle]); } }, genWeekDays: function genWeekDays() { var h = this.$createElement; var weekdays = (0, _utils2.t)('weekdays'); var firstDayOfWeek = this.firstDayOfWeek; var renderWeekDays = [].concat(weekdays.slice(firstDayOfWeek, 7), weekdays.slice(0, firstDayOfWeek)); return h("div", { "class": (0, _utils2.bem)('weekdays') }, [renderWeekDays.map(function (item) { return h("span", { "class": (0, _utils2.bem)('weekday') }, [item]); })]); } }, render: function render() { var h = arguments[0]; return h("div", { "class": (0, _utils2.bem)('header') }, [this.genTitle(), this.genSubtitle(), this.genWeekDays()]); } });
exports.default = _default;
/***/ }) /******/ ]);
|